pub struct CW20<'a>(/* private fields */);
Implementations§
Source§impl CW20<'_>
impl CW20<'_>
Sourcepub fn new<'a>(
name: &'a str,
sender: Wallet<'a>,
deployment: &'a Deployment,
) -> Result<CW20<'a>>
pub fn new<'a>( name: &'a str, sender: Wallet<'a>, deployment: &'a Deployment, ) -> Result<CW20<'a>>
Create a new CW20 ContractInstance. Uses “cw20” as code-id key.
Sourcepub async fn send(
&self,
msg: Binary,
amount: u128,
contract: String,
) -> Result<CosmTxResponse, CosmScriptError>
pub async fn send( &self, msg: Binary, amount: u128, contract: String, ) -> Result<CosmTxResponse, CosmScriptError>
Send tokens to a contract allong with a contract call
Sourcepub async fn create_new<T: Into<Uint128>>(
&self,
minter: String,
balance: T,
) -> Result<CosmTxResponse, CosmScriptError>
pub async fn create_new<T: Into<Uint128>>( &self, minter: String, balance: T, ) -> Result<CosmTxResponse, CosmScriptError>
Instantiate a new token instance with some initial balance given to the minter
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for CW20<'a>
impl<'a> !RefUnwindSafe for CW20<'a>
impl<'a> !Send for CW20<'a>
impl<'a> !Sync for CW20<'a>
impl<'a> Unpin for CW20<'a>
impl<'a> !UnwindSafe for CW20<'a>
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request