veIB Migration

This repository hosts the smart contracts that implement the migration logic for veIB from FTM to OP

Install

# Install project dependencies
npm install

Environment Variables

Please setup your own .env file based on the variables in env-template file.

Commands

# Format code
npm run format

# Unit test coverage
npm run coverage

Deployment

  1. In hardhat.config.ts, fill in the veIB address for OP
  2. Execute:
    npx hardhat deploy --tags deploy-dest --network optimism
  3. In 001_deploy_src_chain.ts, fill in the receiver address (veMigrationDest deployed in Step 2)
  4. Execute:
    npx hardhat deploy --tags deploy-src --network fantom
  5. In 002_setup_dest.ts, fill in the sender (veMigrationSrc in Step 4), prepaidFees
  6. Execute:
    npx hardhat deploy --tags setup-dest --network fantom
  7. Make sure veMigrationDest has minter access to IB token on OP.

Verify

npx hardhat etherscan-verify --network optimism
npx hardhat etherscan-verify --network fantom

Tests

Source

Destination