diff --git a/Cargo.lock b/Cargo.lock index 91fcb6a6..7efc9e2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1388,6 +1388,7 @@ dependencies = [ name = "eigensdk-crypto-bls" version = "0.0.1-alpha" dependencies = [ + "alloy-primitives", "ark-bn254", "ark-ec", "ark-ff 0.4.2", diff --git a/crates/chainio/utils/src/lib.rs b/crates/chainio/utils/src/lib.rs index 9c45b423..859f974c 100644 --- a/crates/chainio/utils/src/lib.rs +++ b/crates/chainio/utils/src/lib.rs @@ -15,7 +15,7 @@ use eigensdk_crypto_bn254::utils::u256_to_bigint256; use RegistryCoordinator::{G1Point as RegistryG1Point, G2Point as RegistryG2Point}; pub fn convert_bn254_to_ark(g1_point: RegistryCoordinator::G1Point) -> G1Point { - G1Point::new(u256_to_bigint256(g1_point.x), u256_to_bigint256(g1_point.y)) + G1Point::new(u256_to_bigint256(g1_point.X), u256_to_bigint256(g1_point.Y)) } pub fn convert_to_bn254_g1_point(g1: G1Projective) -> RegistryG1Point { diff --git a/crates/contracts/bindings/src/lib.rs b/crates/contracts/bindings/src/lib.rs index f904e79f..cb32025b 100644 --- a/crates/contracts/bindings/src/lib.rs +++ b/crates/contracts/bindings/src/lib.rs @@ -1,3 +1,6 @@ //! This module is a helper module to generate ethers bindings, if required //! //! If you are using alloy, you don't need to take any action. + + + diff --git a/crates/crypto/bls/Cargo.toml b/crates/crypto/bls/Cargo.toml index 933f1af8..66399f95 100644 --- a/crates/crypto/bls/Cargo.toml +++ b/crates/crypto/bls/Cargo.toml @@ -14,4 +14,5 @@ ark-ff.workspace = true eigensdk-crypto-bn254.workspace = true thiserror.workspace = true ethers-core.workspace = true -ark-ec = "0.4.2" \ No newline at end of file +ark-ec = "0.4.2" +alloy-primitives.workspace = true \ No newline at end of file diff --git a/crates/crypto/bls/src/attestation.rs b/crates/crypto/bls/src/attestation.rs index 3bbc9708..d6b77ba6 100644 --- a/crates/crypto/bls/src/attestation.rs +++ b/crates/crypto/bls/src/attestation.rs @@ -8,7 +8,7 @@ use ark_ff::{BigInteger256, Field, One}; use eigensdk_crypto_bn254::utils::{ get_g2_generator, mul_by_generator_g1, mul_by_generator_g2, u256_to_bigint256, }; -use ethers_core::types::U256; +use alloy_primitives::U256; use std::ops::Neg; use std::ops::{Add, Mul}; pub fn new_fp_element(x: BigInteger256) -> Fq {