This repository comprises a collection of smart contracts designed for tokenizing assets, with a specific focus on battery assets used for our Minimum Viable Product (MVP) v1. The contracts are implemented in Solidity and intended for deployment on peaq Network via EVM-bridge.
The system is composed of several key contracts:
- GlobalStateContract: Manages global parameters such as fees and whitelisted investors / companies.
- ServiceContract: Serves as the primary entry point for users to interact with the system.
- TokenContractERC20: Represents the tokenized asset and includes functionalities like purchasing tokens. Simplified version of actual ERC-1400 contract (will be published in the future).
- LiquidityContract: Serves as a liquidity pool from which funds can be withdrawn by the asset owner.
- RevenueDistributionContract: Distributes revenue among token holders.
- RevenueStreamContract: Interface between tokenization engine (penomo) and Revenue Enabler (third party) to receive revenue funds and billing record. Simplified draft for showcase purpose.
- Node.js and npm installed.
- Hardhat and necessary dependencies installed.
-
Clone the Repository:
git clone [REPO_URL] cd [REPO_DIRECTORY]
-
Install Dependencies:
npm install
-
Compile the Contracts:
npx hardhat compile
-
Deploy the Contracts Locally:
npx hardhat run scripts/deploy.js --network hardhat
-
Interact with the Contracts:
After deployment, you can use Hardhat tasks or the Hardhat console to interact with your deployed contracts:
npx hardhat console --network hardhat
-
Testing (Optional):
Run tests using:
npx hardhat test
- Hardhat will automatically create a local Ethereum environment for you, with several accounts pre-funded with Ether.
- Adjust gas prices and limits as necessary, depending on the Ethereum network's conditions.
- This public repository does not showcase our commit history / actual ERC1400 contracts and is meant for public access and review only.