Building the Project
This project was tested with npm v16.13.1 installed into the user home dir.
You will need the npx and node tools to run the hardhart scripts and RPC server.
To build the project, use the following command.
npm install
This should install all project dependencies into the node_modules directory.
Commands
The following will compile the GOTH token contract.
npx hardhat compile
This command will execute the script to deploy the contract.
npx hardhat run ./scripts/deploy-token.js
You can run the tests as follows.
npx hardhat test
The above command can also be used to deploy to a specific network.
npx hardhat run ./scripts/deploy-token.js --network localhost
The local RPC server can be run like this.
npx hardhat node
This will run the local test net at the address: http://localhost:8545
Publishing the package to NPM
The project is managed by the gothdex organziation on npm.
To publish, first login to the account in the organization using:
npm login
First, the contracts need to be generated using hardhat.
npx hardhat compile
Then publish the package using the following command.
npm publish --access public
If the package has already been published under the existing version number, then this will fail, and the version should be updated.
The versions should correspond to milestones and releases in the project.