Skip to content

Commit

Permalink
feat: Add cosmwasm_3_0 feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
kulikthebird committed Jan 30, 2025
1 parent 5bc54f3 commit 3714b3a
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 462 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ jobs:
keys:
- cargocache-v2-contract_ibc_callbacks-rust:1.74-{{ checksum "Cargo.lock" }}
- check_contract:
min_version: "2.1"
min_version: "3.0"
- save_cache:
paths:
- /usr/local/cargo/registry
Expand Down Expand Up @@ -1120,7 +1120,7 @@ jobs:
name: Clippy linting on std (all feature flags)
working_directory: ~/project/packages/std
# change to --all-features once `abort` is removed
command: cargo clippy --all-targets --tests --features staking,stargate,cosmwasm_2_2 -- -D warnings
command: cargo clippy --all-targets --tests --features staking,stargate,cosmwasm_3_0 -- -D warnings
- run:
name: Clippy linting on vm (no feature flags)
working_directory: ~/project/packages/vm
Expand Down
1 change: 1 addition & 0 deletions contracts/ibc-callbacks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ cosmwasm-schema = { path = "../../packages/schema" }
cosmwasm-std = { path = "../../packages/std", features = [
"iterator",
"stargate",
"cosmwasm_3_0",
] }
schemars = "0.8.3"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
Expand Down
75 changes: 0 additions & 75 deletions contracts/ibc-reflect-send/schema/ibc-reflect-send.json
Original file line number Diff line number Diff line change
Expand Up @@ -402,22 +402,6 @@
}
]
},
"Hop": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
},
"additionalProperties": false
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -474,65 +458,6 @@
},
"additionalProperties": false
},
{
"description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.",
"type": "object",
"required": [
"transfer_v2"
],
"properties": {
"transfer_v2": {
"type": "object",
"required": [
"channel_id",
"forwarding",
"timeout",
"to_address",
"tokens"
],
"properties": {
"channel_id": {
"description": "existing channel to send the tokens over",
"type": "string"
},
"forwarding": {
"type": "array",
"items": {
"$ref": "#/definitions/Hop"
}
},
"memo": {
"description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.",
"type": [
"string",
"null"
]
},
"timeout": {
"description": "when packet times out, measured on remote chain",
"allOf": [
{
"$ref": "#/definitions/IbcTimeout"
}
]
},
"to_address": {
"description": "address on the remote chain to receive these tokens",
"type": "string"
},
"tokens": {
"description": "MsgTransfer in v2 version supports multiple coins",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Sends an IBC packet with given data over the existing channel. Data 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",
Expand Down
75 changes: 0 additions & 75 deletions contracts/ibc-reflect-send/schema/ibc/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -343,22 +343,6 @@
}
]
},
"Hop": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
},
"additionalProperties": false
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -415,65 +399,6 @@
},
"additionalProperties": false
},
{
"description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.",
"type": "object",
"required": [
"transfer_v2"
],
"properties": {
"transfer_v2": {
"type": "object",
"required": [
"channel_id",
"forwarding",
"timeout",
"to_address",
"tokens"
],
"properties": {
"channel_id": {
"description": "existing channel to send the tokens over",
"type": "string"
},
"forwarding": {
"type": "array",
"items": {
"$ref": "#/definitions/Hop"
}
},
"memo": {
"description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.",
"type": [
"string",
"null"
]
},
"timeout": {
"description": "when packet times out, measured on remote chain",
"allOf": [
{
"$ref": "#/definitions/IbcTimeout"
}
]
},
"to_address": {
"description": "address on the remote chain to receive these tokens",
"type": "string"
},
"tokens": {
"description": "MsgTransfer in v2 version supports multiple coins",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Sends an IBC packet with given data over the existing channel. Data 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",
Expand Down
75 changes: 0 additions & 75 deletions contracts/ibc-reflect-send/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,22 +391,6 @@
}
]
},
"Hop": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
},
"additionalProperties": false
},
"IbcMsg": {
"description": "These are messages in the IBC lifecycle. Only usable by IBC-enabled contracts (contracts that directly speak the IBC protocol via 6 entry points)",
"oneOf": [
Expand Down Expand Up @@ -463,65 +447,6 @@
},
"additionalProperties": false
},
{
"description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.",
"type": "object",
"required": [
"transfer_v2"
],
"properties": {
"transfer_v2": {
"type": "object",
"required": [
"channel_id",
"forwarding",
"timeout",
"to_address",
"tokens"
],
"properties": {
"channel_id": {
"description": "existing channel to send the tokens over",
"type": "string"
},
"forwarding": {
"type": "array",
"items": {
"$ref": "#/definitions/Hop"
}
},
"memo": {
"description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.",
"type": [
"string",
"null"
]
},
"timeout": {
"description": "when packet times out, measured on remote chain",
"allOf": [
{
"$ref": "#/definitions/IbcTimeout"
}
]
},
"to_address": {
"description": "address on the remote chain to receive these tokens",
"type": "string"
},
"tokens": {
"description": "MsgTransfer in v2 version supports multiple coins",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Sends an IBC packet with given data over the existing channel. Data 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",
Expand Down
75 changes: 0 additions & 75 deletions contracts/ibc-reflect/schema/ibc/packet_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -403,22 +403,6 @@
}
]
},
"Hop": {
"type": "object",
"required": [
"channel_id",
"port_id"
],
"properties": {
"channel_id": {
"type": "string"
},
"port_id": {
"type": "string"
}
},
"additionalProperties": false
},
"IbcAcknowledgement": {
"type": "object",
"required": [
Expand Down Expand Up @@ -516,65 +500,6 @@
},
"additionalProperties": false
},
{
"description": "Sends bank tokens owned by the contract to the given address on another chain. The channel must already be established between the ibctransfer module on this chain and a matching module on the remote chain. We cannot select the port_id, this is whatever the local chain has bound the ibctransfer module to.",
"type": "object",
"required": [
"transfer_v2"
],
"properties": {
"transfer_v2": {
"type": "object",
"required": [
"channel_id",
"forwarding",
"timeout",
"to_address",
"tokens"
],
"properties": {
"channel_id": {
"description": "existing channel to send the tokens over",
"type": "string"
},
"forwarding": {
"type": "array",
"items": {
"$ref": "#/definitions/Hop"
}
},
"memo": {
"description": "An optional memo. See the blog post [\"Moving Beyond Simple Token Transfers\"](https://medium.com/the-interchain-foundation/moving-beyond-simple-token-transfers-d42b2b1dc29b) for more information.\n\nThere is no difference between setting this to `None` or an empty string.\n\nThis field is only supported on chains with CosmWasm >= 2.0 and silently ignored on older chains. If you need support for both 1.x and 2.x chain with the same codebase, it is recommended to use `CosmosMsg::Stargate` with a custom MsgTransfer protobuf encoder instead.",
"type": [
"string",
"null"
]
},
"timeout": {
"description": "when packet times out, measured on remote chain",
"allOf": [
{
"$ref": "#/definitions/IbcTimeout"
}
]
},
"to_address": {
"description": "address on the remote chain to receive these tokens",
"type": "string"
},
"tokens": {
"description": "MsgTransfer in v2 version supports multiple coins",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Sends an IBC packet with given data over the existing channel. Data 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",
Expand Down
Loading

0 comments on commit 3714b3a

Please sign in to comment.