This project implements a Multisig (multi-signature) wallet system using Solidity smart contracts. It includes a Multisig contract, a MultisigFactory for deploying multiple Multisig wallets, and comprehensive test suites. The system allows for secure management of funds requiring multiple approvals for transactions.
- Create Multisig wallets with customizable quorum and signers
- Transfer ERC20 tokens from the Multisig wallet
- Approve transactions with multiple signatures
- Update quorum with multi-signature approval
- Factory contract for easy deployment of multiple Multisig wallets
The main contract implementing the Multisig wallet functionality.
Key features:
- Initialize with quorum and valid signers
- Create and approve transactions
- Transfer ERC20 tokens
- Update quorum
A factory contract for deploying multiple Multisig wallets.
Key features:
- Create new Multisig wallets
- Keep track of deployed Multisig wallets
The project includes comprehensive test suites for both the Multisig and MultisigFactory contracts.
Located in test/Multisig.ts
, these tests cover:
- Deployment
- Transfer functionality
- Transaction approval
- Quorum updates
Located in test/MultisigFactory.ts
, these tests cover:
- Deployment of the factory
- Creation of multiple Multisig wallets
- Retrieval of deployed Multisig addresses
The project includes a deployment script for (ignition/modules/<script_name>
) for deploying and interacting with the contracts on a live network.
Key operations:
- Deploy MultisigFactory
- Create Multisig wallets
- Transfer tokens to Multisig
- Approve and execute transactions
- Update and approve new quorum
-
Install dependencies:
npm install
-
Compile contracts:
npx hardhat compile
-
Run tests:
npx hardhat test
-
Deploy contracts (adjust network as needed):
npx hardhat run scripts/deploy.js --network <network_name> npx hardhat ignition deploy ./ignition/modules/<script_name> --network <network_name>
- Ensure proper access control for critical functions
- Validate inputs thoroughly to prevent potential exploits
- Consider using OpenZeppelin's security tools for additional safety
- Implement event logging for better tracking of wallet activities
- Add a user interface for easier interaction with the Multisig wallets
- Implement time locks for added security on high-value transactions
This project is licensed under the MIT License.
Contributions are welcome! Please feel free to submit a Pull Request.
This code is provided as-is and should be thoroughly audited before use in any production environment.