BLS12_MAP_FP2_TO_G2
Elliptic curve
Map an extension field element to a point in G2.
| Address | 0x0000000000000000000000000000000000000011 |
|---|---|
| Name | BLS12_MAP_FP2_TO_G2 |
| Minimum gas | 23,800 |
| Input | 128 bytes |
| Output | 256 bytes |
| Available since | Prague |
Input
| Offset | Length | Field | Description |
|---|---|---|---|
| 0 | 128 | fp2 | An Fp2 element, two 64-byte field elements. |
Output
The resulting 256-byte G2 point.
Gas
23800
Failure behaviour
- Reverts if the input is not exactly 128 bytes or a 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_FP2_TO_G2 at 0x11(bool ok, bytes memory out) = address(0x11).staticcall(input);require(ok, "BLS12_MAP_FP2_TO_G2 reverted");Specification
- EIP-2537: Precompile for BLS12-381 curve operations