Struct abstract_interface::AbstractAccount
source · pub struct AbstractAccount<Chain: CwEnv> {
pub manager: Manager<Chain>,
pub proxy: Proxy<Chain>,
}
Fields§
§manager: Manager<Chain>
§proxy: Proxy<Chain>
Implementations§
source§impl<Chain: CwEnv> AbstractAccount<Chain>
impl<Chain: CwEnv> AbstractAccount<Chain>
pub fn upload(&mut self) -> Result<(), AbstractInterfaceError>
source§impl<Chain: CwEnv> AbstractAccount<Chain>
impl<Chain: CwEnv> AbstractAccount<Chain>
pub fn new(abstract_deployment: &Abstract<Chain>, account_id: AccountId) -> Self
sourcepub fn register(
&self,
version_control: &VersionControl<Chain>,
) -> Result<(), AbstractInterfaceError>
pub fn register( &self, version_control: &VersionControl<Chain>, ) -> Result<(), AbstractInterfaceError>
Register the account core contracts in the version control
pub fn install_module<TInitMsg: Serialize>( &self, module_id: &str, init_msg: Option<&TInitMsg>, funds: Option<&[Coin]>, ) -> Result<Chain::Response, AbstractInterfaceError>
pub fn install_modules( &self, modules: Vec<ModuleInstallConfig>, funds: Option<&[Coin]>, ) -> Result<Chain::Response, AbstractInterfaceError>
pub fn install_modules_auto( &self, modules: Vec<ModuleInstallConfig>, ) -> Result<Chain::Response, AbstractInterfaceError>
sourcepub fn expect_modules(
&self,
module_addrs: Vec<String>,
) -> Result<Vec<ManagerModuleInfo>, AbstractInterfaceError>
pub fn expect_modules( &self, module_addrs: Vec<String>, ) -> Result<Vec<ManagerModuleInfo>, AbstractInterfaceError>
Assert that the Account has the expected modules with the provided expected_module_addrs installed.
Note that the proxy is automatically included in the assertions.
Returns the Vec<ManagerModuleInfo>
from the manager
pub fn is_module_installed( &self, module_id: &str, ) -> Result<bool, AbstractInterfaceError>
sourcepub fn expect_whitelist(
&self,
whitelisted_addrs: Vec<String>,
) -> Result<Vec<String>, AbstractInterfaceError>
pub fn expect_whitelist( &self, whitelisted_addrs: Vec<String>, ) -> Result<Vec<String>, AbstractInterfaceError>
Checks that the proxy’s whitelist includes the expected module addresses. Automatically includes the manager in the expected whitelist.
sourcepub fn id(&self) -> Result<AccountId, AbstractInterfaceError>
pub fn id(&self) -> Result<AccountId, AbstractInterfaceError>
Gets the account ID of the account.
sourcepub fn install_adapter<CustomInitMsg: Serialize, T: AdapterDeployer<Chain, CustomInitMsg>>(
&self,
adapter: &T,
funds: Option<&[Coin]>,
) -> Result<Addr, AbstractInterfaceError>
pub fn install_adapter<CustomInitMsg: Serialize, T: AdapterDeployer<Chain, CustomInitMsg>>( &self, adapter: &T, funds: Option<&[Coin]>, ) -> Result<Addr, AbstractInterfaceError>
Installs an adapter from an adapter object
sourcepub fn install_app<CustomInitMsg: Serialize, T: ContractInstance<Chain>>(
&self,
app: &T,
custom_init_msg: &CustomInitMsg,
funds: Option<&[Coin]>,
) -> Result<Addr, AbstractInterfaceError>
pub fn install_app<CustomInitMsg: Serialize, T: ContractInstance<Chain>>( &self, app: &T, custom_init_msg: &CustomInitMsg, funds: Option<&[Coin]>, ) -> Result<Addr, AbstractInterfaceError>
Installs an app from an app object
sourcepub fn install_standalone<CustomInitMsg: Serialize, T: ContractInstance<Chain>>(
&self,
standalone: &T,
custom_init_msg: &CustomInitMsg,
funds: Option<&[Coin]>,
) -> Result<Addr, AbstractInterfaceError>
pub fn install_standalone<CustomInitMsg: Serialize, T: ContractInstance<Chain>>( &self, standalone: &T, custom_init_msg: &CustomInitMsg, funds: Option<&[Coin]>, ) -> Result<Addr, AbstractInterfaceError>
Installs an standalone from an standalone object
pub fn register_remote_account( &self, host_chain: TruncatedChainId, ) -> Result<<Chain as TxHandler>::Response, AbstractInterfaceError>
pub fn create_remote_account( &self, account_details: AccountDetails, host_chain: TruncatedChainId, ) -> Result<<Chain as TxHandler>::Response, AbstractInterfaceError>
pub fn create_sub_account( &self, account_details: AccountDetails, funds: Option<&[Coin]>, ) -> Result<AbstractAccount<Chain>, AbstractInterfaceError>
pub fn upload_and_register_if_needed( &self, version_control: &VersionControl<Chain>, ) -> Result<bool, AbstractInterfaceError>
sourcepub fn upgrade(
&self,
abstract_deployment: &Abstract<Chain>,
) -> Result<bool, AbstractInterfaceError>
pub fn upgrade( &self, abstract_deployment: &Abstract<Chain>, ) -> Result<bool, AbstractInterfaceError>
Attempts to upgrade the Account
returns true
if any migrations were performed.
pub fn claim_namespace( &self, namespace: impl Into<String>, ) -> Result<Chain::Response, AbstractInterfaceError>
Trait Implementations§
source§impl<Chain: CwEnv> AsRef<AbstractAccount<Chain>> for AbstractAccount<Chain>
impl<Chain: CwEnv> AsRef<AbstractAccount<Chain>> for AbstractAccount<Chain>
source§fn as_ref(&self) -> &AbstractAccount<Chain>
fn as_ref(&self) -> &AbstractAccount<Chain>
Converts this type into a shared reference of the (usually inferred) input type.
Auto Trait Implementations§
impl<Chain> Freeze for AbstractAccount<Chain>where
Chain: Freeze,
impl<Chain> RefUnwindSafe for AbstractAccount<Chain>where
Chain: RefUnwindSafe,
impl<Chain> Send for AbstractAccount<Chain>where
Chain: Send,
impl<Chain> Sync for AbstractAccount<Chain>where
Chain: Sync,
impl<Chain> Unpin for AbstractAccount<Chain>where
Chain: Unpin,
impl<Chain> UnwindSafe for AbstractAccount<Chain>where
Chain: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more