Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Multisig wallet interaction with 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, });
// 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, });
// Get pending transactions const pending = await safe.getPendingTransactions(safeAddress); // Execute when threshold reached await safe.executeTransaction({ safeAddress, tx: pending[0], signer, });
Was this page helpful?