-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate out the extra per tranche info into an extra query (#210)
* Separate PerTrancheInfos into separate query * Regenerate artifacts * Recompile contract * Add new message to schema
- Loading branch information
1 parent
0c8e066
commit f6868bc
Showing
15 changed files
with
531 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
- Add information about when lockups can vote again to the `per_tranche_info` endpoint. | ||
- Add an extra query for lockups that includes information about when lockups can vote again. | ||
([\#208](https://github.com/informalsystems/hydro/pull/208)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
8b86f0dcccae63522d9a40f11ee08f432570ade1abd75f6e48182f4907ea384d hydro.wasm | ||
de282a84a0c8179a35ddfb8aca950ade2207b235c0b2d9b7fe6bd5b23537aef0 tribute.wasm | ||
df9254217fb90d9053bbdf7388d3ce99a80d3db24b715aafb89193ecada0e7da hydro.wasm | ||
60a998e7725728c20c4f6b54b77a97c5a66e09195abac005df5419443fd4c4c3 tribute.wasm |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
140 changes: 140 additions & 0 deletions
140
contracts/hydro/schema/all_user_lockups_with_tranche_infos_response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "AllUserLockupsWithTrancheInfosResponse", | ||
"type": "object", | ||
"required": [ | ||
"lockups_with_per_tranche_infos" | ||
], | ||
"properties": { | ||
"lockups_with_per_tranche_infos": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/LockupWithPerTrancheInfo" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false, | ||
"definitions": { | ||
"Coin": { | ||
"type": "object", | ||
"required": [ | ||
"amount", | ||
"denom" | ||
], | ||
"properties": { | ||
"amount": { | ||
"$ref": "#/definitions/Uint128" | ||
}, | ||
"denom": { | ||
"type": "string" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"LockEntry": { | ||
"type": "object", | ||
"required": [ | ||
"funds", | ||
"lock_end", | ||
"lock_id", | ||
"lock_start" | ||
], | ||
"properties": { | ||
"funds": { | ||
"$ref": "#/definitions/Coin" | ||
}, | ||
"lock_end": { | ||
"$ref": "#/definitions/Timestamp" | ||
}, | ||
"lock_id": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"lock_start": { | ||
"$ref": "#/definitions/Timestamp" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"LockEntryWithPower": { | ||
"type": "object", | ||
"required": [ | ||
"current_voting_power", | ||
"lock_entry" | ||
], | ||
"properties": { | ||
"current_voting_power": { | ||
"$ref": "#/definitions/Uint128" | ||
}, | ||
"lock_entry": { | ||
"$ref": "#/definitions/LockEntry" | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"LockupWithPerTrancheInfo": { | ||
"type": "object", | ||
"required": [ | ||
"lock_with_power", | ||
"per_tranche_info" | ||
], | ||
"properties": { | ||
"lock_with_power": { | ||
"$ref": "#/definitions/LockEntryWithPower" | ||
}, | ||
"per_tranche_info": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/PerTrancheLockupInfo" | ||
} | ||
} | ||
}, | ||
"additionalProperties": false | ||
}, | ||
"PerTrancheLockupInfo": { | ||
"type": "object", | ||
"required": [ | ||
"next_round_lockup_can_vote", | ||
"tranche_id" | ||
], | ||
"properties": { | ||
"current_voted_on_proposal": { | ||
"type": [ | ||
"integer", | ||
"null" | ||
], | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"next_round_lockup_can_vote": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
}, | ||
"tranche_id": { | ||
"type": "integer", | ||
"format": "uint64", | ||
"minimum": 0.0 | ||
} | ||
}, | ||
"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" | ||
} | ||
} | ||
} |
Oops, something went wrong.