From b72493221ee1d2f2fb30ed94a3cc535a9028d09f Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Tue, 12 Mar 2024 12:32:43 -0400 Subject: [PATCH] add some comments --- package.json | 2 +- src/lib/ConsiderationConstants.sol | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ebeea62..be7cbd1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "seaport-types", - "version": "1.6.2", + "version": "1.6.3", "description": "Core types and interfaces for Seaport", "main": "src/", "repository": "https://github.com/ProjectOpenSea/seaport-types.git", diff --git a/src/lib/ConsiderationConstants.sol b/src/lib/ConsiderationConstants.sol index 40cbef5..ce694da 100644 --- a/src/lib/ConsiderationConstants.sol +++ b/src/lib/ConsiderationConstants.sol @@ -49,8 +49,25 @@ uint256 constant information_versionLengthPtr = 0x63; uint256 constant information_versionWithLength = 0x03312e36; // 1.6 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;