Saturday, May 4, 2024

Rust pop-quiz answer: sorted domains for deployed liquidity

#Rust pop-quiz answer to representing deploying liquidity via (multiparametric) domains:

The magic that creates ./dom occurs in records.rs: https://github.com/logicalgraphs/crypto-n-rust/blob/main/src/ch11/dom/records.rs, and the magic that occurs there is that, since HashSet is not a HashMap-key, I sort the domain Vec values to ensure correct indexing of domains.




No comments:

Post a Comment