-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontract.rs
33 lines (28 loc) · 837 Bytes
/
contract.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use cosmwasm_std::{Addr, Api, Binary, Env, Extern, HandleResponse, InitResponse, Querier, StdResult, Storage, Uint128};
use secret_toolkit::snip20;
use secret_toolkit::utils::{pad_handle_result, pad_query_result};
pub const CONTRACT_NAME: &str = "POAP Contract";
pub struct State {
pub contract_owner: Addr,
// Other state variables...
}
pub fn init<S: Storage, A: Api, Q: Querier>(
deps: &mut Extern<S, A, Q>,
env: Env,
msg: InitMsg,
) -> StdResult<InitResponse> {
// Initialization logic...
}
pub fn handle<S: Storage, A: Api, Q: Querier>(
deps: &mut Extern<S, A, Q>,
env: Env,
msg: HandleMsg,
) -> StdResult<HandleResponse> {
// Handle logic...
}
pub fn query<S: Storage, A: Api, Q: Querier>(
deps: &Extern<S, A, Q>,
msg: QueryMsg,
) -> StdResult<Binary> {
// Query logic...
}