pub struct FTTransactionable {
prepopulated: PrepopulateTransaction,
receiver: AccountId,
decimals: u8,
}Expand description
The structs validates the decimals correctness on runtime level before sending the ft tokens as well as deposits 100 milliNear of the deposit if the receiver doesn’t have any allocated storage in the provided FT contract
Fields§
§prepopulated: PrepopulateTransaction§receiver: AccountId§decimals: u8Implementations§
Source§impl FTTransactionable
impl FTTransactionable
pub async fn check_decimals( &self, network: &NetworkConfig, ) -> Result<(), ValidationError>
Trait Implementations§
Source§impl Clone for FTTransactionable
impl Clone for FTTransactionable
Source§fn clone(&self) -> FTTransactionable
fn clone(&self) -> FTTransactionable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FTTransactionable
impl Debug for FTTransactionable
Source§impl Transactionable for FTTransactionable
impl Transactionable for FTTransactionable
fn prepopulated(&self) -> PrepopulateTransaction
Source§fn validate_with_network<'life0, 'life1, 'async_trait>(
&'life0 self,
network: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate_with_network<'life0, 'life1, 'async_trait>(
&'life0 self,
network: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate the transaction before sending it to the network
Source§fn edit_with_network<'life0, 'life1, 'async_trait>(
&'life0 mut self,
network: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn edit_with_network<'life0, 'life1, 'async_trait>(
&'life0 mut self,
network: &'life1 NetworkConfig,
) -> Pin<Box<dyn Future<Output = Result<(), ValidationError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Edit the transaction before sending it to the network.
This is useful for example to add storage deposit to the transaction
if it’s needed.
Though, it won’t be called if the user has presigned the transaction.
Auto Trait Implementations§
impl Freeze for FTTransactionable
impl RefUnwindSafe for FTTransactionable
impl Send for FTTransactionable
impl Sync for FTTransactionable
impl Unpin for FTTransactionable
impl UnwindSafe for FTTransactionable
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