Skip to main content
Version: 11.x

Function: toFeeVersion()

toFeeVersion(providedVersion?): ETransactionVersion | undefined

Defined in: src/utils/stark/index.ts:506

Convert Transaction version to Fee version or throw an error

Parameters​

providedVersion?​

BigNumberish

number representing the transaction version

Returns​

ETransactionVersion | undefined

the fee estimation version corresponding to the transaction version provided

Throws​

if the transaction version is unknown

Example​

const result = stark.toFeeVersion(3);
// result = "0x100000000000000000000000000000003"