Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/certora-basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ concurrency:
on:
pull_request:
branches:
- main
- certora
- "**"
push:
branches:
- main
Expand All @@ -18,13 +17,14 @@ on:
jobs:
verify:
runs-on: ubuntu-latest
if:
github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'push' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
# if:
# github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'push' &&
# github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
permissions:
contents: read
statuses: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -36,7 +36,7 @@ jobs:
touch applyHarness.patch
make munged

- uses: Certora/certora-run-action@v1
- uses: Certora/certora-run-action@v2
with:
cli-version: 7.29.1
configurations: |-
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/certora-stata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ concurrency:
on:
pull_request:
branches:
- main
- certora
- "**"
push:
branches:
- main
Expand All @@ -18,13 +17,14 @@ on:
jobs:
verify:
runs-on: ubuntu-latest
if:
github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'push' &&
github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
# if:
# github.event.pull_request.head.repo.full_name == github.repository || (github.event_name == 'push' &&
# github.ref == format('refs/heads/{0}', github.event.repository.default_branch))
permissions:
contents: read
statuses: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -36,7 +36,7 @@ jobs:
touch applyHarness.patch
make munged

- uses: Certora/certora-run-action@v1
- uses: Certora/certora-run-action@v2
with:
cli-version: 7.29.1
configurations: |-
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ deploy-phase-one-update-payload :;
--sig "run()" \
--verify --broadcast

# Deploy liquidation data provider. `make deploy-liquidation-data-provider` CHAIN=mainnet ACCOUNT=account
deploy-liquidation-data-provider :;
FOUNDRY_PROFILE=${CHAIN} forge script scripts/misc/DeployLiquidationDataProvider.sol:DeployLiquidationDataProvider \
--rpc-url ${CHAIN} --account ${ACCOUNT} --slow --gas-estimate-multiplier 150 \
--chain ${CHAIN} --verifier etherscan \

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)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--sig "run()" \
--verify --broadcast

# Invariants
echidna:
echidna tests/invariants/Tester.t.sol --contract Tester --config ./tests/invariants/_config/echidna_config.yaml --corpus-dir ./tests/invariants/_corpus/echidna/default/_data/corpus
Expand Down
20 changes: 20 additions & 0 deletions scripts/misc/DeployLiquidationDataProvider.sol
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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally we should take these as inputs (maybe as args in run()), wdyt?

Copy link
Author

@yan-man yan-man Sep 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that would be more versatile, i did it like this bc I was focused on horizon deployment but good call

edit: bc5c38e

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);
}
}
24 changes: 24 additions & 0 deletions tests/deployments/DeployLiquidationDataProvider.t.sol
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()
);
}
}
1 change: 1 addition & 0 deletions tests/deployments/HorizonPhaseOneListing.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ abstract contract HorizonListingMainnetTest is HorizonListingBaseTest {
});

function setUp() public virtual {
vm.skip(true);
vm.createSelectFork('mainnet');
initEnvironment();
}
Expand Down
1 change: 1 addition & 0 deletions tests/deployments/HorizonPhaseOneUpdate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ contract HorizonPhaseOneUpdateTest is HorizonPhaseOneListingTest {
}

function setUp() public virtual override {
vm.skip(true);
super.setUp();
loadUpdatedParams();
}
Expand Down
Loading