Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(x/ecocredit)!: implement independent projects #2167

Open
wants to merge 120 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
89e7630
feat(x/ecocredit): independent project API
aaronc Jan 30, 2024
c54af2a
feat(x/ecocredit): independent project API
aaronc Jan 30, 2024
d98b364
fixes and proto-gen
aaronc Jan 30, 2024
78d71e1
updates
aaronc Jan 30, 2024
cf50830
add credit class to batch
aaronc Jan 30, 2024
0139192
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc Feb 6, 2024
4a7370e
update to multiple credit classes per project
aaronc Feb 6, 2024
f4146a3
updates
aaronc Feb 6, 2024
864c63b
add queries
aaronc Feb 6, 2024
7f0af0d
add queries
aaronc Feb 6, 2024
f6d3f93
add events
aaronc Feb 6, 2024
041af55
Update proto/regen/ecocredit/v1/tx.proto
aaronc Feb 7, 2024
ea41f12
Update proto/regen/ecocredit/v1/tx.proto
aaronc Feb 7, 2024
c3c15cd
address review comments
aaronc Feb 7, 2024
d13c13c
proto-gen
aaronc Feb 7, 2024
809c089
fix build errors
aaronc Feb 7, 2024
fe74b46
fix tests with msg stubs
aaronc Feb 7, 2024
1798de5
add msg_create_unregistered_project.feature
aaronc Feb 7, 2024
b571c1f
udpates
aaronc Feb 8, 2024
ad6b522
update design
aaronc Feb 8, 2024
a03d165
docs
aaronc Feb 8, 2024
4c81f78
fixes
aaronc Feb 8, 2024
89e986f
Merge branch 'aaronc/independent-projects' into aaronc/independent-pr…
aaronc Feb 12, 2024
222a6af
tests
aaronc Feb 12, 2024
d5feae9
tests
aaronc Feb 12, 2024
4921fbe
tests and validation
aaronc Feb 12, 2024
84ac1a4
add project creation fee
aaronc Feb 13, 2024
5faa1ae
Merge branch 'aaronc/independent-projects' into aaronc/independent-pr…
aaronc Feb 13, 2024
72f1d54
WIP
aaronc Feb 13, 2024
8e58525
WIP
aaronc Feb 13, 2024
fc61689
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc Feb 16, 2024
5450d06
proto updates
aaronc Feb 16, 2024
2e523c8
update logic
aaronc Feb 21, 2024
53fbaf6
add fee logic
aaronc Feb 21, 2024
5faccb5
refactoring
aaronc Feb 21, 2024
9bbe3eb
query logic, refactoring
aaronc Feb 21, 2024
7008513
refactoring
aaronc Feb 22, 2024
81ef202
refactoring, fixing tests
aaronc Feb 22, 2024
b2ad50c
WIP on fixing tests
aaronc Feb 26, 2024
0d98f57
better queries
aaronc Feb 26, 2024
8d0cbb4
bridge fix
aaronc Feb 26, 2024
33afc48
fix project state tests
aaronc Feb 26, 2024
bff1c32
remove over aggressive project and batch ID validation
aaronc Feb 26, 2024
fe45d70
test fixes
aaronc Feb 26, 2024
75616f9
test fixes
aaronc Feb 26, 2024
18c0c7f
WIP on bridge fixes
aaronc Feb 26, 2024
b29c249
ref id fixes
aaronc Feb 27, 2024
e7aa7be
refactor get credit type from batch
aaronc Feb 28, 2024
65a9758
remove reference_id from MsgCreateUnregisteredProject, WIP on fixing …
aaronc Mar 6, 2024
6fabbf7
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc Mar 18, 2024
ea8f17b
proto gen
aaronc Mar 18, 2024
fa5a465
proto gen
aaronc Mar 18, 2024
6e60592
Fix missing Batch.ClassKey
aaronc Mar 19, 2024
a5aa435
test fixes
aaronc Mar 19, 2024
0aabd0b
test fixes
aaronc Mar 19, 2024
84ba6f9
test fixes
aaronc Mar 19, 2024
8a18b1a
test fixes
aaronc Mar 19, 2024
1657932
test fixes
aaronc Mar 19, 2024
8d6299f
test fixes
aaronc Mar 19, 2024
c00ce61
test fixes
aaronc Mar 19, 2024
c952a45
test fixes
aaronc Mar 19, 2024
19c4aff
test fixes
aaronc Mar 19, 2024
e97f26f
all existing tests passing
aaronc Mar 19, 2024
7fdcf70
add gherkin stubs
aaronc Mar 19, 2024
8f0840d
add migration
aaronc Mar 19, 2024
b365045
register migration
aaronc Mar 19, 2024
6c837f6
create or update application tests
aaronc Mar 28, 2024
7b37ed0
create unregistered project tests
aaronc Mar 28, 2024
d089a80
WIP on update project enrollment tests
aaronc Mar 28, 2024
a135011
update project enrollment tests
aaronc Mar 28, 2024
7279a19
update project enrollment tests
aaronc Mar 28, 2024
17362c0
update project fee tests
aaronc Mar 28, 2024
454d7d4
add tests stubs
aaronc Mar 28, 2024
47507e1
WIP on validation tests
aaronc Mar 28, 2024
86a4180
MsgUpdateProjectFee validation tests
aaronc Mar 31, 2024
d047dd7
QueryProjectEnrollment test
aaronc Mar 31, 2024
cc428ad
QueryProjectEnrollments test
aaronc Mar 31, 2024
48a9dc7
MsgUpdateProjectEnrollment validation tests
aaronc Mar 31, 2024
cafe075
migration test
aaronc Mar 31, 2024
b3a7eb3
docs, fix sims/tests
aaronc Mar 31, 2024
497de7b
lint fix
aaronc Mar 31, 2024
38b631a
lint
aaronc Mar 31, 2024
4aff001
lint
aaronc Mar 31, 2024
a53fe68
lint
aaronc Mar 31, 2024
5d5249e
add CHANGELOG entries
aaronc Mar 31, 2024
ab7cc06
feat(x/ecocredit/v3/client): add/update independent project CLI commands
aaronc Apr 9, 2024
5724801
query commands
aaronc Apr 9, 2024
29f659b
Update x/ecocredit/base/types/v1/features/msg_add_credit_type.feature
aaronc May 2, 2024
f4fd66a
Update proto/regen/ecocredit/v1/query.proto
aaronc May 2, 2024
2b8e175
Merge branch 'aaronc/independent-projects-cli' into aaronc/independen…
aaronc May 2, 2024
d6e0b78
proto-gen
aaronc May 2, 2024
65f60c7
Merge branch 'main' into aaronc/independent-projects-impl
aaronc May 2, 2024
356a2ff
rename refactor
aaronc May 28, 2024
b0cfdb7
Update CHANGELOG.md
aaronc May 28, 2024
c262750
fix CHANGELOG.md
aaronc May 28, 2024
4336def
add test for project not accepted to credit class
aaronc May 28, 2024
7c6fdb2
add test for withdrawing an accepted enrollment and fix logic
aaronc May 28, 2024
728919f
Update x/ecocredit/base/keeper/features/msg_create_or_update_applicat…
aaronc Jun 11, 2024
9fdd3fc
add more tests for MsgUpdateProjectEnrollment state transitions
aaronc Jun 12, 2024
146ffb7
Update x/ecocredit/base/client/query.go
aaronc Jul 9, 2024
9c208b4
Update x/ecocredit/base/client/query.go
aaronc Jul 9, 2024
27700ae
Update x/ecocredit/base/client/tx.go
aaronc Jul 9, 2024
171c661
Update x/ecocredit/base/client/tx.go
aaronc Jul 9, 2024
5687db8
Update x/ecocredit/base/client/tx.go
aaronc Jul 9, 2024
92ceeec
Update x/ecocredit/base/client/tx.go
aaronc Jul 9, 2024
9f9f9cc
Update x/ecocredit/base/client/tx.go
aaronc Jul 9, 2024
3a5c295
Update x/ecocredit/client/tx.go
aaronc Jul 9, 2024
2de0250
wire up missing cmd's
aaronc Jul 9, 2024
d25eebf
fix example batch json
aaronc Jul 9, 2024
5146a89
improve error messages
aaronc Jul 9, 2024
fd96f71
allow MsgUpdateProjectEnrollment to use status UNSPECIFIED
aaronc Jul 10, 2024
c4b8c76
fix integration test
aaronc Jul 10, 2024
1216bbd
Remove classId from TestTxCreateProjectCmd
paul121 Jul 21, 2024
26b1f22
Update x/ecocredit/base/keeper/msg_create_project.go
aaronc Jul 21, 2024
f1968c5
Update proto/regen/ecocredit/v1/query.proto
aaronc Aug 20, 2024
dc4f235
Update proto/regen/ecocredit/v1/query.proto
aaronc Aug 20, 2024
75a7dfe
Update x/ecocredit/base/client/tx.go
aaronc Aug 20, 2024
8fd6b93
Update x/ecocredit/migrations/v5/state_test.go
aaronc Oct 9, 2024
27bca17
add additional grpc gateway binding
aaronc Oct 9, 2024
389ace5
Merge remote-tracking branch 'origin/aaronc/independent-projects-impl…
aaronc Oct 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

