simulate error code=-32000

Open
#114 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
api, blockchain

Research direction

No source files or tests are named. Start by reproducing the TypeScript snippet with FlashbotsBundleProvider.simulate and inspect the complete simulation response for error code -32000. Done means identifying the cause of this simulation error and documenting or fixing the behavior, but the issue does not define the expected result.

Written by the indexing model from the issue text.

Description

image

the code:

` const maxBaseFeeInFutureBlock = FlashbotsBundleProvider.getMaxBaseFeeInFutureBlock(block.baseFeePerGas, BLOCKS_IN_THE_FUTURE)

 //定义一个eip1559交易
const eip1559Transaction  = {
  to: '0xC1c4301C5bd4eBe2C04817aC815AaceB4DeDA8DB',
  type: 2,
  maxFeePerGas: PRIORITY_FEE.add(maxBaseFeeInFutureBlock),
  maxPriorityFeePerGas: PRIORITY_FEE,
  gasLimit: 100000,
  data: '0x',
  chainId: 5,
  value: ethers.utils.parseEther("0.1105"),
  nonce:mNonce
  
}

 



//签名绑定包
const signedTransactions = await flashbotsProvider.signBundle([
 
  {
    signer: wallet,
    transaction: eip1559Transaction
  }
])

//模拟
const targetBlockNumber = block.number + BLOCKS_IN_THE_FUTURE
const simulation = await flashbotsProvider.simulate(signedTransactions, targetBlockNumber)

// Using TypeScript discrimination
if ('error' in simulation) {
  console.warn(`Simulation Error: ${simulation.error.message}`)
  process.exit(1)
} else {
  console.log(`Simulation Success: ${JSON.stringify(simulation, null, 2)}`)
}

`

Dominant language
TypeScript
Stars
566
Forks
212
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from flashbots/ethers-provider-flashbots-bundle

All issues in flashbots/ethers-provider-flashbots-bundle

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.