Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
371 changes: 188 additions & 183 deletions Cargo.lock

Large diffs are not rendered by default.

85 changes: 44 additions & 41 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,50 +157,50 @@ serde = "1.0"
serde_json = "1.0"
serde_derive = "1.0"
serde_yaml = "0.9.34"
borsh = { version = "0.10" } # todo: internalize jmt and bump
borsh = { version = "0.10" } # todo: internalize jmt and bum

## Aptos dependencies

### We use a forked version so that we can override dependency versions. This is required
### to be avoid dependency conflicts with other Sovereign Labs crates.
aptos-api = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-api-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-bitvec = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-block-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852", features = [
"cloneable-private-keys",
aptos-api = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-api-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-bitvec = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-block-executor = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-cached-packages = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-config = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-consensus-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-crypto = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0", features = [
"cloneable-private-keys",
] }
aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-executor-test-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-executor-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-faucet-core = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-framework = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-language-e2e-tests = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-mempool = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-proptest-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-sdk = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-state-view = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-temppath = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-vm-genesis = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-vm-logging = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-vm-validator = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-logger = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-vm-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-indexer = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-indexer-grpc-fullnode = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-indexer-grpc-table-info = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-protos = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-release-builder = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-gas-schedule = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
move-package = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
movement = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "68c376c2ad8328c7a8294db65f373ec02ec3f852" }
aptos-db = { git = "https://github.com/movementlabsxyz/aptos-core.git", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-executor = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-executor-test-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-executor-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-faucet-core = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-framework = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-language-e2e-tests = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-mempool = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-proptest-helpers = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-sdk = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-state-view = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-storage-interface = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-temppath = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-vm = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-vm-genesis = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-vm-logging = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-vm-validator = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-logger = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-vm-types = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-indexer = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-indexer-grpc-fullnode = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-indexer-grpc-table-info = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-protos = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-release-builder = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
aptos-gas-schedule = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
move-package = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }
movement = { git = "https://github.com/movementlabsxyz/aptos-core", rev = "f018a5b6a015449a551e9765690cf5d98d967ae0" }

# Indexer
processor = { git = "https://github.com/movementlabsxyz/aptos-indexer-processors", rev = "77a36245400250e7d8a854360194288d078681bc" }
Expand Down Expand Up @@ -257,7 +257,9 @@ alloy-rpc-types = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b
alloy-sol-types = { version = "0.7.2", features = ["json"] }
alloy-signer = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
alloy-transport = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2", features = ["reqwest-rustls-tls"] }
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2", features = [
"reqwest-rustls-tls",
] }
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy.git", rev = "83343b172585fe4e040fb104b4d1421f58cbf9a2" }

anyhow = "1.0"
Expand Down Expand Up @@ -372,7 +374,7 @@ aws-sdk-s3 = "1.42.0"

# movement
movement-client = { path = "networks/movement/movement-client" }
simple_asn1 = "0.6.3"
simple_asn1 = "0.6.3"
dotenv = "0.15.0"
rand_core = "0.9.0"

Expand Down Expand Up @@ -400,4 +402,5 @@ opt-level = 3

[patch.crates-io]
merlin = { git = "https://github.com/aptos-labs/merlin" }
x25519-dalek = { git = "https://github.com/aptos-labs/x25519-dalek", branch = "zeroize_v1" }
x25519-dalek = { git = "https://github.com/aptos-labs/x25519-dalek", branch = "zeroize_v1" }

4 changes: 4 additions & 0 deletions networks/movement/movement-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ path = "src/bin/e2e/whitelist.rs"
name = "movement-tests-e2e-ggp-gas-fee"
path = "src/bin/e2e/ggp_gas_fee.rs"

[[bin]]
name = "movement-tests-e2e-admin-cli"
path = "src/bin/e2e/admin_cli.rs"


[dependencies]
aptos-sdk = { workspace = true }
Expand Down
111 changes: 111 additions & 0 deletions networks/movement/movement-client/src/bin/e2e/admin_cli.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
use anyhow::Context;
use aptos_sdk::{
coin_client::CoinClient,
rest_client::{Client, FaucetClient},
};
use movement_client::crypto::ed25519::Ed25519PrivateKey;
use movement_client::crypto::ValidCryptoMaterialStringExt;
use movement_client::types::LocalAccount;
use once_cell::sync::Lazy;
use std::str::FromStr;
use tokio::process::Command;
//use tokio::process::Command;
//use tracing::info;
use tracing_subscriber::EnvFilter;
use url::Url;

