[Delegation Toolkit] Update docs#2116
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@AyushBherwani1998 I assume we want to create the new version after merging these updates? Let us know, and we can release the new version after these are merged. |
|
@bgravenorst DevRel typically creates a separate PR to release a new version and add a version changelog. @AyushBherwani1998 Releasing a version is the same process as in the old docs, except you need to tag the plugin ID in the command: |
|
|
||
| :::warning Important | ||
|
|
||
| Before creating a delegation, ensure that the delegator account has |
There was a problem hiding this comment.
This should probably be "Before redeeming a delegation..."
Additionally, it might be worthwhile including some guidance on how to deploy the account as part of the redemption (can encode the factory call in the useroperation that redeems the delegation 🎉 )
There was a problem hiding this comment.
I was wondering if we should keep it before creating delegation, or redeeming the delegation? In case if it's done while redeeming the delegation, the delegate has to pay the gas fee.
There was a problem hiding this comment.
As discussed, we'll add a new page on deploying smart accounts in "How to" guides.
delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md
Outdated
Show resolved
Hide resolved
delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md
Outdated
Show resolved
Hide resolved
delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Alexandra Carrillo <12214231+alexandratran@users.noreply.github.com>
| const authorization = await walletClient.signAuthorization({ | ||
| account, | ||
| contractAddress, | ||
| executor: "self", | ||
| }); |
There was a problem hiding this comment.
This could be confusing, because the version of Viem that the delegation toolkit depends on has the experimental_signAuthorization method:
walletClient.experimental_signAuthorization(
{
contractAddress,
chainId,
nonce,
},
)
I do not know how well the latest viem and DTK play together. I do plan to upgrade viem dependency in the DTK, and maybe we should do it in 0.13.0.
There was a problem hiding this comment.
I see, I can add prerequisite to install Viem separately. That should solve it?
There was a problem hiding this comment.
We have decided to go with installing Viem separately.
delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md
Outdated
Show resolved
Hide resolved
delegation-toolkit/how-to/create-smart-account/configure-accounts-signers.md
Outdated
Show resolved
Hide resolved
| ExecutionMode, | ||
| } from "@metamask/delegation-toolkit"; | ||
| import { DelegationManager } from "@metamask/delegation-toolkit/contracts"; | ||
| import { SINGLE_DEFAULT_MODE } from "@metamask/delegation-toolkit/utils"; |
There was a problem hiding this comment.
Not for docs, but seems trange to me that ExecutionMode is in @metamask/delegation-toolkit but the actual modes are in @metamask/delegation-toolkit/utils.
I think we should combine these into an enum enum ExecutionMode - I'll pick that up.
Co-authored-by: jeffsmale90 <6363749+jeffsmale90@users.noreply.github.com>
Description
Update delegation toolkit docs to latest v0.12.0 release
Preview
Checklist
Complete this checklist before merging your PR: