diff --git a/contracts/counter/artifacts/checksums.txt b/contracts/counter/artifacts/checksums.txt index 3e3ebd8..884699e 100644 --- a/contracts/counter/artifacts/checksums.txt +++ b/contracts/counter/artifacts/checksums.txt @@ -1 +1 @@ -bb14886bfd94d6402eb40a6632d5b0fb7ec24f9120c1ce8d83f771776402c48b counter.wasm +20828f78f4b256f0563c2fbb65b5361504f948dd4910dfe54e981aa5670f73a8 counter.wasm diff --git a/contracts/counter/artifacts/checksums_intermediate.txt b/contracts/counter/artifacts/checksums_intermediate.txt index 2d9e440..ff9a52d 100644 --- a/contracts/counter/artifacts/checksums_intermediate.txt +++ b/contracts/counter/artifacts/checksums_intermediate.txt @@ -1 +1 @@ -77a2fd2a04bd7c5f38ca2e35452d08b97c5bb8191121406e100d58fa20409974 ./target/wasm32-unknown-unknown/release/counter.wasm +07b18dc271100d7c375e9ff1de8a767899ffa745dd52dbaa0ce9ab587346d78e ./target/wasm32-unknown-unknown/release/counter.wasm diff --git a/contracts/counter/artifacts/counter.wasm b/contracts/counter/artifacts/counter.wasm index a00d9fc..d1b4512 100644 Binary files a/contracts/counter/artifacts/counter.wasm and b/contracts/counter/artifacts/counter.wasm differ diff --git a/contracts/counter/src/contract.rs b/contracts/counter/src/contract.rs index 0f33443..e6906f4 100644 --- a/contracts/counter/src/contract.rs +++ b/contracts/counter/src/contract.rs @@ -4,7 +4,7 @@ use cosmwasm_std::{Order, Uint128, Coin, BankMsg, CosmosMsg, Uint256, to_binary, use cw2::set_contract_version; use crate::error::ContractError; -use crate::msg::{ExecuteMsg, InstantiateMsg, totalPayersResponse, QueryMsg}; +use crate::msg::{ExecuteMsg, InstantiateMsg, totalPayersResponse, QueryMsg, self}; use crate::state::{State, STATE, BALANCES}; // version info for migration info @@ -75,9 +75,7 @@ pub fn try_payup(deps: DepsMut, info: MessageInfo) -> Result Result StdResult { } } - pub fn QueryPayers(deps: Deps) -> StdResult { let state = STATE.load(deps.storage)?; Ok(totalPayersResponse { payers: state.TotalPayers}) } +/* -//pub createorder(deps: DepsMut, info: MessageInfo: i32) -> Result{ -//} + for index in 0..state.TotalPayers{ + let config = STATE.load(deps.storage)?; + let to_be_paid: (state.bill)*(1/(state.TotalPayers)); + let Divided_Amount: Uint = BALANCES[index]; + let deposit_amount: Uint128 = info + .funds + .iter() + .find(|c| c.denom == "uluna") + .map(|c| Uint128::from(c.amount)) + .unwrap_or_else(Uint128::zero); + + if deposit_amount.is_zero() { + return Err(ContractError::ZeroDeposit {}); + } + + }*/ diff --git a/refs.terrain.json b/refs.terrain.json index 50fc609..9185c8c 100644 --- a/refs.terrain.json +++ b/refs.terrain.json @@ -1,9 +1,9 @@ { "localterra": { "counter": { - "codeId": "7", + "codeId": "13", "contractAddresses": { - "default": "terra1y45vkh0n6kplaeqw6ratuertapxupz53wdg6vd" + "default": "terra1dazgw2z5sxe7hgt43p0e3xyljnu45tlzwraccz" } } }