Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(anvil): use default gas limit if zero #3254

Merged
merged 1 commit into from Sep 17, 2022

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Sep 17, 2022

Motivation

Closes #3247

Solution

use default gasLimit if block's gaslimit is 0

@mattsse mattsse added T-bug Type: bug C-anvil Command: anvil labels Sep 17, 2022
Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait..Aurora returns u256::MAX, not zero. Is the issue in the OP that they used a wrong address for the Aurora network?

@mattsse
Copy link
Member Author

mattsse commented Sep 17, 2022

while the opcode returns max the api returns 0:

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method": "eth_getBlockByNumber", "params": ["latest", false],"id":67}' https://aurora-mainnet.infura.io/v3/3ea24ab163f04f4893a91af359d24258
{
  "jsonrpc": "2.0",
  "id": 67,
  "result": {
    "difficulty": "0x0",
    "extraData": "0x",
    "gasLimit": "0x0",
    "gasUsed": "0x0",
    "hash": "0x35735b7a24d4ddd51313e1760840e994949444e4be93cee718a9cd82fe5feb39",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "miner": "0x0000000000000000000000000000000000000000",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "nonce": "0x0000000000000000",
    "number": "0x46e6078",
    "parentHash": "0x10b0f09e0e264a719c007b382df9f3796ccd347deb6b7062ec6f833e300284c5",
    "receiptsRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x0",
    "stateRoot": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "timestamp": "0x0",
    "totalDifficulty": "0x0",
    "transactions": [],
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "uncles": []
  }
}

@gakonst gakonst merged commit 04a78b4 into foundry-rs:master Sep 17, 2022
iFrostizz pushed a commit to iFrostizz/foundry that referenced this pull request Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-anvil Command: anvil T-bug Type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Getting OutOfGas error on Aurora
3 participants