33992542b1
* updated contracts to cosmwasm2.2 and fixed build issues * removed old coconut contract code + additional dkg fixes * replace deprecated to_binary and from_binary functions * mixnet contract tests compiling some are failing due to incorrect addresses * made other contract tests compile * fixed remaining tests * allow usage of manually dispatching contract replies * nym-api test fixes * removed old toolchain from contracts CI * linter fixes * regenerated contract schema * fixed easy_addr * further license fixes * post rebase fixes + update to 2.2.2 * change ci runner * minor CI adjustments * change wallet CI to use node 20 * more CI changes... * run cosmwasm-check against release contracts * test ci changes * wip...
581 lines
18 KiB
JSON
581 lines
18 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ExecuteMsg",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"propose"
|
|
],
|
|
"properties": {
|
|
"propose": {
|
|
"type": "object",
|
|
"required": [
|
|
"description",
|
|
"msgs",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"latest": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Expiration"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"msgs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/CosmosMsg_for_Empty"
|
|
}
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"vote"
|
|
],
|
|
"properties": {
|
|
"vote": {
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id",
|
|
"vote"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"vote": {
|
|
"$ref": "#/definitions/Vote"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"execute"
|
|
],
|
|
"properties": {
|
|
"execute": {
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"close"
|
|
],
|
|
"properties": {
|
|
"close": {
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Handles update hook messages from the group contract",
|
|
"type": "object",
|
|
"required": [
|
|
"member_changed_hook"
|
|
],
|
|
"properties": {
|
|
"member_changed_hook": {
|
|
"$ref": "#/definitions/MemberChangedHookMsg"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
],
|
|
"definitions": {
|
|
"BankMsg": {
|
|
"description": "The message types of the bank module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto",
|
|
"oneOf": [
|
|
{
|
|
"description": "Sends native tokens from the contract to the given address.\n\nThis is translated to a [MsgSend](https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/bank/v1beta1/tx.proto#L19-L28). `from_address` is automatically filled with the current contract's address.",
|
|
"type": "object",
|
|
"required": [
|
|
"send"
|
|
],
|
|
"properties": {
|
|
"send": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"to_address"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Coin"
|
|
}
|
|
},
|
|
"to_address": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "This will burn the given coins from the contract's account. There is no Cosmos SDK message that performs this, but it can be done by calling the bank keeper. Important if a contract controls significant token supply that must be retired.",
|
|
"type": "object",
|
|
"required": [
|
|
"burn"
|
|
],
|
|
"properties": {
|
|
"burn": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Coin"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"Coin": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"$ref": "#/definitions/Uint128"
|
|
},
|
|
"denom": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"CosmosMsg_for_Empty": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"bank"
|
|
],
|
|
"properties": {
|
|
"bank": {
|
|
"$ref": "#/definitions/BankMsg"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"custom"
|
|
],
|
|
"properties": {
|
|
"custom": {
|
|
"$ref": "#/definitions/Empty"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"wasm"
|
|
],
|
|
"properties": {
|
|
"wasm": {
|
|
"$ref": "#/definitions/WasmMsg"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"Empty": {
|
|
"description": "An empty struct that serves as a placeholder in different places, such as contracts that don't set a custom message.\n\nIt is designed to be expressible in correct JSON and JSON Schema but contains no meaningful data. Previously we used enums without cases, but those cannot represented as valid JSON Schema (https://github.com/CosmWasm/cosmwasm/issues/451)",
|
|
"type": "object",
|
|
"additionalProperties": false
|
|
},
|
|
"Expiration": {
|
|
"description": "Expiration represents a point in time when some event happens. It can compare with a BlockInfo and will return is_expired() == true once the condition is hit (and for every block in the future)",
|
|
"oneOf": [
|
|
{
|
|
"description": "AtHeight will expire when `env.block.height` >= height",
|
|
"type": "object",
|
|
"required": [
|
|
"at_height"
|
|
],
|
|
"properties": {
|
|
"at_height": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "AtTime will expire when `env.block.time` >= time",
|
|
"type": "object",
|
|
"required": [
|
|
"at_time"
|
|
],
|
|
"properties": {
|
|
"at_time": {
|
|
"$ref": "#/definitions/Timestamp"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Never will never expire. Used to express the empty variant",
|
|
"type": "object",
|
|
"required": [
|
|
"never"
|
|
],
|
|
"properties": {
|
|
"never": {
|
|
"type": "object",
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"MemberChangedHookMsg": {
|
|
"description": "MemberChangedHookMsg should be de/serialized under `MemberChangedHook()` variant in a ExecuteMsg. This contains a list of all diffs on the given transaction.",
|
|
"type": "object",
|
|
"required": [
|
|
"diffs"
|
|
],
|
|
"properties": {
|
|
"diffs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/MemberDiff"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"MemberDiff": {
|
|
"description": "MemberDiff shows the old and new states for a given cw4 member They cannot both be None. old = None, new = Some -> Insert old = Some, new = Some -> Update old = Some, new = None -> Delete",
|
|
"type": "object",
|
|
"required": [
|
|
"key"
|
|
],
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"new": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"old": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"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.\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"
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"Uint64": {
|
|
"description": "A thin wrapper around u64 that is using strings for JSON encoding/decoding, such that the full u64 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 `u64` to get the value out:\n\n``` # use cosmwasm_std::Uint64; let a = Uint64::from(42u64); assert_eq!(a.u64(), 42);\n\nlet b = Uint64::from(70u32); assert_eq!(b.u64(), 70); ```",
|
|
"type": "string"
|
|
},
|
|
"Vote": {
|
|
"oneOf": [
|
|
{
|
|
"description": "Marks support for the proposal.",
|
|
"type": "string",
|
|
"enum": [
|
|
"yes"
|
|
]
|
|
},
|
|
{
|
|
"description": "Marks opposition to the proposal.",
|
|
"type": "string",
|
|
"enum": [
|
|
"no"
|
|
]
|
|
},
|
|
{
|
|
"description": "Marks participation but does not count towards the ratio of support / opposed",
|
|
"type": "string",
|
|
"enum": [
|
|
"abstain"
|
|
]
|
|
},
|
|
{
|
|
"description": "Veto is generally to be treated as a No vote. Some implementations may allow certain voters to be able to Veto, or them to be counted stronger than No in some way.",
|
|
"type": "string",
|
|
"enum": [
|
|
"veto"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"WasmMsg": {
|
|
"description": "The message types of the wasm module.\n\nSee https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto",
|
|
"oneOf": [
|
|
{
|
|
"description": "Dispatches a call to another contract at a known address (with known ABI).\n\nThis is translated to a [MsgExecuteContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L68-L78). `sender` is automatically filled with the current contract's address.",
|
|
"type": "object",
|
|
"required": [
|
|
"execute"
|
|
],
|
|
"properties": {
|
|
"execute": {
|
|
"type": "object",
|
|
"required": [
|
|
"contract_addr",
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Instantiates a new contracts from previously uploaded Wasm code.\n\nThe contract address is non-predictable. But it is guaranteed that when emitting the same Instantiate message multiple times, multiple instances on different addresses will be generated. See also Instantiate2.\n\nThis is translated to a [MsgInstantiateContract](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L53-L71). `sender` is automatically filled with the current contract's address.",
|
|
"type": "object",
|
|
"required": [
|
|
"instantiate"
|
|
],
|
|
"properties": {
|
|
"instantiate": {
|
|
"type": "object",
|
|
"required": [
|
|
"code_id",
|
|
"funds",
|
|
"label",
|
|
"msg"
|
|
],
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"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",
|
|
"required": [
|
|
"migrate"
|
|
],
|
|
"properties": {
|
|
"migrate": {
|
|
"type": "object",
|
|
"required": [
|
|
"contract_addr",
|
|
"msg",
|
|
"new_code_id"
|
|
],
|
|
"properties": {
|
|
"contract_addr": {
|
|
"type": "string"
|
|
},
|
|
"msg": {
|
|
"description": "msg is the json-encoded MigrateMsg struct that will be passed to the new code",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Binary"
|
|
}
|
|
]
|
|
},
|
|
"new_code_id": {
|
|
"description": "the code_id of the new logic to place in the given contract",
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Sets a new admin (for migrate) on the given contract. Fails if this contract is not currently admin of the target contract.",
|
|
"type": "object",
|
|
"required": [
|
|
"update_admin"
|
|
],
|
|
"properties": {
|
|
"update_admin": {
|
|
"type": "object",
|
|
"required": [
|
|
"admin",
|
|
"contract_addr"
|
|
],
|
|
"properties": {
|
|
"admin": {
|
|
"type": "string"
|
|
},
|
|
"contract_addr": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Clears the admin on the given contract, so no more migration possible. Fails if this contract is not currently admin of the target contract.",
|
|
"type": "object",
|
|
"required": [
|
|
"clear_admin"
|
|
],
|
|
"properties": {
|
|
"clear_admin": {
|
|
"type": "object",
|
|
"required": [
|
|
"contract_addr"
|
|
],
|
|
"properties": {
|
|
"contract_addr": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|