Skip to content

Commit f80fe1d

Browse files
authored
Avalanche deployment (#186)
* deploying on Avalanche * deploying the swapper contract * verifying borrow helpers contract * fixing forge test
1 parent fb6c092 commit f80fe1d

25 files changed

Lines changed: 7606 additions & 12 deletions

β€Ždeploy/0_proxyAdmin.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
2222

2323
console.log(`Now deploying ProxyAdmin on the chain ${network.config.chainId}`);
2424
console.log('Guardian address is ', guardian);
25-
await deploy('ProxyAdmin', {
25+
await deploy('ProxyAdminGuardian', {
2626
contract: 'ProxyAdmin',
2727
from: deployer.address,
2828
log: !argv.ci,
2929
});
30-
const proxyAdminAddress = (await ethers.getContract('ProxyAdmin')).address;
30+
const proxyAdminAddress = (await ethers.getContract('ProxyAdminGuardian')).address;
3131

3232
proxyAdmin = new ethers.Contract(proxyAdminAddress, ProxyAdmin__factory.createInterface(), deployer) as ProxyAdmin;
3333

β€Ždeploy/5_vaultManagerImplementation.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ const func: DeployFunction = async ({ deployments, ethers }) => {
2121
};
2222

2323
func.tags = ['vaultManagerImplementation'];
24-
func.dependencies = ['oracle'];
24+
// func.dependencies = ['oracle'];
2525
export default func;

β€Ždeploy/6_vaultManagerProxy.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
6969
vaultManagerParams.params,
7070
vaultManagerParams.symbol,
7171
]);
72+
7273
// await deployProxy(name, implementation, proxyAdminAddress, callData);
7374
await deploy(name, {
7475
contract: 'TransparentUpgradeableProxy',
@@ -88,5 +89,5 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
8889
};
8990

9091
func.tags = ['vaultManagerProxy'];
91-
func.dependencies = ['vaultManagerImplementation'];
92+
// func.dependencies = ['vaultManagerImplementation'];
9293
export default func;

β€Ždeploy/7_swapper.tsβ€Ž

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
1212
const core = (await deployments.get('CoreBorrow')).address;
1313

1414
console.log('Now deploying the swapper contract');
15-
const angleRouter = registry(network.config.chainId as ChainId)?.AngleRouterV2;
15+
// const angleRouter = registry(network.config.chainId as ChainId)?.AngleRouterV2;
16+
const angleRouter = '0xf530b844fb797D2C6863D56a94777C3e411CEc86';
1617
console.log('Checking contract addresses');
1718
console.log(`${core} ${json.uniswapV3Router} ${json.oneInchRouter} ${angleRouter}`);
1819

19-
await deploy(`Swapper`, {
20+
await deploy(`SwapperV2`, {
2021
contract: 'Swapper',
2122
from: deployer.address,
2223
args: [core, json.uniswapV3Router, json.oneInchRouter, angleRouter],
2324
log: !argv.ci,
2425
});
2526
console.log('Success');
26-
const swapperAddress = (await deployments.get('Swapper')).address;
27+
const swapperAddress = (await deployments.get('SwapperV2')).address;
2728
console.log(`${swapperAddress}`);
2829
};
2930

β€Ždeploy/ui-helpers.tsβ€Ž

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,24 @@ const func: DeployFunction = async ({ deployments, ethers, network }) => {
1515
// Otherwise, we're using the proxy admin address from the desired network
1616
proxyAdmin = CONTRACTS_ADDRESSES[network.config.chainId as ChainId].ProxyAdmin!;
1717
}
18+
// Using the proxyAdminGuardian for Avalanche
19+
proxyAdmin = '0xe14bFA5575d9906BA35beb15C9DBe5C77bFdd5b5';
1820
console.log('deployer ', deployer.address);
1921

2022
console.log('Now deploying the AngleHelpers contract');
2123
console.log('Starting with the implementation');
22-
const angleHelpersImplementation = await deploy('AngleHelpers_Arbitrum_Implementation', {
24+
const angleHelpersImplementation = await deploy('AngleHelpers_Avalanche_Implementation', {
2325
contract: 'AngleBorrowHelpers',
2426
from: deployer.address,
2527
});
2628

27-
console.log(`Successfully deployed the Arbitrum implementation for AngleBorrowHelpers at ${angleHelpersImplementation.address}\n`);
29+
console.log(
30+
`Successfully deployed the Avalanche implementation for AngleBorrowHelpers at ${angleHelpersImplementation.address}\n`,
31+
);
2832

2933
console.log('Now deploying the Proxy');
3034
console.log(`Proxy admin: ${proxyAdmin}`);
31-
const angleHelpers = await deploy('AngleBorrowHelpersArbitrum', {
35+
const angleHelpers = await deploy('AngleBorrowHelpersAvalanche', {
3236
contract: 'TransparentUpgradeableProxy',
3337
from: deployer.address,
3438
args: [angleHelpersImplementation.address, proxyAdmin, '0x'],

β€Ždeployments/arbitrum/SwapperV2.jsonβ€Ž

Lines changed: 262 additions & 0 deletions
Large diffs are not rendered by default.

β€Ždeployments/arbitrum/solcInputs/891a411f4f277461fb1354bee4d4be13.jsonβ€Ž

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

β€Ždeployments/avalanche/AngleBorrowHelpersAvalanche.jsonβ€Ž

Lines changed: 235 additions & 0 deletions
Large diffs are not rendered by default.

β€Ždeployments/avalanche/AngleHelpers_Avalanche_Implementation.jsonβ€Ž

Lines changed: 152 additions & 0 deletions
Large diffs are not rendered by default.

β€Ždeployments/avalanche/Oracle_AVAX_EUR.jsonβ€Ž

Lines changed: 248 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
Β (0)