From 27de5b6d28067b8966f7f8abc5649ae78336125e Mon Sep 17 00:00:00 2001 From: Shunji Zhan Date: Tue, 9 Jul 2024 09:56:21 +0800 Subject: [PATCH] swap and router factory new deployments (#58) * swap and router factory deployment * deployed swap router * bump --- hardhat.config.ts | 21 +++++++++++++-------- package.json | 2 +- scripts/consts.ts | 4 ++-- scripts/deploy-fee.ts | 5 +++-- scripts/deploy-swap-and-route-factory.ts | 21 +++++++++++++++++++++ 5 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 scripts/deploy-swap-and-route-factory.ts diff --git a/hardhat.config.ts b/hardhat.config.ts index 4aab922..53e1e74 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -10,34 +10,39 @@ const TEST_ACCOUNTS = { path: 'm/44\'/60\'/0\'/0', }; -const PROD_ACCOUNTS = process.env.KEY ? process.env.KEY.split(',') : []; +const MY_ACCOUNTS = process.env.KEY ? process.env.KEY.split(',') : []; const config: HardhatUserConfig = { solidity: '0.8.18', networks: { mandala: { url: 'http://127.0.0.1:8545', - accounts: TEST_ACCOUNTS, + accounts: MY_ACCOUNTS, chainId: 595, }, karuraTestnet: { url: 'https://eth-rpc-karura-testnet.aca-staging.network', - accounts: TEST_ACCOUNTS, + accounts: MY_ACCOUNTS, chainId: 596, }, + acalaTestnet: { + url: 'https://eth-rpc-acala-testnet.aca-staging.network', + accounts: MY_ACCOUNTS, + chainId: 597, + }, acalaFork: { url: 'https://crosschain-dev.polkawallet.io/forkAcala/', - accounts: PROD_ACCOUNTS, + accounts: MY_ACCOUNTS, chainId: 787, }, karura: { url: 'https://eth-rpc-karura.aca-api.network', - accounts: PROD_ACCOUNTS, + accounts: MY_ACCOUNTS, chainId: 686, }, acala: { url: 'https://eth-rpc-acala.aca-api.network', - accounts: PROD_ACCOUNTS, + accounts: MY_ACCOUNTS, chainId: 787, }, }, @@ -64,8 +69,8 @@ const config: HardhatUserConfig = { network: 'acalaTestnet', chainId: 597, urls: { - apiURL: 'https://blockscout.acala-dev.aca-dev.network/api', - browserURL: 'https://blockscout.acala-dev.aca-dev.network', + apiURL: 'https://blockscout.acala-testnet.aca-staging.network/api', + browserURL: 'https://blockscout.acala-testnet.aca-staging.network', }, }, { diff --git a/package.json b/package.json index 8fd9475..16f2a7e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/asset-router", - "version": "1.0.18-1", + "version": "1.0.18", "main": "dist/index.js", "repository": "git@github.com:AcalaNetwork/asset-router.git", "author": "Acala Developers ", diff --git a/scripts/consts.ts b/scripts/consts.ts index 2dfb170..66ccd9a 100644 --- a/scripts/consts.ts +++ b/scripts/consts.ts @@ -71,12 +71,12 @@ export const ADDRESSES = { [CHAIN.ACALA]: { tokenBridgeAddr: CONTRACTS.MAINNET.acala.token_bridge, factoryAddr: '0x4D72F3b3e6D2AFeD99923137a04b9Cd9Cd2F21C5', - feeAddr: '0x94Bb240Ff3BB9a61D8f31C39978Ce7D858b9C015', + feeAddr: '0x5Fc7261E168F6a8c1053F2208c7db4BCbef133b3', usdcAddr: '0x07DF96D1341A7d16Ba1AD431E2c847d978BC2bCe', homaFactoryAddr: '0x2ed9aa0e30D52958E21Db37FfBDC3F0B0fD4b973', accountHelperAddr: '0x0252340cC347718f9169d329CEFf8B15A92badf8', euphratesFactoryAddr: '0x2AeFc65B6E1660d2bA2796f8698120A2acB95634', - swapAndStakeFactoryAddr: '', + swapAndStakeFactoryAddr: '0x3923E44cf1062FBa513279Ab81e6B8727a6de3D6', }, } as const; diff --git a/scripts/deploy-fee.ts b/scripts/deploy-fee.ts index d8c96f6..eafc9a2 100644 --- a/scripts/deploy-fee.ts +++ b/scripts/deploy-fee.ts @@ -58,7 +58,7 @@ karura: 0x2AeFc65B6E1660d2bA2796f8698120A2acB95634 '0x0000000000000000000100000000000000000082': 1000000000n } -acala: 0x94Bb240Ff3BB9a61D8f31C39978Ce7D858b9C015 +acala: 0x5Fc7261E168F6a8c1053F2208c7db4BCbef133b3 { '0xD53E4bA478cCA5080C47435769ff82F41e5e4cd0': 36000000000000000n, '0x19EbA3efA7D0E02956678C5f3c63c46Beda2D7D8': 50000000000000000n, @@ -80,6 +80,7 @@ acala: 0x94Bb240Ff3BB9a61D8f31C39978Ce7D858b9C015 '0x0000000000000000000100000000000000000002': 100000000n, '0x0000000000000000000100000000000000000003': 800000000n, '0x0000000000000000000300000000000000000000': 100000000n, - '0x000000000000000000040000000000000000000d': 100000000n + '0x000000000000000000040000000000000000000d': 100000000n, + '0xa7fb00459f5896c3bd4df97870b44e868ae663d7': 300000n } --------------- */ diff --git a/scripts/deploy-swap-and-route-factory.ts b/scripts/deploy-swap-and-route-factory.ts new file mode 100644 index 0000000..6332991 --- /dev/null +++ b/scripts/deploy-swap-and-route-factory.ts @@ -0,0 +1,21 @@ +import { ethers, run } from 'hardhat'; + +async function main() { + const Factory = await ethers.getContractFactory('SwapAndStakeEuphratesFactory'); + const factory = await Factory.deploy(); + await factory.deployed(); + + console.log(`swap and route factory address: ${factory.address}`); + + if (process.env.VERIFY) { + await run('verify:verify', { + address: factory.address, + constructorArguments: [], + }); + } +} + +main().catch((error) => { + console.error(error); + process.exitCode = 1; +});