Transaction API

class pab.transaction.TransactionHandler(w3: web3.Web3, chain_id: int, config: Config)
w3

Internal Web3 connection.

chain_id

ChainID of current blockchain for transactions.

config

Config data.

transact(account: LocalAccount, func: Callable, args: tuple, timeout: Optional[int] = None) TxReceipt

Submits transaction and returns receitp.

_build_signed_txn(account: LocalAccount, func: Callable, args: tuple) SignedTransaction

Builds a signed transactoin ready to be sent to the network.

_txn_details(account: LocalAccount, call: Callable) dict

Returns transaction details such as chainId, gas, gasPrice and nonce.

gas(call: Callable) int

Returns gas allocated for transaction. Depending on the PAB configs it returns an estimation or a fixed value.

_estimate_call_gas(call: Callable) int

Returns estimated gas for a given call.

gas_price() Wei
exception pab.transaction.TransactionError