Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const config = {
sidebarCollapsed: false,
includeCurrentVersion: true,
// Set to the latest release.
lastVersion: '0.13.0',
lastVersion: '0.1.0',
versions: {
// Defaults to the ./docs folder.
// Using "development" instead of "next" as path.
Expand All @@ -222,8 +222,8 @@ const config = {
path: 'development',
},
// The latest release.
'0.13.0': {
label: 'latest (0.13.0)',
'0.1.0': {
label: 'latest (0.1.0)',
},
},
},
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 118 additions & 0 deletions gator_versioned_docs/version-0.1.0/changelog/0.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
sidebar_label: 0.1.0
description: MetaMask Smart Accounts Kit v0.1.0 changelog
---

# What's new in v0.1.0?

:::warning Breaking changes

The ⚠️ symbol denotes potentially breaking API changes. As per the [semantic versioning specification](https://semver.org/#spec-item-4), from v1.0.0 onwards, breaking changes will be released only in major version bumps.

:::

## Breaking Changes

### ⚠️ Package name

- Updates the package name from `@metamask/delegation-toolkit` to `@metamask/smart-accounts-kit`. This change does not impact the entrypoints.

```typescript
// remove-next-line
- import { } from '@metamask/delegation-toolkit'
// add-next-line
+ import { } from '@metamask/smart-accounts-kit'

// Contracts entrypoint
// remove-next-line
- import { } from '@metamask/delegation-toolkit/contracts'
// add-next-line
+ import { } from '@metamask/smart-accounts-kit/contracts'

// Utils entrypoint
// remove-next-line
- import { } from '@metamask/delegation-toolkit/utils'
// add-next-line
+ import { } from '@metamask/smart-accounts-kit/utils'

// Actions entrypoint
// remove-next-line
- import { } from '@metamask/delegation-toolkit/actions'
// add-next-line
+ import { } from '@metamask/smart-accounts-kit/actions'
```

### ⚠️ Advanced Permissions actions

- Advanced Permissions related actions have been moved out of the `/experimental` to `/actions` entrypoint.

```typescript
// remove-next-line
- import { erc7715ProviderActions } from '@metamask/delegation-toolkit/experimental'
// add-next-line
+ import { erc7715ProviderActions } from '@metamask/smart-accounts-kit/actions'
```

### ⚠️ Toolkit environemnt

- Renames the `DeleGatorEnvironment` type to `SmartAccountsEnvironment`.
- Renames the `getDeleGatorEnvironment` function to `getSmartAccountsEnvironment`.

```typescript
// remove-next-line
- import { getDeleGatorEnvironment, DeleGatorEnvironment } from '@metamask/delegation-toolkit'
// add-next-line
+ import { getSmartAccountsEnvironment, SmartAccountsEnvironment } from '@metamask/smart-accounts-kit'
```

## Contract addresses

The following are the contract addresses for the
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
as used by this version of the toolkit.

### Delegation Framework

| Contract | Address |
|----------|---------|
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |

### Caveat enforcers

| Enforcer | Address |
|----------|---------|
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
| ERC20PeriodTransferEnforcer| `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
187 changes: 187 additions & 0 deletions gator_versioned_docs/version-0.1.0/changelog/0.12.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
---
sidebar_label: Delegation Toolkit (0.12.0)
description: MetaMask Delegation Toolkit v0.12.0 changelog
---

# What's new in v0.12.0?

:::warning Breaking changes

The ⚠️ symbol denotes potentially breaking API changes. As per the [semantic versioning specification](https://semver.org/#spec-item-4), from v1.0.0 onwards, breaking changes will be released only in major version bumps.

:::

## Breaking Changes

### ⚠️ `createExecution`

The function now accepts named parameters instead of positional parameters.

```typescript

// remove-start
- const execution = createExecution(
- "0x..",
- 0n,
- "0x",
- );
// remove-end

// add-start
+ const execution = createExecution({
+ target: "0x..",
+ value: 0n,
+ callData: "0x",
+ });
// add-end

```

### ⚠️ `redeemDelegations`

The function is now part of `DelegationManager` contract namespace.

```typescript
// remove-next-line
- import { DelegationFramework } from "@metamask/delegation-toolkit";
// add-next-line
- import { DelegationManager } from "@metamask/delegation-toolkit/contracts";

// remove-next-line
- const data = DelegationFramework.encode.redeemDelegations({
// add-next-line
+ const data = DelegationManager.encode.redeemDelegations({
delegations: [[delegation]],
modes: [SINGLE_DEFAULT_MODE],
executions: [[execution]],
});
```

### ⚠️ `ExecutionStruct`

The `target` parameter now accepts a `Address` instead of `Hex`.

### ⚠️ Utility exports

Some functions and interfaces have been moved from root to the utils export. Several of them are listed below.

#### ⚠️ `overrideDeployedEnvironment`

The function has been moved from root export to utils export.

```typescript

// remove-next-line
- import { overrideDeployedEnvironment } from "@metamask/delegation-toolkit";
// add-next-line
+ import { overrideDeployedEnvironment } from "@metamask/delegation-toolkit/utils";

```

#### ⚠️ `deployDeleGatorEnvironment`

The function has been moved from root export to utils export.

```typescript

// remove-next-line
- import { deployDeleGatorEnvironment } from "@metamask/delegation-toolkit";
// add-next-line
+ import { deployDeleGatorEnvironment } from "@metamask/delegation-toolkit/utils";

```

#### ⚠️ `ExecutionMode` types

The `ExecutionMode` types have been moved from root export to utils export.

```typescript

import {
SINGLE_DEFAULT_MODE,
SINGLE_TRY_MODE,
BATCH_DEFAULT_MODE
// remove-next-line
- } from "@metamask/delegation-toolkit";
// add-next-line
+ } from "@metamask/delegation-toolkit/utils";

```

### ⚠️ Contract utility functions

The contract utility functions have been moved from root to the contract exports. Some of them are listed below.

```typescript
import {
DelegationManager,
MultiSigDeleGator,
HybridDeleGator,
// remove-next-line
- } from "@metamask/delegation-toolkit";
// add-next-line
+ } from "@metamask/delegation-toolkit/contracts";
```

## Enhancements

- Delegation Framework now supports the Unichain, Arbitrum Nova, Berachain,
Arbitrum Sepolia, Optimism Sepolia, Binance Smart Chain testnet, Polygon Amoy, and
Monad 🎉. See [supported networks](../get-started/supported-networks.md) for more details.
- The [`createDelegation`](../reference/delegation/index.md#createdelegation) and [`createOpenDelegation`](../reference/delegation/index.md#createopendelegation) functions now accept `salt` as a parameter. This helps
prevent hash collisions when creating identical delegations.
- A new implementation type has been added to `MetaMaskSmartAccount` for externally owned accounts (EOAs) upgraded using EIP-7702. See the [EIP-7702 quickstart](../get-started/smart-account-quickstart/eip7702.md) to learn how to upgrade EOAs and create a `MetaMaskSmartAccount`.
- New decode functions have been added for delegations.


## Contract addresses

The following are the contract addresses for the
[Delegation Framework version 1.3.0](https://github.com/MetaMask/delegation-framework/blob/v1.3.0/documents/Deployments.md),
as used by this version of the toolkit.

### Delegation Framework

| Contract | Address |
|----------|---------|
| EntryPoint | `0x0000000071727De22E5E9d8BAf0edAc6f37da032` |
| SimpleFactory | `0x69Aa2f9fe1572F1B640E1bbc512f5c3a734fc77c` |
| DelegationManager | `0xdb9B1e94B5b69Df7e401DDbedE43491141047dB3` |
| MultiSigDeleGatorImpl | `0x56a9EdB16a0105eb5a4C54f4C062e2868844f3A7` |
| HybridDeleGatorImpl | `0x48dBe696A4D990079e039489bA2053B36E8FFEC4` |

### Caveat enforcers

| Enforcer | Address |
|----------|---------|
| AllowedCalldataEnforcer | `0xc2b0d624c1c4319760C96503BA27C347F3260f55` |
| AllowedMethodsEnforcer | `0x2c21fD0Cb9DC8445CB3fb0DC5E7Bb0Aca01842B5` |
| AllowedTargetsEnforcer | `0x7F20f61b1f09b08D970938F6fa563634d65c4EeB` |
| ArgsEqualityCheckEnforcer | `0x44B8C6ae3C304213c3e298495e12497Ed3E56E41` |
| BlockNumberEnforcer | `0x5d9818dF0AE3f66e9c3D0c5029DAF99d1823ca6c` |
| DeployedEnforcer | `0x24ff2AA430D53a8CD6788018E902E098083dcCd2` |
| ERC20BalanceChangeEnforcer | `0xcdF6aB796408598Cea671d79506d7D48E97a5437` |
| ERC20TransferAmountEnforcer | `0xf100b0819427117EcF76Ed94B358B1A5b5C6D2Fc` |
| ERC20PeriodTransferEnforcer| `0x474e3Ae7E169e940607cC624Da8A15Eb120139aB` |
| ERC20StreamingEnforcer | `0x56c97aE02f233B29fa03502Ecc0457266d9be00e` |
| ERC721BalanceChangeEnforcer | `0x8aFdf96eDBbe7e1eD3f5Cd89C7E084841e12A09e` |
| ERC721TransferEnforcer | `0x3790e6B7233f779b09DA74C72b6e94813925b9aF` |
| ERC1155BalanceChangeEnforcer | `0x63c322732695cAFbbD488Fc6937A0A7B66fC001A` |
| ExactCalldataBatchEnforcer | `0x982FD5C86BBF425d7d1451f974192d4525113DfD` |
| ExactCalldataEnforcer | `0x99F2e9bF15ce5eC84685604836F71aB835DBBdED` |
| ExactExecutionBatchEnforcer | `0x1e141e455d08721Dd5BCDA1BaA6Ea5633Afd5017` |
| ExactExecutionEnforcer | `0x146713078D39eCC1F5338309c28405ccf85Abfbb` |
| IdEnforcer | `0xC8B5D93463c893401094cc70e66A206fb5987997` |
| LimitedCallsEnforcer | `0x04658B29F6b82ed55274221a06Fc97D318E25416` |
| MultiTokenPeriodEnforcer | `0xFB2f1a9BD76d3701B730E5d69C3219D42D80eBb7` |
| NonceEnforcer | `0xDE4f2FAC4B3D87A1d9953Ca5FC09FCa7F366254f` |
| NativeBalanceChangeEnforcer | `0xbD7B277507723490Cd50b12EaaFe87C616be6880` |
| NativeTokenPaymentEnforcer | `0x4803a326ddED6dDBc60e659e5ed12d85c7582811` |
| NativeTokenTransferAmountEnforcer | `0xF71af580b9c3078fbc2BBF16FbB8EEd82b330320` |
| NativeTokenStreamingEnforcer | `0xD10b97905a320b13a0608f7E9cC506b56747df19` |
| NativeTokenPeriodTransferEnforcer | `0x9BC0FAf4Aca5AE429F4c06aEEaC517520CB16BD9` |
| OwnershipTransferEnforcer | `0x7EEf9734E7092032B5C56310Eb9BbD1f4A524681` |
| RedeemerEnforcer | `0xE144b0b2618071B4E56f746313528a669c7E65c5` |
| SpecificActionERC20TransferBatchEnforcer | `0x00e0251aaA263dfE3B3541B758A82D1CBA1c3B6D` |
| TimestampEnforcer | `0x1046bb45C8d673d4ea75321280DB34899413c069` |
| ValueLteEnforcer | `0x92Bf12322527cAA612fd31a0e810472BBB106A8F` |
Loading
Loading