1. Prepare the Contract source and Folder CONTRACTS_DIR (example).
mkdir CONTRACTS_DIR cd CONTRACTS_DIR
Pull the Source
git clone https://github.com/vexanium/vex.contracts
The repository already contains several Smart Contracts which later can also be used in further segments to develop vexanium contracts
Open the Contracts Folder and check that there are vex.tokens contracts there
2. Create a VEX Account for the Contract
Vexanium-based smart contracts, you must create a contract account, your account can include contract contracts from the smart contract, you can create a new account or import a previous VEX account, see articles about the account and how to import accounts https: //learn.vexanium. com / article / make-development-wallet /
Open Wallet contract and account
./cleos wallet unlock --password PWDKASJFJSFLSAFJLASJF.... (use your password)
3. Compile Contract
vex-cpp -I include -o vex.token.wasm src/vex.token.cpp --abigen
4. Deploy Token Contract
./cleos --url http://explorer.vexanium.com:8080 set contract ur_account CONTRACTS_DIR/vex.token --abi vex.token.abi -p ur_account@active
5. CREATE TOKEN
To create a new token (CREATE TOKEN), call create an action with the correct parameters. This action accepts 1 argument, consisting of:
Issuer contract which is a vexanium account (vex account). In this case, this is your account. This issuer will be the authorized party to call (issue) Issue / isssued and / or take other actions such as closing accounts or tokens that are no longer used.
The type of asset / token consists of two pieces of data, the semicolon determines the maximum supply and the symbol in alpha character that represents the asset. For example, “1,0000 CNTH”.
Below is a quick way to call this method, using the position argument:
./cleos --url http://explorer.vexanium.com:8080 push action ur_account create '[ "issue_account", "10000000000.0000 CNTH"]' -p ur_account@active
The above command creates a new token named CNTH with 4 decimal precision and a maximum supply of 100,000,000,000 CNTH. It also designates ur_account (your account) as the publisher. To create this token, the contract requires permission from the vex.token account. For this reason, -p vex.token@active is given to authorize this action.
6. Issue Tokens
The issuer account (the publisher can now issue or issue a new token. As mentioned previously only the publisher can do it, therefore, -p ur_account @ active must be provided to authorize
./cleos --url http://explorer.vexanium.com:8080 push action ur_account issue '[ "issue_account", "10000000000.0000 CNTH", "memo" ]' -p ur_account@active
7. Transfer Tokens
After you have done all the steps above correctly and without any problems, congratulations you have succeeded in Deploying a Token Contract and you have succeeded in making a token, and you have successfully issued your token.
Then you can send tokens using cleos, do the following steps
./cleos --url http://explorer.vexanium.com:8080 push action ur_account transfer '[ "sender", "reciv" "10000.0000 CNTH", "memo" ]' -p sender@active
In addition, you can also register the token that you have published on vexwallet by submitting the form:
If your token has been registered with vexwallet mobile, then you can send and receive your token anytime anywhere using your smart phone via vexwallet mobile