TransactionRequest
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:71
A TransactionRequest is a transactions with potentially various properties not defined, or with less strict types for its values.
This is used to pass to various operations, which will internally coerce any types and populate any necessary values.
Properties
Section titled “Properties”accessList?
Section titled “accessList?”optional accessList: | null | AccessListish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:125
The [[link-eip-2930]] access list. Storage slots included in the access list are //warmed// by pre-loading them, so their initial cost to fetch is guaranteed, but then each additional access is cheaper.
authorizationList?
Section titled “authorizationList?”optional authorizationList: | null | AuthorizationLike[];
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:170
The [[link-eip-7702]] authorizations (if any).
blobs?
Section titled “blobs?”optional blobs: null | BlobLike[];
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:158
Any blobs to include in the transaction (see [[link-eip-4844]]).
blobVersionedHashes?
Section titled “blobVersionedHashes?”optional blobVersionedHashes: null | string[];
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:150
The blob versioned hashes (see [[link-eip-4844]]).
blockTag?
Section titled “blockTag?”optional blockTag: BlockTag;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:136
When using call
or estimateGas
, this allows a specific
block to be queried. Many backends do not support this and when
unsupported errors are silently squelched and "latest"
is used.
chainId?
Section titled “chainId?”optional chainId: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:119
The chain ID for the network this transaction is valid on.
customData?
Section titled “customData?”optional customData: any;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:130
A custom object, which can be passed along for network-specific values.
optional data: null | string;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:111
The transaction data.
enableCcipRead?
Section titled “enableCcipRead?”optional enableCcipRead: boolean;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:146
When using call
, this enables CCIP-read, which permits the
provider to be redirected to web-based content during execution,
which is then further validated by the contract.
There are potential security implications allowing CCIP-read, as it could be used to expose the IP address or user activity during the fetch to unexpected parties.
optional from: | null | AddressLike;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:83
The sender of the transaction.
gasLimit?
Section titled “gasLimit?”optional gasLimit: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:91
The maximum amount of gas to allow this transaction to consume.
gasPrice?
Section titled “gasPrice?”optional gasPrice: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:98
The gas price to use for legacy transactions or transactions on legacy networks.
Most of the time the max*FeePerGas
is preferred.
optional kzg: | null | KzgLibraryLike;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:166
An external library for computing the KZG commitments and proofs necessary for EIP-4844 transactions (see [[link-eip-4844]]).
This is generally null
, unless you are creating BLOb
transactions.
maxFeePerBlobGas?
Section titled “maxFeePerBlobGas?”optional maxFeePerBlobGas: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:154
The maximum fee per blob gas (see [[link-eip-4844]]).
maxFeePerGas?
Section titled “maxFeePerGas?”optional maxFeePerGas: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:107
The [[link-eip-1559]] maximum total fee to pay per gas. The actual value used is protocol enforced to be the block’s base fee.
maxPriorityFeePerGas?
Section titled “maxPriorityFeePerGas?”optional maxPriorityFeePerGas: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:102
The [[link-eip-1559]] maximum priority fee to pay per gas.
nonce?
Section titled “nonce?”optional nonce: null | number;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:87
The nonce of the transaction, used to prevent replay attacks.
optional to: | null | AddressLike;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:79
The target of the transaction.
optional type: null | number;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:75
The transaction type.
value?
Section titled “value?”optional value: | null | BigNumberish;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:115
The transaction value (in wei).