Commit 32f12af6 authored by Andrew Jones's avatar Andrew Jones

Fix lang2 example generate abi

parent 2a060af2
......@@ -11,5 +11,6 @@ path = "main.rs"
[dependencies]
contract = { path = "../..", package = "runtime_storage", features = ["ink-generate-abi", "test-env"] }
serde = { version = "1.0", features = ["derive"] }
ink_lang2 = { path = "../../../../../lang2", default-features = false, features = ["ink-generate-abi"] }
serde = "1.0"
serde_json = "1.0"
fn main() -> Result<(), std::io::Error> {
let abi = contract::ink_generate_abi();
let abi = <contract::RuntimeStorage as ink_lang2::GenerateAbi>::generate_abi();
let contents = serde_json::to_string_pretty(&abi)?;
std::fs::create_dir("target").ok();
std::fs::write("target/abi.json", contents)?;
std::fs::write("target/metadata.json", contents)?;
Ok(())
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment