From 0f23d57afe92997752132b71aa45f780549869d7 Mon Sep 17 00:00:00 2001 From: Basant Date: Thu, 5 Nov 2026 06:00:45 +0545 Subject: [PATCH 1/4] feat: add SYSTEM_ADDRESS constant to StdConstants --- src/StdConstants.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/StdConstants.sol b/src/StdConstants.sol index 9f069ef8..b5cabf20 100644 --- a/src/StdConstants.sol +++ b/src/StdConstants.sol @@ -27,4 +27,8 @@ library StdConstants { /// @dev The order of the secp256k1 curve. uint256 internal constant SECP256K1_ORDER = 115792089237316195423570985008687907852837564279074904382605163141518161494337; + /// @dev Protocol system address: caller of system calls (EIP-4788, EIP-2935, EIP-7002, EIP-7251) + /// and emitter of EIP-7708 ETH transfer logs. + /// Taken from https://eips.ethereum.org/EIPS/eip-4788. + address internal constant SYSTEM_ADDRESS = 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE; } From 33f487dea37395675ec152c2f29f2596dd062edd Mon Sep 17 00:00:00 2001 From: Basant Date: Thu, 5 Nov 2026 06:00:46 +0545 Subject: [PATCH 2/4] feat: add SYSTEM_ADDRESS constant to CommonBase --- src/Base.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Base.sol b/src/Base.sol index d948010f..076f18a6 100644 --- a/src/Base.sol +++ b/src/Base.sol @@ -34,6 +34,11 @@ abstract contract CommonBase { uint256 internal constant SECP256K1_ORDER = 115792089237316195423570985008687907852837564279074904382605163141518161494337; + /// @dev Protocol system address: caller of system calls (EIP-4788, EIP-2935, EIP-7002, EIP-7251) + /// and emitter of EIP-7708 ETH transfer logs. + /// Taken from https://eips.ethereum.org/EIPS/eip-4788. + address internal constant SYSTEM_ADDRESS = 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE; + uint256 internal constant UINT256_MAX = 115792089237316195423570985008687907853269984665640564039457584007913129639935; From 6dcc9212d9d76e5b194f516cc165681037fe3e94 Mon Sep 17 00:00:00 2001 From: Basant Date: Thu, 5 Nov 2026 06:00:48 +0545 Subject: [PATCH 3/4] test: add test for SYSTEM_ADDRESS in StdConstantsTest --- test/StdConstants.t.sol | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/StdConstants.t.sol b/test/StdConstants.t.sol index 8ed524ec..effaf0bf 100644 --- a/test/StdConstants.t.sol +++ b/test/StdConstants.t.sol @@ -33,6 +33,11 @@ contract StdConstantsTest is Test { assertEq(address(this), StdConstants.VM.computeCreateAddress(StdConstants.DEFAULT_SENDER, 1)); assertEq(StdConstants.DEFAULT_TEST_CONTRACT, StdConstants.VM.computeCreateAddress(address(this), 1)); } + + function testSystemAddress() public pure { + assertEq(StdConstants.SYSTEM_ADDRESS, 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE); + assertEq(StdConstants.SYSTEM_ADDRESS, address(uint160(uint256(type(uint160).max - 1)))); + } } contract Dummy {} From 5a5a0c3024cf2538af776619cb4ccfeb80286144 Mon Sep 17 00:00:00 2001 From: Basant Date: Thu, 5 Nov 2026 06:00:49 +0545 Subject: [PATCH 4/4] test: add test for SYSTEM_ADDRESS in CommonBaseTest --- test/CommonBase.t.sol | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/CommonBase.t.sol b/test/CommonBase.t.sol index 28c91a91..53256dba 100644 --- a/test/CommonBase.t.sol +++ b/test/CommonBase.t.sol @@ -34,6 +34,10 @@ contract CommonBaseTest is Test { assertEq(SECP256K1_ORDER, StdConstants.SECP256K1_ORDER); } + function testSystemAddressValue() public pure { + assertEq(SYSTEM_ADDRESS, StdConstants.SYSTEM_ADDRESS); + } + function testUint256MaxValue() public pure { assertEq(UINT256_MAX, type(uint256).max); }