diff --git a/app/ts/components/Settings.tsx b/app/ts/components/Settings.tsx index 174a39f..0970a9e 100644 --- a/app/ts/components/Settings.tsx +++ b/app/ts/components/Settings.tsx @@ -115,7 +115,7 @@ export const SettingsModal = ({ display, appSettings }: { display: Signal) => validateSimulationRelayEndpointInput(e.currentTarget.value)} value={simulationRelayEndpointInput.value.value} type='text' className='bg-transparent outline-none placeholder:text-gray-600' placeholder='https://' />
- Bundle Submit Relay URL + Bundle Submission Relay URL ) => validateAndSetSubmissionRelayEndpointInput(e.currentTarget.value)} value={submissionRelayEndpointInput.value.value} type='text' className='bg-transparent outline-none placeholder:text-gray-600' placeholder='https://' />
diff --git a/app/ts/library/flashbots.ts b/app/ts/library/flashbots.ts index 141d19f..b27d0ff 100644 --- a/app/ts/library/flashbots.ts +++ b/app/ts/library/flashbots.ts @@ -94,6 +94,7 @@ export async function simulateBundle( } } +let bundleId = 1 export async function sendBundle(bundle: Bundle, targetBlock: bigint, fundingAmountMin: bigint, provider: ProviderStore, signers: Signers, blockInfo: BlockInfo, appSettings: AppSettings) { if (appSettings.blocksInFuture <= 0n) throw new Error('Blocks in future is negative or zero') @@ -105,7 +106,12 @@ export async function sendBundle(bundle: Bundle, targetBlock: bigint, fundingAmo maxBaseFee, ) - const payload = JSON.stringify({ jsonrpc: '2.0', method: 'eth_sendBundle', params: [{ txs, blockNumber: `0x${targetBlock.toString(16)}`, revertingTxHashes: [] }] }) + const payload = JSON.stringify({ + jsonrpc: '2.0', + method: 'eth_sendBundle', + id: bundleId++, + params: [{ txs, blockNumber: `0x${targetBlock.toString(16)}`, revertingTxHashes: [] }] + }) const flashbotsSig = `${await provider.authSigner.getAddress()}:${await provider.authSigner.signMessage(id(payload))}` const request = await fetch(appSettings.submissionRelayEndpoint, { method: 'POST', body: payload, headers: { 'Content-Type': 'application/json', 'X-Flashbots-Signature': flashbotsSig } }