static SUZUKA_CONFIG: Lazy<movement_config::Config> = Lazy::new(|| {
let dot_movement = dot_movement::DotMovement::try_from_env().unwrap();
dot_movement.try_get_config_from_json::<movement_config::Config>().unwrap()
});

static NODE_URL: Lazy<Url> = Lazy::new(|| {
let node_connection_address = SUZUKA_CONFIG
.execution_config
.maptos_config
.client
.maptos_rest_connection_hostname
.clone();
let node_connection_port =
SUZUKA_CONFIG.execution_config.maptos_config.client.maptos_rest_connection_port;
let node_connection_url =
format!("http://{}:{}", node_connection_address, node_connection_port);
Url::from_str(&node_connection_url).unwrap()
});

static FAUCET_URL: Lazy<Url> = Lazy::new(|| {
let faucet_listen_address = SUZUKA_CONFIG
.execution_config
.maptos_config
.client
.maptos_faucet_rest_connection_hostname
.clone();
let faucet_listen_port = SUZUKA_CONFIG
.execution_config
.maptos_config
.client
.maptos_faucet_rest_connection_port;

let faucet_listen_url = format!("http://{}:{}", faucet_listen_address, faucet_listen_port);

Url::from_str(faucet_listen_url.as_str()).unwrap()
});

const DEAD_ADDRESS: &str = "000000000000000000000000000000000000000000000000000000000000dead";

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
tracing_subscriber::fmt()
.with_env_filter(
EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")),
)
.init();

// Initialize clients
let rest_client = Client::new(NODE_URL.clone());
let faucet_client = FaucetClient::new(FAUCET_URL.clone(), NODE_URL.clone());
let coin_client = CoinClient::new(&rest_client);

let raw_pk = SUZUKA_CONFIG
.execution_config
.maptos_config
.chain
.maptos_private_key_signer_identifier
.try_raw_private_key()?;

let private_key = Ed25519PrivateKey::try_from(raw_pk.as_slice())?;
let core_resources_account =
LocalAccount::from_private_key(private_key.to_encoded_string()?.as_str(), 0)?;

faucet_client
.fund(core_resources_account.address(), 100_000_000_000)
.await
.context("Failed to fund core resourece account")?;

let output = Command::new("cargo")
.args(&[
"run",
"-p",
"movement-full-node",
"admin",
"ops",
"mint-to",
"--movement-path",
".movement/",
"--amount",
"42",
"--recipient",
DEAD_ADDRESS,
])
.output()
.await
.expect("Failed to execute command");

if output.status.success() {
println!("Command executed successfully:\n{}", String::from_utf8_lossy(&output.stdout));
} else {
eprintln!("Command failed:\n{}", String::from_utf8_lossy(&output.stderr));
}

Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async fn main() -> Result<(), anyhow::Error> {

// Wait to verify no additional deposits
tokio::time::sleep(tokio::time::Duration::from_secs(5)).await;

//
// Check final balance
let final_framework_balance = coin_client
.get_account_balance(&ggp_account_address)
Expand Down
9 changes: 7 additions & 2 deletions networks/movement/movement-full-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ rust-version = { workspace = true }
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
aptos-crypto = { workspace = true }
aptos-types = { workspace = true }
aptos-sdk = { workspace = true }
maptos-dof-execution = { workspace = true }
prost = { workspace = true }
movement-da-light-node-proto = { workspace = true, features = ["client"] }
Expand Down Expand Up @@ -40,9 +43,11 @@ zstd = { workspace = true }
hyper = { workspace = true }
hex = { workspace = true }
mcr-settlement-config = { workspace = true }
clap = { workspace = true }
movement-da-light-node-client = { workspace = true}
clap = { workspace = true }
movement-da-light-node-client = { workspace = true }
aptos-framework-elsa-to-biarritz-rc1-migration = { workspace = true }
once_cell = { workspace = true }
url = { workspace = true }

[features]
default = []
Expand Down
Loading
Loading