Skip to content

Commit

Permalink
new GetConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
taitruong committed Aug 13, 2024
1 parent bcd8a7c commit 71d692b
Show file tree
Hide file tree
Showing 20 changed files with 4,207 additions and 1,564 deletions.
13 changes: 7 additions & 6 deletions contracts/cw721-base/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cosmwasm_schema::{export_schema_with_title, remove_schemas, schema_for};
use cosmwasm_schema::{remove_schemas, write_api};
use cw721_base::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
use std::env::current_dir;
use std::fs::create_dir_all;
Expand All @@ -9,9 +9,10 @@ fn main() {
create_dir_all(&out_dir).unwrap();
remove_schemas(&out_dir).unwrap();

// entry points - generate always with title for avoiding name suffixes like "..._empty_for_..." due to generics
export_schema_with_title(&schema_for!(InstantiateMsg), &out_dir, "InstantiateMsg");
export_schema_with_title(&schema_for!(ExecuteMsg), &out_dir, "ExecuteMsg");
export_schema_with_title(&schema_for!(QueryMsg), &out_dir, "QueryMsg");
export_schema_with_title(&schema_for!(MigrateMsg), &out_dir, "MigrateMsg");
write_api! {
instantiate: InstantiateMsg,
execute: ExecuteMsg,
query: QueryMsg,
migrate: MigrateMsg,
}
}
Loading

0 comments on commit 71d692b

Please sign in to comment.