pub fn new(
        account_id: AccountId,
        from: Address,
        to: Address,
        token: TokenId,
        amount: BigUint,
        fee: BigUint,
        nonce: Nonce,
        signature: Option<TxSignature>,
    ) -> Self {
        let mut tx = Self {
            account_id,
            from,
            to,
            token,
            amount,
            fee,
            nonce,
            signature: signature.clone().unwrap_or_default(),
            cached_signer: VerifiedSignatureCache::NotCached,
        };
        if signature.is_some() {
            tx.cached_signer = VerifiedSignatureCache::Cached(tx.verify_signature());
        }
        tx
    }
/// Creates transaction from parts
/// signature is optional, because sometimes we don't know it (i.e. data_restore)
Creates transaction from parts
signature is optional, because sometimes we don't know it
Creates transaction from parts signature is optional because sometimes we don ' t know it
pub fn new(
        account_id: AccountId,
        from: Address,
        to: Address,
        token: TokenId,
        amount: BigUint,
        fee: BigUint,
        nonce: Nonce,
        signature: Option<TxSignature>,
    ) -> Self {
        let mut tx = Self {
            account_id,
            from,
            to,
            token,
            amount,
            fee,
            nonce,
            signature: signature.clone().unwrap_or_default(),
            cached_signer: VerifiedSignatureCache::NotCached,
        };
        if signature.is_some() {
            tx.cached_signer = VerifiedSignatureCache::Cached(tx.verify_signature());
        }
        tx
    }
pub fn new ( account_id : AccountId , from : Address , to : Address , token : TokenId , amount : BigUint , fee : BigUint , nonce : Nonce , signature : Option < TxSignature > , ) -> Self { let mut tx = Self { account_id , from , to , token , amount , fee , nonce , signature : signature . clone ( ) . unwrap_or_default ( ) , cached_signer : VerifiedSignatureCache :: NotCached , } ; if signature . is_some ( ) { tx . cached_signer = VerifiedSignatureCache :: Cached ( tx . verify_signature ( ) ) ; } tx }
Creates transaction from parts
signature is optional, because sometimes we don't know it (i.e.
Creates transaction from parts signature is optional because sometimes we don ' t know it ( i . e .
account_id
AccountId
from
Address
to
Address
token
TokenId
amount
BigUint
fee
BigUint
nonce
Nonce
signature
Option<TxSignature>