Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 43 additions & 18 deletions contracts/yieldaggregator-bonus/schema/raw/execute.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,35 @@
{
"type": "object",
"required": [
"delete_bonus_window"
"vote"
],
"properties": {
"delete_bonus_window": {
"$ref": "#/definitions/DeleteBonusWindowMsg"
"vote": {
"$ref": "#/definitions/VoteMsg"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"vote"
"stake_vault_share"
],
"properties": {
"vote": {
"$ref": "#/definitions/VoteMsg"
"stake_vault_share": {
"$ref": "#/definitions/StakeVaultShareMsg"
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"stake_vault_share"
"distribution"
],
"properties": {
"stake_vault_share": {
"$ref": "#/definitions/StakeVaultShareMsg"
"distribution": {
"$ref": "#/definitions/DistributionMsg"
}
},
"additionalProperties": false
Expand All @@ -68,36 +68,55 @@
"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"
},
"DeleteBonusWindowMsg": {
"DistributionMsg": {
"type": "object",
"required": [
"bonus_window_id"
"bonus_window_id",
"price_data"
],
"properties": {
"bonus_window_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"price_data": {
"type": "array",
"items": {
"$ref": "#/definitions/PriceData"
}
}
},
"additionalProperties": false
},
"PriceData": {
"type": "object",
"required": [
"price",
"vault_id"
],
"properties": {
"price": {
"$ref": "#/definitions/Decimal"
},
"vault_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
},
"RegisterBonusWindowMsg": {
"type": "object",
"required": [
"apr_for_winners",
"budget_for_all",
"denom",
"end_at",
"reward_for_winners",
"start_at"
],
"properties": {
"apr_for_winners": {
"type": "array",
"items": {
"$ref": "#/definitions/Decimal"
}
},
"budget_for_all": {
"$ref": "#/definitions/Uint128"
},
Expand All @@ -107,6 +126,12 @@
"end_at": {
"$ref": "#/definitions/Timestamp"
},
"reward_for_winners": {
"type": "array",
"items": {
"$ref": "#/definitions/Uint128"
}
},
"start_at": {
"$ref": "#/definitions/Timestamp"
}
Expand Down
6 changes: 1 addition & 5 deletions contracts/yieldaggregator-bonus/schema/raw/instantiate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
"title": "InstantiateMsg",
"type": "object",
"required": [
"authority",
"stake_denom"
"authority"
],
"properties": {
"authority": {
"type": "string"
},
"stake_denom": {
"type": "string"
}
},
"additionalProperties": false
Expand Down
41 changes: 38 additions & 3 deletions contracts/yieldaggregator-bonus/schema/raw/query.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"type": "object",
"required": [
"address",
"bonus_window_id"
"bonus_window_id",
"vault_id"
],
"properties": {
"address": {
Expand All @@ -71,6 +72,40 @@
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"vault_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
{
"type": "object",
"required": [
"total_staking_info_for_a_vault"
],
"properties": {
"total_staking_info_for_a_vault": {
"type": "object",
"required": [
"bonus_window_id",
"vault_id"
],
"properties": {
"bonus_window_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"vault_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false
Expand All @@ -81,10 +116,10 @@
{
"type": "object",
"required": [
"distribution_amount"
"total_staking_info"
],
"properties": {
"distribution_amount": {
"total_staking_info": {
"type": "object",
"required": [
"bonus_window_id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,14 @@
"BonusWindow": {
"type": "object",
"required": [
"apr_for_winners",
"budget_for_all",
"denom",
"end_at",
"id",
"reward_for_winners",
"start_at"
],
"properties": {
"apr_for_winners": {
"type": "array",
"items": {
"$ref": "#/definitions/Decimal"
}
},
"budget_for_all": {
"$ref": "#/definitions/Uint128"
},
Expand All @@ -37,16 +31,18 @@
"format": "uint64",
"minimum": 0.0
},
"reward_for_winners": {
"type": "array",
"items": {
"$ref": "#/definitions/Uint128"
}
},
"start_at": {
"$ref": "#/definitions/Timestamp"
}
},
"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"
},
"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": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Array_of_TotalStakingInfo",
"type": "array",
"items": {
"$ref": "#/definitions/TotalStakingInfo"
},
"definitions": {
"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"
},
"TotalStakingInfo": {
"type": "object",
"required": [
"total_staked_amount",
"total_staking_power_index",
"vault_id"
],
"properties": {
"total_staked_amount": {
"$ref": "#/definitions/Uint128"
},
"total_staking_power_index": {
"$ref": "#/definitions/Decimal"
},
"vault_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"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"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "TotalStakingInfo",
"type": "object",
"required": [
"total_staked_amount",
"total_staking_power_index",
"vault_id"
],
"properties": {
"total_staked_amount": {
"$ref": "#/definitions/Uint128"
},
"total_staking_power_index": {
"$ref": "#/definitions/Decimal"
},
"vault_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
}
},
"additionalProperties": false,
"definitions": {
"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"
},
"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"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,23 @@
"$ref": "#/definitions/VaultShareStaking"
},
"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.",
"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"
},
"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"
},
"VaultShareStaking": {
"type": "object",
"required": [
"address",
"start_at",
"vault_id",
"staking_power_index",
"vault_share"
],
"properties": {
"address": {
"$ref": "#/definitions/Addr"
},
"start_at": {
"$ref": "#/definitions/Timestamp"
},
"vault_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
"staking_power_index": {
"$ref": "#/definitions/Decimal"
},
"vault_share": {
"$ref": "#/definitions/Uint128"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,10 @@
"VotedVault": {
"type": "object",
"required": [
"bonus_window_id",
"vault_id",
"voted_amount"
],
"properties": {
"bonus_window_id": {
"type": "integer",
"format": "uint64",
"minimum": 0.0
},
"vault_id": {
"type": "integer",
"format": "uint64",
Expand Down
Loading