ethers-provider-flashbots-bundle icon indicating copy to clipboard operation
ethers-provider-flashbots-bundle copied to clipboard

error: 'execution reverted',

Open guojixu opened this issue 2 years ago • 7 comments

When I construct a transaction, the transaction is to send a data to my personal contract through my account. Then simulate this transaction through the eth_callBundle method of flashbots, but the response I received shows an error, so I would like to ask you to help solve the problem, or point out the reason for the error, thank you for your help. Below is my code and error message。

 const Tx = {
    to: my_contract.address,
    from: Wallet.address,
    data: Payload,
    chainId: 1,
    maxPriorityFeePerGas: 0,
    maxFeePerGas: nextBaseFee,
    gasLimit: 250000,
    nonce: nonce + 1,
    type: 2,
  };
  console.log(Tx);
  const TxSigned = await Wallet.signTransaction(Tx);
  const signedTxs = [TxSigned];
  const simulatedResp = await callBundleFlashbots(signedTxs, targetBlockNumber);

the response is :

simulatedResp {
  bundleGasPrice: '816000544',
  bundleHash: '0x6114e885fcf513af79cdcd72ba3192eff297fc58772f6681b022a83594fbca43',
  coinbaseDiff: '128523349703840',
  ethSentToCoinbase: '0',
  gasFees: '128523349703840',
  results: [
    {
      coinbaseDiff: '0',
      error: 'execution reverted',
      ethSentToCoinbase: '0',
      fromAddress: '0x446E90CDd028cBDf8aCcd47C2C3AD50F585C2e15',
      gasFees: '0',
      gasPrice: '0',
      gasUsed: 28155,
      revert: '\x00\x00\x00',
      toAddress: '0x35e456AE04D641F2c13c52C7e637645CE92c293c',
      txHash: '0xe78add5bc73e08ad291b8eafb77cff3b8f900264edf54e619fdb7a84eebd4d3c'
    }
 ]
}

guojixu avatar May 09 '22 18:05 guojixu

This seems like a standard transaction failure with a single transaction. There's a null revert message, you could deploy the contract with expressive require statements (like require(msg.value % 2 == 0, "Even value required."); . I imagine your Payload doesn't correspond to calldata that succeeds on that contract (or expects value). You could use a tool like Tenderly to simulate and see where the actual failure is, but i do not believe this is a failure on the Flashbots side.

epheph avatar Jun 29 '22 21:06 epheph

hey i have same error ! did you solve it

ahmediblao1 avatar Aug 30 '22 16:08 ahmediblao1

Fix your transaction. If you take that exact transaction and send it to ethereum, it will also fail. Flashbots is just telling you about the failure before you send it.

epheph avatar Aug 30 '22 17:08 epheph

ye i did that! but now The step to transfer in Eth is working. The step to move the NFT isn't working..

ahmediblao1 avatar Aug 30 '22 17:08 ahmediblao1

{ transaction: tx({ to: '0x377A825a415A6ee3Fdf3c65d80b26E9279650bef', gasLimit: 73294, data: '0x42842e0e000000000000000000000000eeda7a919871689fe103655062123a9f78338d99000000000000000000000000eeda7a919871689fe103655062123a9f78338d9900000000000000000000000000000000000000000000000000000000000000d5' }), signer: compromisedWallet },

i put the nft contract address in TO : value put idk where to put the save wallet address that i want the nft in

ahmediblao1 avatar Aug 30 '22 17:08 ahmediblao1

gasPrice?

epheph avatar Aug 31 '22 06:08 epheph

Base: 27 | Priority: 4

ahmediblao1 avatar Aug 31 '22 15:08 ahmediblao1