pub struct CEP95ReceiverContractRef { /* private fields */ }Expand description
[CEP95Receiver] Contract Ref.
Implementations§
Source§impl CEP95ReceiverContractRef
impl CEP95ReceiverContractRef
Sourcepub fn on_cep95_received(
&mut self,
operator: &Address,
from: &Address,
token_id: &U256,
data: &Option<Bytes>,
) -> bool
pub fn on_cep95_received( &mut self, operator: &Address, from: &Address, token_id: &U256, data: &Option<Bytes>, ) -> bool
Called after a safe_transfer_from completes its internal state update.
MUST return true to signal acceptance; returning false or reverting
causes the entire transfer to roll back.
§Arguments
operator - The account (EOA or contract) that invoked safe_transfer_from.
from - The previous owner of token_id.
token_id - The NFT being transferred.
data - Opaque auxiliary data forwarded from the original call; may be None if no extra data was
supplied.
§Returns
true to accept the NFT, anything else to reject.
Trait Implementations§
Source§impl ContractRef for CEP95ReceiverContractRef
impl ContractRef for CEP95ReceiverContractRef
Source§impl SchemaEvents for CEP95ReceiverContractRef
impl SchemaEvents for CEP95ReceiverContractRef
Source§fn custom_types() -> Vec<Option<CustomType>>
fn custom_types() -> Vec<Option<CustomType>>
Returns a vector of CustomTypes. Read more
Auto Trait Implementations§
impl Freeze for CEP95ReceiverContractRef
impl !RefUnwindSafe for CEP95ReceiverContractRef
impl !Send for CEP95ReceiverContractRef
impl !Sync for CEP95ReceiverContractRef
impl Unpin for CEP95ReceiverContractRef
impl !UnwindSafe for CEP95ReceiverContractRef
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> 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