Skip to main content

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

ParameterTypeDefault valueDescription
providerJsonRpcApiProviderundefinedUnderlying RPC provider providing read access to the EVM network
maxFeeRatePerGasbigint...Maximum fee rate for a transaction, default to 500 GWei
priorityFeebigint...Priority fee (or tip) to add to the transactions, default to 1 GWei
feeMultipliernumber1.25Fee multiplier to multiply the RPC-returned fee rate with

Returns

CitreaFees

Inherited from

EVMFees.constructor

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

ParameterTypeDescription
txTransactionRequestEVM Transaction to apply the fee rate to
gasnumberGas limit to add to the transaction
feeRatestringSerialized fee rate to add to the transaction, in format: <baseFee>,<priorityFee>

Returns

void

Inherited from

EVMFees.applyFeeRate


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

EVMFees.getFeeRate


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

ParameterTypeDefault valueDescription
gasnumberundefined
feeRatestringundefined
stateDiffSizenumber0

Returns

bigint

Overrides

EVMFees.getGasFee