A simple project that simulates tokens transfer between different accounts build with hardhat framework.
- Token transfer
- Get Balance
You need to install Node.js first, then in order to clone the project via HTTPS, run this command:
git clone https://github.com/cunhaedu/hardhat-token-manager.git
Install dependencies
npm install
Create your environment variables based on the examples of .env.example
cp .env.example .env
Compile project
npx hardhat compile
Run the following command in order to deploy the application locally
npx hardhat run scripts/deploy.ts
If you want to deploy the application and see it work I highly recommend you to create a free account in Infura, a Blockchain Development Suite that allow us to deploy blockchain contracts.
Once you have an account you can create a project there and get your endpoint data, then, you can put it in .env
file:
RINKEBY_URL=https://rinkeby.infura.io/v3/<YOUR INFURA KEY>
PRIVATE_KEY=0x<YOUR METAMASK PRIVATE KEY>
Once you put your data in .env you can run the following command:
npx hardhat run scripts/deploy.ts --network rinkeby