Crates.io | ink_contract_decoder |
lib.rs | ink_contract_decoder |
version | 0.1.1 |
source | src |
created_at | 2023-03-28 03:59:17.452945 |
updated_at | 2023-03-28 05:29:21.575062 |
description | A Rust crate to decode ink! contracts JSON into Rust types using Serde. |
homepage | |
repository | https://github.com/kvinwang/ink_contract_decoder.git |
max_upload_size | |
id | 822720 |
size | 5,394 |
A Rust crate to decode ink! contracts JSON into Rust types using Serde.
Add this to your Cargo.toml
:
[dependencies]
ink_contract_decoder = "0.1.0"
use ink_contract_decoder::decode_ink_contract;
fn main() {
let json_str = r#"
{
// Your JSON contract string here
}
"#;
let ink_contract = decode_ink_contract(json_str).unwrap();
println!("{:#?}", ink_contract);
}