Skip to content

Commit bfb15e5

Browse files
Apply suggestions from code review
Co-authored-by: Alexandra Carrillo <[email protected]>
1 parent 4a094c6 commit bfb15e5

File tree

4 files changed

+24
-25
lines changed

4 files changed

+24
-25
lines changed

delegation-toolkit/concepts/smart-accounts.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ The signatory must have at least as many signers include as the threshold is con
5656

5757
This type is referenced in the toolkit as `Implementation.Multisig`.
5858

59-
### Statless 7702 smart account
59+
### Stateless 7702 smart account
6060

61-
The Stateless 7702 smart account implementation represents an Externally Owned Account (EOA) upgraded to
62-
support smart account functionality as defined by the [EIP-7702 standard](https://eips.ethereum.org/EIPS/eip-7715). This implementation enables EOAs to perform smart account operations, including the creation and management of delegations.
61+
The Stateless 7702 smart account implementation represents an externally owned account (EOA) upgraded to
62+
support smart account functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702). This implementation enables EOAs to perform smart account operations, including the creation and management of delegations.
6363

64-
This type is reference in the toolkit as `Implementation.Stateless7702`.
64+
This type is referenced in the toolkit as `Implementation.Stateless7702`.
6565

6666
## Smart account flow
6767

delegation-toolkit/get-started/eip7702-quickstart.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
2-
description: Upgrade an externally owned account(EOA) to smart account
2+
description: Upgrade an externally owned account (EOA) to a smart account
33
sidebar_position: 3
4-
sidebar_label: EIP-7702 Quickstart
4+
sidebar_label: EIP-7702 quickstart
55
---
66

7-
# EIP-7702 Quickstart
7+
# EIP-7702 quickstart
88

9-
This page demonstrates how to upgrade your Externally Owned Account (EOA) to support MetaMask smart account
10-
functionality using an EIP-7702 transaction. This enables your EOA to leverage the benefits of account
9+
This page demonstrates how to upgrade your externally owned account (EOA) to support MetaMask smart account
10+
functionality using an [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) transaction. This enables your EOA to leverage the benefits of account
1111
abstraction, such as batch transactions, gas sponsorship, and [ERC-7710 delegation capabilities](./../concepts/delegation.md).
1212

