Struct abstract_sdk::base::AbstractContract
source · pub struct AbstractContract<Module: Handler + 'static, Error: From<StdError> + 'static, CustomExecMsg = Empty, CustomInitMsg = Empty, CustomQueryMsg = Empty, CustomMigrateMsg = Empty, ReceiveMsg = Empty> {
pub reply_handlers: [&'static [(u64, ReplyHandlerFn<Module, Error>)]; 2],
/* private fields */
}Expand description
State variables for a generic contract
Fields§
§reply_handlers: [&'static [(u64, ReplyHandlerFn<Module, Error>)]; 2]Expected replies
Implementations§
source§impl<Module, Error: From<StdError>, CustomExecMsg, CustomInitMsg, CustomQueryMsg, CustomMigrateMsg, ReceiveMsg> AbstractContract<Module, Error, CustomExecMsg, CustomInitMsg, CustomQueryMsg, CustomMigrateMsg, ReceiveMsg>where
Module: Handler,
impl<Module, Error: From<StdError>, CustomExecMsg, CustomInitMsg, CustomQueryMsg, CustomMigrateMsg, ReceiveMsg> AbstractContract<Module, Error, CustomExecMsg, CustomInitMsg, CustomQueryMsg, CustomMigrateMsg, ReceiveMsg>where
Module: Handler,
pub const fn new(
name: Name,
version: VersionString,
metadata: Option<&'static str>
) -> Self
pub fn version(&self, store: &dyn Storage) -> StdResult<ContractVersion>
pub fn info(&self) -> (Name, VersionString, Option<&'static str>)
sourcepub const fn with_dependencies(
self,
dependencies: &'static [StaticDependency]
) -> Self
pub const fn with_dependencies(
self,
dependencies: &'static [StaticDependency]
) -> Self
add dependencies to the contract
pub const fn with_replies(
self,
reply_handlers: [&'static [(u64, ReplyHandlerFn<Module, Error>)]; 2]
) -> Self
sourcepub const fn with_ibc_callbacks(
self,
callbacks: &'static [(&'static str, IbcCallbackHandlerFn<Module, Error>)]
) -> Self
pub const fn with_ibc_callbacks(
self,
callbacks: &'static [(&'static str, IbcCallbackHandlerFn<Module, Error>)]
) -> Self
add IBC callback handler to contract