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

Mock band fixes #351

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ members = [
# "contracts/snip20_staking", //TODO: migrate to v1

# Mock contracts
# "contracts/mock/mock_band", //TODO: migrate to v1
"contracts/mock/mock_band",
# "contracts/mock/mock_secretswap_pair", //TODO: migrate to v1
"contracts/mock/mock_sienna_pair",
# "contracts/mock/mock_adapter", //TODO: migrate to v1
Expand Down
4 changes: 2 additions & 2 deletions archived-contracts/bonds/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ shade-oracles = { git = "https://github.com/securesecrets/shade-oracle.git", tag
[dev-dependencies]
fadroma = { branch = "v100", commit = 76867e0, git = "https://github.com/hackbg/fadroma.git", features= ["ensemble"] }
fadroma-platform-scrt = { branch = "v100", commit = 76867e0, git = "https://github.com/hackbg/fadroma.git" }
contract_harness = { version = "0.1.0", path = "../../packages/contract_harness", features = [ "snip20", "bonds", "oracle", "mock_band", "query_auth", "admin", "shade-oracles-ensemble" ] }
mock_band = { version = "0.1.0", path = "../../contracts/mock_band" }
shade-multi-test = { version = "0.1.0", path = "../../packages/multi_test", features = [ "snip20", "bonds", "oracle", "mock_band", "query_auth", "admin", "shade-oracles-ensemble" ] }
AustinWoetzel marked this conversation as resolved.
Show resolved Hide resolved
mock_band = { version = "0.1.0", path = "../mock_band" }
shade-oracles-ensemble = { git = "https://github.com/securesecrets/shade-oracle.git", tag = "0.11"}

Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
use shade_protocol::c_std::{
to_binary,
Api,
Binary,
Env,
DepsMut,
Response,
Querier,
StdError,
StdResult,
Storage,
Deps,
};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use shade_protocol::contract_interfaces::oracles::band::{InstantiateMsg, ReferenceData};
use shade_protocol::c_std::Uint128;
Expand All @@ -27,7 +25,7 @@ pub fn price_w(storage: &mut dyn Storage) -> Bucket<Uint128> {
bucket(storage, PRICE)
}

pub fn init(
pub fn instantiate(
Copy link
Collaborator

Choose a reason for hiding this comment

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

add #[shd_entry_point] to this, execute & query

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

_deps: DepsMut,
_env: Env,
_msg: InstantiateMsg,
Expand Down Expand Up @@ -100,7 +98,6 @@ pub fn query(
} else {
return Err(StdError::GenericErr {
msg: "Missing Price Feed".to_string(),
backtrace: None,
});
}
}
Expand Down