Skip to content

Commit

Permalink
Rename DKGBackendConfig to SigningRulesBackendConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
salman01zp committed Feb 27, 2024
1 parent 865edfe commit b228440
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
13 changes: 5 additions & 8 deletions crates/proposal-signing-backends/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ pub mod mocked;
/// A module to handle the queue of proposals
pub mod queue;

/// A module that Implements the Mocked Proposal Signing Backend.
/// A module that handles proposal signing using Mocked Proposal Signing Backend.
pub use mocked::*;
/// A module that Implements the DKG Proposal Signing Backend.
/// A module that handles proposal signing using Signing Rules Contract.
pub use signing_rules::*;
use webb_relayer_config::signing_backend::DkgProposalSigningBackendConfig;
use webb_relayer_config::signing_backend::SigningRulesBackendConfig;
use webb_relayer_utils::metric;

/// A Proposal Signing Backend is responsible for signing proposal `P` where `P` is anything really depending on the
Expand Down Expand Up @@ -82,7 +82,7 @@ where
M: Middleware,
{
/// Signing rules contract config.
pub config: DkgProposalSigningBackendConfig,
pub config: SigningRulesBackendConfig,
/// Contratc
pub contract: SigningRulesContract<M>,
}
Expand All @@ -92,10 +92,7 @@ where
M: Middleware,
{
/// Creates wrapper around SigningRulesContract.
pub fn new(
config: DkgProposalSigningBackendConfig,
client: Arc<M>,
) -> Self {
pub fn new(config: SigningRulesBackendConfig, client: Arc<M>) -> Self {
Self {
contract: SigningRulesContract::new(config.address, client),
config,
Expand Down
6 changes: 3 additions & 3 deletions crates/relayer-config/src/signing_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ use super::*;
#[serde(tag = "type")]
pub enum ProposalSigningBackendConfig {
/// Uses signing rules contract to vote and submit proposals for signing.
Dkg(DkgProposalSigningBackendConfig),
Dkg(SigningRulesBackendConfig),
/// Uses the Private Key of the current Governor to sign proposals.
Mocked(MockedProposalSigningBackendConfig),
}

/// DkgProposalSigningBackendConfig represents the configuration for the DKG signing backend.
/// SigningRulesBackendConfig represents the configuration for the DKG signing backend.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all(serialize = "camelCase", deserialize = "kebab-case"))]
pub struct DkgProposalSigningBackendConfig {
pub struct SigningRulesBackendConfig {
/// The address of this contract on this chain.
pub address: Address,
/// Phase1 Job Id
Expand Down
3 changes: 0 additions & 3 deletions crates/relayer-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ use axum::response::{IntoResponse, Response};
use multi_provider::MultiProvider;
use webb::substrate::subxt::PolkadotConfig;
use webb::{evm::ethers, substrate::subxt};
use webb_proposals::ResourceId;
pub mod clickable_link;

/// Metrics functionality
Expand Down Expand Up @@ -224,8 +223,6 @@ pub enum Error {
/// The chain id of the node.
chain_id: String,
},
#[error("No bridge registered with DKG for resource id {:?}", _0)]
BridgeNotRegistered(ResourceId),
#[error("Failed to fetch token price for token: {token}")]
FetchTokenPriceError { token: String },
#[error("Failed to read a value from substrate storage")]
Expand Down

0 comments on commit b228440

Please sign in to comment.