Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add schema generation scripts #45

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading