lsankar4033 / surrogeth

Tricking frontrunners into doing good
42 stars 5 forks source link

Use multicall to batch constant web3 calls in surrogeth-client #15

Open lsankar4033 opened 5 years ago

lsankar4033 commented 5 years ago

https://github.com/makerdao/multicall

Just for constant reads used by the client lib

barryWhiteHat commented 5 years ago

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

weijiekoh commented 5 years ago

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.

lsankar4033 commented 5 years ago

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

barryWhiteHat commented 5 years ago

:+1: