You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-6Lines changed: 51 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,21 +14,36 @@ Ethereum's environment evolves fast. So fast that you can't keep up writing and
14
14
Welcome the `Executor` contract:
15
15
16
16
1. Calculate whatever you need to submit your execution
17
-
2. Chain calls / delegatecalls as needed to execute whatever you want to execute atomically onchain (using `ethers-v6`)
17
+
2. Chain calls / delegatecalls as needed to execute whatever you want to execute atomically onchain (using `viem` and/or `ethers-v6`!)
18
18
3. Optionally prepend any ERC20/ERC721 approval via a third-party bundling service (such as Flashbots)
19
19
4. Submit your execution transaction (or bundle)
20
20
5. For MEV out there: tip the bundler
21
21
22
+
You can even atomically populate your chain of calls if it depends on some state change!
23
+
For example, you can skim ERC20 tokens after an execution by simply requesting the balance left onchain and replacing it in the onchain call.
24
+
22
25
---
23
26
24
27
## Installation
25
28
29
+
### viem
30
+
31
+
```bash
32
+
npm install executooor-viem
33
+
```
34
+
35
+
```bash
36
+
yarn add executooor-viem
37
+
```
38
+
39
+
### ethers-v6
40
+
26
41
```bash
27
-
npm install executooor
42
+
npm install executooor-ethers
28
43
```
29
44
30
45
```bash
31
-
yarn add executooor
46
+
yarn add executooor-ethers
32
47
```
33
48
34
49
---
@@ -41,16 +56,18 @@ Deploy your very own `Executor` contract with the owner address you want, once a
41
56
42
57
The exact deployment bytecode is given below for convenience. You can deploy the Executor by broadcasting a transaction with this exact bytecode, appended with the owner address you want (typically your bot address).
43
58
44
-
A merely cost of [0.0025 ETH @ 10 gwei](https://etherscan.io/tx/0x77831c7dd4062a158efa527fc43938e0bafedac8c1de86703addc36e9b8ef077)!
59
+
A merely cost of [0.003 ETH @ 10 gwei](https://etherscan.io/tx/0x77831c7dd4062a158efa527fc43938e0bafedac8c1de86703addc36e9b8ef077)!
Create an `ExecutorEncoder` instance and chain any calls wanted. Then, submit the transaction using `exec` (or populate the transaction using `populateExec`!).
0 commit comments