QuaiTransaction
Represents a Quai transaction.
Extends
AbstractTransaction
<Signature
>
Implements
QuaiTransactionLike
Constructors
new QuaiTransaction()
Creates a new Transaction with default values.
Parameters
Parameter | Type | Description |
---|---|---|
from ? | string | The sender address. |
Returns
Overrides
AbstractTransaction<Signature>.constructor
Source
transaction/quai-transaction.ts:295
Accessors
accessList
The access list.
An access list permits discounted (but pre-paid) access to bytecode and state variable access within contract execution.
Returns
null
| AccessList
Source
transaction/quai-transaction.ts:279
chainId
The chain ID this transaction is valid on.
Returns
bigint
Source
transaction/abstract-transaction.ts:280
data
The transaction data. For init
transactions this is the deployment code.
Returns
string
Source
transaction/quai-transaction.ts:252
destZone
The zone of the recipient address
Returns
undefined
| Zone
Source
transaction/quai-transaction.ts:186
digest
The pre-image hash of this transaction.
This is the digest that a Signer must sign to authorize this transaction.
Returns
string
Source
transaction/abstract-transaction.ts:315
gasLimit
The gas limit.
Returns
bigint
Source
transaction/quai-transaction.ts:208
gasPrice
The maximum total fee per unit of gas to pay. On legacy networks this should be null
.
Returns
null
| bigint
Source
transaction/quai-transaction.ts:236
hash
The permuted hash of the transaction as specified by QIP-0010.
Throws
If the transaction is not signed.
Returns
null
| string
Source
transaction/quai-transaction.ts:141
isExternal
Check if the transaction is external.
Returns
boolean
True if the transaction is external.
Source
transaction/abstract-transaction.ts:417
minerTip
The maximum priority fee per unit of gas to pay. On legacy networks this should be null
.
Returns
null
| bigint
Source
transaction/quai-transaction.ts:220
nonce
The transaction nonce.
Returns
number
Source
transaction/quai-transaction.ts:196
originZone
The zone of the sender address
Returns
undefined
| Zone
Source
transaction/quai-transaction.ts:176
serialized
The serialized transaction.
This throws if the transaction is unsigned. For the pre-image, use unsignedSerialized .
Returns
string
Source
transaction/abstract-transaction.ts:341
signature
If signed, the signature for this transaction.
Returns
S
Source
transaction/abstract-transaction.ts:290
to
The to
address for the transaction or null
if the transaction is an init
transaction.
Returns
null
| string
Source
transaction/quai-transaction.ts:126
type
The transaction type.
If null, the type will be automatically inferred based on explicit properties.
Returns
null
| number
Source
transaction/abstract-transaction.ts:240
typeName
The name of the transaction type.
Returns
null
| string
Source
transaction/abstract-transaction.ts:264
unsignedSerialized
The transaction pre-image.
The hash of this is the digest which needs to be signed to authorize this transaction.
Returns
string
Source
transaction/abstract-transaction.ts:356
value
The amount of ether to send in this transactions.
Returns
bigint
Source
transaction/quai-transaction.ts:264
Methods
clone()
Create a copy of this transaction.
Returns
The cloned transaction.
Overrides
AbstractTransaction.clone
Source
transaction/quai-transaction.ts:347
inferType()
Return the most “likely” type; currently the highest supported transaction type.
Returns
number
The inferred transaction type.
Inherited from
AbstractTransaction.inferType
Source
transaction/abstract-transaction.ts:365
inferTypes()
Validates the explicit properties and returns a list of compatible transaction types.
Returns
number
[]
The compatible transaction types.
Overrides
AbstractTransaction.inferTypes
Source
transaction/quai-transaction.ts:314
isSigned()
Returns true if signed.
This provides a Type Guard that properties requiring a signed transaction are non-null.
Returns
this is AbstractTransaction<Signature> & Object
Indicates if the transaction is signed.
Inherited from
AbstractTransaction.isSigned
Source
transaction/abstract-transaction.ts:326
toJSON()
Return a JSON-friendly object.
Returns
QuaiTransactionLike
The JSON-friendly object.
Overrides
AbstractTransaction.toJSON
Source
transaction/quai-transaction.ts:356
toProtobuf()
Return a protobuf-friendly JSON object.
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
includeSignature ? | boolean | true | Whether to include the signature. Default is true |
Returns
ProtoTransaction
The protobuf-friendly JSON object.
Overrides
AbstractTransaction.toProtobuf
Source
transaction/quai-transaction.ts:387
from()
Create a Transaction from a serialized transaction or a Transaction-like object.
Parameters
Parameter | Type | Description |
---|---|---|
tx | string | QuaiTransactionLike | The transaction to decode. |
Returns
The decoded transaction.
Source
transaction/quai-transaction.ts:426
fromProto()
Create a Transaction from a ProtoTransaction object.
Parameters
Parameter | Type | Description |
---|---|---|
protoTx | ProtoTransaction | The transaction to decode. |
Returns
The decoded transaction.
Source
Was this page helpful?