This repo contains token contracts to be deployed on Etherlink Mainnet by the Etherlink team. This project is a hardhat project built on the template provided by LayerZero.
The token deployments, including addresses, can be found under deployments/ and are summarized as follows:
WXTZ: Wrapped XTZ, exchange XTZ for WXTZ 1:1 on Etherlink. This should be deployed as a classic OFT.tzBTC: Wrapped BTC, the contract owner can influence the supply of the token on Etherlink. This should be deployed as a custom OApp.
docs/: Documentation of the tokenscontracts/: Solidity smart contracts for tokensdeploy/: Deployment scripts for the solidity contractsdeployments/: Deployment addresses of contracts per networkscripts/: Typescript helpers and utilitiestest/: Tests for the contracts
First, you should create and populate a .env file to set your environment variables as in .env.example. You can set either your wallet private key or mnemonic, for example:
PRIVATE_KEY="YOUR_PRIVATE_KEY"
To install project dependencies, run:
npm install
To compile and test the contracts run the following:
npx hardhat compile
npx hardhat test
If the contract is an OFT, it's best to use the command provided by LayerZero and follow the steps outlined in the terminal:
npx hardhat lz:deploy
If the contract is not a classic OFT, it is recommended to deploy it manually with hardhat-deploy instead as follows:
npx hardhat deploy --tags <TAG_OF_DEPLOYMENT> --network <DESIRED_NETWORK>
To verify your contract, run the following command:
npx hardhat verify <YOUR_CONTRACT_ADDRESS> --network <DESIRED_NETWORK> <YOUR_CONTRACT_CONSTRUCTOR_ARGS>
Please refer to the Audit and Security sections for each of the respective under docs/.