mirror of
https://github.com/BiPhan4/DefiHackathon-2022.git
synced 2025-04-02 10:41:42 -04:00
Merge branch 'main' into alex_payup
This commit is contained in:
commit
8a316add09
5 changed files with 18 additions and 3 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
|
@ -1,3 +1,2 @@
|
||||||
# DefiHackathon-2022
|
# DefiHackathon-2022
|
||||||
|
Demo video: https://youtu.be/kMNxAIWr4T8
|
||||||
Demo video: https://youtu.be/kMNxAIWr4T8
|
|
2
contracts/counter/Cargo.lock
generated
2
contracts/counter/Cargo.lock
generated
|
@ -164,8 +164,10 @@ name = "cw-storage-plus"
|
||||||
version = "0.8.1"
|
version = "0.8.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c1e867b9972b83b32e00e878dfbff48299ba26618dabeb19b9c56fae176dc225"
|
checksum = "c1e867b9972b83b32e00e878dfbff48299ba26618dabeb19b9c56fae176dc225"
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cosmwasm-std",
|
"cosmwasm-std",
|
||||||
|
"cw-storage-plus",
|
||||||
"schemars",
|
"schemars",
|
||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
|
@ -7,6 +7,7 @@ use crate::error::ContractError;
|
||||||
use crate::msg::{ExecuteMsg, InstantiateMsg, totalPayersResponse, QueryMsg, self};
|
use crate::msg::{ExecuteMsg, InstantiateMsg, totalPayersResponse, QueryMsg, self};
|
||||||
use crate::state::{State, STATE, BALANCES};
|
use crate::state::{State, STATE, BALANCES};
|
||||||
|
|
||||||
|
|
||||||
// version info for migration info
|
// version info for migration info
|
||||||
const CONTRACT_NAME: &str = "crates.io:counter";
|
const CONTRACT_NAME: &str = "crates.io:counter";
|
||||||
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
|
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
@ -43,6 +44,7 @@ pub fn execute(
|
||||||
match msg {
|
match msg {
|
||||||
ExecuteMsg::Payup {} => try_payup(deps, info),
|
ExecuteMsg::Payup {} => try_payup(deps, info),
|
||||||
ExecuteMsg::Createaccounts {} => create_accounts(deps, info),
|
ExecuteMsg::Createaccounts {} => create_accounts(deps, info),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,19 @@ pub struct State {
|
||||||
pub TotalPayers: i32,
|
pub TotalPayers: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
pub const STATE: Item<State> = Item::new("state");
|
pub const STATE: Item<State> = Item::new("state");
|
||||||
|
|
||||||
pub const BALANCES: Map<&Addr, bool> = Map::new("balance");
|
pub const BALANCES: Map<&Addr, bool> = Map::new("balance");
|
||||||
|
|
||||||
|
/*
|
||||||
|
add states:
|
||||||
|
|
||||||
|
1 - the bill(s) / item
|
||||||
|
2 - the customers /map
|
||||||
|
3 - Need to figure out a way to store money that we've taken from users. Third state is item again?
|
||||||
|
|
||||||
|
1 - how to use map and item to store customers or any state
|
||||||
|
2 - how to display bill to user
|
||||||
|
|
||||||
|
Hello
|
||||||
|
*/
|
Loading…
Add table
Reference in a new issue