diff --git a/foundry.toml b/foundry.toml index d672a2c..cd23a60 100644 --- a/foundry.toml +++ b/foundry.toml @@ -2,6 +2,7 @@ out = 'out' libs = ['lib'] ffi = true +evm_version = "shanghai" fs_permissions = [ { access = "read", path = "./test/auth/mocks/AuthWrappers.huff" }, { access = "read", path = "./test/auth/mocks/OwnedWrappers.huff" }, diff --git a/lib/foundry-huff b/lib/foundry-huff index e691315..bcac40d 160000 --- a/lib/foundry-huff +++ b/lib/foundry-huff @@ -1 +1 @@ -Subproject commit e691315769147cffb6245536e039e590aed78455 +Subproject commit bcac40d5b0950588b30cdf24dff25df080007295 diff --git a/src/tokens/ERC20.huff b/src/tokens/ERC20.huff index 2a9bdfd..0836ea8 100644 --- a/src/tokens/ERC20.huff +++ b/src/tokens/ERC20.huff @@ -70,7 +70,7 @@ [INITIAL_DOMAIN_SEPARATOR] sstore // [] // Copy the runtime bytecode with constructor argument concatenated. - 0x67 // [offset] - constructor code size + 0x66 // [offset] - constructor code size dup1 // [offset, offset] codesize // [total_size, offset, offset] sub // [runtime_size, offset] diff --git a/src/utils/JumpTableUtil.huff b/src/utils/JumpTableUtil.huff index 1fb6e92..76d4263 100644 --- a/src/utils/JumpTableUtil.huff +++ b/src/utils/JumpTableUtil.huff @@ -1,4 +1,3 @@ - /// @title JumpTableUtil /// @notice SPDX-License-Identifier: MIT /// @author clabby diff --git a/test/tokens/ERC20.t.sol b/test/tokens/ERC20.t.sol index a44402f..eae507d 100644 --- a/test/tokens/ERC20.t.sol +++ b/test/tokens/ERC20.t.sol @@ -53,6 +53,7 @@ contract ERC20Test is Test { // Deploy the Mintable ERC20 address mintableTokenAddress = HuffDeployer.config() + .with_evm_version("shanghai") .with_code(mintable_wrapper) .with_deployer(deployer) .with_args(bytes.concat(abi.encode("Token"), abi.encode("TKN"), abi.encode(DECIMALS))) diff --git a/test/utils/JumpTableUtil.t.sol b/test/utils/JumpTableUtil.t.sol index 2a2b7b2..fdaee65 100644 --- a/test/utils/JumpTableUtil.t.sol +++ b/test/utils/JumpTableUtil.t.sol @@ -12,7 +12,7 @@ interface IJumpTableUtil { } contract JumpTableUtilTest is Test { - uint constant FIRST_LABEL_PC = 147; + uint constant FIRST_LABEL_PC = 141; IJumpTableUtil jtUtil; @@ -20,7 +20,7 @@ contract JumpTableUtilTest is Test { /// @notice deploy a new instance of IJumpTableUtil by /// passing in the address of the deployed Huff contract string memory wrapper_code = vm.readFile("test/utils/mocks/JumpTableUtilWrappers.huff"); - jtUtil = IJumpTableUtil(HuffDeployer.deploy_with_code("utils/JumpTableUtil", wrapper_code)); + jtUtil = IJumpTableUtil(HuffDeployer.config().with_evm_version("shanghai").with_code(wrapper_code).deploy("utils/JumpTableUtil")); } function testGetJumpdestFromJT_Mem() public {