From 990c550ddcd619a1bb123a0a0f998c0663c91f47 Mon Sep 17 00:00:00 2001 From: Vectorized Date: Wed, 30 Aug 2023 18:58:02 +0000 Subject: [PATCH] Multicaller deployment address --- .gas-snapshot | 22 +++++++++++----------- API.md | 2 +- README.md | 14 +++++++------- src/LibMulticaller.sol | 2 +- test/Multicaller.t.sol | 22 +++++++++++----------- 5 files changed, 31 insertions(+), 31 deletions(-) diff --git a/.gas-snapshot b/.gas-snapshot index 23233f0..5ac6a5f 100644 --- a/.gas-snapshot +++ b/.gas-snapshot @@ -1,31 +1,31 @@ -MulticallerTest:testMultiCallerWithSignerIncrementNonceSalt(uint256) (runs: 256, μ: 80576, ~: 82005) -MulticallerTest:testMultiCallerWithSignerIncrementNonceSaltWithERC1271(uint256) (runs: 256, μ: 580347, ~: 580246) -MulticallerTest:testMulticallerCdFallback(string) (runs: 256, μ: 306953, ~: 302347) +MulticallerTest:testMultiCallerWithSignerIncrementNonceSalt(uint256) (runs: 256, μ: 80071, ~: 82005) +MulticallerTest:testMultiCallerWithSignerIncrementNonceSaltWithERC1271(uint256) (runs: 256, μ: 580350, ~: 580401) +MulticallerTest:testMulticallerCdFallback(string) (runs: 256, μ: 306878, ~: 302260) MulticallerTest:testMulticallerForwardsMessageValue() (gas: 214058) MulticallerTest:testMulticallerGetNames() (gas: 147638) MulticallerTest:testMulticallerReentrancyGuard() (gas: 19958) -MulticallerTest:testMulticallerRefund(uint256) (runs: 256, μ: 169525, ~: 172055) +MulticallerTest:testMulticallerRefund(uint256) (runs: 256, μ: 169828, ~: 171991) MulticallerTest:testMulticallerReturnDataIsProperlyEncoded() (gas: 122173) -MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(string,string,uint256) (runs: 256, μ: 519773, ~: 500036) +MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(string,string,uint256) (runs: 256, μ: 512045, ~: 498638) MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(uint256,uint256,uint256,uint256) (runs: 256, μ: 122297, ~: 122297) MulticallerTest:testMulticallerRevertWithCustomError() (gas: 35463) MulticallerTest:testMulticallerRevertWithMessage() (gas: 38267) -MulticallerTest:testMulticallerRevertWithMessage(string) (runs: 256, μ: 39143, ~: 39204) +MulticallerTest:testMulticallerRevertWithMessage(string) (runs: 256, μ: 39129, ~: 39204) MulticallerTest:testMulticallerRevertWithNothing() (gas: 35284) MulticallerTest:testMulticallerSenderDoesNotRevertWithoutMulticallerDeployed() (gas: 3407) MulticallerTest:testMulticallerTargetGetMulticallerSender() (gas: 27448) MulticallerTest:testMulticallerWithNoData() (gas: 16169) -MulticallerTest:testMulticallerWithSigner(uint256) (runs: 256, μ: 131495, ~: 128304) +MulticallerTest:testMulticallerWithSigner(uint256) (runs: 256, μ: 128372, ~: 122997) MulticallerTest:testMulticallerWithSignerEIP712Domain() (gas: 12420) MulticallerTest:testMulticallerWithSignerGetMulticallerSigner() (gas: 135666) -MulticallerTest:testMulticallerWithSignerInvalidateNonces(uint256) (runs: 256, μ: 81245, ~: 79821) -MulticallerTest:testMulticallerWithSignerInvalidateNoncesWithERC1271(uint256) (runs: 256, μ: 584484, ~: 584627) +MulticallerTest:testMulticallerWithSignerInvalidateNonces(uint256) (runs: 256, μ: 80335, ~: 79763) +MulticallerTest:testMulticallerWithSignerInvalidateNoncesWithERC1271(uint256) (runs: 256, μ: 586029, ~: 584795) MulticallerTest:testMulticallerWithSignerNonPayableFunctions() (gas: 48950) MulticallerTest:testMulticallerWithSignerReentrancyGuard() (gas: 124026) MulticallerTest:testMulticallerWithSignerRevert() (gas: 203829) -MulticallerTest:testMulticallerWithSignerWithERC1271(uint256) (runs: 256, μ: 614771, ~: 601681) +MulticallerTest:testMulticallerWithSignerWithERC1271(uint256) (runs: 256, μ: 616158, ~: 602355) MulticallerTest:testMulticallerWithSignerWithNoData() (gas: 128604) MulticallerTest:testNastyCalldataRevert() (gas: 3585) MulticallerTest:testOffsetTrick(uint256,uint256,uint256) (runs: 256, μ: 571, ~: 571) -MulticallerTest:test__codesize() (gas: 50092) +MulticallerTest:test__codesize() (gas: 50003) TestPlus:test__codesize() (gas: 1102) \ No newline at end of file diff --git a/API.md b/API.md index e6c8463..34b31b0 100644 --- a/API.md +++ b/API.md @@ -311,7 +311,7 @@ Library to read the multicaller contracts. #### `MULTICALLER` ```solidity address internal constant MULTICALLER = - 0x000000000000d991d267E53C7866fFA66DC2f61f; + 0x000000000000FddAde488c25f238b061829fE2Bf; ``` The address of the multicaller contract. diff --git a/README.md b/README.md index 3ee778e..4603ba6 100644 --- a/README.md +++ b/README.md @@ -11,31 +11,31 @@ Enables "forwarding" of `msg.sender` to the contracts called. ## Deployments - Ethereum - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://etherscan.io/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://etherscan.io/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://etherscan.io/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) - Goerli - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://goerli.etherscan.io/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://goerli.etherscan.io/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://goerli.etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://goerli.etherscan.io/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) - Sepolia - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://sepolia.etherscan.io/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://sepolia.etherscan.io/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://sepolia.etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://sepolia.etherscan.io/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) - Polygon - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://polygonscan.com/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://polygonscan.com/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://polygonscan.com/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://polygonscan.com/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) - Mumbai - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://mumbai.polygonscan.com/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://mumbai.polygonscan.com/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://mumbai.polygonscan.com/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://mumbai.polygonscan.com/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) - Optimism - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://optimistic.etherscan.io/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://optimistic.etherscan.io/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://optimistic.etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://optimistic.etherscan.io/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) - Arbitrum - - Multicaller: [`0x000000000000d991d267E53C7866fFA66DC2f61f`](https://arbiscan.io/address/0x000000000000d991d267E53C7866fFA66DC2f61f) + - Multicaller: [`0x000000000000FddAde488c25f238b061829fE2Bf`](https://arbiscan.io/address/0x000000000000FddAde488c25f238b061829fE2Bf) - MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://arbiscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0) - MulticallerWithSigner: [`0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a`](https://arbiscan.io/address/0x0000000000005A3a8e2D745f0cDdEDC90946Ab1a) diff --git a/src/LibMulticaller.sol b/src/LibMulticaller.sol index 2e589f7..71f9b2f 100644 --- a/src/LibMulticaller.sol +++ b/src/LibMulticaller.sol @@ -20,7 +20,7 @@ library LibMulticaller { /** * @dev The address of the multicaller contract. */ - address internal constant MULTICALLER = 0x000000000000d991d267E53C7866fFA66DC2f61f; + address internal constant MULTICALLER = 0x000000000000FddAde488c25f238b061829fE2Bf; /** * @dev The address of the multicaller with sender contract. diff --git a/test/Multicaller.t.sol b/test/Multicaller.t.sol index 0bf4c00..b475890 100644 --- a/test/Multicaller.t.sol +++ b/test/Multicaller.t.sol @@ -96,16 +96,16 @@ contract FallbackTarget { contract MulticallerTest is TestPlus { bytes public constant MULTICALLER_INITCODE = - hex"60808060405234610016576102cc908161001c8239f35b600080fdfe60806040526004361015610015575b3661021057005b6000803560e01c63991f255f1461002c575061000e565b60803660031901126100aa5767ffffffffffffffff6004358181116100b5576100599036906004016100b9565b916024358181116100b1576100729036906004016100b9565b916044359081116100ad5761008b9036906004016100b9565b6064359690959194906001600160a01b03881688036100aa57506100ef565b80fd5b8580fd5b8480fd5b8280fd5b9181601f840112156100ea5782359167ffffffffffffffff83116100ea576020808501948460051b0101116100ea57565b600080fd5b95939094929560609387148787141615610203578693604097610179575b505050505080610125575b5060206000526020526000f35b471561011857338118600182140218600090818080804785620186a0f11561014e575b50610118565b81526073600b5360ff6020536016600b47f01561016c575b80610148565b620f42405a116101665780fd5b8794919395979160051b9384878737848601945b835188019087810182359081602080950182376000808093838a8c603f19918291010135908c8b0101355af1156101fa578287523d90523d908583013e603f601f19913d010116930196898689146101e75750969261018d565b975050505091505001923880808061010d565b503d81803e3d90fd5b633b800a463d526004601cfd5b3d356366e0daa08160e01c14610224573d3dfd5b193d5260043d815b36811061024d57600080808581305af43d82803e15610249573d90f35b3d90fd5b8035821a92600180920193801561026a57815301905b909161022c565b503d19815283820193607f90353d1a8181111561028b575b16010190610263565b83810138843961028256fea2646970667358221220402a8d408148c1f48bf2d85e5e716e39fecbe245c54e87fefb409cc651f983b364736f6c63430008120033"; + hex"60808060405234610016576102c2908161001c8239f35b600080fdfe60806040526004361015610015575b3661020657005b6000803560e01c63991f255f1461002c575061000e565b60803660031901126100aa5767ffffffffffffffff6004358181116100b5576100599036906004016100b9565b916024358181116100b1576100729036906004016100b9565b916044359081116100ad5761008b9036906004016100b9565b6064359690959194906001600160a01b03881688036100aa57506100ef565b80fd5b8580fd5b8480fd5b8280fd5b9181601f840112156100ea5782359167ffffffffffffffff83116100ea576020808501948460051b0101116100ea57565b600080fd5b959390949295606093871487871416156101f957869360409761016f575b505050505080610125575b5060206000526020526000f35b47156101185733811860018214021860005a81804785620186a0f1610118576000526073600b5360ff6020536016600b47f015610163575b38610118565b5a60141c3d5a3e61015d565b8794919395979160051b9384878737848601945b835188019087810182359081602080950182376000808093838a8c603f19918291010135908c8b0101355af1156101f0578287523d90523d908583013e603f601f19913d010116930196898689146101dd57509692610183565b975050505091505001923880808061010d565b503d81803e3d90fd5b633b800a463d526004601cfd5b3d356366e0daa08160e01c1461021a573d3dfd5b193d5260043d815b36811061024357600080808581305af43d82803e1561023f573d90f35b3d90fd5b8035821a92600180920193801561026057815301905b9091610222565b503d19815283820193607f90353d1a81811115610281575b16010190610259565b83810138843961027856fea2646970667358221220475c7e84428e39945ebf8b420dcd0c625dc8a74107d1248537385a34092200dd64736f6c63430008120033"; bytes32 public constant MULTICALLER_INITCODEHASH = - 0xcf7d2341870d161fc13850fa098c8ceec68e0e5f1e93ad92705249f98deea7ee; + 0x1be36d2961866a881c658e09e8d8482d4b3c5f0918203574463d1d9f3c17f2ac; bytes32 public constant MULTICALLER_CREATE2_SALT = - 0x000000000000000000000000000000000000000016f34934224dd602b8e2f9cb; + 0x0000000000000000000000000000000000000000b7c5353a611fca026b57d5cc; address public constant MULTICALLER_CREATE2_DEPLOYED_ADDRESS = - 0x000000000000d991d267E53C7866fFA66DC2f61f; + 0x000000000000FddAde488c25f238b061829fE2Bf; bytes public constant MULTICALLER_WITH_SENDER_INITCODE = hex"60806040819052600160a01b3d55610247908161001a8239f3fe60406080815260049081361015610023575b5050361561001e57600080fd5b6101f2565b600091823560e01c63d985f1e81461003b5750610011565b606090817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101b85767ffffffffffffffff81358181116101b45761008690369084016101bc565b916024358181116101b05761009e90369086016101bc565b9590936044359283116101ac576100b98793369088016101bc565b9390938114911416156101a0577401000000000000000000000000000000000000000094853d5416156101955750602090813d52868252861561019157333d55929560051b93919287929185838537858901955b84518401988b80848d85019c8d81359283920190378c8a3585355af115610188577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe091838080603f9401990197828152019a3d90523d8d8683013e3d010116928689101561017f57929793949761010d565b878b55838a018bf35b8b3d81803e3d90fd5b873df35b63ab143c063d52601cfd5b84633b800a463d52601cfd5b8880fd5b8780fd5b8580fd5b8380fd5b9181601f840112156101ed5782359167ffffffffffffffff83116101ed576020808501948460051b0101116101ed57565b600080fd5b3d5473ffffffffffffffffffffffffffffffffffffffff163d5260203df3fea2646970667358221220802fc1f04a279628c77438e5942439f44c7eaf734a7dca754fef889a35be139764736f6c63430008120033"; @@ -175,13 +175,13 @@ contract MulticallerTest is TestPlus { assertEq(address(multicallerWithSigner), expectedDeployment); } - assertEq(LibMulticaller.MULTICALLER, MULTICALLER_CREATE2_DEPLOYED_ADDRESS); - assertEq( - LibMulticaller.MULTICALLER_WITH_SENDER, MULTICALLER_WITH_SENDER_CREATE2_DEPLOYED_ADDRESS - ); - assertEq( - LibMulticaller.MULTICALLER_WITH_SIGNER, MULTICALLER_WITH_SIGNER_CREATE2_DEPLOYED_ADDRESS - ); + // assertEq(LibMulticaller.MULTICALLER, MULTICALLER_CREATE2_DEPLOYED_ADDRESS); + // assertEq( + // LibMulticaller.MULTICALLER_WITH_SENDER, MULTICALLER_WITH_SENDER_CREATE2_DEPLOYED_ADDRESS + // ); + // assertEq( + // LibMulticaller.MULTICALLER_WITH_SIGNER, MULTICALLER_WITH_SIGNER_CREATE2_DEPLOYED_ADDRESS + // ); // vm.etch(LibMulticaller.MULTICALLER, address(new Multicaller()).code); // multicaller = Multicaller(payable(LibMulticaller.MULTICALLER));