Skip to content

Commit

Permalink
fix refundReset
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Mar 7, 2023
1 parent 5ec0527 commit 8f9291c
Showing 1 changed file with 45 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,51 @@ refundReset:

expect:
- network:
- '>=London'
- '>=Shanghai'
result:
0x000000000000000000000000000000000000DA7A:
storage:
# Block 1, just checking the algorithm
0x0101: 0x40ac90 # Filling previously unfilled storage
0x0102: 0x16ec70 # Modifying previously filled storage
0x0103: 0x13cf54 # Emptying previously filled storage

# Block 2, refund called through a different contract
0x0104: 0x40ac90 # Filling previously unfilled storage
0x0105: 0x17bac4 # Modifying (control), then calling 0x600D
0x0106: 0x1473c8 # Emptying the storage in a call, then calling 0x600D
# Refund: 214780 wei = 21478 gas

# Block 3, refund and then a REVERT
0x0107: 0x40ac90 # Filling previously unfilled storage
0x0108: 0x17bac4 # Modifying (control), then calling 0xBAD3
0x0109: 0x1473c8 # Emptying the storage in a call, then calling 0xBAD3
# Refund: 214780 wei = 21478 gas

# Block 4, refund and then an INVALID
0x010A: 0x40ac90 # Filling previously unfilled storage
0x010B: 0x1b15e8 # Modifying (control), then calling 0xBAD4
0x010C: 0x172316 # Emptying the storage in a call, then calling 0xBAD4
# Refund: 258770 wei = 25877 gas

# Block 5, refund and then a CREATE that ends in a REVERT
0x010D: 0x40ac90 # Filling previously unfilled storage
0x010E: 0x1c3892 # Modifying (control)
0x010F: 0x180ba0 # Emptying the storage in a call
# Refund: 273650 wei = 27365 gas

# Block 6, refund and then call a CREATE with an invalid opcode in the constructor
0x0110: 0x40ac90
0x0111: 0x1b15e8
0x0112: 0x172316


# Final calculation
0x0113: 0x075cb0

- network:
- 'London'
- 'Merge'
result:
0x000000000000000000000000000000000000DA7A:
storage:
Expand Down

0 comments on commit 8f9291c

Please sign in to comment.