Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda committed Mar 11, 2024
1 parent bf6c893 commit b753c00
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions mantis/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ cvm-runtime = { workspace = true, features = ["std"] }
ndarray ={ workspace = true, features = ["std", "serde"]}
good_lp = {workspace = true, features = ["coin_cbc", "singlethread-cbc"]}
fraction = {workspace = true, features = ["default"]}
log ={ workspace = true}

[dev-dependencies]
rustfmt-wrapper = "0.2.1"
15 changes: 11 additions & 4 deletions mantis/node/src/mantis/blackbox/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use blackbox_rs::{prelude::*, types::*, Client};
/// Given total amount it, order owners and desired out, produce CVM program from and by requesting route
use cvm_runtime::{
shared::{Displayed, XcAddr, CvmInstruction, XcProgram},
Amount, AssetId, ExchangeId,
outpost::GetConfigResponse, shared::{CvmInstruction, Displayed, XcAddr, XcProgram}, Amount, AssetId, ExchangeId
};


Expand Down Expand Up @@ -34,7 +33,7 @@ impl BankInput {
async fn route(
server: &str,
input : BankInput,

glt: GetConfigResponse,
) -> XcProgram {
let blackbox: Client = Client::new(server);
let route = blackbox
Expand All @@ -49,5 +48,13 @@ async fn route(
.expect("route found")
.into_inner()
.get(0).expect("at least one route");
CvmInstruction::Spawn { network_id: (), salt: (), assets: (), program: () }

fn build_next(next: &mut [NextItem]) -> CvmInstruction {
match next.split_first_mut() {
Some(_) => todo!(),
None =>
}
}
}
CvmInstruction::Spawn { network_id: (), salt: (), assets: (), program: () }
}
1 change: 1 addition & 0 deletions mantis/node/src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub use std::fmt::format;
pub use std::fmt::Debug;
pub use std::str::FromStr;
pub use tuples::*;
pub use log::{debug, error, info, trace, warn};

#[cfg(test)]
pub use cosmwasm_std::testing::*;

0 comments on commit b753c00

Please sign in to comment.