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/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/create-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
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ import TabItem from "@theme/TabItem";
10
10
11
11
This tutorial walks you through creating a custom [caveat enforcer](../concepts/caveat-enforcers.md) and applying it to a [delegation](../concepts/delegation.md).
12
12
13
-
The MetaMask Delegation Toolkit provides some[out-of-the-box caveat enforcers](../reference/caveats.md) that define rules and restrictions for common use cases.
14
-
For more granular or custom control, you can create custom caveat enforcers from scratch.
15
-
This tutorial walks you through creating and applying a caveat enforcer that only allows a delegation to be redeemed after a specific timestamp.
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.
16
16
17
17
## Prerequisites
18
18
@@ -87,11 +87,11 @@ The Forge CLI will display the address of the deployed caveat enforcer.
87
87
88
88
### 3. Apply the caveat enforcer
89
89
90
-
Specify the address where your `AfterTimestampEnforcer.sol` contract is deployed, add it to the caveat builder, and create a delegation.
90
+
Specify the address of the deployed `AfterTimestampEnforcer.sol` contract, add it to the caveat builder, and create a delegation.
91
91
Learn more about [applying caveats to a delegation](../guides/create-delegation/restrict-delegation.md).
92
92
93
93
The following code snippet uses the custom caveat enforcer to create a delegation granting
94
-
an allowance of 1,000,000 wei that can only be spent after one hour from when the delegation is created:
94
+
a 1,000,000 wei allowance that becomes spendable one hour after it is created:
95
95
96
96
<Tabs>
97
97
<TabItemvalue="delegation.ts">
@@ -106,7 +106,7 @@ import { delegatorSmartAccount } from "./config.ts";
0 commit comments