How to issue ERC875 non fungible token
In order to issue ERC875 token, we need several things as below:
- Ethereum Network (Testnet or Mainnet)
Visit MetaMask official website to install Chrome Extension.(Assume you have chrome browser) Of course you could have add-on for Firefox, Opera, or a new browser named Brave browser.
Import wallet seed
NOTE: because we are using ropsten testnet, don’t import your ethereum mainnet wallet.
Here I used a test wallet generated by ganache. You can find the mnemonic as following pictures:
In Metamask main window,
- click “Import using account seed phrase” link,
- then input the seed (mnemonic) from ganache,
- input wallet seed
- input password, and click “ok”
Now you have an ethereum wallet for testing.
Choose ethereum network
Yes we can choose ethereum mainnet to issue ERC875 token, but we also can have it with ropsten testnet. Here is the example with ropsten testnet.
Get rEth from ropsten testnet
Visit MetaMask Ether Faucet to request test ether for ropsten testnet.
- check the address info in user section, make sure it is your address.
- click “request 1 ether from faucet” in faucet section.
- return to metamask to check you have got the ether you requested.
Issue ERC875 token
We will use remix to deploy our new token to ropsten testnet.
program smart contract
Here is a sample token code you can download.
- Then visit remix,
- create a new file named TicketPro,
- copy and paste sample code into remix
- settings tab, choose solidity version as “Current version:0.4.24+commit.e67f0147.Emscripten.clang”
- compile tab, click “start to compile”
prepare to deploy token
prepare the deploy script as following:
Attention the parameters with <>. Here are descriptions:
- contract name, a meaningful smart contract name
- contract symbols text, token symbols, like “ETH” for ethereum
- your organiser addr here, ticket organiser’s wallet address
- your payment server addr here, the wallet will pay for gas
- your token recipient address here, the wallet address will receive your ERC875 token, to make it simple, you can copy and paste your wallet address from alphawallet.
After preparation for the deploy parameters,
- copy and paste the deploy script to input text field right to “Deploy” button in Run tab in the right pane in remix.
- There prompts a metamask window to confirm the gas for creation smart contract.
- Click “submit” to confirm. Wait for the success for contract.
- During wait, you can click etherscan link to check the progress.
- here is an example.
import token in your alphawallet
- download and install alphawallet
- Before import token, find your contract address deployed. You can find it easily from etherscan, e.g from last example,
- click contract created address.
- click qrcode for contract overview
- in your alphawallet, click “+”
- click the scaner in address field
- scan the qrcode
- click save
enjoy your ERC875 token
Finally in your alphawallet, you could find your own ERC875 token in my wallet part.
You can redeem, sell, or transfer your own token like a ticket.