Skip to content

Commit

Permalink
Add per tranche info for lockups (#208)
Browse files Browse the repository at this point in the history
* Add per tranche info for lockups

* Add PR number

* Transform next_round_voting_allowed to be more legible

* Add test for per_tranche info on lockups

* Appease clippy

* Fix minor issues

* Make comments more detailed

* Regenerate artifacts

* Restructure logic for skipping tranche

* Regenerate artifacts
  • Loading branch information
p-offtermatt authored Dec 18, 2024
1 parent de07455 commit 0c8e066
Show file tree
Hide file tree
Showing 12 changed files with 913 additions and 579 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/features/208-add-per-tranche-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Add information about when lockups can vote again to the `per_tranche_info` endpoint.
([\#208](https://github.com/informalsystems/hydro/pull/208))
2 changes: 1 addition & 1 deletion artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
a99875e8e9fe0a9fdc4dd162f30c439594668b19fa25675c7ea27bb078fd08cd hydro.wasm
8b86f0dcccae63522d9a40f11ee08f432570ade1abd75f6e48182f4907ea384d hydro.wasm
de282a84a0c8179a35ddfb8aca950ade2207b235c0b2d9b7fe6bd5b23537aef0 tribute.wasm
Binary file modified artifacts/hydro.wasm
Binary file not shown.
49 changes: 48 additions & 1 deletion contracts/hydro/schema/all_user_lockups_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lockups": {
"type": "array",
"items": {
"$ref": "#/definitions/LockEntryWithPower"
"$ref": "#/definitions/LockupWithPerTrancheInfo"
}
}
},
Expand Down Expand Up @@ -73,6 +73,53 @@
},
"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": [
Expand Down
Loading

0 comments on commit 0c8e066

Please sign in to comment.