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/concepts/delegation/caveat-enforcers.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -152,15 +152,15 @@ When designing delegations with caveats, consider these best practices:
152
152
153
153
## Available caveat enforcers
154
154
155
-
The Delegation Toolkit provides [many out-of-the-box caveat enforcers](../../reference/caveats.md)
155
+
The Delegation Toolkit provides [out-of-the-box caveat enforcers](../../reference/caveats.md)
156
156
for common restriction patterns, including:
157
157
158
158
- Limiting target addresses and methods.
159
159
- Setting time or block number constraints.
160
160
- Restricting token transfers and approvals.
161
161
- Limiting execution frequency.
162
162
163
-
For more complex scenarios, you can also [create custom caveat enforcers](../../guides/delegation/create-custom-caveat-enforcer.md) by implementing the `ICaveatEnforcer` interface.
163
+
For other restriction patterns, you can also [create custom caveat enforcers](../../tutorials/create-custom-caveat-enforcer.md) by implementing the `ICaveatEnforcer` interface.
Copy file name to clipboardExpand all lines: delegation-toolkit/tutorials/create-custom-caveat-enforcer.md
+42-24Lines changed: 42 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,31 +1,40 @@
1
1
---
2
-
description: Learn how to create, deploy, and apply a custom caveat enforcer
3
-
sidebar_position: 3
2
+
description: Follow this tutorial to create, deploy, and apply a custom caveat enforcer for a delegation.
3
+
sidebar_position: 2
4
4
---
5
5
6
6
import Tabs from "@theme/Tabs";
7
7
import TabItem from "@theme/TabItem";
8
8
9
9
# Create a custom caveat enforcer
10
10
11
-
When [restricting a delegation](restrict-delegation.md), the MetaMask Delegation Toolkit provides some [out-of-the-box caveat enforcers](../../reference/caveats.md)
12
-
that cover common use cases.
13
-
For more granular or custom control, you can follow the instructions on this page to create custom caveat enforcers from scratch.
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
+
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
+
For more specific control or other use cases, you can create custom caveat enforcers.
15
+
In this tutorial, you'll create and apply a caveat enforcer that only allows a delegation to be redeemed after a specific timestamp.
14
16
15
17
## Prerequisites
16
18
17
-
-[Install and set up the Delegation Toolkit.](../../get-started/install.md)
18
-
-[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
+
-[Install Foundry and Forge.](https://getfoundry.sh/introduction/installation)
22
+
- Get an [Infura API key](/developer-tools/dashboard/get-started/create-api) from the MetaMask Developer dashboard.
23
+
- Have a MetaMask account with some Sepolia ETH to deploy your contract.
24
+
:::note
25
+
You can use the [MetaMask faucet](/developer-tools/faucet) to get Sepolia ETH.
0 commit comments