Skip to content

Conversation

@theref
Copy link
Contributor

@theref theref commented Aug 19, 2025

Summary

  • Add comprehensive TACo Account Abstraction signing demo for adopters
  • Single-file implementation showing TACo threshold signatures with ERC-4337
  • Complete documentation with example output and setup instructions

Demo Features

  • Real TACo testnet integration (2-of-3 threshold)
  • MetaMask Delegation Toolkit smart account creation
  • Balance tracking and fund management
  • Pimlico bundler integration for UserOperation execution
  • Clean developer experience with minimal boilerplate

Test Plan

  • Demo builds successfully
  • All tests pass
  • Linting passes
  • Documentation is clear and complete

Copy link

Copilot AI left a 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.

@theref theref force-pushed the sign-example branch 2 times, most recently from ab18a58 to a7a58f7 Compare August 19, 2025 16:53
@codecov-commenter
Copy link

codecov-commenter commented Aug 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (signing-epic@7cc3d47). Learn more about missing BASE report.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theref theref force-pushed the sign-example branch 2 times, most recently from 3f6b92a to c874f8d Compare August 22, 2025 13:21
Copy link
Contributor

@Muhammad-Altabba Muhammad-Altabba left a 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.

theref added a commit to theref/taco-web that referenced this pull request Sep 10, 2025
- 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.
theref added a commit to theref/taco-web that referenced this pull request Sep 10, 2025
…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.
theref added a commit to theref/taco-web that referenced this pull request Sep 10, 2025
…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.
Copy link
Contributor

@Muhammad-Altabba Muhammad-Altabba left a 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.

@derekpierre
Copy link
Member

You will need to rebase this over signing-epic now that #737 is merged.

theref added a commit to theref/taco-web that referenced this pull request Nov 12, 2025
- 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.
theref added a commit to theref/taco-web that referenced this pull request Nov 12, 2025
…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.
theref added a commit to theref/taco-web that referenced this pull request Nov 12, 2025
- 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.
theref added a commit to theref/taco-web that referenced this pull request Nov 12, 2025
…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,
Copy link
Member

@derekpierre derekpierre Nov 18, 2025

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the function.

derekpierre pushed a commit to derekpierre/taco-web that referenced this pull request Nov 20, 2025
- 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.
derekpierre pushed a commit to derekpierre/taco-web that referenced this pull request Nov 20, 2025
…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.
derekpierre pushed a commit to derekpierre/taco-web that referenced this pull request Nov 20, 2025
- 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.
derekpierre pushed a commit to derekpierre/taco-web that referenced this pull request Nov 20, 2025
…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.
@derekpierre derekpierre dismissed their stale review November 20, 2025 17:36

Reabsed and added a commit

@derekpierre
Copy link
Member

@theref I rebased this PR over signing-epic and used the latest alpha.5 releases. Also made some tweaks to the logic.

theref and others added 9 commits November 26, 2025 10:12
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants