43 lines
844 B
Markdown
43 lines
844 B
Markdown
# Solace Treasury Smart Contracts
|
|
|
|
Smart contracts for the Treasury Management DApp.
|
|
|
|
## Contracts
|
|
|
|
- **TreasuryWallet.sol**: Main multisig wallet contract with transaction proposals and approvals
|
|
- **SubAccountFactory.sol**: Factory for creating sub-accounts under a main treasury
|
|
|
|
## Development
|
|
|
|
```bash
|
|
# Install dependencies
|
|
pnpm install
|
|
|
|
# Compile contracts
|
|
pnpm run compile
|
|
|
|
# Run tests
|
|
pnpm run test
|
|
|
|
# Generate coverage report
|
|
pnpm run coverage
|
|
|
|
# Deploy to Sepolia
|
|
pnpm run deploy:sepolia
|
|
|
|
# Start local node
|
|
pnpm run node
|
|
```
|
|
|
|
## Testing
|
|
|
|
Tests are located in the `test/` directory and use Hardhat's testing framework with Chai assertions.
|
|
|
|
## Security
|
|
|
|
- Contracts use OpenZeppelin's battle-tested libraries
|
|
- Reentrancy guards on external calls
|
|
- Access control for owner management
|
|
- Threshold validation for multisig operations
|
|
|