Burn and Mint Tokens using Zwallet
ZCN smart contract allows conversion of native ZCN token network to Ethereum wrapped WZCN token and from wrapped Ethereum WZCN token to native ZCN token through minting and burning of tokens using zwalletcli.\
Get Started
Import your Ethereum Account
./zwallet bridge-import-account
command can be used to import your ethereum account Here are the parameters for the command.
Parameter | Required | Description |
---|---|---|
--mnemonic | Yes | Ethereum Wallet Mnemonic Phrase |
--password | Yes | Ethereum Wallet Password |
Sample Command:
Sample Response:
Prerequisites
In order to perform DEX operations using zwalletcli basic config.yaml 0chain configuration file should be extended with the following params
Burn ZCN and Mint WZCN token
Navigate into zwalletCLI directory
2. Run the command below to list or check whether your ethereum account is imported successfully in key vault.
Sample Response:
3. Create ZCN wallet and fill it with tokens using the ./zwallet faucet
command.
Sample Response:
4. Now to burn some ZCN tokens use the following command:
Sample Response:
The response will output an zcn-burn-hash like above which can be used to fetch details about the burn transaction and mint WZCN tokens.
5. Here is a command for checking details about the ZCN burn transaction:
Sample Response:
6. Mint WZCN tokens using the command below:
Sample Response:
Burn WZCN and Mint ZCN
Run the command below to list or check whether your ethereum account is imported successfully in key vault. If not import your Ethereum Account.
Sample Response:
Fill your ethereum wallet with WZCN tokens can be done using metamask.
Burn WZCN tokens using the following command :
List Authorizers
./zwallet bridge-list-auth
command can be used to list all authroizers available to validate client transactions.
Sample Command:
Sample Response:
Show Authorizer Configuration
./zwallet bridge-auth-config
command can be used to view authorizer configuration. Here are the parameters for the command.\
Parameter | Required | Description |
---|---|---|
--id | Yes | Provide Authorizer ID to view its configuration . Can be fetched using list authorizers command. |
--help | Syntax Help for the command |
Sample Command:
Sample Response:
Show ZCNBridge Configurations
./zwallet bridge-config
command can be used to view ZCNBridge configuration. To understand how to initialize a bridge client configurations check Intialize a Bridge Client.
Sample Command:
Sample Response:
Last updated