diff --git a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json index 20780b05b..3c91ffab8 100644 --- a/contracts/ibc-reflect-send/schema/ibc-reflect-send.json +++ b/contracts/ibc-reflect-send/schema/ibc-reflect-send.json @@ -305,18 +305,6 @@ } }, "additionalProperties": false - }, - { - "type": "object", - "required": [ - "eureka" - ], - "properties": { - "eureka": { - "$ref": "#/definitions/EurekaMsg" - } - }, - "additionalProperties": false } ] }, @@ -376,78 +364,6 @@ "type": "object", "additionalProperties": false }, - "EurekaMsg": { - "description": "These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts", - "oneOf": [ - { - "description": "Sends an IBC packet with given payloads over the existing channel.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "payloads", - "timeout" - ], - "properties": { - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/EurekaPayload" - } - }, - "timeout": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "EurekaPayload": { - "description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "destination_port", - "encoding", - "value", - "version" - ], - "properties": { - "destination_port": { - "description": "The port id on the chain where the packet is sent to (external chain).", - "type": "string" - }, - "encoding": { - "description": "Encoding used to serialize the [EurekaPayload::value].", - "type": "string" - }, - "value": { - "description": "Encoded payload data.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "version": { - "description": "Version of the receiving contract.", - "type": "string" - } - }, - "additionalProperties": false - }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: /~https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ diff --git a/contracts/ibc-reflect-send/schema/ibc/packet_msg.json b/contracts/ibc-reflect-send/schema/ibc/packet_msg.json index d8dffd2c1..974ced2dc 100644 --- a/contracts/ibc-reflect-send/schema/ibc/packet_msg.json +++ b/contracts/ibc-reflect-send/schema/ibc/packet_msg.json @@ -246,18 +246,6 @@ } }, "additionalProperties": false - }, - { - "type": "object", - "required": [ - "eureka" - ], - "properties": { - "eureka": { - "$ref": "#/definitions/EurekaMsg" - } - }, - "additionalProperties": false } ] }, @@ -317,78 +305,6 @@ "type": "object", "additionalProperties": false }, - "EurekaMsg": { - "description": "These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts", - "oneOf": [ - { - "description": "Sends an IBC packet with given payloads over the existing channel.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "payloads", - "timeout" - ], - "properties": { - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/EurekaPayload" - } - }, - "timeout": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "EurekaPayload": { - "description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "destination_port", - "encoding", - "value", - "version" - ], - "properties": { - "destination_port": { - "description": "The port id on the chain where the packet is sent to (external chain).", - "type": "string" - }, - "encoding": { - "description": "Encoding used to serialize the [EurekaPayload::value].", - "type": "string" - }, - "value": { - "description": "Encoded payload data.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "version": { - "description": "Version of the receiving contract.", - "type": "string" - } - }, - "additionalProperties": false - }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: /~https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ diff --git a/contracts/ibc-reflect-send/schema/raw/execute.json b/contracts/ibc-reflect-send/schema/raw/execute.json index 74ddd3202..8841eded4 100644 --- a/contracts/ibc-reflect-send/schema/raw/execute.json +++ b/contracts/ibc-reflect-send/schema/raw/execute.json @@ -294,18 +294,6 @@ } }, "additionalProperties": false - }, - { - "type": "object", - "required": [ - "eureka" - ], - "properties": { - "eureka": { - "$ref": "#/definitions/EurekaMsg" - } - }, - "additionalProperties": false } ] }, @@ -365,78 +353,6 @@ "type": "object", "additionalProperties": false }, - "EurekaMsg": { - "description": "These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts", - "oneOf": [ - { - "description": "Sends an IBC packet with given payloads over the existing channel.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "payloads", - "timeout" - ], - "properties": { - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/EurekaPayload" - } - }, - "timeout": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "EurekaPayload": { - "description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "destination_port", - "encoding", - "value", - "version" - ], - "properties": { - "destination_port": { - "description": "The port id on the chain where the packet is sent to (external chain).", - "type": "string" - }, - "encoding": { - "description": "Encoding used to serialize the [EurekaPayload::value].", - "type": "string" - }, - "value": { - "description": "Encoded payload data.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "version": { - "description": "Version of the receiving contract.", - "type": "string" - } - }, - "additionalProperties": false - }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: /~https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ diff --git a/contracts/ibc-reflect/schema/ibc/packet_msg.json b/contracts/ibc-reflect/schema/ibc/packet_msg.json index 84a3308ae..eec0371bd 100644 --- a/contracts/ibc-reflect/schema/ibc/packet_msg.json +++ b/contracts/ibc-reflect/schema/ibc/packet_msg.json @@ -322,18 +322,6 @@ } }, "additionalProperties": false - }, - { - "type": "object", - "required": [ - "eureka" - ], - "properties": { - "eureka": { - "$ref": "#/definitions/EurekaMsg" - } - }, - "additionalProperties": false } ] }, @@ -346,78 +334,6 @@ "type": "object", "additionalProperties": false }, - "EurekaMsg": { - "description": "These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts", - "oneOf": [ - { - "description": "Sends an IBC packet with given payloads over the existing channel.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "payloads", - "timeout" - ], - "properties": { - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/EurekaPayload" - } - }, - "timeout": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "EurekaPayload": { - "description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "destination_port", - "encoding", - "value", - "version" - ], - "properties": { - "destination_port": { - "description": "The port id on the chain where the packet is sent to (external chain).", - "type": "string" - }, - "encoding": { - "description": "Encoding used to serialize the [EurekaPayload::value].", - "type": "string" - }, - "value": { - "description": "Encoded payload data.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "version": { - "description": "Version of the receiving contract.", - "type": "string" - } - }, - "additionalProperties": false - }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: /~https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ diff --git a/contracts/reflect/schema/raw/execute.json b/contracts/reflect/schema/raw/execute.json index c10c85b84..60689b4e4 100644 --- a/contracts/reflect/schema/raw/execute.json +++ b/contracts/reflect/schema/raw/execute.json @@ -294,18 +294,6 @@ } }, "additionalProperties": false - }, - { - "type": "object", - "required": [ - "eureka" - ], - "properties": { - "eureka": { - "$ref": "#/definitions/EurekaMsg" - } - }, - "additionalProperties": false } ] }, @@ -419,78 +407,6 @@ } ] }, - "EurekaMsg": { - "description": "These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts", - "oneOf": [ - { - "description": "Sends an IBC packet with given payloads over the existing channel.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "payloads", - "timeout" - ], - "properties": { - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/EurekaPayload" - } - }, - "timeout": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "EurekaPayload": { - "description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "destination_port", - "encoding", - "value", - "version" - ], - "properties": { - "destination_port": { - "description": "The port id on the chain where the packet is sent to (external chain).", - "type": "string" - }, - "encoding": { - "description": "Encoding used to serialize the [EurekaPayload::value].", - "type": "string" - }, - "value": { - "description": "Encoded payload data.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "version": { - "description": "Version of the receiving contract.", - "type": "string" - } - }, - "additionalProperties": false - }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: /~https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ diff --git a/contracts/reflect/schema/reflect.json b/contracts/reflect/schema/reflect.json index 56a789bf6..9a4c0e536 100644 --- a/contracts/reflect/schema/reflect.json +++ b/contracts/reflect/schema/reflect.json @@ -304,18 +304,6 @@ } }, "additionalProperties": false - }, - { - "type": "object", - "required": [ - "eureka" - ], - "properties": { - "eureka": { - "$ref": "#/definitions/EurekaMsg" - } - }, - "additionalProperties": false } ] }, @@ -429,78 +417,6 @@ } ] }, - "EurekaMsg": { - "description": "These are messages in the IBC lifecycle using the new Eureka approach. Only usable by IBC-enabled contracts", - "oneOf": [ - { - "description": "Sends an IBC packet with given payloads over the existing channel.", - "type": "object", - "required": [ - "send_packet" - ], - "properties": { - "send_packet": { - "type": "object", - "required": [ - "channel_id", - "payloads", - "timeout" - ], - "properties": { - "channel_id": { - "description": "existing channel to send the tokens over", - "type": "string" - }, - "payloads": { - "type": "array", - "items": { - "$ref": "#/definitions/EurekaPayload" - } - }, - "timeout": { - "$ref": "#/definitions/Timestamp" - } - }, - "additionalProperties": false - } - }, - "additionalProperties": false - } - ] - }, - "EurekaPayload": { - "description": "Payload value should be encoded in a format defined by the channel version, and the module on the other side should know how to parse this.", - "type": "object", - "required": [ - "destination_port", - "encoding", - "value", - "version" - ], - "properties": { - "destination_port": { - "description": "The port id on the chain where the packet is sent to (external chain).", - "type": "string" - }, - "encoding": { - "description": "Encoding used to serialize the [EurekaPayload::value].", - "type": "string" - }, - "value": { - "description": "Encoded payload data.", - "allOf": [ - { - "$ref": "#/definitions/Binary" - } - ] - }, - "version": { - "description": "Version of the receiving contract.", - "type": "string" - } - }, - "additionalProperties": false - }, "GovMsg": { "description": "This message type allows the contract interact with the [x/gov] module in order to cast votes.\n\n[x/gov]: /~https://github.com/cosmos/cosmos-sdk/tree/v0.45.12/x/gov\n\n## Examples\n\nCast a simple vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); use cosmwasm_std::{GovMsg, VoteOption};\n\n#[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::Vote { proposal_id: 4, option: VoteOption::Yes, })) } ```\n\nCast a weighted vote:\n\n``` # use cosmwasm_std::{ # HexBinary, # Storage, Api, Querier, DepsMut, Deps, entry_point, Env, StdError, MessageInfo, # Response, QueryResponse, # }; # type ExecuteMsg = (); # #[cfg(feature = \"cosmwasm_1_2\")] use cosmwasm_std::{Decimal, GovMsg, VoteOption, WeightedVoteOption};\n\n# #[cfg(feature = \"cosmwasm_1_2\")] #[entry_point] pub fn execute( deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg, ) -> Result { // ... Ok(Response::new().add_message(GovMsg::VoteWeighted { proposal_id: 4, options: vec![ WeightedVoteOption { option: VoteOption::Yes, weight: Decimal::percent(65), }, WeightedVoteOption { option: VoteOption::Abstain, weight: Decimal::percent(35), }, ], })) } ```", "oneOf": [ diff --git a/docs/CAPABILITIES-BUILT-IN.md b/docs/CAPABILITIES-BUILT-IN.md index f95913f19..30630b8ca 100644 --- a/docs/CAPABILITIES-BUILT-IN.md +++ b/docs/CAPABILITIES-BUILT-IN.md @@ -11,6 +11,8 @@ might define others. "Stargate". It primarily includes protobuf messages and IBC support. - `staking` is for chains with the Cosmos SDK staking module. There are Cosmos chains that don't use this (e.g. Tgrade). +- `eureka` is for messages and queries that came with the Cosmos SDK upgrade + "Eureka". - `cosmwasm_1_1` enables the `BankQuery::Supply` query. Only chains running CosmWasm `1.1.0` or higher support this. - `cosmwasm_1_2` enables the `GovMsg::VoteWeighted` and `WasmMsg::Instantiate2` diff --git a/packages/std/Cargo.toml b/packages/std/Cargo.toml index 876a296e4..7d15f3e17 100644 --- a/packages/std/Cargo.toml +++ b/packages/std/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" readme = "README.md" [package.metadata.docs.rs] -features = ["abort", "cosmwasm_2_2", "staking", "stargate"] +features = ["abort", "cosmwasm_2_2", "staking", "stargate", "eureka"] [features] default = ["iterator", "std"] @@ -29,6 +29,8 @@ staking = [] # stargate enables stargate-dependent messages and queries, like raw protobuf messages # as well as ibc-related functionality stargate = [] +# eureka enables eureka-dependent messages and queries +eureka = [] # This feature makes `BankQuery::Supply` available for the contract to call, but requires # the host blockchain to run CosmWasm `1.1.0` or higher. cosmwasm_1_1 = [] diff --git a/packages/std/src/exports.rs b/packages/std/src/exports.rs index 6dbf72e15..17e2cf22d 100644 --- a/packages/std/src/exports.rs +++ b/packages/std/src/exports.rs @@ -44,6 +44,10 @@ extern "C" fn requires_staking() {} #[no_mangle] extern "C" fn requires_stargate() {} +#[cfg(feature = "eureka")] +#[no_mangle] +extern "C" fn requires_eureka() {} + #[cfg(feature = "cosmwasm_1_1")] #[no_mangle] extern "C" fn requires_cosmwasm_1_1() {} diff --git a/packages/std/src/results/cosmos_msg.rs b/packages/std/src/results/cosmos_msg.rs index 7ee12c33e..b6ea3b116 100644 --- a/packages/std/src/results/cosmos_msg.rs +++ b/packages/std/src/results/cosmos_msg.rs @@ -6,6 +6,7 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::coin::Coin; +#[cfg(feature = "eureka")] use crate::eureka::EurekaMsg; #[cfg(feature = "stargate")] use crate::ibc::IbcMsg; @@ -85,6 +86,7 @@ pub enum CosmosMsg { Wasm(WasmMsg), #[cfg(feature = "stargate")] Gov(GovMsg), + #[cfg(feature = "eureka")] Eureka(EurekaMsg), } @@ -110,6 +112,7 @@ impl CosmosMsg { CosmosMsg::Wasm(msg) => CosmosMsg::Wasm(msg), #[cfg(feature = "stargate")] CosmosMsg::Gov(msg) => CosmosMsg::Gov(msg), + #[cfg(feature = "eureka")] CosmosMsg::Eureka(msg) => CosmosMsg::Eureka(msg), }) } @@ -488,6 +491,7 @@ impl From for CosmosMsg { } } +#[cfg(feature = "eureka")] impl From for CosmosMsg { fn from(msg: EurekaMsg) -> Self { CosmosMsg::Eureka(msg)