trufflesuite / ganache

:warning: The Truffle Suite is being sunset. For information on ongoing support, migration options and FAQs, visit the Consensys blog. Thank you for all the support over the years.

Home Page:https://consensys.io/blog/consensys-announces-the-sunset-of-truffle-and-ganache-and-new-hardhat?utm_source=github&utm_medium=referral&utm_campaign=2023_Sep_truffle-sunset-2023_announcement_

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error "Cannot mix BigInt and other types" when debugging on a forked chain

haltman-at opened this issue · comments

Likely related to: #4359. I thought about posting this just as a comment there in fact, but since they might be separate issues, I'm filing separate issues. Feel free to combine these if appropriate.

Here's another transaction that causes Ganache to incorrectly error when doing a debug_traceTransaction on a forked chain. However, in this case, the error response is different. Specifically, it's:

{
  id: 1687377797355,
  jsonrpc: '2.0',
  error: {
    message: 'Cannot mix BigInt and other types, use explicit conversions',
    stack: 'TypeError: Cannot mix BigInt and other types, use explicit conversions\n' +
      '    at t.calculateIntrinsicGas (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:203481)\n' +
      '    at EIP1559FeeMarketTransaction.calculateIntrinsicGas (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:204086)\n' +
      '    at EIP1559FeeMarketTransaction.calculateIntrinsicGas (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:206975)\n' +
      '    at Object.getBaseFee (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:206679)\n' +
      '    at VM._runTx (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/0.js:2:3813191)\n' +
      '    at async VM.runTx (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/0.js:2:3821314)\n' +
      '    at async Blockchain.<anonymous> (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:76082)\n' +
      '    at async Blockchain.<anonymous> (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:76291)\n' +
      '    at async Blockchain.traceTransaction (/home/sniffnoy/.nvm/versions/node/v14.21.3/lib/node_modules/ganache/dist/node/1.js:2:85688)',
    code: -32700
  }
}

The transaction this occurs with is transaction 0x84f82b79b516aa64f38797f204e09a49e821f7f9353723545dfd600e99b60955 on Sepolia, which I forked with ganache -f sepolia.

As with #4359, this error occurs both in Ganache 7.8.0 and Ganache 7.7.0, but not Ganache 7.6.0.