Trait near_contract_tools::standard::nep141::Nep141Receiver
source · pub trait Nep141Receiver {
fn ft_on_transfer(
&mut self,
sender_id: AccountId,
amount: U128,
msg: String
) -> PromiseOrValue<U128>;
}
Expand description
A contract that may be the recipient of an ft_transfer_call
function
call.
Required Methods§
sourcefn ft_on_transfer(
&mut self,
sender_id: AccountId,
amount: U128,
msg: String
) -> PromiseOrValue<U128>
fn ft_on_transfer(
&mut self,
sender_id: AccountId,
amount: U128,
msg: String
) -> PromiseOrValue<U128>
Function that is called in an ft_transfer_call
promise chain.
Returns the number of tokens “used”, that is, those that will be kept
in the receiving contract’s account. (The contract will attempt to
refund the difference from amount
to the original sender.)