Files
nym/contracts/mixnet/examples/schema.rs
T
Jędrzej Stuczyński 4e03759c0f Feature/cosmwasm 0.14.1 update (#653)
* Updated smart contract to work with future cosmwasm 0.14.0 update

* Updated the rest of the codebase

* Reordered imports

* Missing imports

* cargo fmt

* More cargo fmt action

* Introduced type alias for IdentityKey reference
2021-06-22 17:07:11 +01:00

20 lines
700 B
Rust

use cosmwasm_schema::{export_schema, remove_schemas, schema_for};
use mixnet_contract::MixNodeBond;
use mixnet_contracts::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use mixnet_contracts::state::State;
use std::env::current_dir;
use std::fs::create_dir_all;
fn main() {
let mut out_dir = current_dir().unwrap();
out_dir.push("schema");
create_dir_all(&out_dir).unwrap();
remove_schemas(&out_dir).unwrap();
export_schema(&schema_for!(InstantiateMsg), &out_dir);
export_schema(&schema_for!(ExecuteMsg), &out_dir);
export_schema(&schema_for!(QueryMsg), &out_dir);
export_schema(&schema_for!(State), &out_dir);
export_schema(&schema_for!(MixNodeBond), &out_dir);
}