-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve(NetworkUtils): add chainIsL1Function #682
Conversation
Signed-off-by: bennett <bennett@umaproject.org>
wdyt about just checking for the existence of tryMulticall in the contract interface? I think something like that is still needed (or alternatively a check to verify that the target address is a SpokePool), and in the case of mainnet we still need to distinguish between Hub and Spoke, so I'm not sure how knowing whether the chain is mainnet is helpful. |
The issue with this is that we get the contract interface from I am adding a function to determine if a contract is a hub pool or spoke pool, but this will be in across-protocol/relayer#1466. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should include the version bump before merging.
Signed-off-by: bennett <bennett@umaproject.org>
Signed-off-by: bennett <bennett@umaproject.org>
I don't need this in now, so I'm actually going to just wait until this gets merged in, so that version bump will include this as well. #683 |
As we begin to introduce
tryMulticall
into the relayer, theMulticallerClient
will need to be aware of whether it is calling a spoke pool or hub pool contract (to determine whether it can even calltryMulticall
). One approach is to first check if the contract's chain ID we are calling is one which has a hub pool implementation. It would be ideal to introduce this code into the sdk, where there already exists a set of functions which performs similar checks with our other chain IDs.