This repository contains the periphery smart contracts for the DerpDEX Protocol. For the lower level core contracts, see the derpdex-core repository.
This repository is subject to DerpDEX bug bounty program, per terms defined here.
Three zksync networks are supported (local, testnet, mainnet). The NODE_ENV
environment variable should be updated before deploying the contracts.
The NFTDescriptor library should be deployed first and the address should be updated in addresses/index.ts
.
export NODE_ENV=mainnet
yarn hardhat copmile && yarn hardhat deploy-zksync --script deploy/01_deployLibraries.ts
The address should be updated to the addresses/index.ts
file.
export NODE_ENV=mainnet
yarn hardhat copmile && yarn hardhat deploy-zksync --script deploy/02_deploy.ts
After deployment, address of NonfungiblePositionManager
contract should be updated in addresses/index.ts
export NODE_ENV=mainnet
yarn hardhat copmile && yarn hardhat deploy-zksync --script deploy/03_deployOthers.ts
The deploy scripts will verify the contracts. Following command can be used to manually verify the contracts.
$ yarn hardhat verify --network zkSyncNetwork CONTRACT_ADDRESS CONSTRUCTOR_PARAMS
$ yarn hardhat verify-status --verification-id VERIFICATION_ID