0xKitsune / cfmms-rs

The predecessor to `amms-rs`. CFMM lib built in Rust enabling pair syncing and swap simulation with pools on Ethereum.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement Multicall where applicable to speed up operations.

0xKitsune opened this issue · comments

Some functions that call the node (ex. Syncing, getting pool data, etc) can use a multicall to complete much faster. We should implement this where applicable. There should be an option to use the function with and without multicall, probably by passing in a optional Chain Enum (ex. Chain::Ethereum, Chain::Polygon, etc). If the value is None, it wont use the multicall. The mulicall address should be a constant value for each chain.

commented

Are there any resources you can recommend regarding mulitcalls to get started on this?