Skip to content

Commit

Permalink
Merge pull request #114 from neutron-org/fix/deprecate-old-admin-prop…
Browse files Browse the repository at this point in the history
…osals

fix: deprecate old admin proposals
  • Loading branch information
pr0n00gler authored Oct 10, 2023
2 parents 9626f30 + 6bcda2c commit 5ecde7d
Show file tree
Hide file tree
Showing 7 changed files with 468 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contracts/ibc_transfer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ schemars = "0.8.10"
serde = { version = "1.0.149", default-features = false, features = ["derive"] }
serde-json-wasm = { version = "0.5.1" }
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.6.1"}
neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.7.0"}
protobuf = { version = "3.2.0", features = ["with-bytes"] }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion contracts/neutron_interchain_queries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ cosmwasm-std = { version = "1.3.0", features = ["staking"] }
cw2 = "1.1.0"
schemars = "0.8.10"
serde = { version = "1.0.149", default-features = false, features = ["derive"] }
neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.6.1"}
neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.7.0"}
base64 = "0.21.2"
cosmos-sdk-proto = { version = "0.16.0", default-features = false }
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
Expand Down
2 changes: 1 addition & 1 deletion contracts/neutron_interchain_txs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ serde = { version = "1.0.149", default-features = false, features = ["derive"] }
serde-json-wasm = { version = "0.5.1" }
cw-storage-plus = { version = "1.1.0", features = ["iterator"]}
cosmos-sdk-proto = { version = "0.16.0", default-features = false }
neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.6.1"}
neutron-sdk = { path = "../../packages/neutron-sdk", default-features = false, version = "0.7.0"}
base64 = "0.21.2"
protobuf = { version = "3.2.0", features = ["with-bytes"] }
prost = "0.11"
Expand Down
2 changes: 1 addition & 1 deletion packages/neutron-sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "neutron-sdk"
description = "Neutron CosmWasm SDK for interacting with Neutron blockchain"
version = "0.6.1"
version = "0.7.0"
edition = "2021"
license = "Apache-2.0"
repository = "https://github.com/neutron-org/neutron-sdk"
Expand Down
295 changes: 294 additions & 1 deletion packages/neutron-sdk/schema/neutron_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@
"description": "AdminProposal defines the struct for various proposals which Neutron's Admin Module may accept.",
"oneOf": [
{
"description": "Proposal to change params. Note that this works for old params. New params has their own `MsgUpdateParams` msgs that can be supplied to `ProposalExecuteMessage`",
"type": "object",
"required": [
"param_change_proposal"
Expand All @@ -520,6 +521,7 @@
"additionalProperties": false
},
{
"description": "Proposal to upgrade IBC client",
"type": "object",
"required": [
"upgrade_proposal"
Expand All @@ -532,6 +534,7 @@
"additionalProperties": false
},
{
"description": "Proposal to update IBC client",
"type": "object",
"required": [
"client_update_proposal"
Expand All @@ -544,6 +547,7 @@
"additionalProperties": false
},
{
"description": "Proposal to execute CosmosMsg.",
"type": "object",
"required": [
"proposal_execute_message"
Expand All @@ -554,13 +558,154 @@
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Proposal to upgrade network",
"deprecated": true,
"type": "object",
"required": [
"software_upgrade_proposal"
],
"properties": {
"software_upgrade_proposal": {
"$ref": "#/definitions/SoftwareUpgradeProposal"
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Proposal to cancel existing software upgrade",
"deprecated": true,
"type": "object",
"required": [
"cancel_software_upgrade_proposal"
],
"properties": {
"cancel_software_upgrade_proposal": {
"$ref": "#/definitions/CancelSoftwareUpgradeProposal"
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Will fail to execute if you use it. Deprecated. Proposal to pin wasm contract codes",
"deprecated": true,
"type": "object",
"required": [
"pin_codes_proposal"
],
"properties": {
"pin_codes_proposal": {
"$ref": "#/definitions/PinCodesProposal"
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Deprecated. Proposal to unpin wasm contract codes.",
"deprecated": true,
"type": "object",
"required": [
"unpin_codes_proposal"
],
"properties": {
"unpin_codes_proposal": {
"$ref": "#/definitions/UnpinCodesProposal"
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Proposal to call sudo on contract.",
"deprecated": true,
"type": "object",
"required": [
"sudo_contract_proposal"
],
"properties": {
"sudo_contract_proposal": {
"$ref": "#/definitions/SudoContractProposal"
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Proposal to update contract admin.",
"deprecated": true,
"type": "object",
"required": [
"update_admin_proposal"
],
"properties": {
"update_admin_proposal": {
"$ref": "#/definitions/UpdateAdminProposal"
}
},
"additionalProperties": false
},
{
"description": "Deprecated. Proposal to clear contract admin.",
"deprecated": true,
"type": "object",
"required": [
"clear_admin_proposal"
],
"properties": {
"clear_admin_proposal": {
"$ref": "#/definitions/ClearAdminProposal"
}
},
"additionalProperties": false
}
]
},
"Binary": {
"description": "Binary is a wrapper around Vec<u8> to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.\n\nThis is only needed as serde-json-{core,wasm} has a horrible encoding for Vec<u8>. See also <https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md>.",
"type": "string"
},
"CancelSoftwareUpgradeProposal": {
"description": "Deprecated. CancelSoftwareUpgradeProposal defines the struct for cancel software upgrade proposal.",
"deprecated": true,
"type": "object",
"required": [
"description",
"title"
],
"properties": {
"description": {
"description": "*description** is a text description of proposal. Non unique.",
"type": "string"
},
"title": {
"description": "*title** is a text title of proposal. Non unique.",
"type": "string"
}
}
},
"ClearAdminProposal": {
"description": "Deprecated. SudoContractProposal defines the struct for clear admin proposal.",
"deprecated": true,
"type": "object",
"required": [
"contract",
"description",
"title"
],
"properties": {
"contract": {
"description": "*contract** is an address of contract admin will be removed.",
"type": "string"
},
"description": {
"description": "*description** is a text description of proposal.",
"type": "string"
},
"title": {
"description": "*title** is a text title of proposal.",
"type": "string"
}
}
},
"ClientUpdateProposal": {
"description": "ClientUpdateProposal defines the struct for client update proposal.",
"type": "object",
Expand Down Expand Up @@ -725,6 +870,35 @@
}
}
},
"PinCodesProposal": {
"description": "Deprecated. PinCodesProposal defines the struct for pin contract codes proposal.",
"deprecated": true,
"type": "object",
"required": [
"code_ids",
"description",
"title"
],
"properties": {
"code_ids": {
"description": "*code_ids** is an array of codes to be pined.",
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"description": {
"description": "*description** is a text description of proposal.",
"type": "string"
},
"title": {
"description": "*title** is a text title of proposal.",
"type": "string"
}
}
},
"Plan": {
"description": "Plan defines the struct for planned upgrade.",
"type": "object",
Expand Down Expand Up @@ -805,12 +979,131 @@
}
}
},
"SoftwareUpgradeProposal": {
"description": "Deprecated. SoftwareUpgradeProposal defines the struct for software upgrade proposal.",
"deprecated": true,
"type": "object",
"required": [
"description",
"plan",
"title"
],
"properties": {
"description": {
"description": "*description** is a text description of proposal. Non unique.",
"type": "string"
},
"plan": {
"description": "*plan** is a plan of upgrade.",
"allOf": [
{
"$ref": "#/definitions/Plan"
}
]
},
"title": {
"description": "*title** is a text title of proposal. Non unique.",
"type": "string"
}
}
},
"SudoContractProposal": {
"description": "Deprecated. SudoContractProposal defines the struct for sudo execution proposal.",
"deprecated": true,
"type": "object",
"required": [
"contract",
"description",
"msg",
"title"
],
"properties": {
"contract": {
"description": "*contract** is an address of contract to be executed.",
"type": "string"
},
"description": {
"description": "*description** is a text description of proposal.",
"type": "string"
},
"msg": {
"description": "**msg*** is a sudo message.",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"title": {
"description": "*title** is a text title of proposal.",
"type": "string"
}
}
},
"Uint128": {
"description": "A thin wrapper around u128 that is using strings for JSON encoding/decoding, such that the full u128 range can be used for clients that convert JSON numbers to floats, like JavaScript and jq.\n\n# Examples\n\nUse `from` to create instances of this and `u128` to get the value out:\n\n``` # use cosmwasm_std::Uint128; let a = Uint128::from(123u128); assert_eq!(a.u128(), 123);\n\nlet b = Uint128::from(42u64); assert_eq!(b.u128(), 42);\n\nlet c = Uint128::from(70u32); assert_eq!(c.u128(), 70); ```",
"type": "string"
},
"UnpinCodesProposal": {
"description": "Deprecated. UnpinCodesProposal defines the struct for unpin contract codes proposal.",
"deprecated": true,
"type": "object",
"required": [
"code_ids",
"description",
"title"
],
"properties": {
"code_ids": {
"description": "*code_ids** is an array of codes to be unpined.",
"type": "array",
"items": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"description": {
"description": "*description** is a text description of proposal.",
"type": "string"
},
"title": {
"description": "*title** is a text title of proposal.",
"type": "string"
}
}
},
"UpdateAdminProposal": {
"description": "Deprecated. UpdateAdminProposal defines the struct for update admin proposal.",
"deprecated": true,
"type": "object",
"required": [
"contract",
"description",
"new_admin",
"title"
],
"properties": {
"contract": {
"description": "*contract** is an address of contract to update admin.",
"type": "string"
},
"description": {
"description": "*description** is a text description of proposal.",
"type": "string"
},
"new_admin": {
"description": "**new_admin*** is an address of new admin",
"type": "string"
},
"title": {
"description": "*title** is a text title of proposal.",
"type": "string"
}
}
},
"UpgradeProposal": {
"description": "UpgradeProposal defines the struct for upgrade proposal.",
"description": "UpgradeProposal defines the struct for IBC upgrade proposal.",
"type": "object",
"required": [
"description",
Expand Down
1 change: 1 addition & 0 deletions packages/neutron-sdk/src/bindings/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#[allow(deprecated)]
pub mod msg;
pub mod query;
pub mod types;
Loading

0 comments on commit 5ecde7d

Please sign in to comment.