surrogeth icon indicating copy to clipboard operation
surrogeth copied to clipboard

Use multicall to batch constant web3 calls in surrogeth-client

Open lsankar4033 opened this issue 5 years ago • 4 comments

https://github.com/makerdao/multicall

Just for constant reads used by the client lib

lsankar4033 avatar Sep 26 '19 22:09 lsankar4033

I belive this will make the transaction simulation more difficult. Imagine i am monirotring the tx pool to see if you have repriced any trnasactions. Without this change I would only need to simulate every transaction that calls 0xrelayer but after this change i would have no way of knowing which transactions eventually call the relayRegistry and i wont know which transactions to simulate unless i do some more advanced analysis

barryWhiteHat avatar Sep 26 '19 22:09 barryWhiteHat

Ah, this isn't about transaction simulation, but for clients (like UIs) to aggregate calls to the registry contract. e.g. instead of making one call per relayerId to get a list of relayerAddress, this library combines all these calls into one which returns an array.

weijiekoh avatar Sep 26 '19 23:09 weijiekoh

yep, as @weijiekoh mentioned, this is just for reads (not tx-creating methods)

lsankar4033 avatar Sep 27 '19 03:09 lsankar4033

:+1:

barryWhiteHat avatar Sep 27 '19 09:09 barryWhiteHat