This repository serves as an example of how to use factory contracts to deploy other contracts without needing to run a cli deployment or use Remix.
The factory deploys a standard OpenZeppelin ERC-20 contract which has been extended to mint the initial supply to the token creator.
OZ is the OG of smart contract development and they continue to hone their skills.
https://docs.openzeppelin.com/contracts
Click "Use as Template" to create a repo on GitHub based on this repo. Otherwise:
git clone git@github.com:DeFiFoFum/truffle-typescript-template.git
yarn install
Create a .env file based off of .env.example to deploy contracts to bsc mainnet/testnet and to verify deployed contracts.
yarn compile
yarn migrate:bsc [--reset] // Use --reset to redeploy already deployed contracts
yarn verify:bsc
yarn migrate:testnet [--reset]
yarn verify:testnet
* new contracts that are added must be added to the verification script in package.json by adding && to the end with the new contract verification.
Lint with solhint
yarn lint / yarn lint:fix
Use typechain to generate contract interfaces for UI integration.
yarn gen:types