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
The Delegation Toolkit supports [ERC-7715](https://eips.ethereum.org/EIPS/eip-7715), which lets you request fine-grained permissions from a MetaMask user to execute transactions on their behalf.
9
+
For example, a user can grant your dapp permission to spend 10 USDC per day to buy ETH over the course of a month.
10
+
Once the permission is granted, your dapp can use the allocated 10 USDC each day to purchase ETH directly from the MetaMask user's account.
11
+
12
+
ERC-7715 eliminates the need for users to approve every transaction, which is useful for highly interactive dapps.
13
+
It also enables dapps to execute transactions for users without an active wallet connection.
14
+
15
+
:::note
16
+
This feature requires [MetaMask Flask 12.14.2](/snaps/get-started/install-flask) or later.
17
+
:::
18
+
19
+
## ERC-7715 permissions lifecycle
20
+
21
+
The ERC-7715 permissions lifecycle is as follows:
22
+
23
+
1.**Set up a session account** - Set up a session account to execute transactions on behalf of the MetaMask user.
24
+
It can be a [smart account](smart-accounts.md) or an externally owned account (EOA).
25
+
26
+
2.**Request permissions** - Request permissions from the user.
3.**Set up a Viem client** - Set up a Viem client (the client type depends on the session account type) to redeem permissions.
30
+
31
+
4.**Redeem permissions** - Once the permission is granted, the session account redeems the permission.
32
+
33
+
See [how to perform executions on a MetaMask user's behalf](../guides/erc7715/execute-on-metamask-user-behalf.md) to get started with the ERC-7715 lifecycle.
34
+
35
+
## Permission types
36
+
37
+
The Delegation Toolkit currently supports the following types of ERC-7715 permissions:
38
+
39
+
-**Native token permissions** - Define how dapps can use users' native tokens.
40
+
41
+
-**ERC-20 token permissions** - Define how dapps can use users' ERC-20 tokens.
42
+
43
+
## ERC-7715 permissions vs. delegation
44
+
45
+
Requesting and redeeming ERC-7715 permissions differ from [creating and redeeming delegations](delegation/index.md).
Copy file name to clipboardExpand all lines: delegation-toolkit/guides/erc7715/execute-on-metamask-user-behalf.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ import TabItem from "@theme/TabItem";
9
9
10
10
# Perform executions on a MetaMask user's behalf
11
11
12
-
The Delegation Toolkit supports [ERC-7715](https://eips.ethereum.org/EIPS/eip-7715), which lets you request fine-grained permissions from a MetaMask user to execute transactions on their
12
+
[ERC-7715 permissions](../../concepts/erc7715.md) are fine-grained permissions that your dapp can request from a MetaMask user to execute transactions on their
13
13
behalf. For example, a user can grant your dapp permission to spend 10 USDC per day to buy ETH over the course
14
14
of a month. Once the permission is granted, your dapp can use the allocated 10 USDC each day to
15
15
purchase ETH directly from the MetaMask user's account.
The session account can now [redeem the delegation](../experimental/erc-7710-redeem-delegations.md). The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the user's behalf.
186
+
The session account can now redeem the delegation. The redeem transaction is sent to the `DelegationManager` contract, which validates the delegation and executes actions on the user's behalf.
187
187
188
188
To redeem the permissions, use the appropriate client action based on your session account type:
import CardList from "@site/src/components/CardList"
9
9
10
-
# Embed MetaMask Smart Accounts using the Delegation Toolkit
10
+
# Create MetaMask Smart Accounts using the Delegation Toolkit
11
11
12
12
The MetaMask Delegation Toolkit is a [Viem](https://viem.sh/)-based collection of tools for embedding [MetaMask Smart Accounts](concepts/smart-accounts.md) into dapps.
13
13
Smart accounts support programmable account behavior and advanced features like delegated permissions, multi-signature approvals, and gas abstraction.
@@ -16,6 +16,8 @@ Smart accounts support programmable account behavior and advanced features like
16
16
Delegation is powered by the toolkit's Delegation Framework, which defines how
17
17
permissions are created, shared, and enforced.
18
18
19
+
MetaMask Smart Accounts also support [ERC-7715 permissions](concepts/erc7715.md), which are fine-grained permissions dapps can request from MetaMask users.
20
+
19
21
## Why use the toolkit?
20
22
21
23
The toolkit enables developers to create frictionless new experiences based on programmable account behavior and granular permission
0 commit comments