diff --git a/crates/examples/examples/0001-simple.toml b/crates/examples/examples/0001-simple.toml new file mode 100644 index 0000000000000000000000000000000000000000..53f1bcfba9ab553fa81e93809bf6ea024352add2 --- /dev/null +++ b/crates/examples/examples/0001-simple.toml @@ -0,0 +1,30 @@ +[settings] +timeout = 1000 + +[relaychain] +default_image = "docker.io/parity/polkadot-sdk:latest" +chain = "rococo-local" +command = "polkadot" + + [[relaychain.nodes]] + name = "alice" + args = [ "--alice", "-lruntime=debug,parachain=trace" ] + + [[relaychain.nodes]] + name = "bob" + args = [ "--bob", "-lruntime=debug,parachain=trace" ] + +[[parachains]] +id = 100 +addToGenesis = false + + [parachains.collator] + name = "collator01" + image = "docker.io/parity/polkadot-sdk:latest" + command = "adder-collator" + args = [ "-lruntime=debug,parachain=trace" ] + +[types.Header] +number = "u64" +parent_hash = "Hash" +post_state = "Hash" \ No newline at end of file diff --git a/crates/examples/examples/simple_network_example.rs b/crates/examples/examples/simple_network_example.rs new file mode 100644 index 0000000000000000000000000000000000000000..dff2f03bbb59645c103886bc68fc6dd66b1a9cfc --- /dev/null +++ b/crates/examples/examples/simple_network_example.rs @@ -0,0 +1,16 @@ +use configuration::NetworkConfig; + +fn main() { + + let load_from_toml = + NetworkConfig::load_from_toml("./0001-simple.toml").unwrap(); + + // let config = NetworkConfigBuilder::new() + // .with_relaychain(|r| { + // r.with_chain("rococo-local") + // .with_node(|node| node.with_name("alice").with_command("polkadot")) + // }) + // .build(); + + println!("{:?}", load_from_toml); +}