1. Deploy MdexController
npm run deploy:rinkeby scripts/controllers/index.js2. Deploy MdexCrossChainSwap
-
Deploy MdexCrossChainSwap
You must disable Connext Service before Deploy MdexCrossChainSwap
const mdexCrossChainSwap = require('./mdex-cross-chain-swap'); const connextService = require('./connext-service'); async function main() { await mdexCrossChainSwap(); // await connextService(); } main().catch((error) => { console.error(error); process.exitCode = 1; });
npm run deploy:rinkeby scripts/bridge/index.js
-
In the file connext-service.js you must set the parameter in constructor are ConnextHandler Address, promiseRouter, MdexCross Address
const hre = require('hardhat'); module.exports = async function main() { // Deploy Token const ConnextService = await hre.ethers.getContractFactory('ConnextService'); const connextService = await ConnextService.deploy( 'Connext Handler Address', 'Promise Router Address', 'Mdex Cross Chain Address', ); await connextService.deployed(); };
You must disable MdexCrossChainSwap before deploy Connext Service
const mdexCrossChainSwap = require('./mdex-cross-chain-swap'); const connextService = require('./connext-service'); async function main() { // await mdexCrossChainSwap(); await connextService(); } main().catch((error) => { console.error(error); process.exitCode = 1; });
npm run deploy:rinkeby scripts/bridge/index.js
3. Deploy AMM Uniswap
npm run deploy:rinkeby scripts/amm-uniswap/00_deploy-core.js4. Deploy Best Rate
npm run deploy:rinkeby scripts/best-rate/index.js5. Deploy Tokens
npm run deploy:rinkeby scripts/tokens/index.js6. Deploy Multisig Wallet You can set constructor in the file multisigWallet.js follow this example
const hre = require('hardhat');
module.exports = async function main() {
const MultiSigWallet = await hre.ethers.getContractFactory('MultiSigWallet');
const multiSigWallet = await MultiSigWallet.deploy([
'Wallet 1',
'Wallet 2',
'Wallet 3',
'Wallet 4',
'Wallet 5',
'Wallet 6',
'Wallet 7',
]);
await multiSigWallet.deployed();
};npm run deploy:rinkeby scripts/wallet/index.jsTo try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Ropsten.
In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details. Enter your Etherscan API key, your Ropsten node URL (eg from Alchemy), and the private key of the account which will send the deployment transaction. With a valid .env file in place, first deploy your contract:
hardhat run --network ropsten scripts/deploy.jsThen, copy the deployment address and paste it in to replace DEPLOYED_CONTRACT_ADDRESS in this command:
npx hardhat verify --network ropsten DEPLOYED_CONTRACT_ADDRESS "Hello, Hardhat!"