Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.39 KB

DEVELOPER.md

File metadata and controls

30 lines (21 loc) · 1.39 KB

Perper Stablecoin developer instructions

The project uses the following main frameworks:

  • OpenZeppelin smart contract templates
  • Yarn for package management
  • Hardhat for development environment and unit test running
  • Typechain for generating TypeScript types from the contracts for unit tests
  • Chai & Mocha for unit tests

Preparations

  1. Install packages: yarn
  2. Compile: npx hardhat compile
  3. Generate typechain artifacts: npm run generate:typechain
  4. Run unit tests: npx hardhat test
  5. Run coverage test: npm run run:coverage

Slither reports

For static analysis we use Slither. When it's installed locally, you can run: npm run run:slither

Deployment

The contracts can be deployed either directly through Hardhat or through a Fireblocks integration (with the help of Hardhat). This section explains direct Hardhat deployment - Fireblocks deployment is documented elsewhere. Deployments also verify the contracts in Etherscan.

Steps:

  1. Set your environment variables in .secrets.env. You can see .secrets.env.example for the format. Note that you don't need any of the Fireblocks-related settings when deploying directly with Hardhat
  2. Deploy: npx hardhat run scripts/deployManual.ts --network goerliDirect
  3. Go to Etherscan and open the address given by the deployment script. Mark the contract as proxy in Etherscan.