git clone https://github.com/kimanikelly/contracts.git
npm i
npx hardhat test
or
npm test
npm i @kimanikelly/core-contracts
A .env
file has to be configured fro testnet deployment.
- Create a
.env
file by running the command
touch .env
-
Use the
.env.example
file as a template to input the credentials needed for testnet deployment inside the.env
file. -
Verify
GOERLI_URL=https://goerli.infura.io/v3/<YOUR INFURA KEY>
has a valid key. -
Verify the
PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1
is a valid wallet private key.
-
Open one terminal and run the command
npx hardhat node
to start the local node. -
Open another terminal and run the command
npm run token-local
to deploy Token.sol locally. -
The localhost address will print to the terminal.
-
Open one terminal and run the command
npm run token-goerli
to deploy Token.sol to Goerli. -
The Goerli address will print to the terminal.
-
Open one terminal and run the command
npx hardhat node
to start the local node. -
Open another terminal and run the command
npm run ttBank-local
to deploy TTBank.sol locally. -
The localhost address will print to the terminal.
-
Open one terminal and run the command
npm run ttBank-goerli
to deploy TTBank.sol to Goerli. -
The Goerli address will print to the terminal.