-
Notifications
You must be signed in to change notification settings - Fork 54
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
fix(Dataworker): Cannot fund DonationBox using MulticallerClient #1975
base: master
Are you sure you want to change the base?
Conversation
The MulticallerClient has [logic](https://github.com/across-protocol/relayer/blob/40b0c7971a3548a0499e7fc5990d150437c527fb/src/clients/MultiCallerClient.ts#L361) that batches transactions together and attempts to `multicall()` them. This works normally with the `HubPool` and `SpokePool` which extend the `Multicaller()` interface. However, we can't use this logic to make calls on ERC20's like we are doing to fund the `DonationBox`. Instead, we either need to update the `MulticallerClient` to handle cases where transactions are not multicall-able, or we can send these transactions to the `TransactionClient`. In this PR, I added a new method `simulateAndSubmit` to the `TransactionClient` that the Dataworker uses to `transfer` custom gas tokens to the DonationBox.
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.
lgtm!
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.
One minor question.
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.
one comment otherwise lgtm
The MulticallerClient has logic that batches transactions together and attempts to
multicall()
them. This works normally with theHubPool
andSpokePool
which extend theMulticaller()
interface.However, we can't use this logic to make calls on ERC20's like we are doing to fund the
DonationBox
. Instead, we either need to update theMulticallerClient
to handle cases where transactions are not multicall-able, or we can send these transactions to theTransactionClient
.In this PR, I added a new method
simulateAndSubmit
to theTransactionClient
that the Dataworker uses totransfer
custom gas tokens to the DonationBox.