pub struct Cw20<Chain: BootEnvironment>(/* private fields */);Implementations§
Source§impl<Chain: BootEnvironment> Cw20<Chain>
impl<Chain: BootEnvironment> Cw20<Chain>
pub fn new(id: &str, chain: Chain) -> Self
pub fn send( &self, msg: &impl Serialize, amount: u128, contract: String, ) -> Result<TxResponse<Chain>, BootError>
pub fn transfer( &self, amount: u128, recipient: String, ) -> Result<TxResponse<Chain>, BootError>
pub fn create_new<T: Into<Uint128>>( &self, minter: &Addr, balance: T, ) -> Result<TxResponse<Chain>, BootError>
pub fn balance(&self, address: &Addr) -> Result<u128, BootError>
pub fn mint( &self, recipient: impl Into<String>, amount: u128, ) -> Result<TxResponse<Chain>, BootError>
pub fn increase_allowance( &self, spender: impl Into<String>, amount: u128, expires: Option<Expiration>, ) -> Result<TxResponse<Chain>, BootError>
Trait Implementations§
Source§impl<Chain: BootEnvironment> ContractInstance<Chain> for Cw20<Chain>
impl<Chain: BootEnvironment> ContractInstance<Chain> for Cw20<Chain>
fn as_instance(&self) -> &Contract<Chain>
fn as_instance_mut(&mut self) -> &mut Contract<Chain>
fn id(&self) -> String
fn address(&self) -> Result<Addr, BootError>
fn addr_str(&self) -> Result<String, BootError>
fn code_id(&self) -> Result<u64, BootError>
fn set_address(&self, address: &Addr)
fn set_code_id(&self, code_id: u64)
fn get_chain(&self) -> &Chain
Source§impl<Chain: BootEnvironment> CwInterface for Cw20<Chain>
impl<Chain: BootEnvironment> CwInterface for Cw20<Chain>
type InstantiateMsg = InstantiateMsg
type ExecuteMsg = Cw20ExecuteMsg
type QueryMsg = QueryMsg
type MigrateMsg = Empty
Auto Trait Implementations§
impl<Chain> Freeze for Cw20<Chain>where
Chain: Freeze,
impl<Chain> !RefUnwindSafe for Cw20<Chain>
impl<Chain> !Send for Cw20<Chain>
impl<Chain> !Sync for Cw20<Chain>
impl<Chain> Unpin for Cw20<Chain>where
Chain: Unpin,
impl<Chain> !UnwindSafe for Cw20<Chain>
Blanket Implementations§
Source§impl<T, Chain> BootExecute<Chain> for T
impl<T, Chain> BootExecute<Chain> for T
type ExecuteMsg = <T as CwInterface>::ExecuteMsg
fn execute( &self, execute_msg: &<T as BootExecute<Chain>>::ExecuteMsg, coins: Option<&[Coin]>, ) -> Result<<Chain as TxHandler>::Response, BootError>
Source§impl<T, Chain> BootInstantiate<Chain> for T
impl<T, Chain> BootInstantiate<Chain> for T
type InstantiateMsg = <T as CwInterface>::InstantiateMsg
fn instantiate( &self, instantiate_msg: &<T as BootInstantiate<Chain>>::InstantiateMsg, admin: Option<&Addr>, coins: Option<&[Coin]>, ) -> Result<<Chain as TxHandler>::Response, BootError>
Source§impl<T, Chain> BootMigrate<Chain> for T
impl<T, Chain> BootMigrate<Chain> for T
type MigrateMsg = <T as CwInterface>::MigrateMsg
fn migrate( &self, migrate_msg: &<T as BootMigrate<Chain>>::MigrateMsg, new_code_id: u64, ) -> Result<<Chain as TxHandler>::Response, BootError>
Source§impl<T, Chain> BootUpload<Chain> for Twhere
T: ContractInstance<Chain>,
Chain: BootEnvironment,
impl<T, Chain> BootUpload<Chain> for Twhere
T: ContractInstance<Chain>,
Chain: BootEnvironment,
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§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