Contracts are written in Solidity and run in a Hardhat environment. They live in the smart-contracts directory.
Tests are in the tests directory, written in JavaScript or TypeScript. An example test is included.
Deploy scripts are in the scripts directory, also in JavaScript or TypeScript. Required scripts are already in place to get started.
Deploy to a local test chain
Follow the start developing instructions to spin up a local chain.The dev command runs the scripts/deploy_localhost script internally, which deploys all contracts in the correct sequence.
When working on your own smart contracts, update scripts/deploy_localhost to deploy them in the right order.
For all available options:
dapp-launchpad dev -h
Enable a local block explorer with Ethernal
You can optionally start a local blockchain explorer that auto-indexes transactions and provides a dashboard with an overview of the chain.
Add your login email, password, and workspace name to the .env file in the smart-contracts directory.
These values can also be passed as flags to the dev command: --ethernal-login-email, --ethernal-login-password, and --ethernal-workspace. These flags override the environment variables if both are set.