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

Enable cosmwasm_1_4 for reflect contract #1851

Merged
merged 2 commits into from
Sep 1, 2023
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
2 changes: 1 addition & 1 deletion contracts/reflect/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ backtraces = ["cosmwasm-std/backtraces", "cosmwasm-vm/backtraces"]

[dependencies]
cosmwasm-schema = { path = "../../packages/schema" }
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate", "cosmwasm_1_1"] }
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate", "cosmwasm_1_4"] }
schemars = "0.8.3"
serde = { version = "=1.0.103", default-features = false, features = ["derive"] }
thiserror = "1.0.26"
Expand Down
128 changes: 128 additions & 0 deletions contracts/reflect/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@
}
]
},
"Decimal": {
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
"type": "string"
},
"DistributionMsg": {
"description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto",
"oneOf": [
Expand Down Expand Up @@ -337,6 +341,31 @@
}
},
"additionalProperties": false
},
{
"description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.",
"type": "object",
"required": [
"fund_community_pool"
],
"properties": {
"fund_community_pool": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"description": "The amount to spend",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -374,6 +403,36 @@
}
},
"additionalProperties": false
},
{
"description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.",
"type": "object",
"required": [
"vote_weighted"
],
"properties": {
"vote_weighted": {
"type": "object",
"required": [
"options",
"proposal_id"
],
"properties": {
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/WeightedVoteOption"
}
},
"proposal_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -794,6 +853,60 @@
},
"additionalProperties": false
},
{
"description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.",
"type": "object",
"required": [
"instantiate2"
],
"properties": {
"instantiate2": {
"type": "object",
"required": [
"code_id",
"funds",
"label",
"msg",
"salt"
],
"properties": {
"admin": {
"type": [
"string",
"null"
]
},
"code_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"label": {
"description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace",
"type": "string"
},
"msg": {
"description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"salt": {
"$ref": "#/definitions/Binary"
}
}
}
},
"additionalProperties": false
},
{
"description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.",
"type": "object",
Expand Down Expand Up @@ -878,6 +991,21 @@
"additionalProperties": false
}
]
},
"WeightedVoteOption": {
"type": "object",
"required": [
"option",
"weight"
],
"properties": {
"option": {
"$ref": "#/definitions/VoteOption"
},
"weight": {
"$ref": "#/definitions/Decimal"
}
}
}
}
}
Loading
Loading