pub struct LegacyTx {
pub nonce: u64,
pub gas_price: String,
pub gas: u64,
pub to: String,
pub value: String,
pub data: Bytes,
pub v: Bytes,
pub r: Bytes,
pub s: Bytes,
}
Expand description
LegacyTx is the transaction data of regular Ethereum transactions.
Note that setting “evm.Params.AllowUnprotectedTxs” to false will cause all non-EIP155 signed transactions to fail, as they’ll lack replay protection.
LegacyTx is a custom implementation of “LegacyTx” from “github.com/ethereum/go-ethereum/core/types”.
Fields§
§nonce: u64
nonce corresponds to the account nonce (transaction sequence).
gas_price: String
gas_price defines the value for each gas unit
gas: u64
gas defines the gas limit defined for the transaction.
to: String
to is the hex formatted address of the recipient
value: String
value defines the unsigned integer value of the transaction amount.
data: Bytes
data is the data payload bytes of the transaction.
v: Bytes
v defines the recovery id as the “v” signature value from the elliptic curve digital signatute algorithm (ECDSA). It indicates which of two possible solutions should be used to reconstruct the public key from the signature. In Ethereum, “v” takes the value 27 or 28 for transactions that are not relay-protected.
r: Bytes
r defines the x-coordinate of a point on the elliptic curve in the elliptic curve digital signatute algorithm (ECDSA). It’s crucial in ensuring uniqueness of the signature.
s: Bytes
s define the signature value derived from the private key, message hash, and the value of “r”. It ensures that the signature is tied to both the message and the private key of the sender.
Trait Implementations§
Source§impl Message for LegacyTx
impl Message for LegacyTx
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.impl StructuralPartialEq for LegacyTx
Auto Trait Implementations§
impl !Freeze for LegacyTx
impl RefUnwindSafe for LegacyTx
impl Send for LegacyTx
impl Sync for LegacyTx
impl Unpin for LegacyTx
impl UnwindSafe for LegacyTx
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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 moreSource§impl<M> NibiruProstMsg for Mwhere
M: Message,
impl<M> NibiruProstMsg for Mwhere
M: Message,
fn to_binary(&self) -> Binary
Source§fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
fn try_into_stargate_msg(&self, type_url: &str) -> CosmosMsg
Name.type_url()
function. This method attempts
to downcast the message to prost::Name, and if successful, constructs a
CosmosMsg::Stargate
object corresponding to the type.