foundry icon indicating copy to clipboard operation
foundry copied to clipboard

forge can't disable EIP-1559: deserialization error: missing field `effectiveGasPrice` at line 1 column 949

Open gzliudan opened this issue 10 months ago • 7 comments

Component

Forge

Have you ensured that all of these are up to date?

  • [X] Foundry
  • [X] Foundryup

What version of Foundry are you on?

forge 0.2.0 (440ec52 2024-04-11T00:18:58.806922049Z)

What command(s) is the bug in?

forge script -vv --broadcast --legacy scripts/deploy/deploy-fiat-token.s.sol --rpc-url https://earpc.apothem.network/

Operating System

Linux

Describe the bug

[⠒] Compiling...
No files changed, compilation skipped
Script ran successfully.

== Return ==
0: contract FiatTokenV2_2 0xFee50c8Bdb3589B43ed1771C2c5aA1EF6B050909
1: contract MasterMinter 0x75F96eA6205168214185F366f51C798bF2548bE0
2: contract FiatTokenProxy 0xf661B45f9Ef7b10363491505b8dB6C7FdC0416f5

== Logs ==
  TOKEN_NAME: 'USDC'
  TOKEN_SYMBOL: 'USDC'
  TOKEN_CURRENCY: 'USD'
  TOKEN_DECIMALS: '6'
  FIAT_TOKEN_IMPLEMENTATION_ADDRESS: '0x0000000000000000000000000000000000000000'
  PROXY_ADMIN_ADDRESS: '0x85f33E1242d87a875301312BD4EbaEe8876517BA'
  MASTER_MINTER_OWNER_ADDRESS: '0xD4CE02705041F04135f1949Bc835c1Fe0885513c'
  OWNER_ADDRESS: '0xD4CE02705041F04135f1949Bc835c1Fe0885513c'
  PAUSER_ADDRESS: '0xD4CE02705041F04135f1949Bc835c1Fe0885513c'
  BLACKLISTER_ADDRESS: '0xD4CE02705041F04135f1949Bc835c1Fe0885513c'
  LOST_AND_FOUND_ADDRESS: '0xD4CE02705041F04135f1949Bc835c1Fe0885513c'

## Setting up 1 EVM.

==========================

Chain 51

Estimated gas price: 12.5 gwei

Estimated total gas used for script: 10472885

Estimated amount required: 0.1309110625 ETH

