☁️
Züs
  • About Züs
  • Concepts
    • Architecture
      • Mining on the Züs Blockchain
        • Onboarding a New Miner or Sharder
        • Block Production Protocol
        • Block Finalization
        • Merkle Patricia Trees(MPT) and Recovery
        • View Change and Distributed Key Generation(DKG)
      • Payment
      • Storage
      • Token Bridge Protocol
      • Resources
    • Tokenomics
      • Staking Process
      • Block Rewards
      • Delegation
    • Store
    • Earn
    • Build
    • NFT
  • Resources
    • Whitepapers
      • Tokenomics Paper
      • Architecture Paper
      • Storage Paper
    • Patents
      • NON-FUNGIBLE TOKEN BLOCKCHAIN PROCESSING
      • FREE STORAGE PROTOCOL FOR BLOCKCHAIN PLATFORM
      • TRANSFERRING CONTENT VIA PROXY RE-ENCRYPTION
      • STREAMING CONTENT VIA BLOCKCHAIN TECHNOLOGY
      • SPLIT-KEY WALLET ACCESS BETWEEN BLOCKCHAINS
      • ENFORCING SECURITY PARAMETERS SPECIFIED BY AN OWNER ON A BLOCKCHAIN PLATFORM
      • CLIENT AUTHENTICATION USING SPLIT KEY SIGNING ON A BLOCKCHAIN PLATFORM
      • BLOCKCHAIN CONTENT PURCHASING PROTOCOL
      • BLOCKCHAIN BASED PRIVACY COMPLIANCE PLATFORM
      • SYSTEMS AND METHODS OF SELF-ADMINISTERED PROTOCOLS ON A BLOCKCHAIN PLATFORM
      • SYSTEMS AND METHODS OF AGGREGATE SIGNING OF DIGITAL SIGNATURES ON MULTIPLE MESSAGES SIMULTANEOUSLY U
      • SYSTEMS AND METHODS OF BLOCKCHAIN PLATFORM FOR AUTOMATED ASSET BASED PROVISIONING OF RESOURCES
      • SYSTEMS AND METHODS OF SELF-FORKING BLOCKCHAIN PROTOCOL
      • SYSTEMS AND METHODS OF SUSTAINABILITY PROTOCOL USING DISTRIBUTED BLOCKCHAIN APPLICATION WITH IoT SEN
      • SYSTEMS AND METHODS OF BLOCKCHAIN PLATFORM FOR DISTRIBUTED APPLICATIONS
  • API Reference
    • Endpoints
      • Block
      • Client
      • Connection
      • DNS
      • File
      • Smart Contracts
      • Blobber Stats
      • Transactions
      • Miners and Sharders
        • Stats
        • State
        • Diagnostics
        • Configuration
        • Smart Contract State
        • Smart Contract Stats
        • Chain Stats
  • Hackathon
    • Register to Hackathon
      • How to Add Members to Hackathon Team
    • Repos
    • Documentation
  • Products
    • Bolt
      • Get Started
      • Stake
      • Activity
      • Buy ZCN
      • Sell ZCN
      • Send Tokens
      • Receive Tokens
      • Settings
        • Manage Profile
        • Wallet
        • Read Pool
      • Troubleshooting
    • Vult
      • Sign Up
      • Upload File
      • Upload an Encrypted File
      • Upload a File to a Folder
      • Share a Uploaded File
      • Move a Uploaded File
      • Delete a File
      • Make File Available Offline
      • Troubleshooting
    • Atlus
      • Dashboard Overview
      • Service Providers
      • Charts
        • Market Charts
        • Network Charts
        • Storage Charts
        • Züs Explainer
      • Blockchain
      • Server Map
    • Blimp
      • Sign Up
        • Buy ZCN for Storage
      • Use Blimp as Direct Storage
      • Use Blimp as S3 Server
        • S3 Operations
      • Use Blimp for Cloud Migration
      • Manage Allocations
        • Extend Size
        • Extend Duration
        • Add Blobber
        • Replace Blobber
        • Make allocation Immutable
        • Freeze Allocation
        • Cancel Allocation
    • Chimney
      • Get Started
      • Deploy Blobber on Own Server
      • Deploy Blobber on Rented Server
      • Stake Blobber
      • Add Blobber
      • Monitor Blobbers
      • Visualize Blobber Logs
      • View Blobber Rank
    • Chalk
      • Sign Up
      • Create NFT Collection
        • Buy ZCN for NFT via ERC token
        • Buy ZCN for NFT via Credit card
      • Explore NFT Collections
      • My NFTs
      • Profile
        • Withdraw Earnings
        • Manage Collections
  • Guides
    • Zus GO SDK
    • Zus JS SDK
    • Zbox CLI
      • Repo
      • Get Started
      • Creating and Managing Allocations
      • Uploading and Managing Files
      • Lock and Unlock Tokens
      • Tips and Troubleshooting
    • Zwallet CLI
      • Repo
      • Get Started
      • Zwallet Operations
      • Staking on miners and sharders
      • Burn and Mint Tokens using Zwallet
      • Troubleshooting
    • Add a Blobber
      • Repo
      • Getting Started
    • Add a Miner/Sharder
      • Repo
      • Getting Started
    • Setup a Blockchain
      • Repo
      • Quickstart
        • Understand the Script
      • Step 1: Set up the project
      • Step 2: Setup the network for Züs components
      • Step 3: Initialize and Build the Züs components
      • Step 4: Start Sharder and Miner Containers
      • Step 5 : Create a wallet using zwalletcli
      • Step 6: Starting the blobber containers
      • Step 7: Validate Züs deployment
      • Step 8: Creating an Allocation on Blobber
      • Restarting Sharder and Miner Containers with CleanDB.
      • Additional Tips and Troubleshooting
    • Glossary
  • Support
    • Help Center
      • Community
      • Issues on Github
      • Contact Us
