sg_whitelist_basic/
lib.rs

1use cosmwasm_schema::{cw_serde, QueryResponses};
2use cosmwasm_std::Addr;
3
4#[cw_serde]
5pub enum SgWhitelistExecuteMsg {
6    /// Update admin of the list
7    UpdateAdmin { admin: String },
8    /// Add addresses to the list
9    AddAddresses { addresses: Vec<String> },
10    /// Remove an address from the list
11    RemoveAddresses { addresses: Vec<String> },
12    /// Called by another contract to process an address
13    /// Returns true if the address is whitelisted and processed
14    ProcessAddress { address: String },
15    /// Update per address limit
16    UpdatePerAddressLimit { limit: u32 },
17}
18
19#[cw_serde]
20#[derive(QueryResponses)]
21pub enum SgWhitelistQueryMsg {
22    /// Query the current contract admin
23    #[returns(Addr)]
24    Admin {},
25    /// Query the number of addresses
26    #[returns(u64)]
27    AddressCount {},
28    /// Query the per address limit
29    #[returns(u64)]
30    PerAddressLimit { limit: u64 },
31    /// Query if address is included
32    #[returns(bool)]
33    IncludesAddress { address: String },
34    /// Query if address is included and under per address limit
35    #[returns(bool)]
36    IsProcessable { address: String },
37}