pub trait FungibleTokenWithdrawer: FungibleTokenReceiver + FungibleTokenWithdrawResolver {
// Required method
fn ft_withdraw(
&mut self,
token: AccountId,
receiver_id: AccountId,
amount: U128,
memo: Option<String>,
msg: Option<String>,
) -> PromiseOrValue<U128>;
}
Required Methods§
Sourcefn ft_withdraw(
&mut self,
token: AccountId,
receiver_id: AccountId,
amount: U128,
memo: Option<String>,
msg: Option<String>,
) -> PromiseOrValue<U128>
fn ft_withdraw( &mut self, token: AccountId, receiver_id: AccountId, amount: U128, memo: Option<String>, msg: Option<String>, ) -> PromiseOrValue<U128>
Returns number of tokens were successfully withdrawn.
Optionally can specify storage_deposit
for receiver_id
on token
.
The amount will be subtracted from user’s NEP-141 wNEAR
balance.
NOTE: MUST attach 1 yⓃ for security purposes.