-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Delegation Toolkit] Add MetaMask Smart Accounts quickstart #2132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added minor suggestions. If we are introducing "MetaMask Smart Account" branding here, I think we should keep it consistent throughout the page and also make consistent changes across the rest of the DTK docs. I will work on a PR for the latter today.
sidebar_position: 2 | ||
sidebar_label: Quickstart | ||
--- | ||
|
||
# Delegation Toolkit quickstart | ||
# MetaMask Smart Accounts quickstart |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# MetaMask Smart Accounts quickstart | |
# MetaMask Smart Account quickstart |
|
||
This page demonstrates how to get started quickly with the MetaMask Delegation Toolkit, | ||
by creating a delegator account and completing the delegation lifecycle (creating, signing, and redeeming a delegation). | ||
This page demonstrates how to get started quickly with the MetaMask Smart Accounts, and send the first user operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page demonstrates how to get started quickly with the MetaMask Smart Accounts, and send the first user operation. | |
This page demonstrates how to get started quickly with MetaMask Smart Accounts, and send the first user operation. |
@@ -17,157 +16,77 @@ by creating a delegator account and completing the delegation lifecycle (creatin | |||
|
|||
### 1. Set up a Public Client | |||
|
|||
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. | |||
This client will let the delegator account query the signer's account state and interact with smart contracts. | |||
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the smart account query the signer's account state and interact with blockchain network. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the smart account query the signer's account state and interact with blockchain network. | |
Set up a [Viem Public Client](https://viem.sh/docs/clients/public) using Viem's `createPublicClient` function. This client will let the Smart Account query the signer's account state and interact with blockchain network. |
``` | ||
|
||
### 3. Create a delegator account | ||
### 3. Create a MetaMask smart account |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
### 3. Create a MetaMask smart account | |
### 3. Create a MetaMask Smart Account |
|
||
[Create a delegator smart account](../how-to/create-smart-account/index.md) to set up a delegation. | ||
[Create a MetaMask smart account](../how-to/create-smart-account/index.md) to send first user operation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Create a MetaMask smart account](../how-to/create-smart-account/index.md) to send first user operation. | |
[Create a MetaMask Smart Account](../how-to/create-smart-account/index.md) to send the first user operation. |
|
||
This example configures a [Hybrid](../how-to/create-smart-account/configure-accounts-signers.md#configure-a-hybrid-smart-account) delegator account: | ||
This example configures a [Hybrid](../how-to/create-smart-account/configure-accounts-signers.md#configure-a-hybrid-smart-account) smart account: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example configures a [Hybrid](../how-to/create-smart-account/configure-accounts-signers.md#configure-a-hybrid-smart-account) smart account: | |
This example configures a [Hybrid](../how-to/create-smart-account/configure-accounts-signers.md#configure-a-hybrid-smart-account) Smart Account: |
import { createPublicClient, http } from "viem"; | ||
import { sepolia as chain } from "viem/chains"; | ||
|
||
import { createPublicClient, http } from 'viem' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { createPublicClient, http } from 'viem' | |
import { createPublicClient, http } from "viem" |
We try to use double quotes consistently throughout the doc site. This applies to the rest of the code samples on this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's my habit of saving files frequently, and since Prettier is configured to use single quotes, it keeps formatting them that way. Maybe we should consider changing the config?
Prettier configuration: https://github.com/MetaMask/metamask-docs/blob/main/.prettierrc
|
||
### 5. Create a delegation | ||
The smart account will remain counterfactual until the first user operation. If the smart account is not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The smart account will remain counterfactual until the first user operation. If the smart account is not | |
The Smart Account will remain counterfactual until the first user operation. If the Smart Account is not |
@AyushBherwani1998 Here's a follow up PR: #2134 |
Description
Adds quickstart for MetaMask Smart Accounts
Issue(s) fixed
Fixes #
Preview
Checklist
Complete this checklist before merging your PR: