-
Notifications
You must be signed in to change notification settings - Fork 105
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(gtest): Improve value and ED managment #4111
Conversation
8958553
to
c5df457
Compare
c5df457
to
6d8115d
Compare
TODO:
|
Fixed all 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.
You need to rebase to master
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.
Excellent work ⭐
Love it how gtest
looks now.
There are some tiny correction has to be done. Also very important:
- actors and accounts storages must be cleaned when
System
is dropped (seedrop
impl for theSystem
) - I suggest removing
Program::mint_to
. ActuallySystem::transfer
is the most right way to mint balance to the program. Also I'd remove ED check from theExtManager::mint_to
, because 1) theAccount::increase
already does the op the proper way (if account exists then allows minting value lt ED), 2) the method would be used only for users, not programs (see 1). - In accordance to 2 need to add check that
id
is the user inSystem::mint_to
.
Co-authored-by: Sabaun Taraki <taraki.sabaun.rl@gmail.com>
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.
🔥
Release notes:
gtest
. Programs now spend gas during execution and charge ED upon creation.gtest
, adding separateAccounts
andActors
stores.Program::mint
method fromgtest
; users should now useSystem::transaction
to top up a program's balance.@reviewer-or-team