WavePortal.sol
is the smart contract for Buildspace's Solidity course. To learn more, visit the course page.
WavePortal.sol
: 0xd98840ecb01bdF2520B3418F2409709b6336b579
Clone this reposiory
git clone https://github.com/nkrishang/waveportal-contracts.git
Install all dependencies
yarn install
Create an .env
file following the .env.example
file as a reference.
Compile the contracts in the /contracts
directory by running
npx hardhat compile
Run tests with the following command
npx hardhat test
To deploy the contrats to a given network (e.g. rinkeby):
- Update the
hardhat.config.js
file with the network's chain ID (rinkeby: 4)
const chainIds = {
rinkeby: 4,
};
- Append the network to the config file
if (testPrivateKey) {
config.networks = {
rinkeby: createNetworkConfig("rinkeby"),
};
}
- Finally, run the following command:
npx hardhat run scripts/deploy.js --network rinkeby
To verify the deployed contract on Etherscan, run:
npx hardhat verify --network rinkeby contract-address