3582 lines
135 KiB
JSON
3582 lines
135 KiB
JSON
{
|
|
"contract_name": "cw3-flex-multisig",
|
|
"contract_version": "1.0.0",
|
|
"idl_version": "1.0.0",
|
|
"instantiate": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "InstantiateMsg",
|
|
"type": "object",
|
|
"required": [
|
|
"coconut_bandwidth_contract_address",
|
|
"coconut_dkg_contract_address",
|
|
"group_addr",
|
|
"max_voting_period",
|
|
"threshold"
|
|
],
|
|
"properties": {
|
|
"coconut_bandwidth_contract_address": {
|
|
"type": "string"
|
|
},
|
|
"coconut_dkg_contract_address": {
|
|
"type": "string"
|
|
},
|
|
"executor": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Executor"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"group_addr": {
|
|
"type": "string"
|
|
},
|
|
"max_voting_period": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"proposal_deposit": {
|
|
"description": "The cost of creating a proposal (if any).",
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/UncheckedDepositInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Threshold"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Addr": {
|
|
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
|
|
"type": "string"
|
|
},
|
|
"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"
|
|
},
|
|
"Duration": {
|
|
"description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"height"
|
|
],
|
|
"properties": {
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Time in seconds",
|
|
"type": "object",
|
|
"required": [
|
|
"time"
|
|
],
|
|
"properties": {
|
|
"time": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"Executor": {
|
|
"description": "Defines who is able to execute proposals once passed",
|
|
"oneOf": [
|
|
{
|
|
"description": "Any member of the voting group, even with 0 points",
|
|
"type": "string",
|
|
"enum": [
|
|
"member"
|
|
]
|
|
},
|
|
{
|
|
"description": "Only the given address",
|
|
"type": "object",
|
|
"required": [
|
|
"only"
|
|
],
|
|
"properties": {
|
|
"only": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"Threshold": {
|
|
"description": "This defines the different ways tallies can happen.\n\nThe total_weight used for calculating success as well as the weights of each individual voter used in tallying should be snapshotted at the beginning of the block at which the proposal starts (this is likely the responsibility of a correct cw4 implementation). See also `ThresholdResponse` in the cw3 spec.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Declares that a fixed weight of Yes votes is needed to pass. See `ThresholdResponse.AbsoluteCount` in the cw3 spec for details.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_count"
|
|
],
|
|
"properties": {
|
|
"absolute_count": {
|
|
"type": "object",
|
|
"required": [
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a percentage of the total weight that must cast Yes votes in order for a proposal to pass. See `ThresholdResponse.AbsolutePercentage` in the cw3 spec for details.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_percentage"
|
|
],
|
|
"properties": {
|
|
"absolute_percentage": {
|
|
"type": "object",
|
|
"required": [
|
|
"percentage"
|
|
],
|
|
"properties": {
|
|
"percentage": {
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a `quorum` of the total votes that must participate in the election in order for the vote to be considered at all. See `ThresholdResponse.ThresholdQuorum` in the cw3 spec for details.",
|
|
"type": "object",
|
|
"required": [
|
|
"threshold_quorum"
|
|
],
|
|
"properties": {
|
|
"threshold_quorum": {
|
|
"type": "object",
|
|
"required": [
|
|
"quorum",
|
|
"threshold"
|
|
],
|
|
"properties": {
|
|
"quorum": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"UncheckedDenom": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"native"
|
|
],
|
|
"properties": {
|
|
"native": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"cw20"
|
|
],
|
|
"properties": {
|
|
"cw20": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"UncheckedDepositInfo": {
|
|
"description": "Information about the deposit required to create a proposal. For use in messages. To validate, transform into `DepositInfo` via `into_checked()`.",
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom",
|
|
"refund_failed_proposals"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "The number tokens required for payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Uint128"
|
|
}
|
|
]
|
|
},
|
|
"denom": {
|
|
"description": "The denom of the deposit payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/UncheckedDenom"
|
|
}
|
|
]
|
|
},
|
|
"refund_failed_proposals": {
|
|
"description": "Should failed proposals have their deposits refunded?",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"execute": {
|
|
"$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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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 expressable 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"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"query": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "QueryMsg",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"threshold"
|
|
],
|
|
"properties": {
|
|
"threshold": {
|
|
"type": "object",
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"proposal"
|
|
],
|
|
"properties": {
|
|
"proposal": {
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"list_proposals"
|
|
],
|
|
"properties": {
|
|
"list_proposals": {
|
|
"type": "object",
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"reverse_proposals"
|
|
],
|
|
"properties": {
|
|
"reverse_proposals": {
|
|
"type": "object",
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_before": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"vote"
|
|
],
|
|
"properties": {
|
|
"vote": {
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id",
|
|
"voter"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"voter": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"list_votes"
|
|
],
|
|
"properties": {
|
|
"list_votes": {
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id"
|
|
],
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"voter"
|
|
],
|
|
"properties": {
|
|
"voter": {
|
|
"type": "object",
|
|
"required": [
|
|
"address"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"list_voters"
|
|
],
|
|
"properties": {
|
|
"list_voters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Gets the current configuration.",
|
|
"type": "object",
|
|
"required": [
|
|
"config"
|
|
],
|
|
"properties": {
|
|
"config": {
|
|
"type": "object",
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"migrate": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "MigrateMsg",
|
|
"type": "object",
|
|
"required": [
|
|
"coconut_bandwidth_address",
|
|
"coconut_dkg_address"
|
|
],
|
|
"properties": {
|
|
"coconut_bandwidth_address": {
|
|
"type": "string"
|
|
},
|
|
"coconut_dkg_address": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"sudo": null,
|
|
"responses": {
|
|
"config": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "Config",
|
|
"type": "object",
|
|
"required": [
|
|
"coconut_bandwidth_addr",
|
|
"coconut_dkg_addr",
|
|
"group_addr",
|
|
"max_voting_period",
|
|
"threshold"
|
|
],
|
|
"properties": {
|
|
"coconut_bandwidth_addr": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"coconut_dkg_addr": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"executor": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Executor"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"group_addr": {
|
|
"$ref": "#/definitions/Cw4Contract"
|
|
},
|
|
"max_voting_period": {
|
|
"$ref": "#/definitions/Duration"
|
|
},
|
|
"proposal_deposit": {
|
|
"description": "The price, if any, of creating a new proposal.",
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/DepositInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Threshold"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Addr": {
|
|
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
|
|
"type": "string"
|
|
},
|
|
"Cw4Contract": {
|
|
"description": "Cw4Contract is a wrapper around Addr that provides a lot of helpers for working with cw4 contracts\n\nIf you wish to persist this, convert to Cw4CanonicalContract via .canonical()",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"Denom": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"native"
|
|
],
|
|
"properties": {
|
|
"native": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"cw20"
|
|
],
|
|
"properties": {
|
|
"cw20": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"DepositInfo": {
|
|
"description": "Information about the deposit required to create a proposal.",
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom",
|
|
"refund_failed_proposals"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "The number tokens required for payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Uint128"
|
|
}
|
|
]
|
|
},
|
|
"denom": {
|
|
"description": "The denom of the deposit payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Denom"
|
|
}
|
|
]
|
|
},
|
|
"refund_failed_proposals": {
|
|
"description": "Should failed proposals have their deposits refunded?",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"Duration": {
|
|
"description": "Duration is a delta of time. You can add it to a BlockInfo or Expiration to move that further in the future. Note that an height-based Duration and a time-based Expiration cannot be combined",
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"height"
|
|
],
|
|
"properties": {
|
|
"height": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Time in seconds",
|
|
"type": "object",
|
|
"required": [
|
|
"time"
|
|
],
|
|
"properties": {
|
|
"time": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"Executor": {
|
|
"description": "Defines who is able to execute proposals once passed",
|
|
"oneOf": [
|
|
{
|
|
"description": "Any member of the voting group, even with 0 points",
|
|
"type": "string",
|
|
"enum": [
|
|
"member"
|
|
]
|
|
},
|
|
{
|
|
"description": "Only the given address",
|
|
"type": "object",
|
|
"required": [
|
|
"only"
|
|
],
|
|
"properties": {
|
|
"only": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"Threshold": {
|
|
"description": "This defines the different ways tallies can happen.\n\nThe total_weight used for calculating success as well as the weights of each individual voter used in tallying should be snapshotted at the beginning of the block at which the proposal starts (this is likely the responsibility of a correct cw4 implementation). See also `ThresholdResponse` in the cw3 spec.",
|
|
"oneOf": [
|
|
{
|
|
"description": "Declares that a fixed weight of Yes votes is needed to pass. See `ThresholdResponse.AbsoluteCount` in the cw3 spec for details.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_count"
|
|
],
|
|
"properties": {
|
|
"absolute_count": {
|
|
"type": "object",
|
|
"required": [
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a percentage of the total weight that must cast Yes votes in order for a proposal to pass. See `ThresholdResponse.AbsolutePercentage` in the cw3 spec for details.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_percentage"
|
|
],
|
|
"properties": {
|
|
"absolute_percentage": {
|
|
"type": "object",
|
|
"required": [
|
|
"percentage"
|
|
],
|
|
"properties": {
|
|
"percentage": {
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a `quorum` of the total votes that must participate in the election in order for the vote to be considered at all. See `ThresholdResponse.ThresholdQuorum` in the cw3 spec for details.",
|
|
"type": "object",
|
|
"required": [
|
|
"threshold_quorum"
|
|
],
|
|
"properties": {
|
|
"threshold_quorum": {
|
|
"type": "object",
|
|
"required": [
|
|
"quorum",
|
|
"threshold"
|
|
],
|
|
"properties": {
|
|
"quorum": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Decimal"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"list_proposals": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ProposalListResponse_for_Empty",
|
|
"type": "object",
|
|
"required": [
|
|
"proposals"
|
|
],
|
|
"properties": {
|
|
"proposals": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/ProposalResponse_for_Empty"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Addr": {
|
|
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
|
|
"type": "string"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"Denom": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"native"
|
|
],
|
|
"properties": {
|
|
"native": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"cw20"
|
|
],
|
|
"properties": {
|
|
"cw20": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"DepositInfo": {
|
|
"description": "Information about the deposit required to create a proposal.",
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom",
|
|
"refund_failed_proposals"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "The number tokens required for payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Uint128"
|
|
}
|
|
]
|
|
},
|
|
"denom": {
|
|
"description": "The denom of the deposit payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Denom"
|
|
}
|
|
]
|
|
},
|
|
"refund_failed_proposals": {
|
|
"description": "Should failed proposals have their deposits refunded?",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"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 expressable 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"
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"ProposalResponse_for_Empty": {
|
|
"description": "Note, if you are storing custom messages in the proposal, the querier needs to know what possible custom message types those are in order to parse the response",
|
|
"type": "object",
|
|
"required": [
|
|
"description",
|
|
"expires",
|
|
"id",
|
|
"msgs",
|
|
"proposer",
|
|
"status",
|
|
"threshold",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"deposit": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/DepositInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"expires": {
|
|
"$ref": "#/definitions/Expiration"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"msgs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/CosmosMsg_for_Empty"
|
|
}
|
|
},
|
|
"proposer": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/Status"
|
|
},
|
|
"threshold": {
|
|
"description": "This is the threshold that is applied to this proposal. Both the rules of the voting contract, as well as the total_weight of the voting group may have changed since this time. That means that the generic `Threshold{}` query does not provide valid information for existing proposals.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ThresholdResponse"
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"Status": {
|
|
"oneOf": [
|
|
{
|
|
"description": "proposal was created, but voting has not yet begun for whatever reason",
|
|
"type": "string",
|
|
"enum": [
|
|
"pending"
|
|
]
|
|
},
|
|
{
|
|
"description": "you can vote on this",
|
|
"type": "string",
|
|
"enum": [
|
|
"open"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over and it did not pass",
|
|
"type": "string",
|
|
"enum": [
|
|
"rejected"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over and it did pass, but has not yet executed",
|
|
"type": "string",
|
|
"enum": [
|
|
"passed"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over it passed, and the proposal was executed",
|
|
"type": "string",
|
|
"enum": [
|
|
"executed"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ThresholdResponse": {
|
|
"description": "This defines the different ways tallies can happen. Every contract should support a subset of these, ideally all.\n\nThe total_weight used for calculating success as well as the weights of each individual voter used in tallying should be snapshotted at the beginning of the block at which the proposal starts (this is likely the responsibility of a correct cw4 implementation).",
|
|
"oneOf": [
|
|
{
|
|
"description": "Declares that a fixed weight of yes votes is needed to pass. It does not matter how many no votes are cast, or how many do not vote, as long as `weight` yes votes are cast.\n\nThis is the simplest format and usually suitable for small multisigs of trusted parties, like 3 of 5. (weight: 3, total_weight: 5)\n\nA proposal of this type can pass early as soon as the needed weight of yes votes has been cast.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_count"
|
|
],
|
|
"properties": {
|
|
"absolute_count": {
|
|
"type": "object",
|
|
"required": [
|
|
"total_weight",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a percentage of the total weight that must cast Yes votes, in order for a proposal to pass. The passing weight is computed over the total weight minus the weight of the abstained votes.\n\nThis is useful for similar circumstances as `AbsoluteCount`, where we have a relatively small set of voters, and participation is required. It is understood that if the voting set (group) changes between different proposals that refer to the same group, each proposal will work with a different set of voter weights (the ones snapshotted at proposal creation), and the passing weight for each proposal will be computed based on the absolute percentage, times the total weights of the members at the time of each proposal creation.\n\nExample: we set `percentage` to 51%. Proposal 1 starts when there is a `total_weight` of 5. This will require 3 weight of Yes votes in order to pass. Later, the Proposal 2 starts but the `total_weight` of the group has increased to 9. That proposal will then automatically require 5 Yes of 9 to pass, rather than 3 yes of 9 as would be the case with `AbsoluteCount`.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_percentage"
|
|
],
|
|
"properties": {
|
|
"absolute_percentage": {
|
|
"type": "object",
|
|
"required": [
|
|
"percentage",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"percentage": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "In addition to a `threshold`, declares a `quorum` of the total votes that must participate in the election in order for the vote to be considered at all. Within the votes that were cast, it requires `threshold` votes in favor. That is calculated by ignoring the Abstain votes (they count towards `quorum`, but do not influence `threshold`). That is, we calculate `Yes / (Yes + No + Veto)` and compare it with `threshold` to consider if the proposal was passed.\n\nIt is rather difficult for a proposal of this type to pass early. That can only happen if the required quorum has been already met, and there are already enough Yes votes for the proposal to pass.\n\n30% Yes votes, 10% No votes, and 20% Abstain would pass early if quorum <= 60% (who has cast votes) and if the threshold is <= 37.5% (the remaining 40% voting no => 30% yes + 50% no). Once the voting period has passed with no additional votes, that same proposal would be considered successful if quorum <= 60% and threshold <= 75% (percent in favor if we ignore abstain votes).\n\nThis type is more common in general elections, where participation is often expected to be low, and `AbsolutePercentage` would either be too high to pass anything, or allow low percentages to pass, independently of if there was high participation in the election or not.",
|
|
"type": "object",
|
|
"required": [
|
|
"threshold_quorum"
|
|
],
|
|
"properties": {
|
|
"threshold_quorum": {
|
|
"type": "object",
|
|
"required": [
|
|
"quorum",
|
|
"threshold",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"quorum": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"list_voters": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "VoterListResponse",
|
|
"type": "object",
|
|
"required": [
|
|
"voters"
|
|
],
|
|
"properties": {
|
|
"voters": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/VoterDetail"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"VoterDetail": {
|
|
"type": "object",
|
|
"required": [
|
|
"addr",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"addr": {
|
|
"type": "string"
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"list_votes": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "VoteListResponse",
|
|
"type": "object",
|
|
"required": [
|
|
"votes"
|
|
],
|
|
"properties": {
|
|
"votes": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/VoteInfo"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"VoteInfo": {
|
|
"description": "Returns the vote (opinion as well as weight counted) as well as the address of the voter who submitted it",
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id",
|
|
"vote",
|
|
"voter",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"vote": {
|
|
"$ref": "#/definitions/Vote"
|
|
},
|
|
"voter": {
|
|
"type": "string"
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"proposal": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ProposalResponse_for_Empty",
|
|
"description": "Note, if you are storing custom messages in the proposal, the querier needs to know what possible custom message types those are in order to parse the response",
|
|
"type": "object",
|
|
"required": [
|
|
"description",
|
|
"expires",
|
|
"id",
|
|
"msgs",
|
|
"proposer",
|
|
"status",
|
|
"threshold",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"deposit": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/DepositInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"expires": {
|
|
"$ref": "#/definitions/Expiration"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"msgs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/CosmosMsg_for_Empty"
|
|
}
|
|
},
|
|
"proposer": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/Status"
|
|
},
|
|
"threshold": {
|
|
"description": "This is the threshold that is applied to this proposal. Both the rules of the voting contract, as well as the total_weight of the voting group may have changed since this time. That means that the generic `Threshold{}` query does not provide valid information for existing proposals.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ThresholdResponse"
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Addr": {
|
|
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
|
|
"type": "string"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"Denom": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"native"
|
|
],
|
|
"properties": {
|
|
"native": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"cw20"
|
|
],
|
|
"properties": {
|
|
"cw20": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"DepositInfo": {
|
|
"description": "Information about the deposit required to create a proposal.",
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom",
|
|
"refund_failed_proposals"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "The number tokens required for payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Uint128"
|
|
}
|
|
]
|
|
},
|
|
"denom": {
|
|
"description": "The denom of the deposit payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Denom"
|
|
}
|
|
]
|
|
},
|
|
"refund_failed_proposals": {
|
|
"description": "Should failed proposals have their deposits refunded?",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"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 expressable 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"
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"Status": {
|
|
"oneOf": [
|
|
{
|
|
"description": "proposal was created, but voting has not yet begun for whatever reason",
|
|
"type": "string",
|
|
"enum": [
|
|
"pending"
|
|
]
|
|
},
|
|
{
|
|
"description": "you can vote on this",
|
|
"type": "string",
|
|
"enum": [
|
|
"open"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over and it did not pass",
|
|
"type": "string",
|
|
"enum": [
|
|
"rejected"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over and it did pass, but has not yet executed",
|
|
"type": "string",
|
|
"enum": [
|
|
"passed"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over it passed, and the proposal was executed",
|
|
"type": "string",
|
|
"enum": [
|
|
"executed"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ThresholdResponse": {
|
|
"description": "This defines the different ways tallies can happen. Every contract should support a subset of these, ideally all.\n\nThe total_weight used for calculating success as well as the weights of each individual voter used in tallying should be snapshotted at the beginning of the block at which the proposal starts (this is likely the responsibility of a correct cw4 implementation).",
|
|
"oneOf": [
|
|
{
|
|
"description": "Declares that a fixed weight of yes votes is needed to pass. It does not matter how many no votes are cast, or how many do not vote, as long as `weight` yes votes are cast.\n\nThis is the simplest format and usually suitable for small multisigs of trusted parties, like 3 of 5. (weight: 3, total_weight: 5)\n\nA proposal of this type can pass early as soon as the needed weight of yes votes has been cast.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_count"
|
|
],
|
|
"properties": {
|
|
"absolute_count": {
|
|
"type": "object",
|
|
"required": [
|
|
"total_weight",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a percentage of the total weight that must cast Yes votes, in order for a proposal to pass. The passing weight is computed over the total weight minus the weight of the abstained votes.\n\nThis is useful for similar circumstances as `AbsoluteCount`, where we have a relatively small set of voters, and participation is required. It is understood that if the voting set (group) changes between different proposals that refer to the same group, each proposal will work with a different set of voter weights (the ones snapshotted at proposal creation), and the passing weight for each proposal will be computed based on the absolute percentage, times the total weights of the members at the time of each proposal creation.\n\nExample: we set `percentage` to 51%. Proposal 1 starts when there is a `total_weight` of 5. This will require 3 weight of Yes votes in order to pass. Later, the Proposal 2 starts but the `total_weight` of the group has increased to 9. That proposal will then automatically require 5 Yes of 9 to pass, rather than 3 yes of 9 as would be the case with `AbsoluteCount`.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_percentage"
|
|
],
|
|
"properties": {
|
|
"absolute_percentage": {
|
|
"type": "object",
|
|
"required": [
|
|
"percentage",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"percentage": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "In addition to a `threshold`, declares a `quorum` of the total votes that must participate in the election in order for the vote to be considered at all. Within the votes that were cast, it requires `threshold` votes in favor. That is calculated by ignoring the Abstain votes (they count towards `quorum`, but do not influence `threshold`). That is, we calculate `Yes / (Yes + No + Veto)` and compare it with `threshold` to consider if the proposal was passed.\n\nIt is rather difficult for a proposal of this type to pass early. That can only happen if the required quorum has been already met, and there are already enough Yes votes for the proposal to pass.\n\n30% Yes votes, 10% No votes, and 20% Abstain would pass early if quorum <= 60% (who has cast votes) and if the threshold is <= 37.5% (the remaining 40% voting no => 30% yes + 50% no). Once the voting period has passed with no additional votes, that same proposal would be considered successful if quorum <= 60% and threshold <= 75% (percent in favor if we ignore abstain votes).\n\nThis type is more common in general elections, where participation is often expected to be low, and `AbsolutePercentage` would either be too high to pass anything, or allow low percentages to pass, independently of if there was high participation in the election or not.",
|
|
"type": "object",
|
|
"required": [
|
|
"threshold_quorum"
|
|
],
|
|
"properties": {
|
|
"threshold_quorum": {
|
|
"type": "object",
|
|
"required": [
|
|
"quorum",
|
|
"threshold",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"quorum": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"reverse_proposals": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ProposalListResponse_for_Empty",
|
|
"type": "object",
|
|
"required": [
|
|
"proposals"
|
|
],
|
|
"properties": {
|
|
"proposals": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/ProposalResponse_for_Empty"
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"Addr": {
|
|
"description": "A human readable address.\n\nIn Cosmos, this is typically bech32 encoded. But for multi-chain smart contracts no assumptions should be made other than being UTF-8 encoded and of reasonable length.\n\nThis type represents a validated address. It can be created in the following ways 1. Use `Addr::unchecked(input)` 2. Use `let checked: Addr = deps.api.addr_validate(input)?` 3. Use `let checked: Addr = deps.api.addr_humanize(canonical_addr)?` 4. Deserialize from JSON. This must only be done from JSON that was validated before such as a contract's state. `Addr` must not be used in messages sent by the user because this would result in unvalidated instances.\n\nThis type is immutable. If you really need to mutate it (Really? Are you sure?), create a mutable copy using `let mut mutable = Addr::to_string()` and operate on that `String` instance.",
|
|
"type": "string"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"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"
|
|
},
|
|
"Denom": {
|
|
"oneOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"native"
|
|
],
|
|
"properties": {
|
|
"native": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"cw20"
|
|
],
|
|
"properties": {
|
|
"cw20": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
]
|
|
},
|
|
"DepositInfo": {
|
|
"description": "Information about the deposit required to create a proposal.",
|
|
"type": "object",
|
|
"required": [
|
|
"amount",
|
|
"denom",
|
|
"refund_failed_proposals"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"description": "The number tokens required for payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Uint128"
|
|
}
|
|
]
|
|
},
|
|
"denom": {
|
|
"description": "The denom of the deposit payment.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/Denom"
|
|
}
|
|
]
|
|
},
|
|
"refund_failed_proposals": {
|
|
"description": "Should failed proposals have their deposits refunded?",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"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 expressable 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"
|
|
},
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"ProposalResponse_for_Empty": {
|
|
"description": "Note, if you are storing custom messages in the proposal, the querier needs to know what possible custom message types those are in order to parse the response",
|
|
"type": "object",
|
|
"required": [
|
|
"description",
|
|
"expires",
|
|
"id",
|
|
"msgs",
|
|
"proposer",
|
|
"status",
|
|
"threshold",
|
|
"title"
|
|
],
|
|
"properties": {
|
|
"deposit": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/DepositInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"expires": {
|
|
"$ref": "#/definitions/Expiration"
|
|
},
|
|
"id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"msgs": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/CosmosMsg_for_Empty"
|
|
}
|
|
},
|
|
"proposer": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"status": {
|
|
"$ref": "#/definitions/Status"
|
|
},
|
|
"threshold": {
|
|
"description": "This is the threshold that is applied to this proposal. Both the rules of the voting contract, as well as the total_weight of the voting group may have changed since this time. That means that the generic `Threshold{}` query does not provide valid information for existing proposals.",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/ThresholdResponse"
|
|
}
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"Status": {
|
|
"oneOf": [
|
|
{
|
|
"description": "proposal was created, but voting has not yet begun for whatever reason",
|
|
"type": "string",
|
|
"enum": [
|
|
"pending"
|
|
]
|
|
},
|
|
{
|
|
"description": "you can vote on this",
|
|
"type": "string",
|
|
"enum": [
|
|
"open"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over and it did not pass",
|
|
"type": "string",
|
|
"enum": [
|
|
"rejected"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over and it did pass, but has not yet executed",
|
|
"type": "string",
|
|
"enum": [
|
|
"passed"
|
|
]
|
|
},
|
|
{
|
|
"description": "voting is over it passed, and the proposal was executed",
|
|
"type": "string",
|
|
"enum": [
|
|
"executed"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"ThresholdResponse": {
|
|
"description": "This defines the different ways tallies can happen. Every contract should support a subset of these, ideally all.\n\nThe total_weight used for calculating success as well as the weights of each individual voter used in tallying should be snapshotted at the beginning of the block at which the proposal starts (this is likely the responsibility of a correct cw4 implementation).",
|
|
"oneOf": [
|
|
{
|
|
"description": "Declares that a fixed weight of yes votes is needed to pass. It does not matter how many no votes are cast, or how many do not vote, as long as `weight` yes votes are cast.\n\nThis is the simplest format and usually suitable for small multisigs of trusted parties, like 3 of 5. (weight: 3, total_weight: 5)\n\nA proposal of this type can pass early as soon as the needed weight of yes votes has been cast.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_count"
|
|
],
|
|
"properties": {
|
|
"absolute_count": {
|
|
"type": "object",
|
|
"required": [
|
|
"total_weight",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a percentage of the total weight that must cast Yes votes, in order for a proposal to pass. The passing weight is computed over the total weight minus the weight of the abstained votes.\n\nThis is useful for similar circumstances as `AbsoluteCount`, where we have a relatively small set of voters, and participation is required. It is understood that if the voting set (group) changes between different proposals that refer to the same group, each proposal will work with a different set of voter weights (the ones snapshotted at proposal creation), and the passing weight for each proposal will be computed based on the absolute percentage, times the total weights of the members at the time of each proposal creation.\n\nExample: we set `percentage` to 51%. Proposal 1 starts when there is a `total_weight` of 5. This will require 3 weight of Yes votes in order to pass. Later, the Proposal 2 starts but the `total_weight` of the group has increased to 9. That proposal will then automatically require 5 Yes of 9 to pass, rather than 3 yes of 9 as would be the case with `AbsoluteCount`.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_percentage"
|
|
],
|
|
"properties": {
|
|
"absolute_percentage": {
|
|
"type": "object",
|
|
"required": [
|
|
"percentage",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"percentage": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "In addition to a `threshold`, declares a `quorum` of the total votes that must participate in the election in order for the vote to be considered at all. Within the votes that were cast, it requires `threshold` votes in favor. That is calculated by ignoring the Abstain votes (they count towards `quorum`, but do not influence `threshold`). That is, we calculate `Yes / (Yes + No + Veto)` and compare it with `threshold` to consider if the proposal was passed.\n\nIt is rather difficult for a proposal of this type to pass early. That can only happen if the required quorum has been already met, and there are already enough Yes votes for the proposal to pass.\n\n30% Yes votes, 10% No votes, and 20% Abstain would pass early if quorum <= 60% (who has cast votes) and if the threshold is <= 37.5% (the remaining 40% voting no => 30% yes + 50% no). Once the voting period has passed with no additional votes, that same proposal would be considered successful if quorum <= 60% and threshold <= 75% (percent in favor if we ignore abstain votes).\n\nThis type is more common in general elections, where participation is often expected to be low, and `AbsolutePercentage` would either be too high to pass anything, or allow low percentages to pass, independently of if there was high participation in the election or not.",
|
|
"type": "object",
|
|
"required": [
|
|
"threshold_quorum"
|
|
],
|
|
"properties": {
|
|
"threshold_quorum": {
|
|
"type": "object",
|
|
"required": [
|
|
"quorum",
|
|
"threshold",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"quorum": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"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"
|
|
},
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
},
|
|
{
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"threshold": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "ThresholdResponse",
|
|
"description": "This defines the different ways tallies can happen. Every contract should support a subset of these, ideally all.\n\nThe total_weight used for calculating success as well as the weights of each individual voter used in tallying should be snapshotted at the beginning of the block at which the proposal starts (this is likely the responsibility of a correct cw4 implementation).",
|
|
"oneOf": [
|
|
{
|
|
"description": "Declares that a fixed weight of yes votes is needed to pass. It does not matter how many no votes are cast, or how many do not vote, as long as `weight` yes votes are cast.\n\nThis is the simplest format and usually suitable for small multisigs of trusted parties, like 3 of 5. (weight: 3, total_weight: 5)\n\nA proposal of this type can pass early as soon as the needed weight of yes votes has been cast.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_count"
|
|
],
|
|
"properties": {
|
|
"absolute_count": {
|
|
"type": "object",
|
|
"required": [
|
|
"total_weight",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "Declares a percentage of the total weight that must cast Yes votes, in order for a proposal to pass. The passing weight is computed over the total weight minus the weight of the abstained votes.\n\nThis is useful for similar circumstances as `AbsoluteCount`, where we have a relatively small set of voters, and participation is required. It is understood that if the voting set (group) changes between different proposals that refer to the same group, each proposal will work with a different set of voter weights (the ones snapshotted at proposal creation), and the passing weight for each proposal will be computed based on the absolute percentage, times the total weights of the members at the time of each proposal creation.\n\nExample: we set `percentage` to 51%. Proposal 1 starts when there is a `total_weight` of 5. This will require 3 weight of Yes votes in order to pass. Later, the Proposal 2 starts but the `total_weight` of the group has increased to 9. That proposal will then automatically require 5 Yes of 9 to pass, rather than 3 yes of 9 as would be the case with `AbsoluteCount`.",
|
|
"type": "object",
|
|
"required": [
|
|
"absolute_percentage"
|
|
],
|
|
"properties": {
|
|
"absolute_percentage": {
|
|
"type": "object",
|
|
"required": [
|
|
"percentage",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"percentage": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"description": "In addition to a `threshold`, declares a `quorum` of the total votes that must participate in the election in order for the vote to be considered at all. Within the votes that were cast, it requires `threshold` votes in favor. That is calculated by ignoring the Abstain votes (they count towards `quorum`, but do not influence `threshold`). That is, we calculate `Yes / (Yes + No + Veto)` and compare it with `threshold` to consider if the proposal was passed.\n\nIt is rather difficult for a proposal of this type to pass early. That can only happen if the required quorum has been already met, and there are already enough Yes votes for the proposal to pass.\n\n30% Yes votes, 10% No votes, and 20% Abstain would pass early if quorum <= 60% (who has cast votes) and if the threshold is <= 37.5% (the remaining 40% voting no => 30% yes + 50% no). Once the voting period has passed with no additional votes, that same proposal would be considered successful if quorum <= 60% and threshold <= 75% (percent in favor if we ignore abstain votes).\n\nThis type is more common in general elections, where participation is often expected to be low, and `AbsolutePercentage` would either be too high to pass anything, or allow low percentages to pass, independently of if there was high participation in the election or not.",
|
|
"type": "object",
|
|
"required": [
|
|
"threshold_quorum"
|
|
],
|
|
"properties": {
|
|
"threshold_quorum": {
|
|
"type": "object",
|
|
"required": [
|
|
"quorum",
|
|
"threshold",
|
|
"total_weight"
|
|
],
|
|
"properties": {
|
|
"quorum": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"threshold": {
|
|
"$ref": "#/definitions/Decimal"
|
|
},
|
|
"total_weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
],
|
|
"definitions": {
|
|
"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"
|
|
}
|
|
}
|
|
},
|
|
"vote": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "VoteResponse",
|
|
"type": "object",
|
|
"properties": {
|
|
"vote": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/VoteInfo"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"additionalProperties": false,
|
|
"definitions": {
|
|
"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"
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"VoteInfo": {
|
|
"description": "Returns the vote (opinion as well as weight counted) as well as the address of the voter who submitted it",
|
|
"type": "object",
|
|
"required": [
|
|
"proposal_id",
|
|
"vote",
|
|
"voter",
|
|
"weight"
|
|
],
|
|
"properties": {
|
|
"proposal_id": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
},
|
|
"vote": {
|
|
"$ref": "#/definitions/Vote"
|
|
},
|
|
"voter": {
|
|
"type": "string"
|
|
},
|
|
"weight": {
|
|
"type": "integer",
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
},
|
|
"voter": {
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "VoterResponse",
|
|
"type": "object",
|
|
"properties": {
|
|
"weight": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint64",
|
|
"minimum": 0.0
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
}
|
|
}
|