đź’¸ A token for rewarding great work
- Node.js (Version 10 and up recommended, async/await support required)
- Ganache Not strictly required, but useful for local debugging
- Clone down the repository.
git clone https://github.com/snollygolly/qrafty-token.git
- Install dependencies
npm install
-
Create your config.json file. There is a
config.example.json
provided in the format you need. -
The config file should exist for the local development and deploy steps to work properly. You can configure
local
,ethtestnet
/ethmainnet
,bsctestnet
/bscmainnet
-
Sign up with your preferred vendor and fill:
rpc
: https URI.phrase
: owner's 12 word mnemonic. This account will be marked as the "owner" of the account.
- MAKE SURE YOU DON'T LOSE YOUR MNEMONIC AND DON'T SEND IT TO ANYONE EVER
- DO NOT PUT YOUR REAL WALLET MNEMONIC IN THE EXAMPLE CONFIG, PUT IT IN YOUR CONFIG.JSON
- To compile the contract and get it ready for deployment:
npx hardhat compile
- To deploy the contract and put it on the ganache local testnet (this is the default):
npx hardhat run scripts/deploy.js --network ganache
expect an output similar to:
Deploying contracts with the account: 0x...
Account balance: ...
Token address: 0x........
-
To deploy on a different network, replace ganache with one of the following:
- localhost: hardhat based debugging node
- ropsten: etherum proof-of-work testnet
- eth_live: etherum mainnet
- bsc_testnet: binance smart chain testnet
- bsc_live: binance smart chain mainnet
-
To start a debugging node:
npx hardhat node
To run the tests:
npm test