pub fn bn128_add(x1: U256, y1: U256, x2: U256, y2: U256) -> (U256, U256)Expand description
Calls the bn128_add G1 addition precompile.
Inputs are affine G1 coordinates over Fq. Returns the resulting affine point or (0, 0) if the result is ∞ / invalid.
§Note
The precompile address is 0x06. You can find its implementation here:
https://github.com/paritytech/polkadot-sdk/blob/master/substrate/frame/revive/src/precompiles/builtin/bn128.rs