multicaller
Advanced tools
Comparing version 1.0.2 to 1.1.0
{ | ||
"name": "multicaller", | ||
"license": "MIT", | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"description": "Efficient multicaller contract", | ||
@@ -6,0 +6,0 @@ "files": [ |
@@ -9,14 +9,15 @@ # Multicaller | ||
Allows for optional "forwarding" of `msg.sender` to the contracts called. | ||
Enables "forwarding" of `msg.sender` to the contracts called. | ||
## Deployments | ||
| Chain | Multicaller | | ||
|---|---| | ||
| Ethereum | [`0x00000000000015bF55A34241Bbf73Ec4f4b080B2`](https://etherscan.io/address/0x00000000000015bF55A34241Bbf73Ec4f4b080B2) | | ||
| Goerli | [`0x00000000000015bF55A34241Bbf73Ec4f4b080B2`](https://goerli.etherscan.io/address/0x00000000000015bF55A34241Bbf73Ec4f4b080B2) | | ||
| Polygon | [`0x00000000000015bF55A34241Bbf73Ec4f4b080B2`](https://polygonscan.com/address/0x00000000000015bF55A34241Bbf73Ec4f4b080B2) | | ||
| Mumbai | [`0x00000000000015bF55A34241Bbf73Ec4f4b080B2`](https://mumbai.polygonscan.com/address/0x00000000000015bF55A34241Bbf73Ec4f4b080B2) | | ||
| Optimism | [`0x00000000000015bF55A34241Bbf73Ec4f4b080B2`](https://optimistic.etherscan.io/address/0x00000000000015bF55A34241Bbf73Ec4f4b080B2) | | ||
| Arbitrum | [`0x00000000000015bF55A34241Bbf73Ec4f4b080B2`](https://arbiscan.io/address/0x00000000000015bF55A34241Bbf73Ec4f4b080B2) | | ||
| Chain | Multicaller | MulticallerWithSender | | ||
|---|---|---| | ||
| Ethereum | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://etherscan.io/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://etherscan.io/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
| Goerli | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://goerli.etherscan.io/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://goerli.etherscan.io/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
| Sepolia | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://sepolia.etherscan.io/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://sepolia.etherscan.io/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
| Polygon | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://polygonscan.com/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://polygonscan.com/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
| Mumbai | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://mumbai.polygonscan.com/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://mumbai.polygonscan.com/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
| Optimism | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://optimistic.etherscan.io/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://optimistic.etherscan.io/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
| Arbitrum | [`0x0000000000Fb21e1322c03884Aa754002339F983`](https://arbiscan.io/address/0x0000000000Fb21e1322c03884Aa754002339F983) | [`0x0000000000D593850Ac7C4ff4D944DD8081abdB1`](https://arbiscan.io/address/0x0000000000D593850Ac7C4ff4D944DD8081abdB1) | | ||
@@ -30,3 +31,4 @@ Please open an issue if you need help to deploy to an EVM chain of your choice. | ||
├─ Multicaller.sol — "The multicaller contract" | ||
└─ MulticallerReader.sol — "Library to read the `msg.sender` of the multicaller contract" | ||
├─ MulticallerWithSender.sol — "The multicaller with sender contract" | ||
└─ LibMulticaller.sol — "Library to read the multicaller with sender contract" | ||
``` | ||
@@ -36,3 +38,3 @@ | ||
You can use the [`src/MulticallerReader.sol`](./src/MulticallerReader.sol) library in your contracts to query the Multicaller efficiently. | ||
You can use the [`src/LibMulticaller.sol`](./src/LibMulticaller.sol) library in your contracts to query the multicaller with sender contract efficiently. | ||
@@ -66,2 +68,4 @@ To install with [**Foundry**](https://github.com/gakonst/foundry): | ||
### MulticallerWithSender | ||
#### `aggregateWithSender` | ||
@@ -90,5 +94,5 @@ ```solidity | ||
### MulticallerReader | ||
### LibMulticaller | ||
Library to read the `msg.sender` of the multicaller contract. | ||
Library to read the multicaller with sender contract. | ||
@@ -99,3 +103,3 @@ #### `multicallerSender` | ||
``` | ||
Returns the address that called `aggregateWithSender` on the multicaller. | ||
Returns the address that called `aggregateWithSender` on the multicaller with sender contract. | ||
@@ -106,3 +110,3 @@ #### `sender` | ||
``` | ||
Returns the address that called `aggregateWithSender` on the multicaller, if `msg.sender` is the multicaller. | ||
Returns the address that called `aggregateWithSender` on the multicaller with sender contract, if `msg.sender` is the multicaller with sender contract. | ||
@@ -119,2 +123,16 @@ Otherwise, returns `msg.sender`. | ||
## Use Cases | ||
For the following, the contracts called must read the `msg.sender` from the multicaller contract. | ||
The `LibMulticaller` library can be used for efficient reading. | ||
**Example use cases:** | ||
- Calling access role restricted functions across multiple contracts in a single transaction. | ||
- Approving a trusted operator contract to transfer tokens, and doing the transfer in a single transaction. | ||
> **Warning** This will skip the approval warning on wallets. To mitigate phishing risk, you should make a custom approval function that validates a time-limited [EIP-712](https://eips.ethereum.org/EIPS/eip-712) signature signed by the `msg.sender`. | ||
## Safety | ||
@@ -143,2 +161,2 @@ | ||
[license-url]: https://github.com/vectorized/multicaller/blob/main/LICENSE.txt | ||
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20986
6
154