Skip to content

BLS12_MAP_FP_TO_G1

Elliptic curve

Map a base field element to a point in G1.

Address0x0000000000000000000000000000000000000010
NameBLS12_MAP_FP_TO_G1
Minimum gas5,500
Input64 bytes
Output128 bytes
Available sincePrague

Input

OffsetLengthFieldDescription
064fpA base field element; the top 16 bytes must be zero.

Output

The resulting 128-byte G1 point.

Gas

5500

Failure behaviour

  • Reverts if the input is not exactly 64 bytes or the field element is non-canonical.

Calling it

Precompiles have no ABI and no function selector: the input is raw bytes at the exact offsets above. Call with staticcall.

// BLS12_MAP_FP_TO_G1 at 0x10
(bool ok, bytes memory out) = address(0x10).staticcall(input);
require(ok, "BLS12_MAP_FP_TO_G1 reverted");

Specification

  • EIP-2537: Precompile for BLS12-381 curve operations