Skip to content

Commit

Permalink
swap and router factory new deployments (#58)
Browse files Browse the repository at this point in the history
* swap and router factory deployment

* deployed swap router

* bump
  • Loading branch information
shunjizhan authored Jul 9, 2024
1 parent 784ae22 commit 27de5b6
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 13 deletions.
21 changes: 13 additions & 8 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
},
Expand All @@ -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',
},
},
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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 <hello@acala.network>",
Expand Down
4 changes: 2 additions & 2 deletions scripts/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
5 changes: 3 additions & 2 deletions scripts/deploy-fee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ karura: 0x2AeFc65B6E1660d2bA2796f8698120A2acB95634
'0x0000000000000000000100000000000000000082': 1000000000n
}
acala: 0x94Bb240Ff3BB9a61D8f31C39978Ce7D858b9C015
acala: 0x5Fc7261E168F6a8c1053F2208c7db4BCbef133b3
{
'0xD53E4bA478cCA5080C47435769ff82F41e5e4cd0': 36000000000000000n,
'0x19EbA3efA7D0E02956678C5f3c63c46Beda2D7D8': 50000000000000000n,
Expand All @@ -80,6 +80,7 @@ acala: 0x94Bb240Ff3BB9a61D8f31C39978Ce7D858b9C015
'0x0000000000000000000100000000000000000002': 100000000n,
'0x0000000000000000000100000000000000000003': 800000000n,
'0x0000000000000000000300000000000000000000': 100000000n,
'0x000000000000000000040000000000000000000d': 100000000n
'0x000000000000000000040000000000000000000d': 100000000n,
'0xa7fb00459f5896c3bd4df97870b44e868ae663d7': 300000n
}
--------------- */
21 changes: 21 additions & 0 deletions scripts/deploy-swap-and-route-factory.ts
Original file line number Diff line number Diff line change
@@ -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;
});

0 comments on commit 27de5b6

Please sign in to comment.