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: delegation-toolkit/tutorials/create-custom-caveat-enforcer.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,16 +8,16 @@ import TabItem from "@theme/TabItem";
8
8
9
9
# Create a custom caveat enforcer
10
10
11
-
This tutorial walks you through creating a custom [caveat enforcer](../concepts/caveat-enforcers.md) and applying it to a [delegation](../concepts/delegation.md).
11
+
This tutorial walks you through creating a custom [caveat enforcer](../concepts/delegation/caveat-enforcers.md) and applying it to a [delegation](../concepts/delegation/index.md).
12
12
13
13
The MetaMask Delegation Toolkit includes [out-of-the-box caveat enforcers](../reference/caveats.md) that define rules and restrictions for common use cases.
14
14
For more specific control or other use cases, you can create custom caveat enforcers.
15
15
In this tutorial, you'll create and apply a caveat enforcer that only allows a delegation to be redeemed after a specific timestamp.
16
16
17
17
## Prerequisites
18
18
19
-
-[Install and set up the Delegation Toolkit](../../get-started/install.md) in your project.
20
-
-[Configure the Delegation Toolkit.](../configure.md)
19
+
-[Install and set up the Delegation Toolkit](../get-started/install.md) in your project.
20
+
-[Configure the Delegation Toolkit.](../guides/configure.md)
21
21
-[Install Foundry and Forge.](https://getfoundry.sh/introduction/installation)
22
22
- Get an [Infura API key](/developer-tools/dashboard/get-started/create-api) from the MetaMask Developer dashboard.
23
23
- Have a MetaMask account with some Sepolia ETH to deploy your contract.
@@ -88,7 +88,7 @@ The Forge CLI will display the address of the deployed caveat enforcer.
88
88
### 3. Apply the caveat enforcer
89
89
90
90
Specify the address of the deployed `AfterTimestampEnforcer.sol` contract, add it to the caveat builder, and create a delegation.
91
-
Learn more about [applying caveats to a delegation](../guides/create-delegation/restrict-delegation.md).
91
+
Learn more about [applying caveats to a delegation](../guides/delegation/restrict-delegation.md).
92
92
93
93
The following code snippet uses the custom caveat enforcer to create a delegation granting
94
94
a 1,000,000 wei allowance that becomes spendable one hour after it is created:
0 commit comments