Skip to content

Commit e470f58

Browse files
remove token revocation permission
1 parent 2b70757 commit e470f58

6 files changed

Lines changed: 4 additions & 156 deletions

File tree

gator_versioned_docs/version-1.2.0/get-started/supported-advanced-permissions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ emailing [hellogators@consensys.net](mailto:hellogators@consensys.net).
1616
| ------------------------------------------------------------------------------------------------------------------------ | ------------------ | -------------- | ----------- |
1717
| [ERC-20 periodic](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
1818
| [ERC-20 stream](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
19-
| [ERC-20 revocation](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-revocation-permission) | >= v0.3.0 | >= v13.14.0 | >= 13.18.1 |
2019
| [Native token periodic](../guides/advanced-permissions/use-permissions/native-token.md#native-token-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
2120
| [Native token stream](../guides/advanced-permissions/use-permissions/native-token.md#native-token-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |

gator_versioned_docs/version-1.2.0/guides/advanced-permissions/use-permissions/erc20-token.md

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Learn how to use the ERC-20 token permissions with Advanced Permissions (ERC-7715).
3-
keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions, revocation]
3+
keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions]
44
---
55

66
import Tabs from "@theme/Tabs";
@@ -9,7 +9,7 @@ import TabItem from "@theme/TabItem";
99
# Use ERC-20 token permissions
1010

1111
[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports ERC-20 token permission types that allow you to request fine-grained
12-
permissions for ERC-20 token transfers with time-based (periodic), streaming, or revocation conditions, depending on your use case.
12+
permissions for ERC-20 token transfers with time-based (periodic) or streaming conditions, depending on your use case.
1313

1414
## Prerequisites
1515

@@ -148,56 +148,3 @@ export const walletClient = createWalletClient({
148148
</TabItem>
149149
</Tabs>
150150

151-
## ERC-20 revocation permission
152-
153-
This permission type enables revoking an existing ERC-20 token allowance on behalf of the user.
154-
155-
For example, a user signs an ERC-7715 permission that lets a dapp revoke any ERC-20 token allowances
156-
periodically, or during an ongoing exploit.
157-
158-
See the [ERC-20 revocation permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-revocation-permission) for more information.
159-
160-
<Tabs>
161-
<TabItem value="example.ts">
162-
163-
```typescript
164-
import { sepolia as chain } from 'viem/chains'
165-
import { walletClient } from './client.ts'
166-
167-
// Since current time is in seconds, convert milliseconds to seconds.
168-
const currentTime = Math.floor(Date.now() / 1000)
169-
// 1 week from now.
170-
const expiry = currentTime + 604800
171-
172-
const grantedPermissions = await walletClient.requestExecutionPermissions([
173-
{
174-
chainId: chain.id,
175-
expiry,
176-
// The requested permissions will granted to the
177-
// session account.
178-
to: sessionAccount.address,
179-
permission: {
180-
type: 'erc20-token-revocation',
181-
data: {
182-
justification: 'Permission to revoke ERC-20 token allowances',
183-
},
184-
isAdjustmentAllowed: true,
185-
},
186-
},
187-
])
188-
```
189-
190-
</TabItem>
191-
<TabItem value="client.ts">
192-
193-
```typescript
194-
import { createWalletClient, custom } from 'viem'
195-
import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
196-
197-
export const walletClient = createWalletClient({
198-
transport: custom(window.ethereum),
199-
}).extend(erc7715ProviderActions())
200-
```
201-
202-
</TabItem>
203-
</Tabs>

gator_versioned_docs/version-1.2.0/reference/advanced-permissions/permissions.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,28 +85,6 @@ const permission = {
8585
}
8686
```
8787

88-
### ERC-20 revocation permission
89-
90-
Enables revoking an existing ERC-20 token allowance on behalf of the user.
91-
92-
#### Parameters
93-
94-
| Name | Type | Required | Description |
95-
| --------------- | -------- | -------- | ---------------------------------------------------------------------- |
96-
| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
97-
98-
#### Example
99-
100-
```typescript
101-
const permission = {
102-
type: 'erc20-token-revocation',
103-
data: {
104-
justification: 'Permission to revoke ERC-20 token allowances',
105-
},
106-
isAdjustmentAllowed: true,
107-
}
108-
```
109-
11088
## Native token permissions
11189

11290
### Native token periodic permission

smart-accounts-kit/get-started/supported-advanced-permissions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ emailing [`hellogators@consensys.net`](mailto:hellogators@consensys.net).
1616
| ------------------------------------------------------------------------------------------------------------------------ | ------------------ | -------------- | ----------- |
1717
| [ERC-20 periodic](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
1818
| [ERC-20 stream](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
19-
| [ERC-20 revocation](../guides/advanced-permissions/use-permissions/erc20-token.md#erc-20-revocation-permission) | >= v0.3.0 | >= v13.14.0 | >= 13.18.1 |
2019
| [Native token periodic](../guides/advanced-permissions/use-permissions/native-token.md#native-token-periodic-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |
2120
| [Native token stream](../guides/advanced-permissions/use-permissions/native-token.md#native-token-stream-permission) | >= v0.1.0 | >= v13.5.0 | >= v13.23.0 |

smart-accounts-kit/guides/advanced-permissions/use-permissions/erc20-token.md

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: Learn how to use the ERC-20 token permissions with Advanced Permissions (ERC-7715).
3-
keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions, revocation]
3+
keywords: [permissions, spending limit, restrict, 7715, erc-7715, erc20-permissions]
44
---
55

66
import Tabs from "@theme/Tabs";
@@ -9,7 +9,7 @@ import TabItem from "@theme/TabItem";
99
# Use ERC-20 token permissions
1010

1111
[Advanced Permissions (ERC-7715)](../../../concepts/advanced-permissions.md) supports ERC-20 token permission types that allow you to request fine-grained
12-
permissions for ERC-20 token transfers with time-based (periodic), streaming, or revocation conditions, depending on your use case.
12+
permissions for ERC-20 token transfers with time-based (periodic) or streaming conditions, depending on your use case.
1313

1414
## Prerequisites
1515

@@ -148,56 +148,3 @@ export const walletClient = createWalletClient({
148148
</TabItem>
149149
</Tabs>
150150

151-
## ERC-20 revocation permission
152-
153-
This permission type enables revoking an existing ERC-20 token allowance on behalf of the user.
154-
155-
For example, a user signs an ERC-7715 permission that lets a dapp revoke any ERC-20 token allowances
156-
periodically, or during an ongoing exploit.
157-
158-
See the [ERC-20 revocation permission API reference](../../../reference/advanced-permissions/permissions.md#erc-20-revocation-permission) for more information.
159-
160-
<Tabs>
161-
<TabItem value="example.ts">
162-
163-
```typescript
164-
import { sepolia as chain } from 'viem/chains'
165-
import { walletClient } from './client.ts'
166-
167-
// Since current time is in seconds, convert milliseconds to seconds.
168-
const currentTime = Math.floor(Date.now() / 1000)
169-
// 1 week from now.
170-
const expiry = currentTime + 604800
171-
172-
const grantedPermissions = await walletClient.requestExecutionPermissions([
173-
{
174-
chainId: chain.id,
175-
expiry,
176-
// The requested permissions will granted to the
177-
// session account.
178-
to: sessionAccount.address,
179-
permission: {
180-
type: 'erc20-token-revocation',
181-
data: {
182-
justification: 'Permission to revoke ERC-20 token allowances',
183-
},
184-
isAdjustmentAllowed: true,
185-
},
186-
},
187-
])
188-
```
189-
190-
</TabItem>
191-
<TabItem value="client.ts">
192-
193-
```typescript
194-
import { createWalletClient, custom } from 'viem'
195-
import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
196-
197-
export const walletClient = createWalletClient({
198-
transport: custom(window.ethereum),
199-
}).extend(erc7715ProviderActions())
200-
```
201-
202-
</TabItem>
203-
</Tabs>

smart-accounts-kit/reference/advanced-permissions/permissions.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -85,28 +85,6 @@ const permission = {
8585
}
8686
```
8787

88-
### ERC-20 revocation permission
89-
90-
Enables revoking an existing ERC-20 token allowance on behalf of the user.
91-
92-
#### Parameters
93-
94-
| Name | Type | Required | Description |
95-
| --------------- | -------- | -------- | ---------------------------------------------------------------------- |
96-
| `justification` | `string` | No | A human-readable explanation of why the permission is being requested. |
97-
98-
#### Example
99-
100-
```typescript
101-
const permission = {
102-
type: 'erc20-token-revocation',
103-
data: {
104-
justification: 'Permission to revoke ERC-20 token allowances',
105-
},
106-
isAdjustmentAllowed: true,
107-
}
108-
```
109-
11088
## Native token permissions
11189

11290
### Native token periodic permission

0 commit comments

Comments
 (0)