Powered by GitBook
On this page
  • Get Started
  • Import your Ethereum Account
  • Prerequisites
  • Burn ZCN and Mint WZCN token
  • Burn WZCN and Mint ZCN
  • List Authorizers
  • Show Authorizer Configuration
  • Show ZCNBridge Configurations
  1. Guides
  2. Zwallet CLI

Burn and Mint Tokens using Zwallet

PreviousStaking on miners and shardersNextTroubleshooting

Last updated 1 year ago

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:

./zwallet bridge-import-account --mnemonic "$MNEMONIC_PHRASE" --password "$ETHEREUM_WALLET_PASSWORD"

Sample Response:

Imported account $ETHEREUM_WALLET_ADDRESS 
to path: $WALLET_CONFIG_DIRECTORY

Prerequisites

In order to perform DEX operations using zwalletcli basic config.yaml 0chain configuration file should be extended with the following params

---
block_worker: https://demo.zus.network/dns
signature_scheme: bls0chain
min_submit: 50 # in percentage
min_confirmation: 50 # in percentage
confirmation_chain_length: 3
ethereum_node_url: https://goerli.infura.io/v3/6141be73a15d47748af0dc14f53d57d7
store_unlock_duration_sec: 2

bridge:
  bridge_address: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  token_address: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  authorizers_address: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  ethereum_address: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  password: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Burn ZCN and Mint WZCN token

  1. Navigate into zwalletCLI directory

cd zwallet

2. Run the command below to list or check whether your ethereum account is imported successfully in key vault.

./zwallet bridge-list-accounts

Sample Response:

Ethereum available account: $ETHEREUM_WALLET_ID

3. Create ZCN wallet and fill it with tokens using the ./zwallet faucet command.

./zwallet faucet --methodName pour --input “{Pay day}”

Sample Response:

Execute faucet smart contract success with txn :  04f9a181c87a77306d4a6aa6473385eecacfa04c12933d96f1fae74e0c017949

4. Now to burn some ZCN tokens use the following command:

./zwallet bridge-burn-zcn --token 1 

Sample Response:

Executed smart contract successfully with txn:  $ZCN_BURN_HASH
Transaction completed successfully:

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:

./zwallet bridge-get-zcn-burn --hash $ZCN_BURN_HASH

Sample Response:

ZCN burn ticket the completed consensus
Transaction nonce: 2
Transaction amount: 10000000000
ZCN transaction ID: $ZCN

6. Mint WZCN tokens using the command below:

./zwallet bridge-mint-wzcn --hash "zcn-burn-hash" 

Sample Response:

Sending mint transaction to Ethereum
Payload amount: 10000000000
Payload nonce: 2
ZCN transaction ID: 67b7e0ea1d6522b62e93b22aef140dc59d2a61c6b4469a3c8f8cb8ae09b32eaa
Starting to mint WZCN
failed to prepare bridge: failed to pack arguments: argument count mismatch: got 4 for 5

Burn WZCN and Mint ZCN

  1. ./zwallet bridge-list-accounts

    Sample Response:

    Ethereum available account: $ETHEREUM_WALLET_ID
  2. Burn WZCN tokens using the following command :

./zwallet bridge-burn-wzcn --amount 1  

List Authorizers

./zwallet bridge-list-auth command can be used to list all authroizers available to validate client transactions.

Sample Command:

./zwallet bridge-list-auth

Sample Response:

[
  {
    "id": "2f945f7310689f17afd8c8cb291e1e3ba21677243aa1d404a2293064e7983d60",
    "url": "https://demo.zus.network/authorizer01/"
  },
  {
    "id": "7b07c0489e2f35d7c13160f4da2866b4aa69aa4e8d2b2cd9c4fc002693dca5d7",
    "url": "https://demo.zus.network/authorizer02/"
  },
  {
    "id": "896c171639937a647f9e91d5ba676be580f6d2b7e0d708e4fe6ea36610a13ffd",
    "url": "https://demo.zus.network/authorizer03/"
  }
]

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

--help

Syntax Help for the command

Sample Command:

./zwallet bridge-auth-config --id $AUTHORIZER_ID

Sample Response:

{
  "id": "2f945f7310689f17afd8c8cb291e1e3ba21677243aa1d404a2293064e7983d60",
  "url": "https://demo.zus.network/authorizer01/",
  "fee": 0,
  "latitude": 0,
  "longitude": 0,
  "last_health_check": 0,
  "delegate_wallet": "",
  "min_stake": 0,
  "max_stake": 0,
  "num_delegates": 0,
  "service_charge": 0
}

Show ZCNBridge Configurations

Sample Command:

./zwallet bridge-config

Sample Response:

burn_address     0000000000000000000000000000000000000000000000000000000000000000
cost.add-authorizer      100
cost.burn        100
cost.delete-authorizer   100
cost.mint        100
max_delegates    10
max_fee          100
min_authorizers          1
min_burn         1
min_lock         0
min_mint         1
min_stake        0
owner_id         1746b06bb09f55ee01b33b5e2e055d6cc7a900cb57c0a3a5eaabb8a0e7745802
percent_authorizers      0.7

Run the command below to list or check whether your ethereum account is imported successfully in key vault. If not

Fill your ethereum wallet with WZCN tokens can be done using .

Provide Authorizer ID to view its configuration . Can be fetched using command.

./zwallet bridge-config command can be used to view ZCNBridge configuration. To understand how to initialize a bridge client configurations check .

ZCN smart contract
metamask
import your Ethereum Account.
Intialize a Bridge Client
list authorizers