Skip to content

fix(lending): expose set_oracle so multisig SetOracle can target lending - #449

Open
comandanto wants to merge 1 commit into
thisisouvik:mainfrom
comandanto:fix/multisig-setoracle-target-method
Open

comandanto wants to merge 1 commit into
thisisouvik:mainfrom
comandanto:fix/multisig-setoracle-target-method

Conversation

@comandanto

Copy link
Copy Markdown

Description

The multisig SetOracle action dispatches to set_oracle, but LendingContract only exposed set_price_oracle. Executing a SetOracle proposal targeting the lending contract panicked on-chain. This adds set_oracle to LendingContract as a thin alias of set_price_oracle (same auth and multisig checks, same storage and event), and adds an integration test running a real SetOracle proposal against LendingContract.

Related Issue

Closes #423

Motivation and Context

Governance could not update the lending price oracle through the multisig. Keeping set_price_oracle and adding the alias leaves existing callers untouched and keeps borrower_reputation (which already uses set_oracle) working.

How Has This Been Tested?

From contracts/ on Windows, stable Rust:

  • cargo test: all suites pass, including the new test_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 on main too with 15 unused variable: admin errors in contracts/lending/src/test.rs (lines 92-1283). None are in code touched here, so I left them alone.
test test::test_setting_oracle_via_multisig ... ok
test test::test_setting_oracle_on_lending_via_multisig ... ok
test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality) - n/a
  • Breaking change - n/a

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation. - n/a, no docs reference this symbol
  • I have updated the documentation accordingly. - n/a
  • I have read the CONTRIBUTING document.

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
@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

@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.

@coderabbitai

coderabbitai Bot commented Oct 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f905764e-e2ea-40f6-ad5e-dafd3d8c296c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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.

Fix Multisig Target Method Mismatch for SetOracle Action in MultisigAdminContract

1 participant