From 4a763a7a7c93c91e8fc1e38fe709ff01fe44d086 Mon Sep 17 00:00:00 2001 From: 0xchin Date: Wed, 20 Nov 2024 01:53:54 -0300 Subject: [PATCH] chore: add polygon deploy script --- package.json | 4 +++- script/Deploy.sol | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index bb9d141..ea90ce4 100644 --- a/package.json +++ b/package.json @@ -29,8 +29,9 @@ "test:arbitrum-sepolia": "TESTING=true FORKED_NETWORK=arbitrum-sepolia FORK_BLOCK=98684306 forge test -vvv ", "test:fuzz": "echidna test/invariants/fuzz/Greeter.t.sol --contract InvariantGreeter --corpus-dir test/invariants/fuzz/echidna_coverage/ --test-mode assertion", "test:integration": "TESTING=true FORKED_NETWORK=mainnet FORK_BLOCK=18920905 forge test --match-contract Integration -vvv", - "test:optimism": "TESTING=true FORKED_NETWORK=optimism FORK_BLOCK=128238511 forge test -vvv ", + "test:optimism": "TESTING=true FORKED_NETWORK=optimism FORK_BLOCK=121238511 forge test -vvv ", "test:optimism-sepolia": "TESTING=true FORKED_NETWORK=optimism-sepolia FORK_BLOCK=20113040 forge test -vvv ", + "test:polygon": "TESTING=true FORKED_NETWORK=polygon FORK_BLOCK=53501016 forge test -vvv ", "test:symbolic": "halmos", "test:unit": "forge test --match-contract Unit -vvv", "test:unit:deep": "FOUNDRY_FUZZ_RUNS=5000 yarn test:unit" @@ -41,6 +42,7 @@ "test/**/*.sol": "yarn lint:sol-tests", "package.json": "sort-package-json" }, + "dependencies": {}, "devDependencies": { "@aave/core-v3": "^1.19.3", "@commitlint/cli": "19.3.0", diff --git a/script/Deploy.sol b/script/Deploy.sol index e290754..2677009 100644 --- a/script/Deploy.sol +++ b/script/Deploy.sol @@ -115,6 +115,39 @@ contract Deploy is Script { rewardsController: address(0x929EC64c34a17401F460460D4B9390518E5B473e) // Rewards Controller }); + params = DeploymentParams({ + tokens: _tokens, + aavePool: IPool(0x794a61358D6845594F94dc1DB02A252b5b4814aD), + initialFee: 0.01 ether, // 1% + initialPerformanceFee: 0.05 ether, // 5% + vaults: _vaults + }); + } else if (chainId == CHAIN_POLYGON) { + address[] memory _tokens = new address[](3); + _tokens[0] = address(0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359); // USDC + _tokens[1] = address(0xc2132D05D31c914a87C6611C10748AEb04B58e8F); // USDT + _tokens[2] = address(0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063); // DAI + + VaultDeploymentParams[] memory _vaults = new VaultDeploymentParams[](3); + + _vaults[0] = VaultDeploymentParams({ + token: address(0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359), // USDC + aToken: address(0xA4D94019934D8333Ef880ABFFbF2FDd611C762BD), // aUSDC + rewardsController: address(0x929EC64c34a17401F460460D4B9390518E5B473e) // Rewards Controller + }); + + _vaults[1] = VaultDeploymentParams({ + token: address(0xc2132D05D31c914a87C6611C10748AEb04B58e8F), // USDT + aToken: address(0x6ab707Aca953eDAeFBc4fD23bA73294241490620), // aUSDT + rewardsController: address(0x929EC64c34a17401F460460D4B9390518E5B473e) // Rewards Controller + }); + + _vaults[2] = VaultDeploymentParams({ + token: address(0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063), // DAI + aToken: address(0x82E64f49Ed5EC1bC6e43DAD4FC8Af9bb3A2312EE), // aDAI + rewardsController: address(0x929EC64c34a17401F460460D4B9390518E5B473e) // Rewards Controller + }); + params = DeploymentParams({ tokens: _tokens, aavePool: IPool(0x794a61358D6845594F94dc1DB02A252b5b4814aD),