Skip to content

Commit

Permalink
Update schema
Browse files Browse the repository at this point in the history
  • Loading branch information
chipshort committed Sep 1, 2023
1 parent 677b3fb commit 4b45ed5
Show file tree
Hide file tree
Showing 3 changed files with 658 additions and 0 deletions.
128 changes: 128 additions & 0 deletions contracts/reflect/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,10 @@
}
]
},
"Decimal": {
"description": "A fixed-point decimal value with 18 fractional digits, i.e. Decimal(1_000_000_000_000_000_000) == 1.0\n\nThe greatest possible value that can be represented is 340282366920938463463.374607431768211455 (which is (2^128 - 1) / 10^18)",
"type": "string"
},
"DistributionMsg": {
"description": "The message types of the distribution module.\n\nSee https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto",
"oneOf": [
Expand Down Expand Up @@ -337,6 +341,31 @@
}
},
"additionalProperties": false
},
{
"description": "This is translated to a [[MsgFundCommunityPool](https://github.com/cosmos/cosmos-sdk/blob/v0.42.4/proto/cosmos/distribution/v1beta1/tx.proto#LL69C1-L76C2). `depositor` is automatically filled with the current contract's address.",
"type": "object",
"required": [
"fund_community_pool"
],
"properties": {
"fund_community_pool": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"description": "The amount to spend",
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -374,6 +403,36 @@
}
},
"additionalProperties": false
},
{
"description": "This maps directly to [MsgVoteWeighted](https://github.com/cosmos/cosmos-sdk/blob/v0.45.8/proto/cosmos/gov/v1beta1/tx.proto#L66-L78) in the Cosmos SDK with voter set to the contract address.",
"type": "object",
"required": [
"vote_weighted"
],
"properties": {
"vote_weighted": {
"type": "object",
"required": [
"options",
"proposal_id"
],
"properties": {
"options": {
"type": "array",
"items": {
"$ref": "#/definitions/WeightedVoteOption"
}
},
"proposal_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
},
Expand Down Expand Up @@ -794,6 +853,60 @@
},
"additionalProperties": false
},
{
"description": "Instantiates a new contracts from previously uploaded Wasm code using a predictable address derivation algorithm implemented in [`cosmwasm_std::instantiate2_address`].\n\nThis is translated to a [MsgInstantiateContract2](https://github.com/CosmWasm/wasmd/blob/v0.29.2/proto/cosmwasm/wasm/v1/tx.proto#L73-L96). `sender` is automatically filled with the current contract's address. `fix_msg` is automatically set to false.",
"type": "object",
"required": [
"instantiate2"
],
"properties": {
"instantiate2": {
"type": "object",
"required": [
"code_id",
"funds",
"label",
"msg",
"salt"
],
"properties": {
"admin": {
"type": [
"string",
"null"
]
},
"code_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"funds": {
"type": "array",
"items": {
"$ref": "#/definitions/Coin"
}
},
"label": {
"description": "A human-readable label for the contract.\n\nValid values should: - not be empty - not be bigger than 128 bytes (or some chain-specific limit) - not start / end with whitespace",
"type": "string"
},
"msg": {
"description": "msg is the JSON-encoded InstantiateMsg struct (as raw Binary)",
"allOf": [
{
"$ref": "#/definitions/Binary"
}
]
},
"salt": {
"$ref": "#/definitions/Binary"
}
}
}
},
"additionalProperties": false
},
{
"description": "Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.\n\nOnly the contract admin (as defined in wasmd), if any, is able to make this call.\n\nThis is translated to a [MsgMigrateContract](https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto#L86-L96). `sender` is automatically filled with the current contract's address.",
"type": "object",
Expand Down Expand Up @@ -878,6 +991,21 @@
"additionalProperties": false
}
]
},
"WeightedVoteOption": {
"type": "object",
"required": [
"option",
"weight"
],
"properties": {
"option": {
"$ref": "#/definitions/VoteOption"
},
"weight": {
"$ref": "#/definitions/Decimal"
}
}
}
}
}
201 changes: 201 additions & 0 deletions contracts/reflect/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,151 @@
}
},
"additionalProperties": false
},
{
"description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse",
"type": "object",
"required": [
"denom_metadata"
],
"properties": {
"denom_metadata": {
"type": "object",
"required": [
"denom"
],
"properties": {
"denom": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "This calls into the native bank module for querying metadata for all bank tokens that have a metadata entry. Return value is AllDenomMetadataResponse",
"type": "object",
"required": [
"all_denom_metadata"
],
"properties": {
"all_denom_metadata": {
"type": "object",
"properties": {
"pagination": {
"anyOf": [
{
"$ref": "#/definitions/PageRequest"
},
{
"type": "null"
}
]
}
}
}
},
"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"
},
"DistributionQuery": {
"oneOf": [
{
"description": "See <https://github.com/cosmos/cosmos-sdk/blob/c74e2887b0b73e81d48c2f33e6b1020090089ee0/proto/cosmos/distribution/v1beta1/query.proto#L222-L230>",
"type": "object",
"required": [
"delegator_withdraw_address"
],
"properties": {
"delegator_withdraw_address": {
"type": "object",
"required": [
"delegator_address"
],
"properties": {
"delegator_address": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "See <https://github.com/cosmos/cosmos-sdk/blob/c74e2887b0b73e81d48c2f33e6b1020090089ee0/proto/cosmos/distribution/v1beta1/query.proto#L157-L167>",
"type": "object",
"required": [
"delegation_rewards"
],
"properties": {
"delegation_rewards": {
"type": "object",
"required": [
"delegator_address",
"validator_address"
],
"properties": {
"delegator_address": {
"type": "string"
},
"validator_address": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "See <https://github.com/cosmos/cosmos-sdk/blob/c74e2887b0b73e81d48c2f33e6b1020090089ee0/proto/cosmos/distribution/v1beta1/query.proto#L180-L187>",
"type": "object",
"required": [
"delegation_total_rewards"
],
"properties": {
"delegation_total_rewards": {
"type": "object",
"required": [
"delegator_address"
],
"properties": {
"delegator_address": {
"type": "string"
}
}
}
},
"additionalProperties": false
},
{
"description": "See <https://github.com/cosmos/cosmos-sdk/blob/b0acf60e6c39f7ab023841841fc0b751a12c13ff/proto/cosmos/distribution/v1beta1/query.proto#L202-L210>",
"type": "object",
"required": [
"delegator_validators"
],
"properties": {
"delegator_validators": {
"type": "object",
"required": [
"delegator_address"
],
"properties": {
"delegator_address": {
"type": "string"
}
}
}
},
"additionalProperties": false
}
]
},
"IbcQuery": {
"description": "These are queries to the various IBC modules to see the state of the contract's IBC connection. These will return errors if the contract is not \"ibc enabled\"",
"oneOf": [
Expand Down Expand Up @@ -252,6 +390,34 @@
}
]
},
"PageRequest": {
"description": "Simplified version of the PageRequest type for pagination from the cosmos-sdk",
"type": "object",
"required": [
"limit",
"reverse"
],
"properties": {
"key": {
"anyOf": [
{
"$ref": "#/definitions/Binary"
},
{
"type": "null"
}
]
},
"limit": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"reverse": {
"type": "boolean"
}
}
},
"QueryRequest_for_SpecialQuery": {
"oneOf": [
{
Expand Down Expand Up @@ -290,6 +456,18 @@
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"distribution"
],
"properties": {
"distribution": {
"$ref": "#/definitions/DistributionQuery"
}
},
"additionalProperties": false
},
{
"description": "A Stargate query is encoded the same way as abci_query, with path and protobuf encoded request data. The format is defined in [ADR-21](https://github.com/cosmos/cosmos-sdk/blob/master/docs/architecture/adr-021-protobuf-query-encoding.md). The response is protobuf encoded data directly without a JSON response wrapper. The caller is responsible for compiling the proper protobuf definitions for both requests and responses.",
"type": "object",
Expand Down Expand Up @@ -566,6 +744,29 @@
}
},
"additionalProperties": false
},
{
"description": "Returns a [`CodeInfoResponse`] with metadata of the code",
"type": "object",
"required": [
"code_info"
],
"properties": {
"code_info": {
"type": "object",
"required": [
"code_id"
],
"properties": {
"code_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
}
}
},
"additionalProperties": false
}
]
}
Expand Down
Loading

0 comments on commit 4b45ed5

Please sign in to comment.