FeeData
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:26
A FeeData wraps all the fee-related values associated with the network.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new FeeData( gasPrice?, maxFeePerGas?, maxPriorityFeePerGas?): FeeData;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:58
Creates a new FeeData for %%gasPrice%%, %%maxFeePerGas%% and %%maxPriorityFeePerGas%%.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
gasPrice? | null | bigint |
maxFeePerGas? | null | bigint |
maxPriorityFeePerGas? | null | bigint |
Returns
Section titled “Returns”FeeData
Properties
Section titled “Properties”gasPrice
Section titled “gasPrice”readonly gasPrice: null | bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:30
The gas price for legacy networks.
maxFeePerGas
Section titled “maxFeePerGas”readonly maxFeePerGas: null | bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:43
The maximum fee to pay per gas.
The base fee per gas is defined by the network and based on congestion, increasing the cost during times of heavy load and lowering when less busy.
The actual fee per gas will be the base fee for the block and the priority fee, up to the max fee per gas.
This will be null
on legacy networks (i.e. pre-EIP-1559)
maxPriorityFeePerGas
Section titled “maxPriorityFeePerGas”readonly maxPriorityFeePerGas: null | bigint;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:53
The additional amout to pay per gas to encourage a validator to include the transaction.
The purpose of this is to compensate the validator for the adjusted risk for including a given transaction.
This will be null
on legacy networks (i.e. pre-EIP-1559)
Methods
Section titled “Methods”toJSON()
Section titled “toJSON()”toJSON(): any;
Defined in: node_modules/.pnpm/ethers@6.15.0/node_modules/ethers/lib.esm/providers/provider.d.ts:62
Returns a JSON-friendly value.
Returns
Section titled “Returns”any