==========================
##
Sending transactions [0 - 13].
⠤ [00:00:00] [#########################################################################################################################################################################################################################################################] 14/14 txes (0.0s)##
Waiting for receipts.

Transactions saved to: /home/me/stablecoin-evm/broadcast/deploy-fiat-token.s.sol/51/run-latest.json

Sensitive values saved to: /home/me/stablecoin-evm/cache/foundry/deploy-fiat-token.s.sol/51/run-latest.json

Error:
Transaction dropped from the mempool: 0x4e14f72142063a135c3325fa04ea025f97a35829b401c03c2645cdd4af1d89fb
Transaction dropped from the mempool: 0x8374e1529915c60d0cb532157f16b59718791d6606ada814dc9043e91ac5d536
Transaction dropped from the mempool: 0x312d1eaa0e6da34a384ab12b111c21078284b10c6f248ee61b98ca58f78754c8
Transaction dropped from the mempool: 0x2aef0431710aa295ff22d036544d598d5e9449bd8d41f778fbb560108b5a7d5e
Transaction dropped from the mempool: 0x2c9159c39bccdc96ce2dcc86156e8523d4287772c87811bbf6e15f00418aeecb
Transaction dropped from the mempool: 0x6b8275c3921eb67d27a1510600fae55a27512a9e87b3c07b87af7c301f5f5e42
Transaction dropped from the mempool: 0x004c66ed23dde13ff4741bc523fb4e3b0a2edd61b8165459f0f0c57591795d78
Transaction dropped from the mempool: 0x6b468f8366b200effea62414aa20ed70a1e6b5f7a562d04d503b36d74905989a
Transaction dropped from the mempool: 0x57d6a91bf4c2c721a2dd3d04b322bee6b9229ebe3dc6118dd2135dd1aa9d7482
Transaction dropped from the mempool: 0x554f76915fa5427b5dc2c87f762a44143fc20fa5f58994aa66dc7f4685694bd7
Failure on receiving a receipt for 0x30da84834d32fdf0922dd0cdbfc465471f538a5bea8c2dcd606a1ab8c0ac7ab9:
deserialization error: missing field `effectiveGasPrice` at line 1 column 950
Failure on receiving a receipt for 0x9fed85be5300fc187885627ee3a38a594dac52cb37598d47873667231d37b0e9:
deserialization error: missing field `effectiveGasPrice` at line 1 column 950
Failure on receiving a receipt for 0xbd5311977f8f17c45a6eaec2eacd2b412d04db76375f45d9302eb479e5a3a0ce:
deserialization error: missing field `effectiveGasPrice` at line 1 column 949
Failure on receiving a receipt for 0x9a02e36c5515c7afc516b954e2933e2c7a25ec4d1c7815e1fe2ffbc5e4efe4fc:
deserialization error: missing field `effectiveGasPrice` at line 1 column 949

 Add `--resume` to your command to try and continue broadcasting
    the transactions.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

But the above transactions are success on explorer https://explorer.apothem.network/ in fact.

gzliudan avatar Apr 11 '24 23:04 gzliudan

what chain is this?

looks like their response lacks the effectiveGasPrice field

mattsse avatar Apr 11 '24 23:04 mattsse

Only EIP-1559 provide the field effectiveGasPrice. This chain does not support EIP-1559 now. So I use the argument --legacy to disable EIP-1559. The chain info as below:

  • chain id: 51
  • RPC
    • https://earpc.apothem.network/
    • https://erpc.apothem.network/
  • Faucet (notice: should replace your address's prefix from 0x to xdc when request test coin)
    • http://apothem.network/#getTestXDC
    • https://faucet.blocksscan.io/

gzliudan avatar Apr 12 '24 02:04 gzliudan

Update: I tested some versions:

Fail: Nightly (2024-04-10) https://github.com/foundry-rs/foundry/tree/nightly-460319558e455611be1de64be8364c65c6896d15
Pass: Nightly (2024-04-02) https://github.com/foundry-rs/foundry/tree/nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9
Fail: Nightly (2024-03-02) https://github.com/foundry-rs/foundry/tree/nightly-de33b6af53005037b463318d2628b5cfcaf39916
Pass: Nightly (2024-02-03) https://github.com/foundry-rs/foundry/tree/nightly-2cb875799419c907cc3709e586ece2559e6b340e

The version Nightly (2024-04-02) has no such bug.

gzliudan avatar Apr 12 '24 06:04 gzliudan

it looks like this chain does not return any gasPrice info

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xe2349747e161f04f815677129d81b6def2b369038ae6811a2c618ca5519be2f5",
        "blockNumber": "0x3af3626",
        "contractAddress": null,
        "cumulativeGasUsed": "0x15878",
        "from": "0xcb409e1a857318378137dfb42a06ae87290631ad",
        "gasUsed": "0x15878",
        "logs": [
            {
                "address": "0x8693538d5dacf77be1ac523a3a52dc5e97760a9b",
                "topics": [
                    "0x4736edcab43476194077e25fadaf13bbfb18c7db442202d616b41fd1d549dc9c",
                    "0x0000000000000000000000000000000000000000000000000de537ab0f928800",
                    "0x0000000000000000000000000000000000000000000000000000000066197bda"
                ],
                "data": "0x",
                "blockNumber": "0x3af3626",
                "transactionHash": "0x6f78fb1cee8de3045c5d3784cdab1efd6578c4f0a2d629d781bf8d9e3336cc0f",
                "transactionIndex": "0x0",
                "blockHash": "0xe2349747e161f04f815677129d81b6def2b369038ae6811a2c618ca5519be2f5",
                "logIndex": "0x0",
                "removed": false
            }
        ],
        "logsBloom": "0x00000000800000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000080000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000004000000000000000000000000400000000800",
        "status": "0x1",
        "to": "0x8693538d5dacf77be1ac523a3a52dc5e97760a9b",
        "transactionHash": "0x6f78fb1cee8de3045c5d3784cdab1efd6578c4f0a2d629d781bf8d9e3336cc0f",
        "transactionIndex": "0x0"
    }
}

mattsse avatar Apr 12 '24 18:04 mattsse

Only EIP-1559 provide the field effectiveGasPrice

effectiveGasPrice is now the standard field for gas price according to the spec

mattsse avatar Apr 12 '24 18:04 mattsse

Yo I have this same problem for sx network chain, anyways is there / what is the solution?

user2745 avatar May 11 '24 01:05 user2745

I solved this problem by switch to other versions.

gzliudan avatar May 11 '24 01:05 gzliudan

Any movement on this issue? I am having the same problem with a slightly dated custom chain.

sandybradley avatar Sep 01 '24 16:09 sandybradley

Any movement on this issue? I am having the same problem with a slightly dated custom chain.

it looks like it's being moved to a v1 milestone for forge. I'll continue to monitor this

user2745 avatar Sep 10 '24 02:09 user2745