-
Notifications
You must be signed in to change notification settings - Fork 77
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: OTC fees #863
Merged
feat: OTC fees #863
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f7a084e
initial implementation
Roznovjak 6c67790
add fee to events
Roznovjak afcdf13
ensure min amount with fee
Roznovjak ad49c16
formatting
Roznovjak 34f13fe
fix clippy
Roznovjak 5d2cad4
fix otc-settlements pallet and tests
Roznovjak 5468165
formatting
Roznovjak 5fe486d
bump crate versions
Roznovjak 7cf8c78
add comments
Roznovjak d19a97a
bump major version of OTC pallet
Roznovjak 6bbbd41
rebenchmark otc pallet
Roznovjak d2581ad
rebenchmark otc-settlements pallet
Roznovjak 842fae3
formatting
Roznovjak 41525a7
fix benchmarking test
Roznovjak f272edf
rerun CI
Roznovjak 4d60d7f
Merge branch 'master' into otc_fee
Roznovjak 66b3b30
bump runtime version
Roznovjak c8efdcc
rerun CI
Roznovjak 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
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.
why not to have the fee calculation inside the execute_order ? you would not need extra parameter and there would be only one place to calculate it.
i get you need to have the fee amount in the event, but the execute order can return the amount.
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.
Initially it was there, but I didn't like returning
fee
fromexecute_order()
. It doesn't make a lot of sense. But I can change itThere 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.
or you can move the deposit event into execute order as well.
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.
sounds good, thanks
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.
in the latest version, we need fee in some check prior calling execute_order, so I will leave it as it is