Struct oasis_runtime_sdk::types::transaction::Transaction
source · pub struct Transaction {
pub version: u16,
pub call: Call,
pub auth_info: AuthInfo,
}
Expand description
Transaction.
Fields§
§version: u16
§call: Call
§auth_info: AuthInfo
Implementations§
source§impl Transaction
impl Transaction
sourcepub fn new<B>(method: &str, body: B) -> Selfwhere
B: Encode,
pub fn new<B>(method: &str, body: B) -> Selfwhere
B: Encode,
Create a new (unsigned) transaction.
sourcepub fn prepare_for_signing(self) -> TransactionSigner
pub fn prepare_for_signing(self) -> TransactionSigner
Prepare this transaction for signing.
sourcepub fn set_fee_gas(&mut self, gas: u64)
pub fn set_fee_gas(&mut self, gas: u64)
Set maximum amount of gas that the transaction can use.
sourcepub fn fee_amount(&self) -> &BaseUnits
pub fn fee_amount(&self) -> &BaseUnits
Amount of fee to pay for transaction execution.
sourcepub fn set_fee_amount(&mut self, amount: BaseUnits)
pub fn set_fee_amount(&mut self, amount: BaseUnits)
Set amount of fee to pay for transaction execution.
sourcepub fn set_fee_proxy(&mut self, module: &str, id: &[u8])
pub fn set_fee_proxy(&mut self, module: &str, id: &[u8])
Set a proxy for paying the transaction fee.
sourcepub fn append_signer_info(&mut self, address_spec: AddressSpec, nonce: u64)
pub fn append_signer_info(&mut self, address_spec: AddressSpec, nonce: u64)
Append a new transaction signer information to the transaction.
sourcepub fn append_auth_signature(&mut self, spec: SignatureAddressSpec, nonce: u64)
pub fn append_auth_signature(&mut self, spec: SignatureAddressSpec, nonce: u64)
Append a new transaction signer information with a signature address specification to the transaction.
sourcepub fn append_auth_multisig(&mut self, cfg: Config, nonce: u64)
pub fn append_auth_multisig(&mut self, cfg: Config, nonce: u64)
Append a new transaction signer information with a multisig address specification to the transaction.
sourcepub fn validate_basic(&self) -> Result<(), Error>
pub fn validate_basic(&self) -> Result<(), Error>
Perform basic validation on the transaction.
Trait Implementations§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
Returns a copy 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 Transaction
impl Debug for Transaction
source§impl Decode for Transaction
impl Decode for Transaction
source§fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
fn try_from_cbor_value(value: Value) -> Result<Self, DecodeError>
Try to decode from a given CBOR value.
§fn try_default() -> Result<Self, DecodeError>where
Self: Sized,
fn try_default() -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a missing/null/undefined value.
§fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
fn try_from_cbor_value_default(value: Value) -> Result<Self, DecodeError>where
Self: Sized,
Try to decode from a given CBOR value, calling
try_default
in case the value is null or
undefined.source§impl Encode for Transaction
impl Encode for Transaction
source§impl EncodeAsMap for Transaction
impl EncodeAsMap for Transaction
§fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
fn into_cbor_value_map(self) -> Valuewhere
Self: Sized,
Encode the type into a CBOR Map.
§fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
fn into_cbor_map(self) -> Vec<(Value, Value)>where
Self: Sized,
Encode the type into a CBOR Map, returning the map items.
Auto Trait Implementations§
impl Freeze for Transaction
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)