Struct abstract_sdk::base::AbstractContract
source · pub struct AbstractContract<Module: Handler + 'static, Error: From<AbstractSdkError> + 'static> {
pub reply_handlers: [&'static [(u64, ReplyHandlerFn<Module, Error>)]; 2],
/* private fields */
}
Expand description
Abstract generic contract
Fields§
§reply_handlers: [&'static [(u64, ReplyHandlerFn<Module, Error>)]; 2]
List of reply handlers per reply ID.
Implementations§
source§impl<Module, Error: From<AbstractSdkError>> AbstractContract<Module, Error>where
Module: Handler,
impl<Module, Error: From<AbstractSdkError>> AbstractContract<Module, Error>where Module: Handler,
pub const fn new( name: &'static str, version: VersionString, metadata: Option<&'static str> ) -> Self
pub fn version(&self, store: &dyn Storage) -> AbstractSdkResult<ContractVersion>
pub fn info(&self) -> (&'static str, 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