Skip to content

Commit f5e154b

Browse files
authored
Merge pull request #20 from movementlabsxyz/fix/12
Fixes Deployment Script Bugs
2 parents 9dc30a2 + a2d4507 commit f5e154b

File tree

1,363 files changed

+769
-1126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,363 files changed

+769
-1126
lines changed

Cargo.lock

Lines changed: 51 additions & 74 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ members = [
77
# mcr
88
"protocol/mcr/util/*",
99
"protocol/mcr/clients/*",
10-
"protocol/mcr/client",
1110
"protocol/mcr/manager",
1211
"protocol/mcr/cli/*",
1312

@@ -97,6 +96,9 @@ tracing-test = "0.2.5"
9796
tokio = { version = "1.35.1", features = ["full", "tracing"] }
9897
tokio-stream = "0.1.15"
9998

99+
# model checking and verification
100+
101+
100102
# secure-signing
101103
secure-signer = { git = "https://github.com/movementlabsxyz/secure-signing.git", rev = "62d9ae5fd098d2c0d2a2da2004ada91681e0df53" }
102104
secure-signer-loader = { git = "https://github.com/movementlabsxyz/secure-signing.git", rev = "62d9ae5fd098d2c0d2a2da2004ada91681e0df53" }
@@ -107,8 +109,9 @@ secure-signer-aws-kms = { git = "https://github.com/movementlabsxyz/secure-signi
107109
### protocol
108110
mcr-types = { path = "protocol/mcr/util/types" }
109111
mcr-config = { path = "protocol/mcr/util/config" }
110-
mcr-client-util = { path = "protocol/mcr/clients/util" }
111-
mcr-settlement-client = { path = "protocol/mcr/client" }
112+
mcr-protocol-client-core-util = { path = "protocol/mcr/clients/util" }
113+
mcr-protocol-client-core-eth = { path = "protocol/mcr/clients/eth" }
114+
mcr-protocol-client-core-mock = { path = "protocol/mcr/clients/mock" }
112115
mcr-protocol-client = { path = "protocol/mcr/cli/client" }
113116
mcr-protocol = { path = "protocol/mcr/cli"}
114117
### network
@@ -117,7 +120,7 @@ mcr-network-coordinator = { path = "network/mcr/cli/coordinator" }
117120
mcr-network = { path = "network/mcr/cli/network" }
118121

119122
# util
120-
secure-signing-eth = { path = "util/signing/eth" }
123+
secure-signer-eth = { path = "util/signing/eth" }
121124
ffs-environment = { path = "util/environment" }
122125

123126
[workspace.lints.clippy]

protocol/mcr/cli/client/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ serde = { workspace = true, features = ["derive"] }
1414
clap = { workspace = true}
1515
dotenv = { workspace = true }
1616
anyhow = { workspace = true }
17+
mcr-protocol-client-core-util = { workspace = true }
18+
mcr-protocol-client-core-eth = { workspace = true }
19+
mcr-types = { workspace = true }
1720

1821
[lints]
1922
workspace = true
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pub mod post_admin_commitment;
2+
3+
use clap::Subcommand;
4+
5+
#[derive(Subcommand)]
6+
#[clap(rename_all = "kebab-case")]
7+
pub enum Eth {
8+
PostAdminCommitment(post_admin_commitment::PostAdminCommitment),
9+
}
10+
11+
impl Eth {
12+
pub async fn execute(&self) -> Result<(), anyhow::Error> {
13+
match self {
14+
Eth::PostAdminCommitment(cmd) => cmd.execute().await?,
15+
}
16+
Ok(())
17+
}
18+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
use anyhow::Context;
2+
use clap::Parser;
3+
use mcr_protocol_client_core_eth::config::Config;
4+
use mcr_protocol_client_core_util::McrClientOperations;
5+
use mcr_types::block_commitment::BlockCommitment;
6+
use serde::{Deserialize, Serialize};
7+
8+
#[derive(Parser, Serialize, Deserialize, Debug, Clone)]
9+
pub struct PostAdminCommitment {
10+
#[clap(flatten)]
11+
pub config: Option<Config>,
12+
}
13+
14+
impl PostAdminCommitment {
15+
pub async fn execute(&self) -> Result<(), anyhow::Error> {
16+
let config = self.config.clone().context("no config provided")?;
17+
let client = config.build().await?;
18+
client.force_block_commitment(BlockCommitment::test()).await?;
19+
20+
Ok(())
21+
}
22+
}

protocol/mcr/cli/client/src/cli/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub mod eth;
12
use clap::{Parser, Subcommand};
23

34
/// The `mcr-protocol-client` CLI.
@@ -13,6 +14,8 @@ pub struct McrProtocolClient {
1314
#[clap(rename_all = "kebab-case")]
1415
pub enum McrProtocolClientSubcommand {
1516
Run,
17+
#[clap(subcommand)]
18+
Eth(eth::Eth),
1619
}
1720

1821
/// Implement the `From` trait for `McrProtocolClient` to convert it into a `McrProtocolClientSubcommand`.
@@ -38,6 +41,7 @@ impl McrProtocolClientSubcommand {
3841
McrProtocolClientSubcommand::Run => {
3942
println!("mcr-protocol-client is under development. Please check back later.");
4043
}
44+
McrProtocolClientSubcommand::Eth(eth) => eth.execute().await?,
4145
}
4246
Ok(())
4347
}

protocol/mcr/client/Cargo.toml

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)