From 8fae866ea908f517f0399edd27057b2cc275576d Mon Sep 17 00:00:00 2001 From: Dan Coombs Date: Wed, 20 Mar 2024 14:59:20 -0400 Subject: [PATCH] feat(7562): add op-080 allowing access to balance opcodes from staked entity (#460) --- erc/ERCS/erc-7562.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/erc/ERCS/erc-7562.md b/erc/ERCS/erc-7562.md index f87c38d61..b235634c0 100644 --- a/erc/ERCS/erc-7562.md +++ b/erc/ERCS/erc-7562.md @@ -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`) @@ -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. @@ -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