Super Protocol Execution Controller

Local Dev Setup

  1. Install dependencies:

    yarn install
    
  2. Create .env file:

    cp .env.example .env
    
  3. Replace example environment variables to your values in .env file

Useful commands

Tests

$ npx hardhat test
$ npx hardhat test test/promoStaking.test.ts --show-stack-traces

Deploy to locale node

$ npx hardhat node
$ npx hardhat run scripts/deploy.ts --network local
$ ethernal listen

Deploy to other networks

$ npx hardhat run scripts/deploy.ts --network <network_name>

Verify on etherscan

npx hardhat verify --network ethereum <contract_address> <staking_initializer_address>

Tasks

This task will initialize PromoStaking:

npx hardhat initialize --network <network_name> --contract <promo_staking_contract> --token <token_address> --start <staking_start_block> --duration <staking_duration_in_blocks>

Prettier and linter

$ npm run eslint
$ npm run prettier
$ npx prettier --write 'contracts/**/*.sol'

Useful plugins and extensions