If you find our work valuable, please consider giving us a star on GitHub!
- Official Website: ecolab-web3.github.io
- Whitepaper: e-co-lab.gitbook.io/whitepaper
- Discord Community: discord.gg/Q6BNyUDNtm
- Twitter: x.com/ecolab_web3
This repository contains the official Solidity smart contracts for the E-co.lab Token ($ECO). This is the core token contract for the E-co.lab ecosystem, designed to manage both the primary fungible token ($ECO) and future Real-World Asset (RWA) tokens.
The contract is built following the ERC-1155 Multi-Token Standard and is designed to be upgradeable using the UUPS proxy pattern, ensuring long-term flexibility and security.
Built with Hardhat and OpenZeppelin Contracts.
- ERC-1155 Multi-Token Standard: A single contract to manage both the fungible
$ECOtoken (ID 0) and an infinite number of unique RWA NFTs (IDs > 0). - Upgradeable (UUPS Proxies): The contract logic can be updated to add new features or fix bugs without requiring a token migration.
- Ownable Access Control: Administrative functions like minting new tokens are restricted to a secure owner address, which will eventually be controlled by the E-co.lab DAO.
- Flexible Initialization: Supports different configurations for name, symbol, and metadata URI, allowing for distinct deployments on testnets and mainnet.
To get a local copy up and running, follow these simple steps.
- Node.js (v20 LTS recommended)
- npm (comes with Node.js)
- Git
- Clone the repo:
git clone https://github.com/ecolab-web3/ecolab-token-contract.git
- Navigate to the project directory:
cd ecolab-token-contract - Install NPM packages:
npm install
This project uses Hardhat as its development environment for compiling, testing, and deploying smart contracts.
- Compile the contracts:
npx hardhat compile
- Run tests:
npx hardhat test
This project is committed to the highest standards of quality and security, validated by a comprehensive test suite.
-
To run the full suite of unit tests, execute the following command:
npx hardhat test -
To generate a detailed test coverage report, run:
npx hardhat coverage
The test suite achieves 100% coverage for all executable lines of code and all functions written for the project's business logic.
| File | % Stmts | % Branch | % Funcs | % Lines |
|---|---|---|---|---|
ECOLAB_TOKEN.sol |
100 | 93.75 | 100 | 100 |
ECOLAB_TOKEN_V2.sol |
100 | 100 | 100 | 100 |
| All files | 100 | 93.75 | 100 | 100 |
Note on Branch Coverage: The 93.75% branch coverage is an excellent and expected result. The small remaining portion is related to internal, edge-case checks within the inherited OpenZeppelin UUPSUpgradeable contract. Our tests fully cover 100% of all custom logic and security-critical branches, including the onlyOwner checks on all administrative and upgrade functions.
The V1.1.0 of the EcolabToken contract has been successfully deployed and verified on the Avalanche Fuji Testnet.
- Status: Completed ✅
- Current Active Proxy Address:
0x2ab5510b2E954F95b1F9F50deA7d8CAF41C418AE - DEPRECATED (DO NOT USE):
0x1beF1F515cb4E1EDa4AaDCCC7a4D3E9503889f97- (Reason: Ownership has been permanently renounced due to an error in the initial deployment parameters.)
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
Please feel free to fork the repo and create a pull request, or open an issue with the tag "enhancement".
Distributed under the MIT License. See LICENSE for more information.