TIP3 Token
This project helps you to create your first TIP-3 token for Venom blockchain.
What is TIP-3? Just as ERC-20 is the most popular standard in the Ethereum network, TIP-3 assumes the same role in the Venom network. TIP-3 was designed to match the distributed system design of the Venom network and is cost-effective for its fee-paying model.
TIP-3 provides the following functionalities
- transfer tokens from one account to another
- get the current token balance of an account
- get the total supply of the token available on the network
- mint and burn tokens
You can find more info about TIP3 token in our documentation
NOTE: We highly recommend using locklift as a development environment analog of Hardhat or Truffle in Venom/Everscale world.
Below you will find info about the project structure and the purpose of the main directories and files.
Directory for smart contracts.
Locklift config file. You can find the basic layout here
Directory for migrations scripts to deploy and set up your contracts.
Directory for tests.
After setting up the project with yo venom-scaffold
, you should already have a project ready for testing and deployment.
First, let's check configs at locklift.config.ts
file. Be sure that you provide the correct settings for all required networks.
Further, let's verify the token's settings in scripts/00-deploy.ts
file:
ROOT_OWNER_ADDRESS - Address of the contract root owner (String)
REMAINING_GAS_TO - `Address to send the remaining gas (String)
NAME - The name of your token. For example `'Awesome TIP3 token'` (String)
SYMBOL - The symbol of your token. For example `'AWESOME-TIP3-TOKEN'` (String)
INITIAL_SUPPLY_TO - Address of initial token supply recipient (String)
INITIAL_SUPPLY - The number of tokens that will be issued immediately after deployment (String)
DECIMALS - The number of decimals that your token should have (Number)
DISABLE_MINT - Disables additional emission of tokens (Boolean)
DISABLE_BURN_BY_ROOT - Disables tokens burning (Boolean)
PAUSE_BURN - Temporarily disables token burning (Boolean)
After you check all settings, we are ready to build, test, and deploy contracts.
npm run build
To test contracts locally, we need to run the local node.
npm run run:local-node
To run tests on the venom testnet, ensure you have added a giver for that network in locklift.config.ts
.
npm run test:local
npm run test:testnet
# deploy on the testnet
npm run deploy:testnet
# deploy on the mainnet
npm run deploy:mainnet
Additionally, you can run scripts to mint or burn tokens if you specify DISABLE_MINT
and DISABLE_BURN_BY_ROOT
to false
.
# mint
npm run mint:testnet
npm run mint:mainnet
# burn
npm run burn:testnet
npm run burn:mainnet
Local node is a pre-configured Docker image with a Ganache-like local blockchain designed for dapp debugging and testing.
The container exposes the specified 80 port with nginx, which proxies requests to /graphql to GraphQL API. You can access graphql endpoint at http://localhost/graphql
# run
npm run run:local-node
# stop
npm run stop:local-node
You can check our documentation about TIP3 tokens, to find more tutorials