#### Added
- [#2107](https://github.com/regen-network/regen-ledger/pull/2107) Add `BurnRegen` method.
- [#2167](https://github.com/regen-network/regen-ledger/pull/2167) Add `CreateUnregisteredProject`, `CreateOrUpdateApplication`, `UpdateProjectEnrollment` and `UpdateProjectFee` methods and `ProjectEnrollment` and `ProjectEnrollments` queries. These additions allow:
- projects to be created without being already enrolled in a credit class
- projects to apply for one or more credit class and for project-credit class relationships to be dynamically managed on-chain

#### Changed
- [#2167](https://github.com/regen-network/regen-ledger/pull/2167):
- `FormatProjectID` just takes a sequence number and doesn't need a class ID.
- `FormatBatchDenom` requires a class ID because the class is no longer implied by the project ID.
- the credit type `P` is now reserved because this is the new project prefix
- project and batch string validation is now more lenient and just checks for a non-empty string
- `GetCreditTypeFromBatchDenom` was renamed to `GetCreditTypeFromBatch` and takes a `*Batch` parameter instead of a string.

#### Deprecated
- [#2167](https://github.com/regen-network/regen-ledger/pull/2167):
- `regen.ecocredit.v1.Project.class_key`
- `regen.ecocredit.v1.ProjectSequence`
- `regen.ecocredit.v1.ProjectInfo.class_id`

#### Removed
- [#2167](https://github.com/regen-network/regen-ledger/pull/2167): the `GetClassIDFromProjectID` and `GetProjectIDFromBatchDenom` have been removed and a state lookup must now be used to resolved these references.
-

## [v5.1.2](https://github.com/regen-network/regen-ledger/releases/tag/v5.1.2) - 2023-06-28

Expand Down
62 changes: 44 additions & 18 deletions api/regen/data/v1/query_grpc.pb.go

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

41 changes: 30 additions & 11 deletions api/regen/data/v1/tx_grpc.pb.go

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

Loading
Loading