init multi services

This commit is contained in:
boneyard93501
2021-03-01 17:03:57 -06:00
parent 19d5fd4db6
commit 5f10fb3559
31 changed files with 1282 additions and 0 deletions

View File

@ -0,0 +1,17 @@
use fluence::{fce, WasmLoggerBuilder};
use serde_json;
fn main() {
WasmLoggerBuilder::new().build().ok();
}
#[fce]
pub fn extract_miner_address(json_string: String) -> String {
let obj = serde_json::from_str::<serde_json::Value>(&json_string);
match obj {
Ok(x) => x["result"]["blockMiner"].to_string(),
// Ok(x) => json_string,
Err(_) => String::from("boo yah"),
}
}