Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

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

Closed
haltman-at opened this issue Jun 21, 2023 · 0 comments · Fixed by #4455 or #4463
Closed

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

haltman-at opened this issue Jun 21, 2023 · 0 comments · Fixed by #4455 or #4463

Comments

@haltman-at
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant