2026-05-15 19:18:10 +03:00

320 lines
11 KiB
JSON

{
"contract_name": "astroport-staking",
"contract_version": "2.3.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InstantiateMsg",
"description": "This structure describes the parameters used for creating a contract.",
"type": "object",
"required": [
"deposit_token_denom",
"token_factory_addr",
"tracking_admin",
"tracking_code_id"
],
"properties": {
"deposit_token_denom": {
"description": "The ASTRO token contract address",
"type": "string"
},
"token_factory_addr": {
"description": "Token factory module address. Contract creator must ensure that the address is exact token factory module address.",
"type": "string"
},
"tracking_admin": {
"description": "Tracking contract admin",
"type": "string"
},
"tracking_code_id": {
"description": "The Code ID of contract used to track the TokenFactory token balances",
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
},
"execute": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"description": "This structure describes the execute messages available in the contract.",
"oneOf": [
{
"description": "Deposits ASTRO in exchange for xASTRO The receiver is optional. If not set, the sender will receive the xASTRO.",
"type": "object",
"required": [
"enter"
],
"properties": {
"enter": {
"type": "object",
"properties": {
"receiver": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Deposits ASTRO in exchange for xASTRO and passes **all resulting xASTRO** to defined contract along with an executable message.",
"type": "object",
"required": [
"enter_with_hook"
],
"properties": {
"enter_with_hook": {
"type": "object",
"required": [
"contract_address",
"msg"
],
"properties": {
"contract_address": {
"type": "string"
},
"msg": {
"$ref": "#/definitions/Binary"
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Burns xASTRO in exchange for ASTRO. The receiver is optional. If not set, the sender will receive the ASTRO.",
"type": "object",
"required": [
"leave"
],
"properties": {
"leave": {
"type": "object",
"properties": {
"receiver": {
"type": [
"string",
"null"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
],
"definitions": {
"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"
}
}
},
"query": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"description": "This structure describes the query messages available in the contract.",
"oneOf": [
{
"description": "Config returns the contract configuration specified in a custom [`Config`] structure",
"type": "object",
"required": [
"config"
],
"properties": {
"config": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Returns xASTRO total supply. Duplicates TotalSupplyAt { timestamp: None } logic but kept for backward compatibility.",
"type": "object",
"required": [
"total_shares"
],
"properties": {
"total_shares": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "Returns total ASTRO staked in the contract",
"type": "object",
"required": [
"total_deposit"
],
"properties": {
"total_deposit": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"tracker_config"
],
"properties": {
"tracker_config": {
"type": "object",
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "BalanceAt returns xASTRO balance of the given address at at the given timestamp. Returns current balance if timestamp unset.",
"type": "object",
"required": [
"balance_at"
],
"properties": {
"balance_at": {
"type": "object",
"required": [
"address"
],
"properties": {
"address": {
"type": "string"
},
"timestamp": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"description": "TotalSupplyAt returns xASTRO total token supply at the given timestamp. Returns current total supply if timestamp unset.",
"type": "object",
"required": [
"total_supply_at"
],
"properties": {
"total_supply_at": {
"type": "object",
"properties": {
"timestamp": {
"type": [
"integer",
"null"
],
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
]
},
"migrate": null,
"sudo": null,
"responses": {
"balance_at": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "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"
},
"config": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Config",
"description": "This structure stores the main parameters for the staking contract.",
"type": "object",
"required": [
"astro_denom",
"xastro_denom"
],
"properties": {
"astro_denom": {
"description": "The ASTRO token denom",
"type": "string"
},
"xastro_denom": {
"description": "The xASTRO token denom",
"type": "string"
}
},
"additionalProperties": false
},
"total_deposit": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "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"
},
"total_shares": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "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"
},
"total_supply_at": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "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"
},
"tracker_config": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TrackerData",
"description": "This structure stores the tracking contract data.",
"type": "object",
"required": [
"admin",
"code_id",
"token_factory_addr",
"tracker_addr"
],
"properties": {
"admin": {
"description": "Tracking contract admin",
"type": "string"
},
"code_id": {
"description": "Tracking contract code id",
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"token_factory_addr": {
"description": "Token factory module address",
"type": "string"
},
"tracker_addr": {
"description": "Tracker contract address",
"type": "string"
}
},
"additionalProperties": false
}
}
}