diff --git a/crates/rpc/src/types/v0_6.rs b/crates/rpc/src/types/v0_6.rs index e7b0c6f79..b8f3434a8 100644 --- a/crates/rpc/src/types/v0_6.rs +++ b/crates/rpc/src/types/v0_6.rs @@ -38,7 +38,7 @@ pub(crate) struct RpcUserOperation { max_priority_fee_per_gas: U128, paymaster_and_data: Bytes, signature: Bytes, - authorization_tuple: Option, + eip7702_auth: Option, } impl From for RpcUserOperation { @@ -55,7 +55,7 @@ impl From for RpcUserOperation { max_priority_fee_per_gas: U128::from(op.max_priority_fee_per_gas), paymaster_and_data: op.paymaster_and_data, signature: op.signature, - authorization_tuple: op.authorization_tuple.map(|a| a.into()), + eip7702_auth: op.authorization_tuple.map(|a| a.into()), } } } @@ -78,7 +78,7 @@ impl FromRpc for UserOperation { signature: def.signature, }, ExtendedUserOperation { - authorization_tuple: def.authorization_tuple.map(|a| a.into()), + authorization_tuple: def.eip7702_auth.map(|a| a.into()), }, ) .build() diff --git a/crates/rpc/src/types/v0_7.rs b/crates/rpc/src/types/v0_7.rs index 683e7d34b..1e6554f26 100644 --- a/crates/rpc/src/types/v0_7.rs +++ b/crates/rpc/src/types/v0_7.rs @@ -49,7 +49,7 @@ pub(crate) struct RpcUserOperation { paymaster_data: Option, signature: Bytes, #[serde(skip_serializing_if = "Option::is_none")] - authorization_tuple: Option, + eip7702_auth: Option, } impl From for RpcUserOperation { @@ -87,7 +87,7 @@ impl From for RpcUserOperation { paymaster_post_op_gas_limit: paymaster_post_op_gas_limit.map(|x| U128::from(x)), paymaster_data, signature: op.signature, - authorization_tuple: op.authorization_tuple.map(|a| a.into()), + eip7702_auth: op.authorization_tuple.map(|a| a.into()), } } } @@ -123,8 +123,8 @@ impl FromRpc for UserOperation { if def.factory.is_some() { builder = builder.factory(def.factory.unwrap(), def.factory_data.unwrap_or_default()); } - if def.authorization_tuple.is_some() { - builder = builder.authorization_tuple(def.authorization_tuple.map(|a| a.into())); + if def.eip7702_auth.is_some() { + builder = builder.authorization_tuple(def.eip7702_auth.map(|a| a.into())); } builder.build() } @@ -159,7 +159,7 @@ pub(crate) struct RpcUserOperationOptionalGas { paymaster_post_op_gas_limit: Option, paymaster_data: Option, signature: Bytes, - authorization_contract: Option
, + eip7702_auth: Option, } impl From for UserOperationOptionalGas { @@ -180,7 +180,7 @@ impl From for UserOperationOptionalGas { paymaster_post_op_gas_limit: def.paymaster_post_op_gas_limit.map(|x| x.to()), paymaster_data: def.paymaster_data.unwrap_or_default(), signature: def.signature, - authorization_contract: def.authorization_contract, + authorization_contract: def.eip7702_auth.map(|a| a.address), } } }