1313
## Prerequisites
@@ -64,13 +64,13 @@ export const walletClient = createWalletClient({
6464
})
6565
```
6666

67-
### 4. Authorize 7702 delegation
67+
### 4. Authorize a 7702 delegation
6868

69-
Create an authorization to map the contract code to EOA, and sign it
70-
using `signAuthorization` action. Please note, the `signAuthorization` action
69+
Create an authorization to map the contract code to an EOA, and sign it
70+
using Viem's [`signAuthorization`](https://viem.sh/docs/eip7702/signAuthorization) action. The `signAuthorization` action
7171
does not support JSON-RPC accounts.
7272

73-
In this quickstart, we use [`EIP7702StatelessDeleGator`](https://github.com/MetaMask/delegation-framework/blob/main/src/EIP7702/EIP7702StatelessDeleGator.sol) as the EIP-7702 delegator contract.
73+
This example uses [`EIP7702StatelessDeleGator`](https://github.com/MetaMask/delegation-framework/blob/main/src/EIP7702/EIP7702StatelessDeleGator.sol) as the EIP-7702 delegator contract.
7474
It follows a stateless design, as it does not store signer data in the contract's state. This approach
7575
provides a lightweight and secure way to upgrade an EOA to a smart account.
7676

@@ -94,8 +94,8 @@ const authorization = await walletClient.signAuthorization({
9494

9595
### 5. Submit the authorization
9696

97-
Once you have signed an authroization, you can send an EIP-7702 transaction to set the EOA code.
98-
Since the authorization cannot be sent as standlone, you can include it alongside a dummy transaction.
97+
Once you have signed an authorization, you can send an EIP-7702 transaction to set the EOA code.
98+
Since the authorization cannot be sent by itself, you can include it alongside a dummy transaction.
9999

100100
```ts
101101
import { zeroAddress } from "viem";
@@ -107,9 +107,9 @@ const hash = await walletClient.sendTransaction({
107107
});
108108
```
109109

110-
### 6. Create MetaMask smart account
110+
### 6. Create a MetaMask smart account
111111

112-
After successfully setting the EOA code, you can create a smart account instance for the EOA and start
112+
Create a smart account instance for the EOA and start
113113
leveraging the benefits of account abstraction.
114114

115115
```ts
@@ -131,7 +131,7 @@ const smartAccount = await toMetaMaskSmartAccount({
131131

132132
### 7. Send a user operation
133133

134-
To send a user operation through the upgraded EOA, use the Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
134+
Send a user operation through the upgraded EOA, using Viem's [`sendUserOperation`](https://viem.sh/account-abstraction/actions/bundler/sendUserOperation) method.
135135

136136
```ts
137137
import { parseEther } from "viem";

delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,16 +318,15 @@ The number of signers in the signatories must be at least equal to the threshold
318318

319319
## Configure a Stateless 7702 smart account
320320

321-
The Stateless 7702 smart account represents an EOA that has been upgraded to support smart account
322-
functionality as defined by the [EIP-7702 standard](https://eips.ethereum.org/EIPS/eip-7715). This implementation does not handle the upgrade process
323-
itself, see [7702 Quickstart](./../../get-started/7702-quickstart.md) to learn how to ugrade.
321+
The [Stateless 7702 smart account](../../concepts/smart-accounts.md#stateless-7702-smart-account) represents an EOA that has been upgraded to support smart account
322+
functionality as defined by [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702). This implementation does not handle the upgrade process; see the [EIP-7702 quickstart](./../../get-started/7702-quickstart.md) to learn how to upgrade.
324323

325324
To configure a Stateless 7702 smart account, provide the following parameters:
326325

327326
- `address`: The address of the EOA that has been upgraded to a smart account.
328327
- `signatory`: A signer that will sign on behalf of the smart account.
329328

330-
For a Statless 7702 smart account, you can configure the following types of signatories:
329+
For a Stateless 7702 smart account, you can configure the following types of signatories:
331330

332331
### Configure an account signatory
333332

@@ -346,7 +345,7 @@ import {
346345

347346
const smartAccount = await toMetaMaskSmartAccount({
348347
client: publicClient,
349-
implementation: Implementation.Statless7702,
348+
implementation: Implementation.Stateless7702,
350349
address: account.address
351350
signatory: { account },
352351
});

delegation-toolkit/reference/api/delegation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Creates a delegation with specific delegate.
9292
| `from` | `Hex` | Yes | The address that is granting the delegation. |
9393
| `to` | `Hex` | Yes | The address to which the delegation is being granted. |
9494
| `caveats` | `Caveats` | Yes | Caveats to restrict the authority being granted. |
95-
| `parentDelegation` | `Delegation \| Hex` | No | The parent delegation or it's corresponding hex to create a delegation chain. |
95+
| `parentDelegation` | `Delegation \| Hex` | No | The parent delegation or its corresponding hex to create a delegation chain. |
9696
| `salt` | `Hex` | No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
9797

9898
### Example
@@ -120,7 +120,7 @@ Creates an open delegation that can be redeemed by any delegate.
120120
| ---- | ---- | -------- | ----------- |
121121
| `from` | `Hex` | Yes | The address that is granting the delegation. |
122122
| `caveats` | `Caveats` | Yes | Caveats to restrict the authority being granted. |
123-
| `parentDelegation` | `Delegation \| Hex` | No | The parent delegation or it's corresponding hex to create a delegation chain. |
123+
| `parentDelegation` | `Delegation \| Hex` | No | The parent delegation or its corresponding hex to create a delegation chain. |
124124
| `salt` | `Hex` | No | The salt for generating the delegation hash. This helps prevent hash collisions when creating identical delegations. |
125125

126126

0 commit comments

Comments
 (0)