@passive-income/dpex-peripheral
v1.1.9
Published
🎚 Peripheral smart contracts for interacting with dpex
Downloads
672
Readme
PSI Dex contracts
This project is using Hardhat for development, compiling, testing and deploying. The development tool used for development is Visual Studio Code which has great plugins for solidity development and mocha testing.
Contracts
Binance Chain
- PSI : 0x9A5d9c681Db43D9863e9279c800A39449B7e1d6f
- Factory : 0x92Be203e0dfb40c1a1F937a36929E02856257A2e
- PSI Governance : 0xa1B540B2BE89b55d5949754E326Fb80063F9781f
- Fee Aggregator : 0xE431399b0FD372DF941CF5e23DBa9FC9Ad605FeF
- Router Pairs : 0x275E7d2cBD1687FcCf5e94c33823c2c2d70a553d
- Router : 0xeEdF12C62b8930EC7a1c729616870898D5E8c586
- WETH Wrapper : 0xee54832dba3b4e7ad7f01065d3e948421c784dfd
Binance Test Chain
- PSI : 0x066Bd99080eC62FE0E28bA687A53aC00794c17b6
- Factory : 0x4FA3c5c24c55ED946B304F72D33FF24835fb2aB6
- PSI Governance : 0x04A31EEF89095Eb131Cb1b48bb3ab87655e5e681
- Fee Aggregator : 0xdA56896De5A1aF4E3f32c0e8A8b8A06Ca90CB50c
- Router Pairs : 0xCeb7e8E7472509b1Fe0BA4D1Be6Ca7adE2b6D449
- Router : 0xF561518cDaE1d0795e8077730aD5A28096cC6a5F
- WETH Wrapper : 0x894DEb431457507D67994910BAE3496d87ff49EB
Mainnet
Kovan
Compiling
Introduction to compiling these contracts
Install needed packages
npm install or yarn install
Compile code
npx hardhat compile
Test code
npx hardhat test
Run a local development node
This is needed before a truffle migrate to the development network. You can also use this for local development with for example metamask. Hardhat node guide
npx hardhat node
Scripts
Use the scripts in the "scripts" folder. Each script has the command to start it on top.
Make sure you have set the right settings in your '.env' file. You have to create this file with the following contents yourself:
BSC_PRIVATE_KEY=<private_key>
BSC_TEST_PRIVATE_KEY=<private_key>
KOVAN_PRIVATE_KEY=<private_key>
RINKEBY_PRIVATE_KEY=<private_key>
GOERLI_PRIVATE_KEY=<private_key>
MAIN_PRIVATE_KEY=<private_key>
KOVAN_INFURA=https://kovan.infura.io/v3/<infura_key>
RINKEBY_INFURA=https://rinkeby.infura.io/v3/<infura_key>
GOERLI_INFURA=https://goerli.infura.io/v3/<infura_key>
MAIN_INFURA=https://mainnet.infura.io/v3/<infura_key>
MAIN_ALCHEMY_URL=https://eth-mainnet.alchemyapi.io/v2/<alchemy_key>
KOVAN_ALCHEMY_URL=https://eth-kovan.alchemyapi.io/v2/<alchemy_key>
ETHERSCAN_API_TOKEN=<etherscan_api_token>
BSC_API_TOKEN=<bscscan_api_token>
Flatten contracts
npx hardhat flatten contracts/DPexRouter.sol > contracts-flattened/DPexRouter.sol