Skip to main content
Version: Next

Function: toFeeVersion()

toFeeVersion(providedVersion?): ETransactionVersion | undefined

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

Convert Transaction version to Fee version or throw an error

Parameters

providedVersion?

BigNumberish

0..3 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(2);
// result = "0x100000000000000000000000000000002"