-
Notifications
You must be signed in to change notification settings - Fork 523
Replace Balances.PutWithCreatable()
#2638
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
Replace Balances.PutWithCreatable()
#2638
Conversation
|
What it the rationale of replacing one function with another? Why not |
|
With indexer needs, there will be five scenarios:
Rather than blow up the interface of I don't understand your suggestion though. What would |
Codecov Report
@@ Coverage Diff @@
## master #2638 +/- ##
==========================================
- Coverage 47.00% 46.97% -0.03%
==========================================
Files 348 348
Lines 55717 55712 -5
==========================================
- Hits 26188 26170 -18
- Misses 26588 26595 +7
- Partials 2941 2947 +6
Continue to review full report at Codecov.
|
Same as |
|
This kind of switching seems error-prone. Also what do I do with opting in/out? Another parameter global/local in |
|
Currently there is no need for local/global (well, it is in my branch and I went with An alternative to replacing |
|
Please consider the following alternative: use Allocate(addr basics.Address, cidx basics.CreatableIndex, ctype basics.CreatableType, data CreatableOptions) error
Deallocate(addr basics.Address, cidx basics.CreatableIndex, ctype basics.CreatableType, data CreatableOptions) error
|
Balances.PutWithCreatable()
|
@algorandskiy, thanks for the feedback! I've made the changes we discussed today. |
algorandskiy
left a comment
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.
One small comment remark
|
This follows the direction of unifying assets and apps (both param and states), so it is a good change. |
|
Thanks for review, Pavel! Can somebody merge? |
sure. I was waiting to ensure you and Pavel completed your discussion.. |
|
Thanks! |
Summary
Delete
Balances.PutWithCreatable()and add new functions that notify the COW that a creatable was created or deleted. Coming up next is similar two functions for asset/application local state, needed by indexer.