Skip to main content
Looking for Contributors! This Skill needs an implementation.Contributing a Skill involves:
  1. Writing a reference implementation with full functionality
  2. Adding comprehensive tests
  3. Writing documentation with usage examples
See the ethers-provider Skill for an example of a complete Skill implementation.Interested? Open an issue or PR at github.com/evmts/voltaire.
Skill — Copyable reference implementation. Use as-is or customize. See Skills Philosophy.
Create and interact with Safe multisig wallets programmatically.

Planned Implementation

Create Safe

import { Safe } from './Safe.js';

const safe = Safe({
  provider,
  safeFactory: SAFE_FACTORY,
});

// Deploy new Safe
const safeAddress = await safe.create({
  owners: [owner1, owner2, owner3],
  threshold: 2,
  signer,
});

Propose Transaction

// Create transaction
const tx = await safe.createTransaction({
  safeAddress,
  to: recipient,
  value: parseEther('1'),
  data: '0x',
});

// Sign transaction
const signature = await safe.signTransaction({
  safeAddress,
  tx,
  signer,
});

// Submit to Safe Transaction Service
await safe.proposeTransaction({
  safeAddress,
  tx,
  signature,
  senderAddress: owner1,
});

Execute Transaction

// Get pending transactions
const pending = await safe.getPendingTransactions(safeAddress);

// Execute when threshold reached
await safe.executeTransaction({
  safeAddress,
  tx: pending[0],
  signer,
});

Resources

  • erc4337 — Account abstraction alternative