Skip to content

Commit

Permalink
custom oracle prices
Browse files Browse the repository at this point in the history
  • Loading branch information
codehans committed Jun 5, 2024
1 parent 8fc8ab8 commit c72cc99
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/kujira-rs-testing/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "kujira-rs-testing"
version = "1.6.0"
version = "1.7.0"
authors = ["Kujira Labs"]
edition = "2018"
description = "Interfaces and utilities for Kujira cosmwasm contracts"
Expand Down
12 changes: 5 additions & 7 deletions packages/kujira-rs-testing/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@ pub type CustomApp = App<
DistributionKeeper,
>;

pub fn mock_app(balances: Vec<(Addr, Vec<Coin>)>) -> CustomApp {
let mut custom = KujiraModule {
oracle_prices: HashMap::new(),
};
custom.set_oracle_price(Decimal::from_ratio(1425u128, 100u128), "factory/owner/coll");
custom.set_oracle_price(Decimal::one(), "factory/contract0/uusk");

pub fn mock_app(
balances: Vec<(Addr, Vec<Coin>)>,
oracle_prices: HashMap<String, Decimal>,
) -> CustomApp {
let custom = KujiraModule { oracle_prices };
BasicAppBuilder::new_custom()
.with_custom(custom)
.with_api(MockApiBech32::new("kujira"))
Expand Down

0 comments on commit c72cc99

Please sign in to comment.