-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bab260a
commit 4e15f69
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use cosmwasm_schema::write_api; | ||
|
||
use swapmap::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg}; | ||
|
||
fn main() { | ||
write_api! { | ||
instantiate: InstantiateMsg, | ||
execute: ExecuteMsg, | ||
query: QueryMsg, | ||
migrate: MigrateMsg | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
use cosmwasm_std::{Binary, Addr}; | ||
use schemars::JsonSchema; | ||
use serde::{Deserialize, Serialize}; | ||
use cosmwasm_schema::{cw_serde, QueryResponses}; | ||
use cosmwasm_std::{Addr, Binary}; | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] | ||
#[cw_serde] | ||
pub struct InstantiateMsg {} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] | ||
#[cw_serde] | ||
pub struct MigrateMsg {} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] | ||
#[serde(rename_all = "snake_case")] | ||
#[cw_serde] | ||
pub enum ExecuteMsg { | ||
ChangeOwner { owner: Addr }, | ||
AddTx { hash: Binary, value: Binary }, | ||
Ping {}, | ||
} | ||
|
||
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)] | ||
#[serde(rename_all = "snake_case")] | ||
#[cw_serde] | ||
#[derive(QueryResponses)] | ||
pub enum QueryMsg { | ||
#[returns(Binary)] | ||
GetTx { hash: Binary }, | ||
} |