-
Notifications
You must be signed in to change notification settings - Fork 17
/
lib.rs
43 lines (36 loc) · 1.25 KB
/
lib.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
34
35
36
37
38
39
40
41
42
43
mod proto;
use cosmwasm_schema::cw_serde;
use cosmwasm_std::Binary;
#[cw_serde]
pub struct Any {
pub type_url: String,
pub value: Binary,
}
/// Any contract must implement this sudo message (both variants) in order to
/// qualify as an abstract account.
#[cw_serde]
pub enum AccountSudoMsg {
/// Called by the AnteHandler's BeforeTxDecorator before a tx is executed.
BeforeTx {
/// Messages the tx contains
msgs: Vec<Any>,
/// The tx serialized into binary format.
///
/// If the tx authentication requires a signature, this is the bytes to
/// be signed.
tx_bytes: Binary,
/// The credential to prove this tx is authenticated.
///
/// This is taken from the tx's "signature" field, but in the case of
/// AbstractAccounts, this is not necessarily a cryptographic signature.
/// The contract is free to interpret this as any data type.
cred_bytes: Option<Binary>,
/// Whether the tx is being run in the simulation mode.
simulate: bool,
},
/// Called by the PostHandler's AfterTxDecorator after the tx is executed.
AfterTx {
/// Whether the tx is being run in the simulation mode.
simulate: bool,
},
}