Skip to content

Commit

Permalink
Add schema generation scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
adairrr committed Dec 10, 2024
1 parent c2f618f commit ec13e2b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[alias]
wasm = "build --release --lib --target wasm32-unknown-unknown"
schema = "run --example schema"

[env]
RUSTFLAGS = "-C link-arg=-s"
Expand Down
11 changes: 11 additions & 0 deletions contracts/account/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use account::msg::*;
use cosmwasm_schema::write_api;

fn main() {
write_api! {
instantiate: InstantiateMsg,
query: QueryMsg,
execute: ExecuteMsg,
migrate: MigrateMsg
};
}
10 changes: 10 additions & 0 deletions contracts/treasury/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
use treasury::msg::*;
use cosmwasm_schema::write_api;

fn main() {
write_api! {
instantiate: InstantiateMsg,
query: QueryMsg,
execute: ExecuteMsg,
};
}
2 changes: 1 addition & 1 deletion contracts/treasury/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate core;
pub mod contract;
mod error;
mod execute;
mod msg;
pub mod msg;
mod state;

mod grant;
Expand Down

0 comments on commit ec13e2b

Please sign in to comment.