Objective:
LETZToken is a set of smart contracts designed to tokenize real-world assets (RWA), manage dividends, and enable decentralized governance for token holders. This README guides you through setting up the development environment, deploying the smart contracts, and interacting with them.
Ensure you have installed the following dependencies, packages, and libraries:
- Hardhat (development environment)
- dotenv (environment variable management)
- ethers (Ethereum JavaScript library)
- node
To install the necessary contracts, run the following commands:
npm install @openzeppelin/contracts
npm install @chainlink/contracts
To deploy the smart contracts, ensure your wallet is funded with Ether from the Etherlink faucet: Faucet Link
Update the following fields in your .env file with the appropriate values:
PRIVATE_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
CUSTODIAN_ADDRESS=0x0000000000000000000000000000000000000000
OWNER_ADDRESS=0xXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RPC_URL=https://node.ghostnet.etherlink.com
PAYMENTTOKEN_CONTRACT_ADDRESS=0xB1Ea698633d57705e93b0E40c1077d46CD6A51d8
Run the following command to deploy your smart contract:
npx hardhat run scripts/deploy.js --network etherlink
After deployment, the script will output the contract address. Verify your contract on the Etherlink testnet explorer: Testnet Explorer
To interact with the token in your wallet (e.g., MetaMask), manually add it as a custom token using the contract address provided after deployment.
Run the following command to interact with the deployed smart contract:
npx hardhat run scripts/interact/XXXXX.js --network etherlink
NB: if you want to use the buyToken function you need first to be whitelisted by the OWNER of the Contract via the function addWhitlistadress.
This contract handles the core ERC20 functionality with additional features such as:
Voting extensions
Permissioned addresses
Token creation
Crowdsale management
Whitelisted address management
This contract manages the tokenization and verification of real-world assets (RWA):
Custodian verification for assets
Chainlink oracles for price feeds
Valuation updates and asset management
This contract handles dividend distribution, including:
Deposit of dividends by the token issuer
Calculation of dividends for token holders
Withdrawal of dividends by token holders
This contract manages decentralized governance:
Proposal creation
Voting by token holders
Execution of governance decisions