Skip to content

Commit

Permalink
Merge pull request #1159 from anoma/tiago/ethbridge/add-ethbridge-rs
Browse files Browse the repository at this point in the history
Add `ethbridge-rs` deps to Namada
  • Loading branch information
sug0 authored Feb 15, 2023
2 parents b5bbd55 + a8b8804 commit 8747bda
Show file tree
Hide file tree
Showing 13 changed files with 3,482 additions and 589 deletions.
1,175 changes: 1,007 additions & 168 deletions Cargo.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ async-process = {git = "https://github.com/heliaxdev/async-process.git", rev = "
# borsh-schema-derive-internal = {path = "../borsh-rs/borsh-schema-derive-internal"}

# patched to a commit on the `eth-bridge-integration+consensus-timeout` branch of our fork
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-testgen = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-light-client = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-light-client-verifier = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}
tendermint-config = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}
tendermint-rpc = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}
tendermint-testgen = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}
tendermint-light-client = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}
tendermint-light-client-verifier = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "c364f4d0c3bb6f357ea48549e7a5b1cb49dbc2b4"}

# patched to a commit on the `eth-bridge-integration` branch of our fork
ibc = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "f4703dfe2c1f25cc431279ab74f10f3e0f6827e2"}
ibc-proto = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "f4703dfe2c1f25cc431279ab74f10f3e0f6827e2"}
ibc-relayer = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "f4703dfe2c1f25cc431279ab74f10f3e0f6827e2"}
ibc = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "9a79bc0dce207fd7d3477ebd2197fe79a4d5eb8a"}
ibc-proto = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "9a79bc0dce207fd7d3477ebd2197fe79a4d5eb8a"}
ibc-relayer = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "9a79bc0dce207fd7d3477ebd2197fe79a4d5eb8a"}

# patched to a commit on the `eth-bridge-integration` branch of our fork
tower-abci = {git = "https://github.com/heliaxdev/tower-abci.git", rev = "fcc0014d0bda707109901abfa1b2f782d242f082"}
Expand Down
6 changes: 4 additions & 2 deletions apps/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ config = "0.11.0"
data-encoding = "2.3.2"
derivative = "2.2.0"
ed25519-consensus = "1.2.0"
ethabi = "17.0.0"
ethabi = "18.0.0"
ethbridge-bridge-contract = {git = "https://github.com/heliaxdev/ethbridge-rs", tag = "v0.4.0"}
ethbridge-governance-contract = {git = "https://github.com/heliaxdev/ethbridge-rs", tag = "v0.4.0"}
ferveo = {git = "https://github.com/anoma/ferveo", rev = "9e5e91c954158e7cff45c483fd06cd649a81553f"}
ferveo-common = {git = "https://github.com/anoma/ferveo", rev = "9e5e91c954158e7cff45c483fd06cd649a81553f"}
eyre = "0.6.5"
Expand Down Expand Up @@ -142,7 +144,7 @@ tendermint = {version = "0.23.6", optional = true}
tendermint-config = {version = "0.23.6", optional = true}
tendermint-proto = {version = "0.23.6", optional = true}
tendermint-rpc = {version = "0.23.6", features = ["http-client", "websocket-client"], optional = true}
thiserror = "1.0.30"
thiserror = "1.0.36"
tokio = {version = "1.8.2", features = ["full"]}
toml = "0.5.8"
tonic = "0.6.1"
Expand Down
7 changes: 6 additions & 1 deletion core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ ibc-mocks-abcipp = [
"ibc-abcipp/mocks",
]

ethers-derive = [
"ethbridge-structs/ethers-derive"
]

# for integration tests and test utilies
testing = [
"rand",
Expand All @@ -65,7 +69,8 @@ chrono = {version = "0.4.22", default-features = false, features = ["clock", "st
data-encoding = "2.3.2"
derivative = "2.2.0"
ed25519-consensus = "1.2.0"
ethabi = "17.0.0"
ethabi = "18.0.0"
ethbridge-structs = { git = "https://github.com/heliaxdev/ethbridge-rs", tag = "v0.4.0" }
eyre = "0.6.8"
ferveo = {optional = true, git = "https://github.com/anoma/ferveo", rev = "9e5e91c954158e7cff45c483fd06cd649a81553f"}
ferveo-common = {git = "https://github.com/anoma/ferveo", rev = "9e5e91c954158e7cff45c483fd06cd649a81553f"}
Expand Down
2 changes: 2 additions & 0 deletions core/src/types/ethereum_structs.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//! Ethereum bridge struct re-exports.
pub use ethbridge_structs::*;
1 change: 1 addition & 0 deletions core/src/types/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ pub mod chain;
pub mod eth_abi;
pub mod eth_bridge_pool;
pub mod ethereum_events;
pub mod ethereum_structs;
pub mod governance;
pub mod hash;
pub mod ibc;
Expand Down
3 changes: 2 additions & 1 deletion ethereum_bridge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ testing = [
]

[dependencies]
namada_core = {path = "../core", default-features = false, features = ["secp256k1-sign-verify", "ferveo-tpke"]}
namada_core = {path = "../core", default-features = false, features = ["secp256k1-sign-verify", "ferveo-tpke", "ethers-derive"]}
namada_proof_of_stake = {path = "../proof_of_stake", default-features = false}
borsh = "0.9.0"
ethers = "1.0.2"
eyre = "0.6.8"
itertools = "0.10.0"
serde = {version = "1.0.125", features = ["derive"]}
Expand Down
3 changes: 2 additions & 1 deletion shared/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ testing = [
]

[dependencies]
namada_core = {path = "../core", default-features = false, features = ["secp256k1-sign-verify"]}
namada_core = {path = "../core", default-features = false, features = ["secp256k1-sign-verify", "ethers-derive"]}
namada_proof_of_stake = {path = "../proof_of_stake", default-features = false}
namada_ethereum_bridge = {path = "../ethereum_bridge", default-features = false}
async-trait = {version = "0.1.51", optional = true}
Expand All @@ -95,6 +95,7 @@ circular-queue = "0.2.6"
clru = {git = "https://github.com/marmeladema/clru-rs.git", rev = "71ca566"}
data-encoding = "2.3.2"
derivative = "2.2.0"
ethers = "1.0.2"
eyre = "0.6.8"
ferveo-common = {git = "https://github.com/anoma/ferveo", rev = "9e5e91c954158e7cff45c483fd06cd649a81553f"}
# TODO using the same version of tendermint-rs as we do here.
Expand Down
12 changes: 8 additions & 4 deletions shared/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ pub use {
tendermint_abcipp as tendermint,
tendermint_proto_abcipp as tendermint_proto,
};
pub use {
namada_core as core, namada_ethereum_bridge as eth_bridge,
namada_proof_of_stake as proof_of_stake,
};
pub use {namada_core as core, namada_proof_of_stake as proof_of_stake};
pub mod ledger;
pub use namada_core::proto;
pub mod types;
pub mod vm;

pub mod eth_bridge {
//! Namada Ethereum bridge re-exports.
pub use ethers;
pub use namada_core::types::ethereum_structs as structs;
pub use namada_ethereum_bridge::*;
}

#[cfg(test)]
#[macro_use]
extern crate assert_matches;
Loading

0 comments on commit 8747bda

Please sign in to comment.