Skip to content

Commit d18123e

Browse files
authored
Merge pull request #111 from DarkFlorist/micah
Adds missing `id` property on eth_callBundle JSON-RPC request.
2 parents 5d5c988 + 820902e commit d18123e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/ts/library/flashbots.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export async function simulateBundle(
128128
}
129129
case 'relay': {
130130
if (network.simulationRelayEndpoint === undefined) throw new Error('simulationRelayEndpoint is not defined')
131-
const payload = JSON.stringify({ jsonrpc: '2.0', method: 'eth_callBundle', params: [{ txs: txs.map((x) => x.rawTransaction), blockNumber: `0x${blockInfo.blockNumber.toString(16)}`, stateBlockNumber: 'latest' }] })
131+
const payload = JSON.stringify({ jsonrpc: '2.0', id: 0, method: 'eth_callBundle', params: [{ txs: txs.map((x) => x.rawTransaction), blockNumber: `0x${blockInfo.blockNumber.toString(16)}`, stateBlockNumber: 'latest' }] })
132132
const flashbotsSig = `${await provider.authSigner.getAddress()}:${await provider.authSigner.signMessage(id(payload))}`
133133
const request = await fetch(network.simulationRelayEndpoint,
134134
{ method: 'POST', body: payload, headers: { 'Content-Type': 'application/json', 'X-Flashbots-Signature': flashbotsSig } }

0 commit comments

Comments
 (0)