Skip to content

Commit

Permalink
Updates and Cleanup (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shady Khalifa authored Mar 18, 2022
1 parent 72d8d0e commit fc5f1e7
Show file tree
Hide file tree
Showing 12 changed files with 225 additions and 1,358 deletions.
251 changes: 123 additions & 128 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "webb-relayer"
version = "0.2.0"
version = "0.3.0"
authors = ["Shady Khalifa <shekohex@gmail.com>"]
edition = "2018"

Expand Down Expand Up @@ -41,7 +41,8 @@ hex = { version = "0.4", default-features = false }
# just to make it compile on linux where the openssl is not available.
# until ethers-rs solve this issue: https://github.com/gakonst/ethers-rs/issues/325
native-tls = { version = "^0.2", features = ["vendored"] }
webb = { git = 'https://github.com/webb-tools/webb-rs', rev = "62340f36", default-features = false }
webb = { version = "0.3.0", default-features = false }
webb-proposals = { version = "0.2.0", default-features = false }
ethereum-types = "0.12"
thiserror = "^1.0"
glob = "^0.3"
Expand Down
31 changes: 1 addition & 30 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,7 @@ pub struct LinkedAnchorConfig {
#[serde(tag = "contract")]
pub enum Contract {
Tornado(TornadoContractConfig),
Anchor(AnchorContractConfig),
AnchorOverDKG(AnchorContractOverDKGConfig),
Bridge(BridgeContractConfig),
GovernanceBravoDelegate(GovernanceBravoDelegateContractConfig),
}

Expand Down Expand Up @@ -262,24 +260,6 @@ pub struct TornadoContractConfig {
pub withdraw_config: AnchorWithdrawConfig,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct AnchorContractConfig {
#[serde(flatten)]
pub common: CommonContractConfig,
/// Controls the events watcher
#[serde(rename(serialize = "eventsWatcher"))]
pub events_watcher: EventsWatcherConfig,
/// The size of this contract
pub size: f64,
/// Anchor withdraw configuration.
#[serde(flatten)]
pub withdraw_config: AnchorWithdrawConfig,
/// A List of linked Anchor Contracts (on other chains) to this contract.
#[serde(rename(serialize = "linkedAnchors"))]
pub linked_anchors: Vec<LinkedAnchorConfig>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct AnchorContractOverDKGConfig {
Expand All @@ -301,15 +281,6 @@ pub struct AnchorContractOverDKGConfig {
#[serde(rename(serialize = "linkedAnchors"))]
pub linked_anchors: Vec<LinkedAnchorConfig>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct BridgeContractConfig {
#[serde(flatten)]
pub common: CommonContractConfig,
/// Controls the events watcher
#[serde(rename(serialize = "eventsWatcher"))]
pub events_watcher: EventsWatcherConfig,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
Expand Down Expand Up @@ -577,7 +548,7 @@ fn postloading_process(
// check that all required chains are already present in the config.
for (chain_name, chain_config) in &config.evm {
let anchors = chain_config.contracts.iter().filter_map(|c| match c {
Contract::Anchor(cfg) => Some(cfg),
Contract::AnchorOverDKG(cfg) => Some(cfg),
_ => None,
});
for anchor in anchors {
Expand Down
300 changes: 0 additions & 300 deletions src/events_watcher/anchor_watcher.rs

This file was deleted.

Loading

0 comments on commit fc5f1e7

Please sign in to comment.