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

refactored fadroma update #228

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion contracts/governance/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ serde_json = { version = "1.0.67" }
mockall = "0.10.2"
mockall_double = "0.2.0"
fadroma = { branch = "v100", git = "https://github.com/hackbg/fadroma.git", features= ["ensemble"] }
fadroma-platform-scrt = { branch = "v100", git = "https://github.com/hackbg/fadroma.git" }
contract_harness = { version = "0.1.0", path = "../../packages/contract_harness", features = [ "governance", "snip20_staking", "snip20" ] }
spip_stkd_0 = { version = "0.1.0", path = "../snip20_staking" }
2 changes: 1 addition & 1 deletion contracts/governance/src/tests/handle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::tests::{admin_only_governance, get_config};
use contract_harness::harness::snip20::Snip20;
use cosmwasm_std::HumanAddr;
use fadroma::ensemble::MockEnv;
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use shade_protocol::{contract_interfaces::{governance, snip20}, utils::asset::Contract};

#[test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use contract_harness::harness::{governance::Governance, snip20_staking::Snip20St
use cosmwasm_math_compat::Uint128;
use cosmwasm_std::{to_binary, Binary, HumanAddr, StdResult};
use fadroma::ensemble::{ContractEnsemble, MockEnv};
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use shade_protocol::{
contract_interfaces::{
governance,
Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/src/tests/handle/proposal/funding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use contract_harness::harness::{governance::Governance, snip20::Snip20};
use cosmwasm_math_compat::Uint128;
use cosmwasm_std::{to_binary, Binary, HumanAddr, StdResult};
use fadroma::ensemble::{ContractEnsemble, MockEnv};
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use shade_protocol::{
contract_interfaces::{
governance,
Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/src/tests/handle/proposal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::tests::{
use cosmwasm_math_compat::Uint128;
use cosmwasm_std::{to_binary, Binary, HumanAddr, StdResult};
use fadroma::ensemble::{ContractEnsemble, MockEnv};
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use shade_protocol::{
contract_interfaces::{
governance,
Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/src/tests/handle/proposal/voting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use contract_harness::harness::{
use cosmwasm_math_compat::Uint128;
use cosmwasm_std::{to_binary, HumanAddr, StdResult};
use fadroma::ensemble::{ContractEnsemble, MockEnv};
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use shade_protocol::{
contract_interfaces::{
governance,
Expand Down
2 changes: 1 addition & 1 deletion contracts/governance/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use cosmwasm_std::{
StdError,
StdResult,
};
use fadroma::core::ContractLink;
use fadroma::ensemble::{ContractEnsemble, ContractHarness, MockDeps, MockEnv};
use fadroma_platform_scrt::ContractLink;
use serde::Serialize;
use shade_protocol::contract_interfaces::{
governance,
Expand Down
2 changes: 1 addition & 1 deletion contracts/mint/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use contract_harness::harness::{
use fadroma::{
ensemble::{ContractEnsemble, ContractHarness, MockDeps, MockEnv},
};
use fadroma::scrt::ContractLink;
use fadroma::core::ContractLink;

fn test_ensemble(
offer_price: Uint128,
Expand Down
1 change: 0 additions & 1 deletion contracts/query_auth/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,3 @@ contract_harness = { version = "0.1.0", path = "../../packages/contract_harness"
mockall = "0.10.2"
mockall_double = "0.2.0"
fadroma = { branch = "v100", git = "https://github.com/hackbg/fadroma.git", features= ["ensemble"] }
fadroma-platform-scrt = { branch = "v100", git = "https://github.com/hackbg/fadroma.git" }
2 changes: 1 addition & 1 deletion contracts/query_auth/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use cosmwasm_std::{
StdResult,
};
use fadroma::ensemble::{ContractEnsemble, MockEnv};
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use query_authentication::transaction::{PermitSignature, PubKey};
use shade_protocol::contract_interfaces::{
query_auth::{self, PermitData, QueryPermit},
Expand Down
3 changes: 1 addition & 2 deletions contracts/snip20/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ snafu = { version = "0.6.3" }
contract_harness = { version = "0.1.0", path = "../../packages/contract_harness", features = [ "snip20" ] }
mockall = "0.10.2"
mockall_double = "0.2.0"
fadroma = { branch = "v100", git = "https://github.com/hackbg/fadroma.git", features= ["ensemble"] }
fadroma-platform-scrt = { branch = "v100", git = "https://github.com/hackbg/fadroma.git" }
fadroma = { branch = "v100", git = "https://github.com/hackbg/fadroma.git", features= ["ensemble"] }
2 changes: 1 addition & 1 deletion contracts/snip20/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub fn balance<S: Storage, A: Api, Q: Querier>(
account: HumanAddr,
) -> StdResult<QueryAnswer> {
Ok(QueryAnswer::Balance {
amount: Balance::load(&deps.storage, account)?.0,
amount: Balance::may_load(&deps.storage, account)?.unwrap_or(Balance(Uint128::zero())).0,
})
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/snip20/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pub mod query;
use contract_harness::harness::snip20::Snip20;
use cosmwasm_std::{Binary, HumanAddr, StdResult};
use fadroma::ensemble::{ContractEnsemble, ContractHarness, MockDeps, MockEnv};
use fadroma_platform_scrt::ContractLink;
use fadroma::core::ContractLink;
use shade_protocol::contract_interfaces::{
snip20,
snip20::{InitConfig, InitialBalance},
Expand Down
2 changes: 1 addition & 1 deletion contracts/treasury/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use contract_harness::harness::{
};

use fadroma::{
scrt::ContractLink,
core::ContractLink,
ensemble::{
MockEnv, MockDeps,
ContractHarness, ContractEnsemble,
Expand Down
2 changes: 1 addition & 1 deletion contracts/treasury_manager/tests/integration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use contract_harness::harness::{
};

use fadroma::{
scrt::{
core::{
ContractLink,
},
ensemble::{
Expand Down