-
Notifications
You must be signed in to change notification settings - Fork 7
feat: liquidation data provider deployment script #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
89120ea
edef5b1
4a76385
d06de2a
4f5b164
6dd1023
bc5c38e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import {LiquidationDataProvider} from '../../src/contracts/helpers/LiquidationDataProvider.sol'; | ||
| import {Script} from 'forge-std/Script.sol'; | ||
|
|
||
| contract DeployLiquidationDataProvider is Script { | ||
| address public constant POOL = 0xAe05Cd22df81871bc7cC2a04BeCfb516bFe332C8; | ||
|
||
| address public constant ADDRESSES_PROVIDER = 0x5D39E06b825C1F2B80bf2756a73e28eFAA128ba0; | ||
|
|
||
| function run() public returns (address) { | ||
| vm.startBroadcast(); | ||
| LiquidationDataProvider liquidationDataProvider = new LiquidationDataProvider( | ||
| POOL, | ||
| ADDRESSES_PROVIDER | ||
| ); | ||
| vm.stopBroadcast(); | ||
| return address(liquidationDataProvider); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| // SPDX-License-Identifier: BUSL-1.1 | ||
| pragma solidity ^0.8.0; | ||
|
|
||
| import {Test} from 'forge-std/Test.sol'; | ||
| import {DeployLiquidationDataProvider} from '../../scripts/misc/DeployLiquidationDataProvider.sol'; | ||
| import {ILiquidationDataProvider} from '../../src/contracts/helpers/interfaces/ILiquidationDataProvider.sol'; | ||
|
|
||
| contract DeployLiquidationDataProviderTest is Test { | ||
| DeployLiquidationDataProvider internal deployLiquidationDataProvider; | ||
| ILiquidationDataProvider internal liquidationDataProvider; | ||
|
|
||
| function setUp() public { | ||
| deployLiquidationDataProvider = new DeployLiquidationDataProvider(); | ||
| liquidationDataProvider = ILiquidationDataProvider(deployLiquidationDataProvider.run()); | ||
| } | ||
|
|
||
| function test_deployLiquidationDataProvider() public { | ||
| assertEq(address(liquidationDataProvider.POOL()), deployLiquidationDataProvider.POOL()); | ||
| assertEq( | ||
| address(liquidationDataProvider.ADDRESSES_PROVIDER()), | ||
| deployLiquidationDataProvider.ADDRESSES_PROVIDER() | ||
| ); | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd remove --verifier from here tbh, maybe add verifier-url? (to be able to use tenderly verifier is needed)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bc5c38e