Struct cpchain_rust_sdk::types::TransactionParameters
source · pub struct TransactionParameters {
pub tx_type: U256,
pub nonce: U256,
pub to: Option<H160>,
pub gas: U256,
pub gas_price: U256,
pub value: U256,
pub data: Bytes,
pub chain_id: u64,
}Fields§
§tx_type: U256Transaction type
nonce: U256Transaction nonce (None for account transaction count)
to: Option<H160>To address
gas: U256Supplied gas
gas_price: U256Gas price (None for estimated gas price)
value: U256Transferred value
data: BytesData
chain_id: u64The chain ID (None for network ID)
Implementations§
source§impl TransactionParameters
impl TransactionParameters
pub fn new( chain_id: u64, nonce: U256, to: Option<H160>, gas: U256, gas_price: U256, value: U256, data: Bytes ) -> TransactionParameters
pub fn to_call_request(&self) -> CallRequest
pub fn sign(&self, sign: impl Key) -> SignedTransaction
Trait Implementations§
source§impl Clone for TransactionParameters
impl Clone for TransactionParameters
source§fn clone(&self) -> TransactionParameters
fn clone(&self) -> TransactionParameters
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 TransactionParameters
impl Debug for TransactionParameters
source§impl<'de> Deserialize<'de> for TransactionParameters
impl<'de> Deserialize<'de> for TransactionParameters
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more