A draft ERC20 Neko Token used for learning purpose.
Can be deploy to Binance Smart Chain Testnet
Table of Contents
The frontend which interact with this token is in this Neko Web3 repo . Clone that repo if you want to see some actions.
-
You're probably going to need NodeJS LTS to use this source code.
-
You will need to install Metamask. Head over here and install it on your browser.
-
Truffle framework for testing local and deploy to some testnet.
-
Install NPM or Yarn globally
- npm
npm install npm@latest -g
- yarn is optional (recommended)
npm install yarn -g
- npm
Please follow these steps.
-
Clone the repo
git clone https://github.com/tungdt-90/neko-token-smartcontract
-
Go into the folder you just clone
cd neko-token-smartcontract
and install NPM packages:
- npm
npm install
- yarn
yarn install
- npm
-
Start truffle
truffle develop
Copy you mnemonic, paste it into
.secret
file in this source code. It will be used to import account in Metamask wallet and deploy to BSC Testnet with that account.After that, keep the window opens.
-
Now you will need to Connect Your MetaMask With Binance Smart Chain Testnet.
-
Open Metamask, choose
import using Secret Recovery Phrase
and use the mnemonic which you saved before (Check.secret
file if you forgot) -
Open Metamask > Settings > Network > Custom RPC and enter these values:
Network Name: BSC Testnet RPC URL: https://data-seed-prebsc-1-s2.binance.org:8545/ ChainID: 97 Symbol: BNB Block Explorer: https://testnet.bscscan.com
-
Choose Account 1 > Copy address,
-
Go to faucet page: https://testnet.binance.org/faucet-smart, then paste your address in the box and click on “Give me BNB”
-
Check if your account received BNB or not.
-
-
Deploy to Binance Smart Chain Testnet
- Now, let's go back to the truffle terminal, enter these commands (wait for it to finish before run the next command)
compile
migrate
If you think last step is not working,deploy --network bscTestnet
Ctrl + C
to exit the truffle terminal, then run:truffle deploy --network bscTestnet
- Now, let's go back to the truffle terminal, enter these commands (wait for it to finish before run the next command)
-
Now, let's check if the new tokens is online or not !!!
- From this source code, open folder
build > contracts > NekoCoin.json
- Find
"networks"
. 97 is the id of BSC Testnet, copy value ofaddress
in 97. - Open Metamask, choose
Account 1
and networkBSC Testnet
, selectimport tokens
- Paste the token address you just copy, and enjoy your 1M NKT token.
- From this source code, open folder
Distributed under the MIT License. See LICENSE.txt
for more information.
Tung Do - tungdt5490@gmail.com
Project Link: https://github.com/tungdt-90/neko-token-smartcontract
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!