Skip to content

Commit

Permalink
feat(7562): add op-080 allowing access to balance opcodes from staked…
Browse files Browse the repository at this point in the history
… entity (#460)
  • Loading branch information
dancoombs committed Mar 20, 2024
1 parent 7af70c8 commit 8fae866
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions erc/ERCS/erc-7562.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ To help make sense of these params, note that a malicious paymaster can at most

### Opcode Rules
* Block access from opcodes that access information outside of storage and code (aka "environment").
* **[OP-011]** Blocked Opcodes:
* `BALANCE` (`0x31`)
* **[OP-011]** Blocked opcodes:
* `ORIGIN` (`0x32`)
* `GASPRICE` (`0x3A`)
* `BLOCKHASH` (`0x40`)
Expand All @@ -260,13 +259,11 @@ To help make sense of these params, note that a malicious paymaster can at most
* `NUMBER` (`0x43`)
* `PREVRANDAO`/`DIFFICULTY` (`0x44`)
* `GASLIMIT` (`0x45`)
* `SELFBALANCE` (`0x47`)
* `BASEFEE` (`0x48`)
* `GAS` (`0x5A`)
* `CREATE` (`0xF0`)
* `INVALID` (`0xFE`)
* `SELFDESTRUCT` (`0xFF`)
* **[OP-012]** `GAS `opcode is allowed, but only if followed immediately by `*CALL` instructions.\
* **[OP-012]** `GAS` (`0x5A`) opcode is allowed, but only if followed immediately by `*CALL` instructions, else it is blocked.\
This is a common way to pass all remaining gas to an external call, and it means that the actual value is
consumed from the stack immediately and cannot be accessed by any other opcode.
* **[OP-13]** any "unassigned" opcode.
Expand All @@ -291,6 +288,8 @@ To help make sense of these params, note that a malicious paymaster can at most
* The [RIP-7212](./rip-7212.md) sec256r1 precompile, on networks that accepted it.
* **[OP-070]** Transient Storage slots defined in [EIP-1153](./eip-1153) and accessed using `TLOAD` (`0x5c`) and `TSTORE` (`0x5d`) opcodes
are treated exactly like persistent storage (SLOAD/SSTORE).
* **[OP-080]** `BALANCE` (`0x31`) and `SELFBALANCE` (`0x47`) are allowed only from a staked entity, else they are blocked.


### Code Rules

Expand Down

0 comments on commit 8fae866

Please sign in to comment.