Skip to content

Commit

Permalink
Merge branch 'paradigmxyz:main' into branches_sharing_code
Browse files Browse the repository at this point in the history
  • Loading branch information
jtraglia committed Mar 19, 2024
2 parents 757ddf5 + 332e412 commit 0d2fd46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/primitives/src/transaction/mod.rs
Expand Up @@ -184,12 +184,15 @@ impl Transaction {
}
}

/// Get the transaction's nonce.
/// Get the transaction's address of the contract that will be called, or the address that will
/// receive the transfer.
///
/// Returns `None` if this is a `CREATE` transaction.
pub fn to(&self) -> Option<Address> {
self.kind().to()
}

/// Get transaction type
/// Get the transaction's type
pub fn tx_type(&self) -> TxType {
match self {
Transaction::Legacy(legacy_tx) => legacy_tx.tx_type(),
Expand Down

0 comments on commit 0d2fd46

Please sign in to comment.