SignedTransactionWithNonce

Documentation for eth_defi.hotwallet.SignedTransactionWithNonce Python class.

class SignedTransactionWithNonce[source]

Helper class to pass around the used nonce when signing txs from the wallet.

  • Emulate SignedTransaction from web3.py package

  • Add some debugging helpers

Attributes summary

hash

Alias for field number 1

nonce

Alias for field number 5

r

Alias for field number 2

rawTransaction

Alias for field number 0

raw_transaction

Get the bytes to be broadcasted to the P2P network.

s

Alias for field number 3

source

Undecoded transaction data as a dict.

v

Alias for field number 4

Methods summary

__init__()

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

rawTransaction: hexbytes.main.HexBytes

Alias for field number 0

hash: hexbytes.main.HexBytes

Alias for field number 1

r: int

Alias for field number 2

s: int

Alias for field number 3

v: int

Alias for field number 4

nonce: int

Alias for field number 5

source: Optional[dict]

Undecoded transaction data as a dict.

If broadcast fails, retain the source so we can debug the cause

property raw_transaction: hexbytes.main.HexBytes

Get the bytes to be broadcasted to the P2P network.

static __new__(_cls, rawTransaction, hash, r, s, v, nonce, source=None)

Create new instance of SignedTransactionWithNonce(rawTransaction, hash, r, s, v, nonce, source)

Parameters
  • rawTransaction (hexbytes.main.HexBytes) –

  • hash (hexbytes.main.HexBytes) –

  • r (int) –

  • s (int) –

  • v (int) –

  • nonce (int) –

  • source (Optional[dict]) –