Files
Jędrzej Stuczyński 33992542b1 feature: upgrade cosmwasm to 2.2 (#5479)
* updated contracts to cosmwasm2.2 and fixed build issues

* removed old coconut contract code + additional dkg fixes

* replace deprecated to_binary and from_binary functions

* mixnet contract tests compiling

some are failing due to incorrect addresses

* made other contract tests compile

* fixed remaining tests

* allow usage of manually dispatching contract replies

* nym-api test fixes

* removed old toolchain from contracts CI

* linter fixes

* regenerated contract schema

* fixed easy_addr

* further license fixes

* post rebase fixes + update to 2.2.2

* change ci runner

* minor CI adjustments

* change wallet CI to use node 20

* more CI changes...

* run cosmwasm-check against release contracts

* test ci changes

* wip...
2025-03-21 13:43:35 +00:00

927 lines
22 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"oneOf": [
{
"type": "object",
"required": [
"track_reward"
],
"properties": {
"track_reward": {
"type": "object",
"required": [
"address",
"amount"
],
"properties": {
"address": {
"type": "string"
},
"amount": {
"$ref": "#/definitions/Coin"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"claim_operator_reward"
],
"properties": {
"claim_operator_reward": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"claim_delegator_reward"
],
"properties": {
"claim_delegator_reward": {
"type": "object",
"required": [
"mix_id"
],
"properties": {
"mix_id": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_mixnode_cost_params"
],
"properties": {
"update_mixnode_cost_params": {
"type": "object",
"required": [
"new_costs"
],
"properties": {
"new_costs": {
"$ref": "#/definitions/NodeCostParams"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_mixnode_config"
],
"properties": {
"update_mixnode_config": {
"type": "object",
"required": [
"new_config"
],
"properties": {
"new_config": {
"$ref": "#/definitions/MixNodeConfigUpdate"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_mixnet_address"
],
"properties": {
"update_mixnet_address": {
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"delegate_to_mixnode"
],
"properties": {
"delegate_to_mixnode": {
"type": "object",
"required": [
"amount",
"mix_id"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"mix_id": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"on_behalf_of": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"undelegate_from_mixnode"
],
"properties": {
"undelegate_from_mixnode": {
"type": "object",
"required": [
"mix_id"
],
"properties": {
"mix_id": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"on_behalf_of": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"create_account"
],
"properties": {
"create_account": {
"type": "object",
"required": [
"owner_address"
],
"properties": {
"cap": {
"anyOf": [
{
"$ref": "#/definitions/PledgeCap"
},
{
"type": "null"
}
]
},
"owner_address": {
"type": "string"
},
"staking_address": {
"type": [
"string",
"null"
]
},
"vesting_spec": {
"anyOf": [
{
"$ref": "#/definitions/VestingSpecification"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"withdraw_vested_coins"
],
"properties": {
"withdraw_vested_coins": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"track_undelegation"
],
"properties": {
"track_undelegation": {
"type": "object",
"required": [
"amount",
"mix_id",
"owner"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"mix_id": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"owner": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bond_mixnode"
],
"properties": {
"bond_mixnode": {
"type": "object",
"required": [
"amount",
"cost_params",
"mix_node",
"owner_signature"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"cost_params": {
"$ref": "#/definitions/NodeCostParams"
},
"mix_node": {
"$ref": "#/definitions/MixNode"
},
"owner_signature": {
"$ref": "#/definitions/MessageSignature"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"pledge_more"
],
"properties": {
"pledge_more": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"decrease_pledge"
],
"properties": {
"decrease_pledge": {
"type": "object",
"required": [
"amount"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unbond_mixnode"
],
"properties": {
"unbond_mixnode": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"track_unbond_mixnode"
],
"properties": {
"track_unbond_mixnode": {
"type": "object",
"required": [
"amount",
"owner"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"owner": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"track_decrease_pledge"
],
"properties": {
"track_decrease_pledge": {
"type": "object",
"required": [
"amount",
"owner"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"owner": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"bond_gateway"
],
"properties": {
"bond_gateway": {
"type": "object",
"required": [
"amount",
"gateway",
"owner_signature"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"gateway": {
"$ref": "#/definitions/Gateway"
},
"owner_signature": {
"$ref": "#/definitions/MessageSignature"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"unbond_gateway"
],
"properties": {
"unbond_gateway": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"track_unbond_gateway"
],
"properties": {
"track_unbond_gateway": {
"type": "object",
"required": [
"amount",
"owner"
],
"properties": {
"amount": {
"$ref": "#/definitions/Coin"
},
"owner": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_gateway_config"
],
"properties": {
"update_gateway_config": {
"type": "object",
"required": [
"new_config"
],
"properties": {
"new_config": {
"$ref": "#/definitions/GatewayConfigUpdate"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"transfer_ownership"
],
"properties": {
"transfer_ownership": {
"type": "object",
"required": [
"to_address"
],
"properties": {
"to_address": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_staking_address"
],
"properties": {
"update_staking_address": {
"type": "object",
"properties": {
"to_address": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"update_locked_pledge_cap"
],
"properties": {
"update_locked_pledge_cap": {
"type": "object",
"required": [
"address",
"cap"
],
"properties": {
"address": {
"type": "string"
},
"cap": {
"$ref": "#/definitions/PledgeCap"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"track_migrated_mixnode"
],
"properties": {
"track_migrated_mixnode": {
"type": "object",
"required": [
"owner"
],
"properties": {
"owner": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"track_migrated_delegation"
],
"properties": {
"track_migrated_delegation": {
"type": "object",
"required": [
"mix_id",
"owner"
],
"properties": {
"mix_id": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"owner": {
"type": "string"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
"Coin": {
"type": "object",
"required": [
"amount",
"denom"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
},
"denom": {
"type": "string"
}
},
"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"
},
"Gateway": {
"description": "Information provided by the node operator during bonding that are used to allow other entities to use the services of this node.",
"type": "object",
"required": [
"clients_port",
"host",
"identity_key",
"location",
"mix_port",
"sphinx_key",
"version"
],
"properties": {
"clients_port": {
"description": "Port used by this gateway for listening for client requests.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"host": {
"description": "Network address of this gateway, for example 1.1.1.1 or foo.gateway.com",
"type": "string"
},
"identity_key": {
"description": "Base58 encoded ed25519 EdDSA public key of the gateway used to derive shared keys with clients",
"type": "string"
},
"location": {
"description": "The physical, self-reported, location of this gateway.",
"type": "string"
},
"mix_port": {
"description": "Port used by this gateway for listening for mix packets.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"sphinx_key": {
"description": "Base58-encoded x25519 public key used for sphinx key derivation.",
"type": "string"
},
"version": {
"description": "The self-reported semver version of this gateway.",
"type": "string"
}
},
"additionalProperties": false
},
"GatewayConfigUpdate": {
"type": "object",
"required": [
"clients_port",
"host",
"location",
"mix_port",
"version"
],
"properties": {
"clients_port": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"host": {
"type": "string"
},
"location": {
"type": "string"
},
"mix_port": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"version": {
"type": "string"
}
},
"additionalProperties": false
},
"MessageSignature": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8",
"minimum": 0.0
}
},
"MixNode": {
"description": "Information provided by the node operator during bonding that are used to allow other entities to use the services of this node.",
"type": "object",
"required": [
"host",
"http_api_port",
"identity_key",
"mix_port",
"sphinx_key",
"verloc_port",
"version"
],
"properties": {
"host": {
"description": "Network address of this mixnode, for example 1.1.1.1 or foo.mixnode.com",
"type": "string"
},
"http_api_port": {
"description": "Port used by this mixnode for its http(s) API",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"identity_key": {
"description": "Base58-encoded ed25519 EdDSA public key.",
"type": "string"
},
"mix_port": {
"description": "Port used by this mixnode for listening for mix packets.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"sphinx_key": {
"description": "Base58-encoded x25519 public key used for sphinx key derivation.",
"type": "string"
},
"verloc_port": {
"description": "Port used by this mixnode for listening for verloc requests.",
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"version": {
"description": "The self-reported semver version of this mixnode.",
"type": "string"
}
},
"additionalProperties": false
},
"MixNodeConfigUpdate": {
"type": "object",
"required": [
"host",
"http_api_port",
"mix_port",
"verloc_port",
"version"
],
"properties": {
"host": {
"type": "string"
},
"http_api_port": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"mix_port": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"verloc_port": {
"type": "integer",
"format": "uint16",
"minimum": 0.0
},
"version": {
"type": "string"
}
},
"additionalProperties": false
},
"NodeCostParams": {
"description": "The cost parameters, or the cost function, defined for the particular mixnode that influences how the rewards should be split between the node operator and its delegators.",
"type": "object",
"required": [
"interval_operating_cost",
"profit_margin_percent"
],
"properties": {
"interval_operating_cost": {
"description": "Operating cost of the associated node per the entire interval.",
"allOf": [
{
"$ref": "#/definitions/Coin"
}
]
},
"profit_margin_percent": {
"description": "The profit margin of the associated node, i.e. the desired percent of the reward to be distributed to the operator.",
"allOf": [
{
"$ref": "#/definitions/Percent"
}
]
}
},
"additionalProperties": false
},
"Percent": {
"description": "Percent represents a value between 0 and 100% (i.e. between 0.0 and 1.0)",
"allOf": [
{
"$ref": "#/definitions/Decimal"
}
]
},
"PledgeCap": {
"description": "Defines cap for pleding/staking tokens.",
"oneOf": [
{
"description": "Specifies a percent-based pledge cap, i.e. only given % of tokens could be pledged/staked.",
"type": "object",
"required": [
"percent"
],
"properties": {
"percent": {
"$ref": "#/definitions/Percent"
}
},
"additionalProperties": false
},
{
"description": "Specifies an absolute pledge cap, i.e. an explicit value that could be pledged/staked.",
"type": "object",
"required": [
"absolute"
],
"properties": {
"absolute": {
"$ref": "#/definitions/Uint128"
}
},
"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"
},
"VestingSpecification": {
"type": "object",
"properties": {
"num_periods": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"period_seconds": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
},
"start_time": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
}
}