diff --git a/test/Create2.t.sol b/test/Create2.t.sol index 80f4a88..c2652e7 100644 --- a/test/Create2.t.sol +++ b/test/Create2.t.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; -import {Test} from "forge-std/Test.sol"; +import Test} from "forge-std/Test.sol"; contract Emitter { event Ping(); @@ -41,4 +41,17 @@ contract Create2Test is Test { Emitter(predictedTo).ping(); } + + function testGas_Create2MinimalProxy() public { + vm.pauseGasMetering(); + address implementation; + bytes memory creationCode = bytes.concat( + hex"3d602d80600a3d3981f3363d3d373d3d3d363d73", bytes20(implementation), hex"5af43d82803e903d91602b57fd5bf3" + ); + bytes32 salt; + bytes memory initCode = bytes.concat(creationCode, abi.encode()); + + vm.resumeGasMetering(); + (bool success,) = CREATE2_FACTORY.call(bytes.concat(salt, initCode)); + } }