Skip to content

Commit

Permalink
feat: update api (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisht13 authored Aug 15, 2024
1 parent 20c7cca commit 60be34b
Show file tree
Hide file tree
Showing 7 changed files with 2,618 additions and 903 deletions.
1,273 changes: 1,239 additions & 34 deletions packages/relayer/src/abis/ecdsa_owned_dkim_registry.rs

Large diffs are not rendered by default.

79 changes: 79 additions & 0 deletions packages/relayer/src/abis/email_account_recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,34 @@ pub mod email_account_recovery {
},
],
),
(
::std::borrow::ToOwned::to_owned("isActivated"),
::std::vec![
::ethers::core::abi::ethabi::Function {
name: ::std::borrow::ToOwned::to_owned("isActivated"),
inputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::borrow::ToOwned::to_owned("recoveredAccount"),
kind: ::ethers::core::abi::ethabi::ParamType::Address,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("address"),
),
},
],
outputs: ::std::vec![
::ethers::core::abi::ethabi::Param {
name: ::std::string::String::new(),
kind: ::ethers::core::abi::ethabi::ParamType::Bool,
internal_type: ::core::option::Option::Some(
::std::borrow::ToOwned::to_owned("bool"),
),
},
],
constant: ::core::option::Option::None,
state_mutability: ::ethers::core::abi::ethabi::StateMutability::View,
},
],
),
(
::std::borrow::ToOwned::to_owned("recoverySubjectTemplates"),
::std::vec![
Expand Down Expand Up @@ -717,6 +745,15 @@ pub mod email_account_recovery {
.method_hash([182, 129, 38, 250], (email_auth_msg, template_idx))
.expect("method not found (this should never happen)")
}
///Calls the contract's `isActivated` (0xc9faa7c5) function
pub fn is_activated(
&self,
recovered_account: ::ethers::core::types::Address,
) -> ::ethers::contract::builders::ContractCall<M, bool> {
self.0
.method_hash([201, 250, 167, 197], recovered_account)
.expect("method not found (this should never happen)")
}
///Calls the contract's `recoverySubjectTemplates` (0x3e91cdcd) function
pub fn recovery_subject_templates(
&self,
Expand Down Expand Up @@ -972,6 +1009,21 @@ pub mod email_account_recovery {
pub email_auth_msg: EmailAuthMsg,
pub template_idx: ::ethers::core::types::U256,
}
///Container type for all input parameters for the `isActivated` function with signature `isActivated(address)` and selector `0xc9faa7c5`
#[derive(
Clone,
::ethers::contract::EthCall,
::ethers::contract::EthDisplay,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
#[ethcall(name = "isActivated", abi = "isActivated(address)")]
pub struct IsActivatedCall {
pub recovered_account: ::ethers::core::types::Address,
}
///Container type for all input parameters for the `recoverySubjectTemplates` function with signature `recoverySubjectTemplates()` and selector `0x3e91cdcd`
#[derive(
Clone,
Expand Down Expand Up @@ -1031,6 +1083,7 @@ pub mod email_account_recovery {
),
HandleAcceptance(HandleAcceptanceCall),
HandleRecovery(HandleRecoveryCall),
IsActivated(IsActivatedCall),
RecoverySubjectTemplates(RecoverySubjectTemplatesCall),
Verifier(VerifierCall),
VerifierAddr(VerifierAddrCall),
Expand Down Expand Up @@ -1105,6 +1158,11 @@ pub mod email_account_recovery {
) {
return Ok(Self::HandleRecovery(decoded));
}
if let Ok(decoded) = <IsActivatedCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
return Ok(Self::IsActivated(decoded));
}
if let Ok(decoded) = <RecoverySubjectTemplatesCall as ::ethers::core::abi::AbiDecode>::decode(
data,
) {
Expand Down Expand Up @@ -1163,6 +1221,9 @@ pub mod email_account_recovery {
Self::HandleRecovery(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::IsActivated(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Self::RecoverySubjectTemplates(element) => {
::ethers::core::abi::AbiEncode::encode(element)
}
Expand Down Expand Up @@ -1207,6 +1268,7 @@ pub mod email_account_recovery {
}
Self::HandleAcceptance(element) => ::core::fmt::Display::fmt(element, f),
Self::HandleRecovery(element) => ::core::fmt::Display::fmt(element, f),
Self::IsActivated(element) => ::core::fmt::Display::fmt(element, f),
Self::RecoverySubjectTemplates(element) => {
::core::fmt::Display::fmt(element, f)
}
Expand Down Expand Up @@ -1288,6 +1350,11 @@ pub mod email_account_recovery {
Self::HandleRecovery(value)
}
}
impl ::core::convert::From<IsActivatedCall> for EmailAccountRecoveryCalls {
fn from(value: IsActivatedCall) -> Self {
Self::IsActivated(value)
}
}
impl ::core::convert::From<RecoverySubjectTemplatesCall>
for EmailAccountRecoveryCalls {
fn from(value: RecoverySubjectTemplatesCall) -> Self {
Expand Down Expand Up @@ -1430,6 +1497,18 @@ pub mod email_account_recovery {
pub struct ExtractRecoveredAccountFromRecoverySubjectReturn(
pub ::ethers::core::types::Address,
);
///Container type for all return fields from the `isActivated` function with signature `isActivated(address)` and selector `0xc9faa7c5`
#[derive(
Clone,
::ethers::contract::EthAbiType,
::ethers::contract::EthAbiCodec,
Default,
Debug,
PartialEq,
Eq,
Hash
)]
pub struct IsActivatedReturn(pub bool);
///Container type for all return fields from the `recoverySubjectTemplates` function with signature `recoverySubjectTemplates()` and selector `0x3e91cdcd`
#[derive(
Clone,
Expand Down
Loading

0 comments on commit 60be34b

Please sign in to comment.