Interface ProtocolParameters

Consensus parameters and node policy settings the transaction builder needs to produce a transaction the node would accept — see getCachedProtocolParameters.

interface ProtocolParameters {
    blockGasLimit: number;
    contractTxBaseGas: Readonly<
        Partial<Record<Tag, Readonly<Partial<Record<AbiVersion, number>>>>>,
    >;
    gasPerByte: number;
    maxAuthFunGas: number;
    minGasPrice: bigint;
    minMinerGasPrice: bigint;
    stateGasPerBlock: Readonly<
        Partial<Record<Tag, Readonly<{ part: number; whole: number }>>>,
    >;
    txBaseGas: Readonly<Partial<Record<Tag, number>>>;
}

Properties

blockGasLimit: number

Maximum total gas the node the SDK is connected to accepts in a single micro block. Node policy rather than a consensus parameter, it may differ between nodes.

contractTxBaseGas: Readonly<
    Partial<Record<Tag, Readonly<Partial<Record<AbiVersion, number>>>>>,
>

Base fee gas of contract-executing transaction types, by ABI version

gasPerByte: number

Gas per serialized transaction byte counted into the minimum fee

maxAuthFunGas: number

Maximum gas accepted for a generalized account authentication function by the node the SDK is connected to. Node policy rather than a consensus parameter, it may differ between nodes.

minGasPrice: bigint

Consensus minimum gas price in aettos, the minimum transaction fee is the transaction's fee gas multiplied by this value

minMinerGasPrice: bigint

Minimum gas price accepted by the miner of the node the SDK is connected to. A transaction below it is still valid, but this node won't mine it.

stateGasPerBlock: Readonly<
    Partial<Record<Tag, Readonly<{ part: number; whole: number }>>>,
>

State rent gas fraction per key block by transaction type, state gas is ceil(relativeTtl * part / whole)

txBaseGas: Readonly<Partial<Record<Tag, number>>>

Base fee gas by transaction type, transactions not executing contract code