-
Notifications
You must be signed in to change notification settings - Fork 24
Add TACo Account Abstraction signing demo #693
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: signing-epic
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
This PR adds a comprehensive TACo Account Abstraction signing demo that demonstrates how to use TACo's distributed threshold signatures with ERC-4337 Account Abstraction. The demo creates a smart account using MetaMask Delegation Toolkit with TACo signers and executes real transactions on Sepolia testnet.
Key Changes:
- Added complete working demo with TACo testnet integration (2-of-3 threshold)
- Implemented MetaMask Delegation Toolkit smart account creation with balance tracking
- Added Pimlico bundler integration for UserOperation execution with comprehensive documentation
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
demos/taco-aa-signing/src/index.ts |
Main demo implementation showing TACo threshold signatures with ERC-4337 |
demos/taco-aa-signing/package.json |
Project dependencies including TACo, viem, and MetaMask delegation toolkit |
demos/taco-aa-signing/README.md |
Complete documentation with setup instructions and example output |
demos/taco-aa-signing/tsconfig.json |
TypeScript configuration extending the root config |
demos/taco-aa-signing/.env.example |
Environment configuration template for RPC, private key, and bundler |
demos/README.md |
Updated main demos index to include the new TACo AA signing demo |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ab18a58 to
a7a58f7
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## signing-epic #693 +/- ##
===============================================
Coverage ? 90.14%
===============================================
Files ? 97
Lines ? 8463
Branches ? 528
===============================================
Hits ? 7629
Misses ? 791
Partials ? 43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3f6b92a to
c874f8d
Compare
Muhammad-Altabba
left a comment
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.
Great to see AA in this nice demo 🚀
I had some questions mostly about adding some helper functions to taco-web.
- Rename demo folder to be MetaMask Delegation Toolkit specific - Update package name to taco-mdt-aa-signing-demo - Update README title to include "MetaMask Delegation Toolkit" - Add note explaining MDT-specific implementation requirements - Update main demos README link reference Addresses Derek's feedback in PR nucypher#693 about making the demo more specific to MetaMask's Delegation Toolkit implementation.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
a0519f0 to
0004216
Compare
Muhammad-Altabba
left a comment
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.
LGTM.
Also it is good to have a follow-up task to check and add possible abstracted code to taco-web, if it was generic enough to be so.
|
You will need to rebase this over |
- Rename demo folder to be MetaMask Delegation Toolkit specific - Update package name to taco-mdt-aa-signing-demo - Update README title to include "MetaMask Delegation Toolkit" - Add note explaining MDT-specific implementation requirements - Update main demos README link reference Addresses Derek's feedback in PR nucypher#693 about making the demo more specific to MetaMask's Delegation Toolkit implementation.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
- Rename demo folder to be MetaMask Delegation Toolkit specific - Update package name to taco-mdt-aa-signing-demo - Update README title to include "MetaMask Delegation Toolkit" - Add note explaining MDT-specific implementation requirements - Update main demos README link reference Addresses Derek's feedback in PR nucypher#693 about making the demo more specific to MetaMask's Delegation Toolkit implementation.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
| // ABI for the cohortMultisigs function | ||
| 'function cohortMultisigs(uint32) view returns (address)', | ||
| ], | ||
| provider, |
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 only works if the child contract is on the same chain as the signing coordinator i.e. only the ETH chain. If the child chain is different the same provider cannot be used, because the provider is used for calling the signing coordinator, and therefore won't be on the same chain.
The best you can do here is return the address of the signing coordinator child contract and not actually make a call on the child contract if it is on a different chain.
Unless a separate provider is passed for the relevant child chain.
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.
Removed the function.
- Rename demo folder to be MetaMask Delegation Toolkit specific - Update package name to taco-mdt-aa-signing-demo - Update README title to include "MetaMask Delegation Toolkit" - Add note explaining MDT-specific implementation requirements - Update main demos README link reference Addresses Derek's feedback in PR nucypher#693 about making the demo more specific to MetaMask's Delegation Toolkit implementation.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
- Rename demo folder to be MetaMask Delegation Toolkit specific - Update package name to taco-mdt-aa-signing-demo - Update README title to include "MetaMask Delegation Toolkit" - Add note explaining MDT-specific implementation requirements - Update main demos README link reference Addresses Derek's feedback in PR nucypher#693 about making the demo more specific to MetaMask's Delegation Toolkit implementation.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
f93d58a to
66b7ab0
Compare
|
@theref I rebased this PR over |
Add comprehensive demo showing how to integrate TACo's distributed threshold signatures with Account Abstraction wallets using MetaMask Delegation Toolkit. Features: - Single-file implementation - Real TACo testnet integration with 2-of-3 threshold - Balance tracking and fund management - ERC-4337 UserOperation signing with Pimlico bundler - Clean documentation with example output
…uality - Replace ts-node with tsx for better performance and compatibility - Add --dry-run flag support for CI syntax checking - Relax TypeScript strict mode for third-party type incompatibilities - Add explicit TypeScript type annotations for better type safety - Apply Prettier formatting to improve code consistency - Fix type casting for viem/account-abstraction compatibility - Update dependencies in pnpm-lock.yaml
- Add createViemTacoAccount utility to wrap TACo signers as Viem accounts - Replace localAccount parameter with TACo-wrapped account in smart account creation - Update function signature to eliminate private key requirement for signatory - Improve type safety by replacing explicit 'any' types where possible - Add ESLint exemptions for necessary type casts due to library incompatibilities Resolves nucypher#699: AA demo now works without local wallet, making it AI agent ready
Co-authored-by: Derek Pierre <derek.pierre@gmail.com> Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>
- Rename demo folder to be MetaMask Delegation Toolkit specific - Update package name to taco-mdt-aa-signing-demo - Update README title to include "MetaMask Delegation Toolkit" - Add note explaining MDT-specific implementation requirements - Update main demos README link reference Addresses Derek's feedback in PR nucypher#693 about making the demo more specific to MetaMask's Delegation Toolkit implementation.
…gner - Add getCohortMultisigAddress() method to SigningCoordinatorAgent - Calls getSigningCoordinatorChild(chainId) to get child contract - Uses cohortMultisigs(cohortId) mapping to get actual multisig address - Update taco-mdt-aa-signing demo to use cohort multisig address - Replace signers[0] placeholder with proper deployed multisig contract - Add console log showing cohort multisig address being used - Update documentation to reflect multisig vs individual signer usage Addresses Derek's feedback in PR nucypher#693 to use the deployed cohort multisig contract (e.g., 0x857949079dB532301157Eb7Fb5AEC3398043A186) instead of individual signer addresses for ERC-1271 compatibility. Successfully tested - demo retrieves correct multisig and executes transactions.
Update to use the new SigningCohortParticipant.signerAddress property instead of the deprecated operator property.
66b7ab0 to
1efc8d1
Compare
Summary
Demo Features
Test Plan