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

feat: band price feeder #195

Merged
merged 13 commits into from
Sep 24, 2024
130 changes: 106 additions & 24 deletions Cargo.lock

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

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ repository = "https://github.com/osmosis-labs/mesh-security"
mesh-apis = { path = "./packages/apis" }
mesh-bindings = { path = "./packages/bindings" }
mesh-burn = { path = "./packages/burn" }
mesh-price-feed = { path = "./packages/price-feed" }
mesh-sync = { path = "./packages/sync" }
mesh-virtual-staking-mock = { path = "./packages/virtual-staking-mock" }

Expand All @@ -43,6 +44,9 @@ thiserror = "1.0.59"
semver = "1.0.22"
itertools = "0.12.1"

obi = "0.0.2"
cw-band = "0.1.1"

# dev deps
anyhow = "1"
cw-multi-test = "0.20"
Expand Down
8 changes: 6 additions & 2 deletions codegen/codegen.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ codegen({
dir: './contracts/consumer/converter/schema'
},
{
name: 'RemotePriceFeed',
dir: './contracts/consumer/remote-price-feed/schema'
name: 'OsmosisPriceFeed',
dir: './contracts/consumer/osmosis-price-feed/schema'
},
{
name: 'BandPriceFeed',
dir: './contracts/consumer/band-price-feed/schema'
},
{
name: 'SimplePriceFeed',
Expand Down
47 changes: 47 additions & 0 deletions contracts/consumer/band-price-feed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[package]
name = "mesh-band-price-feed"
description = "Returns exchange rates of assets fetched from Band Protocol"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }
repository = { workspace = true }

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib", "rlib"]

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []
# enables generation of mt utilities
mt = ["library", "sylvia/mt"]


[dependencies]
mesh-apis = { workspace = true }
mesh-price-feed = { workspace = true }

sylvia = { workspace = true }
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cw2 = { workspace = true }
cw-utils = { workspace = true }

schemars = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
obi = { workspace = true }
cw-band = { workspace = true }

[dev-dependencies]
cw-multi-test = { workspace = true }
test-case = { workspace = true }
derivative = { workspace = true }
anyhow = { workspace = true }

[[bin]]
name = "schema"
doc = false
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you mean to move this file or simply copy it?

Copy link
Collaborator

@JakeHartnell JakeHartnell Jul 26, 2024

Choose a reason for hiding this comment

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

I see other files were moved too, did you kill the old remote-price-feed contract? Fine if you did, just make sure it's cleaned up. ❤️

Copy link
Collaborator Author

@trinitys7 trinitys7 Aug 5, 2024

Choose a reason for hiding this comment

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

I just move the schema.rs file into correct folder. I don't remove anything.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use cosmwasm_schema::write_api;

use mesh_remote_price_feed::contract::sv::{ContractExecMsg, ContractQueryMsg, InstantiateMsg};
use mesh_band_price_feed::contract::sv::{ContractExecMsg, ContractQueryMsg, InstantiateMsg};

#[cfg(not(tarpaulin_include))]
fn main() {
Expand Down
Loading
Loading