@tevm/voltaire / primitives/MaxPriorityFeePerGas
primitives/MaxPriorityFeePerGas
Type Aliases
MaxPriorityFeePerGasType
MaxPriorityFeePerGasType =Defined in: src/primitives/MaxPriorityFeePerGas/MaxPriorityFeePerGasType.ts:10 Branded MaxPriorityFeePerGas type - EIP-1559 maximum priority fee (tip) Represents the maximum tip user is willing to pay to miner/validator Incentivizes transaction inclusion in blocksbigint&object
Type Declaration
[brand]
readonly[brand]:"MaxPriorityFeePerGas"
See
https://eips.ethereum.org/EIPS/eip-1559Variables
MaxPriorityFeePerGas
Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:53constMaxPriorityFeePerGas:object
Type Declaration
compare()
compare: (priorityFee1,priorityFee2) =>number
Parameters
priorityFee1
string | number | bigint
priorityFee2
string | number | bigint
Returns
number
equals()
equals: (priorityFee1,priorityFee2) =>boolean
Parameters
priorityFee1
string | number | bigint
priorityFee2
string | number | bigint
Returns
boolean
from()
from: (Create MaxPriorityFeePerGas from bigint, number, or hex stringvalue) =>MaxPriorityFeePerGasType
Parameters
value
Priority fee in Weistring | number | bigint
Returns
MaxPriorityFeePerGasType
Branded priority fee
Throws
If value is negative or invalid formatExample
fromGwei()
fromGwei: (Create MaxPriorityFeePerGas from Gwei valuegwei) =>MaxPriorityFeePerGasType
Parameters
gwei
Value in Gweinumber | bigint
Returns
MaxPriorityFeePerGasType
Priority fee in Wei
Example
fromWei()
fromWei: (Create MaxPriorityFeePerGas from Wei value (alias for from)wei) =>MaxPriorityFeePerGasType
Parameters
wei
Value in Weistring | number | bigint
Returns
MaxPriorityFeePerGasType
Priority fee
Example
toBigInt()
toBigInt: (priorityFee) =>bigint
Parameters
priorityFee
string | number | bigint
Returns
bigint
toGwei()
toGwei: (priorityFee) =>bigint
Parameters
priorityFee
string | number | bigint
Returns
bigint
toNumber()
toNumber: (priorityFee) =>number
Parameters
priorityFee
string | number | bigint
Returns
number
toWei()
toWei: (priorityFee) =>bigint
Parameters
priorityFee
string | number | bigint
Returns
bigint
Functions
_compare()
_compare(Defined in: src/primitives/MaxPriorityFeePerGas/compare.js:15 Compare two MaxPriorityFeePerGas valuesthis,other):number
Parameters
this
MaxPriorityFeePerGasType
other
MaxPriorityFeePerGasType
Value to compare
Returns
number
-1 if this < other, 0 if equal, 1 if this > other
Example
_equals()
_equals(Defined in: src/primitives/MaxPriorityFeePerGas/equals.js:15 Check if two MaxPriorityFeePerGas values are equalthis,other):boolean
Parameters
this
MaxPriorityFeePerGasType
other
MaxPriorityFeePerGasType
Value to compare
Returns
boolean
True if equal
Example
_toBigInt()
_toBigInt(Defined in: src/primitives/MaxPriorityFeePerGas/toBigInt.js:13 Convert MaxPriorityFeePerGas to bigint (identity function)this):bigint
Parameters
this
MaxPriorityFeePerGasType
Returns
bigint
Value as bigint
Example
_toGwei()
_toGwei(Defined in: src/primitives/MaxPriorityFeePerGas/toGwei.js:13 Convert MaxPriorityFeePerGas to Gweithis):bigint
Parameters
this
MaxPriorityFeePerGasType
Returns
bigint
Value in Gwei
Example
_toNumber()
_toNumber(Defined in: src/primitives/MaxPriorityFeePerGas/toNumber.js:14 Convert MaxPriorityFeePerGas to number WARNING: May lose precision for large valuesthis):number
Parameters
this
MaxPriorityFeePerGasType
Returns
number
Value as number
Example
_toWei()
_toWei(Defined in: src/primitives/MaxPriorityFeePerGas/toWei.js:13 Convert MaxPriorityFeePerGas to Wei (identity function)this):bigint
Parameters
this
MaxPriorityFeePerGasType
Returns
bigint
Value in Wei
Example
compare()
compare(Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:42priorityFee1,priorityFee2):number
Parameters
priorityFee1
string | number | bigint
priorityFee2
string | number | bigint
Returns
number
equals()
equals(Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:35priorityFee1,priorityFee2):boolean
Parameters
priorityFee1
string | number | bigint
priorityFee2
string | number | bigint
Returns
boolean
from()
from(Defined in: src/primitives/MaxPriorityFeePerGas/from.js:16 Create MaxPriorityFeePerGas from bigint, number, or hex stringvalue):MaxPriorityFeePerGasType
Parameters
value
Priority fee in Weistring | number | bigint
Returns
MaxPriorityFeePerGasType
Branded priority fee
Throws
If value is negative or invalid formatExample
fromGwei()
fromGwei(Defined in: src/primitives/MaxPriorityFeePerGas/fromGwei.js:12 Create MaxPriorityFeePerGas from Gwei valuegwei):MaxPriorityFeePerGasType
Parameters
gwei
Value in Gweinumber | bigint
Returns
MaxPriorityFeePerGasType
Priority fee in Wei
Example
fromWei()
fromWei(Defined in: src/primitives/MaxPriorityFeePerGas/fromWei.js:12 Create MaxPriorityFeePerGas from Wei value (alias for from)wei):MaxPriorityFeePerGasType
Parameters
wei
Value in Weistring | number | bigint
Returns
MaxPriorityFeePerGasType
Priority fee
Example
toBigInt()
toBigInt(Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:31priorityFee):bigint
Parameters
priorityFee
string | number | bigint
Returns
bigint
toGwei()
toGwei(Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:19priorityFee):bigint
Parameters
priorityFee
string | number | bigint
Returns
bigint
toNumber()
toNumber(Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:27priorityFee):number
Parameters
priorityFee
string | number | bigint
Returns
number
toWei()
toWei(Defined in: src/primitives/MaxPriorityFeePerGas/index.ts:23priorityFee):bigint
Parameters
priorityFee
string | number | bigint
Returns
bigint
