2022-01-07 07:47:33 -08:00
|
|
|
use cosmwasm_std::Binary;
|
|
|
|
use schemars::JsonSchema;
|
2022-09-30 00:03:54 -07:00
|
|
|
use serde::{Deserialize, Serialize};
|
2022-01-07 07:47:33 -08:00
|
|
|
|
|
|
|
type HumanAddr = String;
|
|
|
|
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-01-07 07:47:33 -08:00
|
|
|
pub struct InstantiateMsg {
|
|
|
|
// governance contract details
|
|
|
|
pub gov_chain: u16,
|
|
|
|
pub gov_address: Binary,
|
|
|
|
|
|
|
|
pub wormhole_contract: HumanAddr,
|
|
|
|
pub wrapped_asset_code_id: u64,
|
|
|
|
}
|
|
|
|
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-01-07 07:47:33 -08:00
|
|
|
#[serde(rename_all = "snake_case")]
|
|
|
|
pub enum ExecuteMsg {
|
|
|
|
RegisterAssetHook {
|
|
|
|
asset_id: Binary,
|
|
|
|
},
|
|
|
|
|
|
|
|
InitiateTransfer {
|
|
|
|
contract_addr: String,
|
|
|
|
token_id: String,
|
|
|
|
recipient_chain: u16,
|
|
|
|
recipient: Binary,
|
|
|
|
nonce: u32,
|
|
|
|
},
|
|
|
|
|
|
|
|
SubmitVaa {
|
|
|
|
data: Binary,
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-01-07 07:47:33 -08:00
|
|
|
#[serde(rename_all = "snake_case")]
|
|
|
|
pub struct MigrateMsg {}
|
|
|
|
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-01-07 07:47:33 -08:00
|
|
|
#[serde(rename_all = "snake_case")]
|
|
|
|
pub enum QueryMsg {
|
|
|
|
WrappedRegistry { chain: u16, address: Binary },
|
2022-09-30 00:03:54 -07:00
|
|
|
AllWrappedAssets {},
|
2022-01-07 07:47:33 -08:00
|
|
|
}
|
|
|
|
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-01-07 07:47:33 -08:00
|
|
|
#[serde(rename_all = "snake_case")]
|
|
|
|
pub struct WrappedRegistryResponse {
|
|
|
|
pub address: HumanAddr,
|
|
|
|
}
|
|
|
|
|
2022-09-30 03:07:27 -07:00
|
|
|
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq, JsonSchema)]
|
2022-01-07 07:47:33 -08:00
|
|
|
#[serde(rename_all = "snake_case")]
|
|
|
|
pub enum WormholeQueryMsg {
|
|
|
|
VerifyVAA { vaa: Binary, block_time: u64 },
|
|
|
|
}
|