CitreaFees
Defined in: atomiq-chain-evm/src/chains/citrea/CitreaFees.ts:7
Extends
Constructors
Constructor
new CitreaFees(
provider,
maxFeeRatePerGas,
priorityFee,
feeMultiplier): CitreaFees;
Defined in: atomiq-chain-evm/src/evm/chain/modules/EVMFees.ts:59
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
provider | JsonRpcApiProvider | undefined | Underlying RPC provider providing read access to the EVM network |
maxFeeRatePerGas | bigint | ... | Maximum fee rate for a transaction, default to 500 GWei |
priorityFee | bigint | ... | Priority fee (or tip) to add to the transactions, default to 1 GWei |
feeMultiplier | number | 1.25 | Fee multiplier to multiply the RPC-returned fee rate with |
Returns
CitreaFees
Inherited from
Methods
applyFeeRate()
static applyFeeRate(
tx,
gas,
feeRate): void;
Defined in: atomiq-chain-evm/src/evm/chain/modules/EVMFees.ts:137
Applies the gas limit and fee rate to a transaction
Parameters
| Parameter | Type | Description |
|---|---|---|
tx | TransactionRequest | EVM Transaction to apply the fee rate to |
gas | number | Gas limit to add to the transaction |
feeRate | string | Serialized fee rate to add to the transaction, in format: <baseFee>,<priorityFee> |
Returns
void
Inherited from
getFeeRate()
getFeeRate(): Promise<string>;
Defined in: atomiq-chain-evm/src/chains/citrea/CitreaFees.ts:38
Gets the gas price with caching, format: <gas price in Wei>;<transaction version: v1/v3>
Returns
Promise<string>
Overrides
getGasFee()
static getGasFee(
gas,
feeRate,
stateDiffSize): bigint;
Defined in: atomiq-chain-evm/src/chains/citrea/CitreaFees.ts:68
Calculates the total gas fee paid for a given gas limit and state diff size at a given fee rate
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
gas | number | undefined | |
feeRate | string | undefined | |
stateDiffSize | number | 0 |
Returns
bigint