Closed jviray closed 2 years ago
hey @jviray it's correct right now multicall doesn't batch yet. It's syntax sugar but I would like to implement https://github.com/makerdao/multicall.js directly in the fetcher.
@aboutlo awesome, I see the TO DO comment in the fetcher file about using https://github.com/Destiner/ethcall.
useDapp has a useChainCalls hook that uses MakerDao's multicall and also caches each request. Just need a easy to use fetcher (with multicall + caching) like you have here though, so I'll be looking forward to it.
There's also https://github.com/indexed-finance/multicall which enables multi-calls without needing to deploy an aggregator contract
@aboutlo awesome, I see the TO DO comment in the fetcher file about using https://github.com/Destiner/ethcall.
useDapp has a useChainCalls hook that uses MakerDao's multicall and also caches each request. Just need a easy to use fetcher (with multicall + caching) like you have here though, so I'll be looking forward to it.
There's also https://github.com/indexed-finance/multicall which enables multi-calls without needing to deploy an aggregator contract
You might be interested in the work 1inch has done with chunking requests for multicall, see https://github.com/1inch/multicall
Additionally you might find the Hughes batching system interesting for multicall usage (not the same as makerdaos) https://dl.acm.org/doi/abs/10.1145/3457337.3457839
You can create your own bespoke multicall by creating a contract interface and using that via eth_call. Arbitrium uses a similar technique I believe
hey @jviray and @sambacha have a look #18
fixed with #19
Thanks 💯
Similar to the example in the README I'm making multiple requests in one, but instead of using the same contract, I'm calling functions on different contracts (all with the same abi). Looks something like this.
Everything returns fine, but when I check the testnet logs, it's still showing 3 separate contract calls being made. Is this the expected behavior?
Maybe i'm misunderstanding the difference between "batching" and/or "multicall", but I'm tying to reduce the load on our Infura node and I want to reduce the amount of contract calls.