DefiHackathon-2022/contracts/counter/src/msg.rs
Array in a Matrix c2e75206df
Alex payup (#1)
* payup method work-in progress

buisness is the owner of the contract--> requests the amount on the bill--> the customer interacts with the same contract to pay the bill

* added payup funtion and other stuff related to that in other files

* pay_up works

* attempting bill splitting

* trying to deploy

* map and payer count works

* added demo video

* final product. Transfering funds not perfected

Co-authored-by: alex324998301 <102430172+alex324998301@users.noreply.github.com>
Co-authored-by: alex324998301 <abdullah.syed@ryerson.ca>
Co-authored-by: BiPhan4 <bi.phan@ryerson.ca>
2022-03-27 09:34:43 -04:00

31 lines
No EOL
770 B
Rust

use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
pub bill: i32,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
Payup {},
Createaccounts{}
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
// GetCount returns the current count as a json-encoded number
QueryPayers{},
}
//We define a custom struct for each query response
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct totalPayersResponse {
pub payers: i32,
}
//initiate balances?