Skip to content

Commit 8f6a29a

Browse files
authored
Use multicall3 to aggregate queued payload checking across N signers (#967)
* Use multicall3 to aggregate queued payload checking across N signers * Adding contracts object to Network type to store per network contract configs for common contracts like ensUniversalResolver and multicall3 * Parallelzing fetched queued payloads and adding fallback for when multicall3 batching either fails or is not configured on the network * Add includeTestnets option to RecoverySettings, default: false so fetchingQueuedPayloads can skip testnets to reduce requests
1 parent 23cb9e9 commit 8f6a29a

4 files changed

Lines changed: 320 additions & 59 deletions

File tree

packages/services/relayer/src/relayer/rpc-relayer/index.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ const networkToChain = (network: Network.Network): Chain => {
4949
},
5050
}
5151
: undefined,
52-
contracts: network.ensAddress
53-
? {
54-
ensUniversalResolver: {
55-
address: network.ensAddress as `0x${string}`,
52+
contracts: network.contracts
53+
? Object.entries(network.contracts).reduce(
54+
(acc, [name, address]) => {
55+
acc[name] = { address }
56+
return acc
5657
},
57-
}
58+
{} as Record<string, { address: Address.Address }>,
59+
)
5860
: undefined,
5961
} as Chain
6062
}

0 commit comments

Comments
 (0)