diff --git a/src/types/lib/ConsiderationConstants.sol b/src/types/lib/ConsiderationConstants.sol index 08b70d9..12b688f 100644 --- a/src/types/lib/ConsiderationConstants.sol +++ b/src/types/lib/ConsiderationConstants.sol @@ -51,7 +51,23 @@ uint256 constant information_length = 0xa0; // uint256(uint32(bytes4(keccak256("_REENTRANCY_GUARD_SLOT")))) uint256 constant _REENTRANCY_GUARD_SLOT = 0x929eee14; -uint256 constant _TLOAD_TEST_PAYLOAD = 0x6002601e613d5c3d52f3; + +/* + * + * --------------------------------------------------------------------------+ + * Opcode | Mnemonic | Stack | Memory | + * --------------------------------------------------------------------------| + * 60 0x02 | PUSH1 0x02 | 0x02 | | + * 60 0x1e | PUSH1 0x1e | 0x1e 0x02 | | + * 61 0x3d5c | PUSH2 0x3d5c | 0x3d5c 0x1e 0x02 | | + * 3d | RETURNDATASIZE | 0 0x3d5c 0x1e 0x02 | | + * | + * ::: store deployed bytecode in memory: (3d) RETURNDATASIZE (5c) TLOAD ::: | + * 52 | MSTORE | 0x1e 0x02 | [0..0x20): 0x3d5c | + * f3 | RETURN | | [0..0x20): 0x3d5c | + * --------------------------------------------------------------------------+ + */ +uint256 constant _TLOAD_TEST_PAYLOAD = 0x6002_601e_613d5c_3d_52_f3; uint256 constant _TLOAD_TEST_PAYLOAD_LENGTH = 0x0a; uint256 constant _TLOAD_TEST_PAYLOAD_OFFSET = 0x16; uint256 constant _NOT_ENTERED_TSTORE = 0;