Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Add ERC1271 support #21

Merged
merged 3 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 31 additions & 28 deletions .gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
MulticallerTest:testMultiCallerWithSignerIncrementNonceSalt(uint256) (runs: 256, μ: 76649, ~: 78646)
MulticallerTest:testMulticallerCdFallback(string) (runs: 256, μ: 306344, ~: 301385)
MulticallerTest:testMulticallerForwardsMessageValue() (gas: 213765)
MulticallerTest:testMulticallerGetNames() (gas: 147559)
MulticallerTest:testMulticallerReentrancyGuard() (gas: 18376)
MulticallerTest:testMulticallerRefund(uint256) (runs: 256, μ: 169784, ~: 171897)
MulticallerTest:testMulticallerReturnDataIsProperlyEncoded() (gas: 122094)
MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(string,string,uint256) (runs: 256, μ: 526229, ~: 529983)
MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(uint256,uint256,uint256,uint256) (runs: 256, μ: 122151, ~: 122151)
MulticallerTest:testMulticallerRevertWithCustomError() (gas: 31988)
MulticallerTest:testMulticallerRevertWithMessage() (gas: 34780)
MulticallerTest:testMulticallerRevertWithMessage(string) (runs: 256, μ: 35673, ~: 35735)
MulticallerTest:testMulticallerRevertWithNothing() (gas: 31828)
MulticallerTest:testMulticallerSenderDoesNotRevertWithoutMulticallerDeployed() (gas: 3452)
MulticallerTest:testMulticallerTargetGetMulticallerSender() (gas: 27471)
MulticallerTest:testMulticallerWithNoData() (gas: 16144)
MulticallerTest:testMulticallerWithSigner(uint256) (runs: 256, μ: 129357, ~: 122472)
MulticallerTest:testMulticallerWithSignerEIP712Domain() (gas: 12317)
MulticallerTest:testMulticallerWithSignerGetMulticallerSigner() (gas: 142638)
MulticallerTest:testMulticallerWithSignerInvalidateNonces(uint256) (runs: 256, μ: 81048, ~: 80575)
MulticallerTest:testMulticallerWithSignerNonPayableFunctions() (gas: 48770)
MulticallerTest:testMulticallerWithSignerReentrancyGuard() (gas: 127793)
MulticallerTest:testMulticallerWithSignerRevert() (gas: 211886)
MulticallerTest:testMulticallerWithSignerRevertsWithNastyArrayLength() (gas: 9663)
MulticallerTest:testMulticallerWithSignerWithNoData() (gas: 132142)
MulticallerTest:testNastyCalldataRevert() (gas: 30988)
MulticallerTest:testOffsetTrick(uint256,uint256,uint256) (runs: 256, μ: 549, ~: 549)
MulticallerTest:test__codesize() (gas: 49507)
MulticallerTest:testMultiCallerWithSignerIncrementNonceSalt(uint256) (runs: 256, μ: 79117, ~: 81170)
MulticallerTest:testMultiCallerWithSignerIncrementNonceSaltWithERC1271(uint256) (runs: 256, μ: 579599, ~: 579578)
MulticallerTest:testMulticallerCdFallback(string) (runs: 256, μ: 307142, ~: 301941)
MulticallerTest:testMulticallerForwardsMessageValue() (gas: 213836)
MulticallerTest:testMulticallerGetNames() (gas: 147569)
MulticallerTest:testMulticallerReentrancyGuard() (gas: 18370)
MulticallerTest:testMulticallerRefund(uint256) (runs: 256, μ: 169958, ~: 171973)
MulticallerTest:testMulticallerReturnDataIsProperlyEncoded() (gas: 122104)
MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(string,string,uint256) (runs: 256, μ: 523865, ~: 513971)
MulticallerTest:testMulticallerReturnDataIsProperlyEncoded(uint256,uint256,uint256,uint256) (runs: 256, μ: 122228, ~: 122228)
MulticallerTest:testMulticallerRevertWithCustomError() (gas: 32024)
MulticallerTest:testMulticallerRevertWithMessage() (gas: 34819)
MulticallerTest:testMulticallerRevertWithMessage(string) (runs: 256, μ: 35689, ~: 35751)
MulticallerTest:testMulticallerRevertWithNothing() (gas: 31867)
MulticallerTest:testMulticallerSenderDoesNotRevertWithoutMulticallerDeployed() (gas: 3408)
MulticallerTest:testMulticallerTargetGetMulticallerSender() (gas: 27451)
MulticallerTest:testMulticallerWithNoData() (gas: 16181)
MulticallerTest:testMulticallerWithSigner(uint256) (runs: 256, μ: 129847, ~: 122128)
MulticallerTest:testMulticallerWithSignerEIP712Domain() (gas: 12442)
MulticallerTest:testMulticallerWithSignerGetMulticallerSigner() (gas: 139939)
MulticallerTest:testMulticallerWithSignerInvalidateNonces(uint256) (runs: 256, μ: 82230, ~: 80039)
MulticallerTest:testMulticallerWithSignerInvalidateNoncesWithERC1271(uint256) (runs: 256, μ: 585512, ~: 584949)
MulticallerTest:testMulticallerWithSignerNonPayableFunctions() (gas: 48928)
MulticallerTest:testMulticallerWithSignerReentrancyGuard() (gas: 127316)
MulticallerTest:testMulticallerWithSignerRevert() (gas: 211551)
MulticallerTest:testMulticallerWithSignerRevertsWithNastyArrayLength() (gas: 9297)
MulticallerTest:testMulticallerWithSignerWithERC1271(uint256) (runs: 256, μ: 630394, ~: 606221)
MulticallerTest:testMulticallerWithSignerWithNoData() (gas: 131563)
MulticallerTest:testNastyCalldataRevert() (gas: 30788)
MulticallerTest:testOffsetTrick(uint256,uint256,uint256) (runs: 256, μ: 571, ~: 571)
MulticallerTest:test__codesize() (gas: 50447)
TestPlus:test__codesize() (gas: 1102)
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ The address of the multicaller with sender contract.
#### `MULTICALLER_WITH_SIGNER`
```solidity
address internal constant MULTICALLER_WITH_SIGNER =
0x0000000000007e02fB2d04caa1C19Ac15d8E77A3;
0x0000000000007DeD88fff5c18A2Bb6254ECd4130;
```

