Skip to content

Commit

Permalink
feat(x/ecocredit): add retirement reason (#1625)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanchristo authored Nov 22, 2022
1 parent dccf079 commit 116e9fa
Show file tree
Hide file tree
Showing 48 changed files with 2,279 additions and 1,027 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1467](https://github.com/regen-network/regen-ledger/pull/1467) Add `BasketFee` state validation checks
- [#1484](https://github.com/regen-network/regen-ledger/pull/1484) Add `Msg/UpdateCurator`
- [#1623](https://github.com/regen-network/regen-ledger/pull/1623) Add `Msg/UpdateBatchMetadata`
- [#1625](https://github.com/regen-network/regen-ledger/pull/1625) Add `reason`/`retirement_reason`

#### Changed

Expand Down
217 changes: 148 additions & 69 deletions api/regen/ecocredit/basket/v1/tx.pulsar.go

Large diffs are not rendered by default.

252 changes: 166 additions & 86 deletions api/regen/ecocredit/marketplace/v1/tx.pulsar.go

Large diffs are not rendered by default.

205 changes: 141 additions & 64 deletions api/regen/ecocredit/v1/events.pulsar.go

Large diffs are not rendered by default.

838 changes: 498 additions & 340 deletions api/regen/ecocredit/v1/tx.pulsar.go

Large diffs are not rendered by default.

144 changes: 112 additions & 32 deletions api/regen/ecocredit/v1/types.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions proto/regen/ecocredit/basket/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@ message MsgTake {
//
// Since Revision 1
string retirement_jurisdiction = 6;

// retirement_reason is any arbitrary string that specifies the reason for
// retiring credits. The reason will be included in EventRetire and is not
// stored in state.
//
// Since Revision 2
string retirement_reason = 7;
}

// MsgTakeFromBasketResponse is the Msg/TakeFromBasket response type.
Expand Down
7 changes: 7 additions & 0 deletions proto/regen/ecocredit/marketplace/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,13 @@ message MsgBuyDirect {
// retirement_jurisdiction is the optional retirement jurisdiction for the
// credits which will be used only if disable_auto_retire is false.
string retirement_jurisdiction = 6;

// retirement_reason is any arbitrary string that specifies the reason for
// retiring credits. The reason will be included in EventRetire and is not
// stored in state.
//
// Since Revision 1
string retirement_reason = 7;
}
}

Expand Down
6 changes: 6 additions & 0 deletions proto/regen/ecocredit/v1/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ message EventRetire {
// fields conforming to ISO 3166-2, and postal-code being up to 64
// alphanumeric characters.
string jurisdiction = 4;

// reason is any arbitrary string that specifies the reason for retiring
// credits.
//
// Since Revision 1
string reason = 5;
}

// EventCancel is an event emitted when credits are cancelled. When credits are
Expand Down
13 changes: 13 additions & 0 deletions proto/regen/ecocredit/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,13 @@ message MsgSend {
// country-code is required, while the sub-national-code and postal-code are
// optional and can be added for increased precision.
string retirement_jurisdiction = 4;

// retirement_reason is any arbitrary string that specifies the reason for
// retiring credits. This field is only required if retired_amount is
// positive.
//
// Since Revision 1
string retirement_reason = 5;
}
}

Expand All @@ -416,6 +423,12 @@ message MsgRetire {
// sub-national-code and postal-code are optional and can be added for
// increased precision.
string jurisdiction = 3;

// reason is any arbitrary string that specifies the reason for retiring
// credits.
//
// Since Revision 1
string reason = 4;
}

// MsgRetire is the Msg/Retire response type.
Expand Down
7 changes: 7 additions & 0 deletions proto/regen/ecocredit/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ message BatchIssuance {
// sub-national-code and postal-code are optional and can be added for
// increased precision.
string retirement_jurisdiction = 4;

// retirement_reason is any arbitrary string that specifies the reason for
// retiring credits. The reason will be included in EventRetire and is not
// stored in state.
//
// Since Revision 1
string retirement_reason = 5;
}

// OriginTx is the transaction from another chain or registry that triggered
Expand Down
Loading

0 comments on commit 116e9fa

Please sign in to comment.