Files
nym/contracts/mixnet/schema/raw/response_to_get_state_params.json
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

233 lines
6.5 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ContractStateParams",
"description": "Contract parameters that could be adjusted in a transaction by the contract admin.",
"type": "object",
"required": [
"config_score_params",
"delegations_params",
"operators_params"
],
"properties": {
"config_score_params": {
"description": "Parameters to do with the config score",
"allOf": [
{
"$ref": "#/definitions/ConfigScoreParams"
}
]
},
"delegations_params": {
"description": "Parameters to do with delegations.",
"allOf": [
{
"$ref": "#/definitions/DelegationsParams"
}
]
},
"operators_params": {
"description": "Parameters to do with node operators.",
"allOf": [
{
"$ref": "#/definitions/OperatorsParams"
}
]
}
},
"additionalProperties": false,
"definitions": {
"Coin": {
"type": "object",
"required": [
"amount",
"denom"
],
"properties": {
"amount": {
"$ref": "#/definitions/Uint128"
},
"denom": {
"type": "string"
}
},
"additionalProperties": false
},
"ConfigScoreParams": {
"type": "object",
"required": [
"version_score_formula_params",
"version_weights"
],
"properties": {
"version_score_formula_params": {
"description": "Defines the parameters of the formula for calculating the version score",
"allOf": [
{
"$ref": "#/definitions/VersionScoreFormulaParams"
}
]
},
"version_weights": {
"description": "Defines weights for calculating numbers of versions behind the current release.",
"allOf": [
{
"$ref": "#/definitions/OutdatedVersionWeights"
}
]
}
},
"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"
},
"DelegationsParams": {
"type": "object",
"properties": {
"minimum_delegation": {
"description": "Minimum amount a delegator must stake in orders for his delegation to get accepted.",
"anyOf": [
{
"$ref": "#/definitions/Coin"
},
{
"type": "null"
}
]
}
},
"additionalProperties": false
},
"OperatorsParams": {
"type": "object",
"required": [
"interval_operating_cost",
"minimum_pledge",
"profit_margin"
],
"properties": {
"interval_operating_cost": {
"description": "Defines the allowed interval operating cost range of operators. default: 0 - 1'000'000'000'000'000 (1 Billion native tokens - the total supply)",
"allOf": [
{
"$ref": "#/definitions/RangedValue_for_Uint128"
}
]
},
"minimum_pledge": {
"description": "Minimum amount a node must pledge to get into the system.",
"allOf": [
{
"$ref": "#/definitions/Coin"
}
]
},
"profit_margin": {
"description": "Defines the allowed profit margin range of operators. default: 0% - 100%",
"allOf": [
{
"$ref": "#/definitions/RangedValue_for_Percent"
}
]
}
},
"additionalProperties": false
},
"OutdatedVersionWeights": {
"description": "Defines weights for calculating numbers of versions behind the current release.",
"type": "object",
"required": [
"major",
"minor",
"patch",
"prerelease"
],
"properties": {
"major": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"minor": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"patch": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
},
"prerelease": {
"type": "integer",
"format": "uint32",
"minimum": 0.0
}
},
"additionalProperties": false
},
"Percent": {
"description": "Percent represents a value between 0 and 100% (i.e. between 0.0 and 1.0)",
"allOf": [
{
"$ref": "#/definitions/Decimal"
}
]
},
"RangedValue_for_Percent": {
"type": "object",
"required": [
"maximum",
"minimum"
],
"properties": {
"maximum": {
"$ref": "#/definitions/Percent"
},
"minimum": {
"$ref": "#/definitions/Percent"
}
},
"additionalProperties": false
},
"RangedValue_for_Uint128": {
"type": "object",
"required": [
"maximum",
"minimum"
],
"properties": {
"maximum": {
"$ref": "#/definitions/Uint128"
},
"minimum": {
"$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"
},
"VersionScoreFormulaParams": {
"description": "Given the formula of version_score = penalty ^ (versions_behind_factor ^ penalty_scaling) define the relevant parameters",
"type": "object",
"required": [
"penalty",
"penalty_scaling"
],
"properties": {
"penalty": {
"$ref": "#/definitions/Decimal"
},
"penalty_scaling": {
"$ref": "#/definitions/Decimal"
}
},
"additionalProperties": false
}
}
}