-
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.
* Add per tranche info for lockups (#208) * 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 * 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
5c0f4a2
commit f036ec9
Showing
16 changed files
with
1,234 additions
and
544 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
- 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 @@ | ||
32369ee7458c2b9aa980ca6607a8761081e5db8c42be991a2455c33754b033cf hydro.wasm | ||
711a5e9f3bbb402df60c2365acae67232a252ba938da5111e44dfa9e537fb555 tribute.wasm | ||
2bf5874dcfd7cf369ec908ece734ed1b34f5cfa4b0ebe6400d218801c343730a hydro.wasm | ||
fc14f3b75361e6518c45f51a66d14ba91ec13c489ce0afb7c597c92fe43bca9e tribute.wasm |
Binary file not shown.
Binary file not shown.
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.