-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathAaveV2ConfigEngine.s.sol
More file actions
83 lines (73 loc) · 2.3 KB
/
AaveV2ConfigEngine.s.sol
File metadata and controls
83 lines (73 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'solidity-utils/contracts/utils/ScriptUtils.sol';
import {AaveV2Ethereum} from 'aave-address-book/AaveV2Ethereum.sol';
import {AaveV2EthereumAMM} from 'aave-address-book/AaveV2EthereumAMM.sol';
import {AaveV2Polygon} from 'aave-address-book/AaveV2Polygon.sol';
import {AaveV2Avalanche} from 'aave-address-book/AaveV2Avalanche.sol';
import {AaveV2ConfigEngine} from '../src/v2-config-engine/AaveV2ConfigEngine.sol';
import {IV2RateStrategyFactory} from '../src/v2-config-engine/IV2RateStrategyFactory.sol';
library DeployV2EngineEthLib {
function deploy(address ratesFactory) internal returns (address) {
return
address(
new AaveV2ConfigEngine(
AaveV2Ethereum.POOL_CONFIGURATOR,
IV2RateStrategyFactory(ratesFactory)
)
);
}
}
library DeployV2EngineEthAMMLib {
function deploy(address ratesFactory) internal returns (address) {
return
address(
new AaveV2ConfigEngine(
AaveV2EthereumAMM.POOL_CONFIGURATOR,
IV2RateStrategyFactory(ratesFactory)
)
);
}
}
library DeployV2EnginePolLib {
function deploy(address ratesFactory) internal returns (address) {
return
address(
new AaveV2ConfigEngine(
AaveV2Polygon.POOL_CONFIGURATOR,
IV2RateStrategyFactory(ratesFactory)
)
);
}
}
library DeployV2EngineAvaLib {
function deploy(address ratesFactory) internal returns (address) {
return
address(
new AaveV2ConfigEngine(
AaveV2Avalanche.POOL_CONFIGURATOR,
IV2RateStrategyFactory(ratesFactory)
)
);
}
}
contract DeployV2EngineEth is EthereumScript {
function run() external broadcast {
DeployV2EngineEthLib.deploy(0xbD37610BBB1ddc2a22797F7e3f531B59902b7bA7);
}
}
contract DeployV2EngineEthAMM is EthereumScript {
function run() external broadcast {
DeployV2EngineEthAMMLib.deploy(0x6e4D068105052C3877116DCF86f5FF36B7eCa2B8);
}
}
contract DeployV2EnginePol is PolygonScript {
function run() external broadcast {
DeployV2EnginePolLib.deploy(0xD05003a24A17d9117B11eC04cF9743b050779c08);
}
}
contract DeployV2EngineAva is AvalancheScript {
function run() external broadcast {
DeployV2EngineAvaLib.deploy(0x6e66E50870A93691C1b953788A3219e01fDdeDD7);
}
}