This guide lists API changes between releases of Tgrade contracts.
list_proposals
query was divided intolist_proposals
andreverse_proposals
list_votes_by_proposal
query was renamed tolist_votes
list_voting_members
query was renamed tolist_voters
list_votes_by_voter
query's parameterstart_before
was changed tostart_after
- The query for total voting weight renamed form
total_weight
tototal_points
. The response stays unchanged for now, still containsweight
field (it is due to its dependency in future repo, expect it change in the near future). - The
total_weight
field on response toproposal
query renamed tototal_points
. - The
proposals[].total_weight
field on response tolist_proposals
query renamed toproposals[].total_points
. - The
vote.weight
field on response tovote
query renamed topoints
. - The
votes[].weight
field on responses tolist_votes_by_proposal
andlist_votes_by_voter
queries renamed tovotes[].weight
. - The
weight
field onvotes
,votes_by_voter
maps in contracts storage renamed topoints
. - The
total_weight
field onproposals
map in contract storage renamed tototal_points
.
-
The
Expiration
type changes. SeeVoting contracts
. -
The
slash
proposal is now renamed topunish
.punish
can slash and/or jail. Ifportion > 0
, it will slash. Ifjailing_duration
is notnull
, it will jail.@@ -31,16 +31,26 @@ { "type": "object", "required": [ - "slash" + "punish" ], "properties": { - "slash": { + "punish": { "type": "object", "required": [ "member", "portion" ], "properties": { + "jailing_duration": { + "anyOf": [ + { + "$ref": "#/definitions/JailingDuration" + }, + { + "type": "null" + } + ] + }, "member": { "$ref": "#/definitions/Addr" }, @@ -61,6 +71,34 @@ "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" + }, + "Duration": { + "description": "Duration is an amount of time, measured in seconds", + "type": "integer", + "format": "uint64", + "minimum": 0.0 + }, + "JailingDuration": { + "oneOf": [ + { + "type": "string", + "enum": [ + "forever" + ] + }, + { + "type": "object", + "required": [ + "duration" + ], + "properties": { + "duration": { + "$ref": "#/definitions/Duration" + } + }, + "additionalProperties": false + } + ] } } }