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
EIP7702 allows EOA addresses to be treated as contract addresses. This is introduced as a new EVM transaction type which adds
28
+
a new field called "authorization list".
29
+
30
+
Each authorization in the list makes a temporary delegation to a contract address for some EOA. This authorization must be signed by that EOA.
31
+
It is temporary in that the EOA can be delegated to this contract only in transactions containing a proper authorization for it.
32
+
33
+
Note that the transaction itself does not need to be signed by the EOA's being delegated. So a "fee-payer" address can craft a transaction
34
+
containing these authorizations for other EOA's and thus sponsor actions for them.
35
+
36
+
### EIP 7702 contract
37
+
38
+
For the authorized EOA, this contract is executed as if EOA is the contract. Meaning the contract can move funds, call other contracts for the EOA.
39
+
Thus it's important that the EOA additionally signs the actions done by the contract (stored in the `data` of the transaction). This protects the EOA
40
+
from the "fee-payer" address inserting arbitrary actions.
41
+
42
+
The input to `BasicSmartAccount` is a list of `(to address, value uint256, data bytes)` tuples, all of which are signed by the EOA. The
43
+
input is simply verified and executed.
44
+
45
+
In summary:
46
+
47
+
- Any EOA can delegate to `BasicSmartAccount` contract by signing an authorization.
48
+
- By delegating to `BasicSmartAccount` in a transaction, an EOA is trusting `BasicSmartAccount` to correctly execute any signed `(address, value, data)` tuples included in that same transaction.
49
+
- The transaction containing the authorization list and `(address, value, data)` data itself can be signed by a separate address. This address pays the fees.
50
+
23
51
## Foundry
24
52
25
53
**Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.**
@@ -69,6 +97,9 @@ anvil
69
97
70
98
### Deploy
71
99
100
+
Deployment is done using deterministic `CREATE2` instruction. Meaning any address can deploy this contract to a chain (for the given `EVM_SALT`),
101
+
and it will have the expected contract address. Note that if any part of the contract changes, then the contract address will also be different.
0 commit comments