Expand description
Constants specifying the precompile addresses for each precompile in EIP-2537
Constants§
- FP_
LENGTH - FP_LENGTH specifies the number of bytes needed to represent an Fp element. This is an element in the base field of BLS12-381.
- FP_
PAD_ BY - FP_PAD_BY specifies the number of bytes that an FP_ELEMENT is padded by to make it 32 byte aligned.
- G1_
ADD_ ADDRESS - G1 add precompile address
- G1_
ADD_ BASE_ GAS_ FEE - G1_ADD_BASE_GAS_FEE specifies the amount of gas needed to perform the G1_ADD precompile.
- G1_
ADD_ INPUT_ LENGTH - G1_ADD_INPUT_LENGTH specifies the number of bytes that the input to G1ADD must use.
- G1_
LENGTH - G1_LENGTH specifies the number of bytes needed to represent a G1 element.
- G1_
MSM_ ADDRESS - G1 msm precompile address
- G1_
MSM_ BASE_ GAS_ FEE - G1_MSM_BASE_GAS_FEE specifies the base amount of gas needed to perform the G1_MSM precompile.
- G1_
MSM_ INPUT_ LENGTH - G1_MSM_INPUT_LENGTH specifies the number of bytes that each MSM input pair should have.
- G2_
ADD_ ADDRESS - G2 add precompile address
- G2_
ADD_ BASE_ GAS_ FEE - G2_ADD_BASE_GAS_FEE specifies the amount of gas needed to perform the G2_ADD precompile.
- G2_
ADD_ INPUT_ LENGTH - G2_ADD_INPUT_LENGTH specifies the number of bytes that the input to G2ADD must occupy.
- G2_
MSM_ ADDRESS - G2 msm precompile address
- G2_
MSM_ BASE_ GAS_ FEE - G2_MSM_BASE_GAS_FEE specifies the base amount of gas needed to perform the G2_MSM precompile.
- G2_
MSM_ INPUT_ LENGTH - G2_MSM_INPUT_LENGTH specifies the number of bytes that each MSM input pair should have.
- MAP_
FP2_ TO_ G2_ ADDRESS - Map fp2 to g2 precompile address
- MAP_
FP2_ TO_ G2_ BASE_ GAS_ FEE - MAP_FP2_TO_G2_BASE_GAS_FEE specifies the amount of gas needed to perform the MAP_FP2_TO_G2 precompile.
- MAP_
FP_ TO_ G1_ ADDRESS - Map fp to g1 precompile address
- MAP_
FP_ TO_ G1_ BASE_ GAS_ FEE - MAP_FP_TO_G1_BASE_GAS_FEE specifies the amount of gas needed to perform the MAP_FP_TO_G1 precompile.
- MSM_
MULTIPLIER - MSM_MULTIPLIER specifies the division constant that is used to determine the gas needed to compute an MSM.
- PADDED_
FP2_ LENGTH - PADDED_FP2_LENGTH specifies the number of bytes that the EVM will use to represent a Fp^2 element according to the padding rules specified in EIP-2537.
- PADDED_
FP_ LENGTH - PADDED_FP_LENGTH specifies the number of bytes that the EVM will use to represent an Fp element according to EIP-2537.
- PADDED_
G1_ LENGTH - PADDED_G1_LENGTH specifies the number of bytes that the EVM will use to represent a G1 element according to padding rules specified in EIP-2537.
- PADDED_
G2_ LENGTH - PADDED_G2_LENGTH specifies the number of bytes that the EVM will use to represent a G2 element.
- PAIRING_
ADDRESS - Pairing precompile address
- PAIRING_
INPUT_ LENGTH - PAIRING_INPUT_LENGTH specifies the number of bytes that each Pairing input pair should have.
- PAIRING_
MULTIPLIER_ BASE - PAIRING_MULTIPLIER_BASE specifies the slope/gradient for the linear expression to determine the amount of gas needed to perform a pairing.
- PAIRING_
OFFSET_ BASE - PAIRING_OFFSET_BASE specifies the y-intercept for the linear expression to determine the amount of gas needed to perform a pairing.
- SCALAR_
LENGTH - SCALAR_LENGTH specifies the number of bytes needed to represent an Fr element. This is an element in the scalar field of BLS12-381.
- SCALAR_
LENGTH_ BITS - SCALAR_LENGTH_BITS specifies the number of bits needed to represent an Fr element. This is an element in the scalar field of BLS12-381.
Statics§
- DISCOUNT_
TABLE_ G1_ MSM - Discounts table for G1 MSM as a vector of pairs
[k, discount]
. - DISCOUNT_
TABLE_ G2_ MSM - Discounts table for G2 MSM as a vector of pairs
[k, discount]
: