Skip to content

Commit 59f9e47

Browse files
ryestewAniket-Engg
authored andcommitted
update readme for intro721template
1 parent 91216ed commit 59f9e47

File tree

1 file changed

+26
-22
lines changed
  • libs/remix-ws-templates/src/templates/introToEIP7702

1 file changed

+26
-22
lines changed
Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,39 @@
11
# EIP 7702
22

3-
This Workspace template presents one of the updates that shipped with the Pectra upgrade - occuring in May 2025.
3+
This Workspace template presents EIP-7701, one of the updates that shipped with the Pectra upgrade (May 2025).
44

55
### Basics
66

77
In the Ethereum blockchain there are two different types of accounts:
8-
- Externally Owned Account (EOA): which require a private key and could initiate transactions.
9-
- Smart Contract Account: which represents code deployed in the blockchain.
8+
- Externally Owned Account (EOA): which require a private key and can initiate transactions
9+
- Smart Contract Account: which represents code deployed on the blockchain
1010

11-
These two concepts are separated. Until now EOAs could not have code associated to them.
12-
But with the Pectra upgrade, EOAs can now host and directly run code.
13-
14-
For more information please see [this page](https://eip7702.io)
11+
Until now EOAs could not have code associated with them.
12+
But with the Pectra upgrade, EOAs can now host and can directly run code.
1513

1614
### Demo of a batched transaction
1715

18-
In this demo, we'll deploy a contract and assign it to an EOA. Then we'll run a script that will deploy a token and another contract. The script will also prepare the data to batch a transaction so that it will contain the approval for the transfer and as well as the transfer.
19-
20-
This section explains how to run this project. Let's first assign a piece of code to an EOA:
21-
22-
- Compile MyToken.sol, Example7702.sol, and Spender.sol using Solidity version 0.8.28.
23-
- In Deploy & Run, in the CONTRACT select box, choose Simple7702Account and deploy it to the Remix VM (Prague) network.
24-
- Copy the deployed contract's address.
25-
- Click the Authorize Delegation button and paste the contract's address into the modal.
26-
- In Deploy and Run, check the new "deployed". It has the same address as the EOA that was assigned to SIMPLE7702ACCOUNT.
27-
- Run the script `run-eip7702.ts`.
28-
- In the terminal, copy the logged data from console.log(executeBatch)
29-
- Back in Deploy & Run, find the DELEGATED SIMPLE7702ACCOUNT and open it up to see its functions.
30-
- In the executeBatch function , paste the data and then run the transaction.
31-
- Go to the the deployed token's balanceOf function. Input the first and then the second account to check that each address' balance has been updated.
32-
- This is possible because of the 7702 connection between the contract and the first EOA address.
16+
This demo will show an example of a batched (not botched) transaction. Before batching, sending a token required two transactions: one to allow the transfer and another to send the token. With batching, these function calls can be done in a single transaction.
17+
18+
Assign a piece of code to an EOA:
19+
20+
- Compile `MyToken.sol`, `Example7702.sol`, and `Spender.sol` using Solidity version 0.8.28.
21+
- In Deploy & Run's **CONTRACT** select box, choose **Simple7702Account** and deploy it to the Remix VM (Prague) network.
22+
- Copy the deployed contract's address.
23+
- Click the **Authorize Delegation** button and paste the contract's address into the modal.
24+
- In Deploy and Run, check the new deployed contract. It has the same address as the EOA that was assigned to SIMPLE7702ACCOUNT.
25+
26+
Setting up the data for the batch:
27+
- Run the script `run-eip7702.ts`.
28+
- In the terminal, copy the logged data from console.log(executeBatch).
29+
- Back in Deploy & Run, find the DELEGATED SIMPLE7702ACCOUNT and open it up to see its functions.
30+
- In the **executeBatch** function, paste the data and then run the transaction.
31+
32+
Executing the batched transaction:
33+
- Go to the the deployed token's **balanceOf** function.
34+
- Input the first and then the second account to check that each address' token balance has been updated.
35+
- The is possible because of the 7702 connection between the contract and the first EOA address.
36+
3337

3438

3539

0 commit comments

Comments
 (0)