35748e07c4
* Starting a refactor to cut the huge files into chunks * Fixing some lints * ibid * Mixnode and gateway bonding tests moved * All transaction test moved into submodules * Finished splitting out transactions.rs from root into submodules. * Moved mixnet params state into submodule * Recombined modules for few top-level actions * Moving mixnode bonding queries into their own file * Removed some unused imports * Got tests running again. Max limit tests not right. * Fixed tests * Started moving delegation queries into own module * Finished moving delegation queries into their own module * Cleanup * Moving query limits into relevant modules * Putting query limits back at top-level * Using prefix to make storage usage a little more explicit * Separating storage into smaller chunks * More storage refactoring * Finished moving all storage into modules * Moved all storage prefixes into relevant modules and made them not-public * Renamed the mostly-empty queries module to query_support * ibid * Fixed query support rename problems * Started to move rewards-related helpers into their own module * Started moving delegations-related helpers into their own module * Moved more code from global helpers into delegations helpers * Moved all remaining test helper code from main helpers file into test helpers * Made use of test_helpers explicit via a module rename. Also got rid of non-explicit usages * Moved mixnode storage retrieval limits into mixnodes storage module * Moved bond retrieval max limit into storage moduel * Moved more storage limits into mixnodes storage file; fixed a gateways limit test. * Added a note on gateways limits constants I'll re-use the mixnodes values, but it doesn't have to be this way. We could easily make a specific constant for gateways instaed. * Renamed "state" to GlobalContractParams * Pulled bit of test helper code up a level * Small cleanup of zero spacing in constants * Made a local helper method private * Renaming GlobalContractParams to ContractSettings and StateParams to ContractSettingsParams * ibid * Renamed contract settings storage methods from "config" (which is a bit vage to "contract_settings" * Indulging a fullword as a personal protest vs the Go programming language * Renaming mixnet settings to mixnet contract settings * Making validate_mixnode_bond private and moving it downwards in the file * Moving gateway bond validation to the bottom of the tests file * Getting the wallet compiling again. * Updated TypeScript client with new types and contract method names * Updating rust validator client with new contract method names and types * Fixed type error in mixnet-contract shared msg. * Used new contract method names and types * Fixed warnings in non-test code * All tests compiling But not passing yet * Fixed test compilation warnings * Fixed tests * Test-locked Delegations struct Co-authored-by: dave <dave@nym-mbp.lan> Co-authored-by: Jędrzej Stuczyński <jedrzej.stuczynski@gmail.com>
324 lines
7.6 KiB
JSON
324 lines
7.6 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"title": "QueryMsg",
|
|
"anyOf": [
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_mix_nodes"
|
|
],
|
|
"properties": {
|
|
"get_mix_nodes": {
|
|
"type": "object",
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_gateways"
|
|
],
|
|
"properties": {
|
|
"get_gateways": {
|
|
"type": "object",
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"owns_mixnode"
|
|
],
|
|
"properties": {
|
|
"owns_mixnode": {
|
|
"type": "object",
|
|
"required": [
|
|
"address"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"owns_gateway"
|
|
],
|
|
"properties": {
|
|
"owns_gateway": {
|
|
"type": "object",
|
|
"required": [
|
|
"address"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/Addr"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"contract_settings_params"
|
|
],
|
|
"properties": {
|
|
"contract_settings_params": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_mix_delegations"
|
|
],
|
|
"properties": {
|
|
"get_mix_delegations": {
|
|
"type": "object",
|
|
"required": [
|
|
"mix_identity"
|
|
],
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"mix_identity": {
|
|
"type": "string"
|
|
},
|
|
"start_after": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_reverse_mix_delegations"
|
|
],
|
|
"properties": {
|
|
"get_reverse_mix_delegations": {
|
|
"type": "object",
|
|
"required": [
|
|
"delegation_owner"
|
|
],
|
|
"properties": {
|
|
"delegation_owner": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_mix_delegation"
|
|
],
|
|
"properties": {
|
|
"get_mix_delegation": {
|
|
"type": "object",
|
|
"required": [
|
|
"address",
|
|
"mix_identity"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"mix_identity": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_gateway_delegations"
|
|
],
|
|
"properties": {
|
|
"get_gateway_delegations": {
|
|
"type": "object",
|
|
"required": [
|
|
"gateway_identity"
|
|
],
|
|
"properties": {
|
|
"gateway_identity": {
|
|
"type": "string"
|
|
},
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"anyOf": [
|
|
{
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
{
|
|
"type": "null"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_reverse_gateway_delegations"
|
|
],
|
|
"properties": {
|
|
"get_reverse_gateway_delegations": {
|
|
"type": "object",
|
|
"required": [
|
|
"delegation_owner"
|
|
],
|
|
"properties": {
|
|
"delegation_owner": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"limit": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"format": "uint32",
|
|
"minimum": 0.0
|
|
},
|
|
"start_after": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"get_gateway_delegation"
|
|
],
|
|
"properties": {
|
|
"get_gateway_delegation": {
|
|
"type": "object",
|
|
"required": [
|
|
"address",
|
|
"gateway_identity"
|
|
],
|
|
"properties": {
|
|
"address": {
|
|
"$ref": "#/definitions/Addr"
|
|
},
|
|
"gateway_identity": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"layer_distribution"
|
|
],
|
|
"properties": {
|
|
"layer_distribution": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"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"
|
|
}
|
|
}
|
|
} |