Skip to content
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
50 changes: 7 additions & 43 deletions contracts/cw2981-royalties/examples/schema.rs
Original file line number Diff line number Diff line change
@@ -1,47 +1,11 @@
use std::env::current_dir;
use std::fs::create_dir_all;
use cosmwasm_schema::write_api;

use cosmwasm_schema::{export_schema, export_schema_with_title, remove_schemas, schema_for};
use cosmwasm_std::Empty;

use cw721::{
AllNftInfoResponse, ContractInfoResponse, NftInfoResponse, NumTokensResponse,
OperatorsResponse, OwnerOfResponse, TokensResponse,
};
use cw721_base::{ExecuteMsg, Extension, InstantiateMsg, MinterResponse, QueryMsg};

use cw2981_royalties::msg::{CheckRoyaltiesResponse, Cw2981QueryMsg, RoyaltiesInfoResponse};
use cw2981_royalties::{ExecuteMsg, InstantiateMsg, QueryMsg};

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_with_title(
&schema_for!(ExecuteMsg<Extension, Empty>),
&out_dir,
"ExecuteMsg",
);
export_schema(&schema_for!(QueryMsg<Cw2981QueryMsg>), &out_dir);
export_schema_with_title(
&schema_for!(AllNftInfoResponse<Extension>),
&out_dir,
"AllNftInfoResponse",
);
export_schema(&schema_for!(OperatorsResponse), &out_dir);
export_schema(&schema_for!(ContractInfoResponse), &out_dir);
export_schema(&schema_for!(MinterResponse), &out_dir);
export_schema_with_title(
&schema_for!(NftInfoResponse<Extension>),
&out_dir,
"NftInfoResponse",
);
export_schema(&schema_for!(NumTokensResponse), &out_dir);
export_schema(&schema_for!(OwnerOfResponse), &out_dir);
export_schema(&schema_for!(TokensResponse), &out_dir);
export_schema(&schema_for!(Cw2981QueryMsg), &out_dir);
export_schema(&schema_for!(RoyaltiesInfoResponse), &out_dir);
export_schema(&schema_for!(CheckRoyaltiesResponse), &out_dir);
write_api! {
instantiate: InstantiateMsg,
execute: ExecuteMsg,
query: QueryMsg,
}
}
160 changes: 0 additions & 160 deletions contracts/cw2981-royalties/schema/all_nft_info_response.json

This file was deleted.

15 changes: 0 additions & 15 deletions contracts/cw2981-royalties/schema/check_royalties_response.json

This file was deleted.

18 changes: 0 additions & 18 deletions contracts/cw2981-royalties/schema/contract_info_response.json

This file was deleted.

Loading