Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade cw1 contracts #303

Merged
merged 3 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions contracts/cw1-subkeys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ cw0 = { path = "../../packages/cw0", version = "0.6.2" }
cw1 = { path = "../../packages/cw1", version = "0.6.2" }
cw2 = { path = "../../packages/cw2", version = "0.6.2" }
cw1-whitelist = { path = "../cw1-whitelist", version = "0.6.2", features = ["library"] }
cosmwasm-std = { version = "0.14.0", features = ["iterator", "staking"] }
cosmwasm-std = { version = "0.15.0", features = ["iterator", "staking"] }
cw-storage-plus = { path = "../../packages/storage-plus", version = "0.6.2", features = ["iterator"] }
schemars = "0.8.1"
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.20" }
thiserror = { version = "1.0.23" }

[dev-dependencies]
cosmwasm-schema = { version = "0.14.0" }
cosmwasm-schema = { version = "0.15.0" }
2 changes: 1 addition & 1 deletion contracts/cw1-subkeys/schema/all_allowances_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
}
},
"Timestamp": {
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.",
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```",
"allOf": [
{
"$ref": "#/definitions/Uint64"
Expand Down
2 changes: 1 addition & 1 deletion contracts/cw1-subkeys/schema/allowance.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
}
},
"Timestamp": {
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.",
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```",
"allOf": [
{
"$ref": "#/definitions/Uint64"
Expand Down
77 changes: 59 additions & 18 deletions contracts/cw1-subkeys/schema/execute_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"msgs": {
"type": "array",
"items": {
"$ref": "#/definitions/CosmosMsg_for_Empty"
"$ref": "#/definitions/SubMsg_for_Empty"
}
}
}
Expand Down Expand Up @@ -421,6 +421,16 @@
}
}
},
"ReplyOn": {
"description": "Use this to define when the contract gets a response callback. If you only need it for errors or success you can select just those in order to save gas.",
"type": "string",
"enum": [
"always",
"error",
"success",
"never"
]
},
"StakingMsg": {
"description": "The message types of the staking module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto",
"anyOf": [
Expand Down Expand Up @@ -505,8 +515,39 @@
}
]
},
"SubMsg_for_Empty": {
"description": "A submessage that will guarantee a `reply` call on success or error, depending on the `reply_on` setting. If you do not need to process the result, use regular messages instead.\n\nNote: On error the submessage execution will revert any partial state changes due to this message, but not revert any state changes in the calling contract. If this is required, it must be done manually in the `reply` entry point.",
"type": "object",
"required": [
"id",
"msg",
"reply_on"
],
"properties": {
"gas_limit": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"id": {
"description": "An arbitrary ID chosen by the contract. This is typically used to match `Reply`s in the `reply` entry point to the submessage.",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"msg": {
"$ref": "#/definitions/CosmosMsg_for_Empty"
},
"reply_on": {
"$ref": "#/definitions/ReplyOn"
}
}
},
"Timestamp": {
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.",
"description": "A point in time in nanosecond precision.\n\nThis type can represent times from 1970-01-01T00:00:00Z to 2554-07-21T23:34:33Z.\n\n## Examples\n\n``` # use cosmwasm_std::Timestamp; let ts = Timestamp::from_nanos(1_000_000_202); assert_eq!(ts.nanos(), 1_000_000_202); assert_eq!(ts.seconds(), 1); assert_eq!(ts.subsec_nanos(), 202);\n\nlet ts = ts.plus_seconds(2); assert_eq!(ts.nanos(), 3_000_000_202); assert_eq!(ts.seconds(), 3); assert_eq!(ts.subsec_nanos(), 202); ```",
"allOf": [
{
"$ref": "#/definitions/Uint64"
Expand Down Expand Up @@ -535,26 +576,26 @@
"type": "object",
"required": [
"contract_addr",
"msg",
"send"
"funds",
"msg"
],
"properties": {
"contract_addr": {
"type": "string"
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"msg": {
"description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"send": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand All @@ -572,9 +613,9 @@
"type": "object",
"required": [
"code_id",
"funds",
"label",
"msg",
"send"
"msg"
],
"properties": {
"admin": {
Expand All @@ -588,6 +629,12 @@
"format": "uint64",
"minimum": 0.0
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"label": {
"description": "A human-readbale label for the contract",
"type": "string"
Expand All @@ -599,12 +646,6 @@
"$ref": "#/definitions/Binary"
}
]
},
"send": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand Down
32 changes: 16 additions & 16 deletions contracts/cw1-subkeys/schema/query_msg.json
Original file line number Diff line number Diff line change
Expand Up @@ -437,26 +437,26 @@
"type": "object",
"required": [
"contract_addr",
"msg",
"send"
"funds",
"msg"
],
"properties": {
"contract_addr": {
"type": "string"
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"msg": {
"description": "msg is the json-encoded ExecuteMsg struct (as raw Binary)",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"send": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand All @@ -474,9 +474,9 @@
"type": "object",
"required": [
"code_id",
"funds",
"label",
"msg",
"send"
"msg"
],
"properties": {
"admin": {
Expand All @@ -490,6 +490,12 @@
"format": "uint64",
"minimum": 0.0
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"label": {
"description": "A human-readbale label for the contract",
"type": "string"
Expand All @@ -501,12 +507,6 @@
"$ref": "#/definitions/Binary"
}
]
},
"send": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
Expand Down
Loading