ERC-20 Token, my new money?

ERC-20 TRANSFER

The Idea

The Project

The Transfer

My first token

pragma solidity ^0.8.0;import "@openzeppelin/contracts/token/ERC20/ERC20.sol";contract OxToken is ERC20 {
constructor() public ERC20("OxToken", "OTKN"){
_mint(msg.sender, 1000000000000000000000000);
}
}
await currentContract.methods
.transfer(queryData.receiver, price)
.send({ from: account })
.once('sent', function(payload) {
console.log("[TRANSACTION PROGRESS] Request Sent")
})
.once('sending', function(payload) {
console.log("[TRANSACTION PROGRESS] Sending")
})
.once('transactionHash', function(hash) {
console.log("[TRANSACTION PROGRESS] Get transaction hash: " + hash)
})
.on('confirmation', function(confNumber, receipt, latestBlockHash) {
console.log("[TRANSACTION PROGRESS] Confirmation number: " + confNumber)
console.log("[TRANSACTION PROGRESS] Confirmation latestBlockHash: " + latestBlockHash)
console.log("[TRANSACTION PROGRESS] Confirmation receipt: " + JSON.stringify(receipt))
})
.on('error', function(error) {
console.log("[TRANSACTION PROGRESS] Failure with error: " + error.message)
});
First ERC-20 Transfer transaction

The transfer

  • Retrieve token information from GET url parameters
  • Select a token
  • Connect a wallet
  • Enter the token amount
  • Transfer tokens

The tokens price

https://api.coingecko.com/api/v3/coins/ethereum/contract/0xca75c43f8c9afd356c585ce7aa4490b48a95c466

The contracts

https://api.etherscan.io/api?module=contract&action=getabi&address=0xca75c43f8c9afd356c585ce7aa4490b48a95c466

The account icon

A Multiavatar

What’s the result?

ERC-20 Transfer

The URL and the QrCode

Mockup QrCode generator

Conclusion

--

--

--

A developper

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

A Guide To Buying Cardano (ADA) — NO PICTURES

Galaxy Heroes Coin: Bringing the First all Heroes Based Coin to the Binance Smart Chain

How to Bridge Velhalla (SCAR) Token

How to Buy Bitcoin and Crypto

30 MOST IMPORTANT WORDS CRYPTOCURRENCY ENTHUSIAST'S AND NEWBIE'S NEED TO FAMILIARIZE

How to Use BTC Proxy for DeFi

MATRIXETF INDEX:- Matrix Index is a crypto index fund to track the qualified tokens of the crypto…

Raze Network Monthly Review — April

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Plo4ox

Plo4ox

A developper

More from Medium

Beginner's guide to understanding the distinction between web 2.0 and web 3.0

Create Your Own Coin On Zilliqa

What is Web 3.0?

Crypto 101 with Vin: Blockchain