This repository contains a set of smart contracts for the Nuva protocol, including token management, depositing, and withdrawal functionality with AML (Anti-Money Laundering) verification.
- CustomToken: An ERC20 token with additional features like minting, burning, and permit functionality.
- TokenFactory: Factory contract for deploying new token instances.
- Depositor: Handles token deposits with AML verification.
- Withdrawal: Manages token withdrawals with AML verification.
- DepositorFactory/WithdrawalFactory: Factory contracts for deploying Depositor and Withdrawal instances.
- CrossChainVault: Cross-chain token bridge using Wormhole infrastructure.
- CrossChainManager: AML-compliant cross-chain token management system.
- CrossChainVault Documentation: Comprehensive guide for the cross-chain token vault contract
- CrossChainManager Documentation: Detailed documentation for the AML-compliant cross-chain manager
- Node.js (v16 or later)
- npm or yarn
- Hardhat
-
Clone the repository:
git clone <repository-url> cd nuva-evm-contracts
-
Install dependencies:
npm install # or yarn install
Run the test suite:
# Run all tests
npm test
# Run tests with gas reporting
REPORT_GAS=true npm test
# Run specific test file
npx hardhat test test/Depositor.js
# Run tests with detailed output
npx hardhat test --verbosenpm run lint: Check code stylenpm run lint:fix: Automatically fix code style issuesnpm run lint:solfix: Format Solidity code stylenpm run lint:solcheck: Check Solidity code stylenpx hardhat compile: Compile contractsnpx hardhat clean: Clean cache and artifactsnpx hardhat node: Start local Ethereum nodenpx hardhat coverage: Generate test coverage reportnpx hardhat verify --network sepolia <contract_address>: Verify contract on Etherscan
This project includes security features such as:
- Access control with OpenZeppelin's AccessControl
- Reentrancy protection
- Input validation
- AML signature verification
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request