Skip to content

Commit

Permalink
improve(dataworker): Only use Multicall3 on Mainnet to save gas (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai authored Dec 21, 2023
1 parent d0dc4ec commit 8b140e5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/dataworker/Dataworker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,9 @@ export class Dataworker {
],
message: "Executed SlowRelayLeaf 🌿!",
mrkdwn,
unpermissioned: true,
// If mainnet, send through Multicall3 so it can be batched with PoolRebalanceLeaf executions, otherwise
// SpokePool.multicall() is fine.
unpermissioned: Number(chainId) === 1,
// If simulating mainnet execution, can fail as it may require funds to be sent from
// pool rebalance leaf.
canFailInSimulation: relayData.destinationChainId === this.clients.hubPoolClient.chainId,
Expand Down Expand Up @@ -2123,7 +2125,9 @@ export class Dataworker {
args: [rootBundleId, leaf, relayerRefundTree.getHexProof(leaf)],
message: "Executed RelayerRefundLeaf 🌿!",
mrkdwn,
unpermissioned: true,
// If mainnet, send through Multicall3 so it can be batched with PoolRebalanceLeaf executions, otherwise
// SpokePool.multicall() is fine.
unpermissioned: Number(chainId) === 1,
// If simulating mainnet execution, can fail as it may require funds to be sent from
// pool rebalance leaf.
canFailInSimulation: leaf.chainId === this.clients.hubPoolClient.chainId,
Expand Down

0 comments on commit 8b140e5

Please sign in to comment.