github.com/theQRL/go-zond@v0.2.1/cmd/zvm/testdata/9/readme.md (about)

     1  ## EIP-1559 testing
     2  
     3  This test contains testcases for EIP-1559, which uses an new transaction type and has a new block parameter. 
     4  
     5  ### Prestate
     6  
     7  The alloc portion contains one contract (`Z000000000000000000000000000000000000aaaa`), containing the 
     8  following code: `0x58585454`: `PC; PC; SLOAD; SLOAD`.
     9  
    10  Essentially, this contract does `SLOAD(0)` and `SLOAD(1)`.
    11  
    12  The alloc also contains some funds on `Z204cc644e26bdf879db422658edee62e302c3da8`. 
    13  
    14  ## Transactions
    15  
    16  The transaction invokes the contract above. 
    17  
    18  1. EIP-1559 ACL-transaction, which contains the `0x0` slot for `0xaaaa`
    19  
    20  ## Execution 
    21  
    22  Running it yields: 
    23  ```
    24  $ go run . t8n --state.fork=Shanghai --input.alloc=testdata/9/alloc.json --input.txs=testdata/9/txs.json --input.env=testdata/9/env.json --trace 2>/dev/null  && cat trace-*  | grep SLOAD
    25  {"pc":2,"op":84,"gas":"0x48c28","gasCost":"0x834","memSize":0,"stack":["0x0","0x1"],"depth":1,"refund":0,"opName":"SLOAD"}
    26  {"pc":3,"op":84,"gas":"0x483f4","gasCost":"0x64","memSize":0,"stack":["0x0","0x0"],"depth":1,"refund":0,"opName":"SLOAD"}
    27  ```
    28  
    29  We can also get the post-alloc:
    30  ```
    31  $ go run . t8n --state.fork=Shanghai --input.alloc=testdata/9/alloc.json --input.txs=testdata/9/txs.json --input.env=testdata/9/env.json --output.alloc=stdout 2>/dev/null
    32  {
    33    "alloc": {
    34      "Z000000000000000000000000000000000000aaaa": {
    35        "code": "0x58585454",
    36        "balance": "0x3",
    37        "nonce": "0x1"
    38      },
    39      "Z204cc644e26bdf879db422658edee62e302c3da8": {
    40        "balance": "0xffe6fc39d8c920",
    41        "nonce": "0x1"
    42      },
    43      "Z2adc25665018aa1fe0e6bc666dac8fc2697ff9ba": {
    44        "balance": "0xd6e0"
    45      }
    46    }
    47  }
    48  ```