{ "contract_name": "cw20-stake-reward-distributor", "contract_version": "2.6.0", "idl_version": "1.0.0", "instantiate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InstantiateMsg", "type": "object", "required": [ "owner", "reward_rate", "reward_token", "staking_addr" ], "properties": { "owner": { "type": "string" }, "reward_rate": { "$ref": "#/definitions/Uint128" }, "reward_token": { "type": "string" }, "staking_addr": { "type": "string" } }, "additionalProperties": false, "definitions": { "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" } } }, "execute": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "ExecuteMsg", "oneOf": [ { "type": "object", "required": [ "update_config" ], "properties": { "update_config": { "type": "object", "required": [ "reward_rate", "reward_token", "staking_addr" ], "properties": { "reward_rate": { "$ref": "#/definitions/Uint128" }, "reward_token": { "type": "string" }, "staking_addr": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "distribute" ], "properties": { "distribute": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "withdraw" ], "properties": { "withdraw": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "description": "Update the contract's ownership. The `action` to be provided can be either to propose transferring ownership to an account, accept a pending ownership transfer, or renounce the ownership permanently.", "type": "object", "required": [ "update_ownership" ], "properties": { "update_ownership": { "$ref": "#/definitions/Action" } }, "additionalProperties": false } ], "definitions": { "Action": { "description": "Actions that can be taken to alter the contract's ownership", "oneOf": [ { "description": "Propose to transfer the contract's ownership to another account, optionally with an expiry time.\n\nCan only be called by the contract's current owner.\n\nAny existing pending ownership transfer is overwritten.", "type": "object", "required": [ "transfer_ownership" ], "properties": { "transfer_ownership": { "type": "object", "required": [ "new_owner" ], "properties": { "expiry": { "anyOf": [ { "$ref": "#/definitions/Expiration" }, { "type": "null" } ] }, "new_owner": { "type": "string" } }, "additionalProperties": false } }, "additionalProperties": false }, { "description": "Accept the pending ownership transfer.\n\nCan only be called by the pending owner.", "type": "string", "enum": [ "accept_ownership" ] }, { "description": "Give up the contract's ownership and the possibility of appointing a new owner.\n\nCan only be invoked by the contract's current owner.\n\nAny existing pending ownership transfer is canceled.", "type": "string", "enum": [ "renounce_ownership" ] } ] }, "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 } ] }, "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" } } }, "query": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "QueryMsg", "oneOf": [ { "type": "object", "required": [ "info" ], "properties": { "info": { "type": "object", "additionalProperties": false } }, "additionalProperties": false }, { "type": "object", "required": [ "ownership" ], "properties": { "ownership": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "migrate": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "MigrateMsg", "oneOf": [ { "description": "Updates the contract from v1 -> v2. Version two implements a two step ownership transfer.", "type": "object", "required": [ "from_v1" ], "properties": { "from_v1": { "type": "object", "additionalProperties": false } }, "additionalProperties": false } ] }, "sudo": null, "responses": { "info": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "InfoResponse", "type": "object", "required": [ "balance", "config", "last_payment_block" ], "properties": { "balance": { "$ref": "#/definitions/Uint128" }, "config": { "$ref": "#/definitions/Config" }, "last_payment_block": { "type": "integer", "format": "uint64", "minimum": 0.0 } }, "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" }, "Config": { "type": "object", "required": [ "reward_rate", "reward_token", "staking_addr" ], "properties": { "reward_rate": { "$ref": "#/definitions/Uint128" }, "reward_token": { "$ref": "#/definitions/Addr" }, "staking_addr": { "$ref": "#/definitions/Addr" } }, "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" } } }, "ownership": { "$schema": "http://json-schema.org/draft-07/schema#", "title": "Ownership_for_Addr", "description": "The contract's ownership info", "type": "object", "properties": { "owner": { "description": "The contract's current owner. `None` if the ownership has been renounced.", "anyOf": [ { "$ref": "#/definitions/Addr" }, { "type": "null" } ] }, "pending_expiry": { "description": "The deadline for the pending owner to accept the ownership. `None` if there isn't a pending ownership transfer, or if a transfer exists and it doesn't have a deadline.", "anyOf": [ { "$ref": "#/definitions/Expiration" }, { "type": "null" } ] }, "pending_owner": { "description": "The account who has been proposed to take over the ownership. `None` if there isn't a pending ownership transfer.", "anyOf": [ { "$ref": "#/definitions/Addr" }, { "type": "null" } ] } }, "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" }, "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 } ] }, "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" } ] }, "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" } } } } }