The address of the multicaller with signer contract.
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ Enables "forwarding" of `msg.sender` to the contracts called.
- Ethereum
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://etherscan.io/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://etherscan.io/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://etherscan.io/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)
- Goerli
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://goerli.etherscan.io/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://goerli.etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://goerli.etherscan.io/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://goerli.etherscan.io/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)
- Sepolia
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://sepolia.etherscan.io/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://sepolia.etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://sepolia.etherscan.io/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://sepolia.etherscan.io/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)
- Polygon
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://polygonscan.com/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://polygonscan.com/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://polygonscan.com/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://polygonscan.com/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)
- Mumbai
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://mumbai.polygonscan.com/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://mumbai.polygonscan.com/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://mumbai.polygonscan.com/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://mumbai.polygonscan.com/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)
- Optimism
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://optimistic.etherscan.io/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://optimistic.etherscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://optimistic.etherscan.io/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://optimistic.etherscan.io/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)
- Arbitrum
- Multicaller: [`0x0000000000009C27972b97d86134DFcffACAbE15`](https://arbiscan.io/address/0x0000000000009C27972b97d86134DFcffACAbE15)
- MulticallerWithSender: [`0x00000000002Fd5Aeb385D324B580FCa7c83823A0`](https://arbiscan.io/address/0x00000000002Fd5Aeb385D324B580FCa7c83823A0)
- MulticallerWithSigner: [`0x0000000000007e02fB2d04caa1C19Ac15d8E77A3`](https://arbiscan.io/address/0x0000000000007e02fB2d04caa1C19Ac15d8E77A3)
- MulticallerWithSigner: [`0x0000000000007DeD88fff5c18A2Bb6254ECd4130`](https://arbiscan.io/address/0x0000000000007DeD88fff5c18A2Bb6254ECd4130)

Please open an issue if you need help to deploy to an EVM chain of your choice.

Expand Down
2 changes: 1 addition & 1 deletion src/LibMulticaller.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ library LibMulticaller {
/**
* @dev The address of the multicaller with signer contract.
*/
address internal constant MULTICALLER_WITH_SIGNER = 0x0000000000007e02fB2d04caa1C19Ac15d8E77A3;
address internal constant MULTICALLER_WITH_SIGNER = 0x0000000000007DeD88fff5c18A2Bb6254ECd4130;

/**
* @dev Returns the caller of `aggregateWithSender` on `MULTICALLER_WITH_SENDER`.
Expand Down
Loading