Repository navigation
fix(lending): expose set_oracle so multisig SetOracle can target lending - #449
Open
comandanto wants to merge 1 commit into
Open
comandanto wants to merge 1 commit into
comandanto wants to merge 1 commit into
Conversation
The multisig SetOracle action dispatches to set_oracle, but the lending contract only exposed set_price_oracle, so executing the proposal panicked. Add set_oracle as an alias and cover it with a multisig integration test against LendingContract. Closes thisisouvik#423
|
@comandanto is attempting to deploy a commit to the thisisouvik's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The multisig
SetOracleaction dispatches toset_oracle, butLendingContractonly exposedset_price_oracle. Executing aSetOracleproposal targeting the lending contract panicked on-chain. This addsset_oracletoLendingContractas a thin alias ofset_price_oracle(same auth and multisig checks, same storage and event), and adds an integration test running a realSetOracleproposal againstLendingContract.Related Issue
Closes #423
Motivation and Context
Governance could not update the lending price oracle through the multisig. Keeping
set_price_oracleand adding the alias leaves existing callers untouched and keepsborrower_reputation(which already usesset_oracle) working.How Has This Been Tested?
From
contracts/on Windows, stable Rust:cargo test: all suites pass, including the newtest_setting_oracle_on_lending_via_multisig(multisig-admin: 28 passed, 0 failed; lending: 135 passed, 0 failed).cargo build --target wasm32-unknown-unknown --release: finished OK.cargo clippy -p multisig-admin -p lending --lib -- -D warnings -A clippy::inconsistent_digit_grouping: clean.cargo clippy --all-targets -- -D warnings ...fails onmaintoo with 15unused variable: adminerrors incontracts/lending/src/test.rs(lines 92-1283). None are in code touched here, so I left them alone.Types of changes
Checklist: