Skip to content
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

refactor(test): use market-lib #170

Merged
merged 3 commits into from
Jul 27, 2023
Merged

refactor(test): use market-lib #170

merged 3 commits into from
Jul 27, 2023

Conversation

Rubilmax
Copy link
Contributor

Illustrates how an integrator would use MarketLib

@Rubilmax Rubilmax marked this pull request as ready for review July 25, 2023 07:40
makcandrov
makcandrov previously approved these changes Jul 25, 2023
Copy link
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

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

Is it just for illustration or do you want to merge it?

@Rubilmax
Copy link
Contributor Author

Is it just for illustration or do you want to merge it?

I'd like to merge it yes because the test suite should IMO be illustrative of how integrators would interact with our protocol.

MerlinEgalite
MerlinEgalite previously approved these changes Jul 25, 2023
Base automatically changed from feat/id-variants to main July 25, 2023 11:29
@MathisGD MathisGD dismissed stale reviews from MerlinEgalite and makcandrov July 25, 2023 11:29

The base branch was changed.

makcandrov
makcandrov previously approved these changes Jul 26, 2023
Jean-Grimal
Jean-Grimal previously approved these changes Jul 26, 2023
Copy link
Contributor

@MathisGD MathisGD left a comment

Choose a reason for hiding this comment

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

this works and it's cleaner to me (Solidity is surprising sometimes)

        market = Market(
            IERC20(address(borrowableAsset)),
            IERC20(address(collateralAsset)),
            borrowableOracle,
            collateralOracle,
            irm,
            LLTV
        );
        id = market.id();

test/forge/Blue.t.sol Outdated Show resolved Hide resolved
test/forge/Blue.t.sol Outdated Show resolved Hide resolved
test/forge/Blue.t.sol Outdated Show resolved Hide resolved
pakim249CAL
pakim249CAL previously approved these changes Jul 26, 2023
@MerlinEgalite
Copy link
Contributor

this works and it's cleaner to me (Solidity is surprising sometimes)

        market = Market(
            IERC20(address(borrowableAsset)),
            IERC20(address(collateralAsset)),
            borrowableOracle,
            collateralOracle,
            irm,
            LLTV
        );
        id = market.id();

Proposed here #189

@MathisGD MathisGD merged commit 7e97f75 into main Jul 27, 2023
2 checks passed
@MathisGD MathisGD deleted the refactor/test-id branch July 27, 2023 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants