Crate ink_contract_decoder

Source
Expand description

A library to decode ink! contract JSON into Rust types using Serde.

This crate provides a simple way to parse ink! contract JSON strings and deserialize them into Rust types for easy manipulation and interaction.

Example:

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);
}

Structs§

Arg
BuildInfo
Constructor
Contract
InkContract
LangError
Layout
Message
ReturnType
Root
Source
Spec
Storage
Struct
WasmOptSettings

Functions§

decode_ink_contract
Decode the JSON string into an InkContract struct.