Skip to content

Commit

Permalink
test: fix testSettingEVMVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
obatirou committed Jul 10, 2023
1 parent d17a272 commit 5ad73ef
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/HuffDeployer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -264,23 +264,23 @@ contract HuffDeployerTest is Test {
/// @dev test that compilation is different with new evm versions
function testSettingEVMVersion() public {
/// expected bytecode for EVM version "paris"
bytes memory expectedParis = hex"60028060093d393df36000";
bytes memory expectedParis = hex"6000";
HuffConfig config = HuffDeployer.config().with_evm_version("paris");
address withParis = config.deploy("test/contracts/EVMVersionCheck");

bytes memory parisBytecode = getBytecode(withParis);
assertEq(parisBytecode, expectedParis);

/// expected bytecode for EVM version "shanghai" | default
bytes memory expectedShanghai = hex"60018060093d393df35f";
bytes memory expectedShanghai = hex"5f";
HuffConfig shanghaiConfig = HuffDeployer.config().with_evm_version("shanghai");
address withShanghai = config.deploy("test/contracts/EVMVersionCheck");
address withShanghai = shanghaiConfig.deploy("test/contracts/EVMVersionCheck");
bytes memory shanghaiBytecode = getBytecode(withShanghai);
assertEq(shanghaiBytecode, expectedShanghai);

/// Default should be shanghai (latest)
HuffConfig defaultConfig = HuffDeployer.config().with_evm_version("");
address withDefault = config.deploy("test/contracts/EVMVersionCheck");
address withDefault = defaultConfig.deploy("test/contracts/EVMVersionCheck");

bytes memory defaultBytecode = getBytecode(withDefault);
assertEq(defaultBytecode, expectedShanghai);
Expand Down

0 comments on commit 5ad73ef

Please sign in to comment.