-
Notifications
You must be signed in to change notification settings - Fork 103
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/marketplace): implement buyer and seller fees #2154
Merged
Merged
Changes from 19 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
fa1208b
feat(x/ecocredit/marketplace): add marketplace fee API
aaronc 3624c5d
docs
aaronc 8e09e86
cleanup
aaronc d0bfd3e
proto-gen
aaronc 00563af
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc c589b42
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc 6459263
feat(x/ecocredit/marketplace): implement buyer and seller fees
aaronc d22fe85
validate basic
aaronc f82c581
add go-mod-tidy-all
aaronc 0835631
WIP
aaronc c5b3f41
make existing tests pass
aaronc 32d7bf1
failing test
aaronc 64b093c
tests
aaronc 494163f
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc aa7084d
fix tests
aaronc 9e27574
fee params tests
aaronc 77cfe06
set fee params validation tests
aaronc 41b76f5
add failing max_fee_amount tests
aaronc dae82fa
tests passing
aaronc 3ee7ed5
tests
aaronc c2a362e
lint
aaronc 478f3e4
refactor max fee amount to coin
aaronc 5ade325
Merge branch 'main' of github.com:regen-network/regen-ledger into aar…
aaronc c4a1c81
proto gen
aaronc b1a7ad2
add seller and buyer fee data to EventBuyDirect
aaronc 7af0973
make max fee amount required
aaronc 3376e76
add marketplace fee pool account
aaronc bd95846
fix tests
aaronc caa606c
add MsgGovSendFromFeePool
aaronc 7442fe2
fix coins
aaronc dbf4e14
proto lint
aaronc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is an event emitted when fees are burned? I see above there are scenarios to test that specific events are emitted. Maybe that isn't needed here since it would not be an event type provided by marketplace submodule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can emit the burn event here. Don't have a strong preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like a burn event should be emitted but it just isn't clear to me if that is already happening. Does the bank keeper do that for us? If so, then maybe we don't need to include in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The bank keeper does include burn events, but since
MsgBuyDirect
now also includes the fees paid and we can assume that if the denom isuregen
that it was a burn, is it okay if we just leave it at that and not add another event?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the pros and cons of adding a specific event here? seems like for users, it is useful to have a specific event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if there's really a pro to adding it. The con is that it just adds duplicitous events which takes up extra storage. The bank keeper and marketplace module already emit events containing the relevant data, so I think we should leave it as is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I might have created some confusion here. I just wanted to make sure that a burn event does exist. I agree we do not need a duplicate event. This would all be very clear if the test scenario included checking that the burn event is emitted but no worries if this is non-trivial to add.