-
Notifications
You must be signed in to change notification settings - Fork 14
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
Change chain extensions to return transferable balance #483
Comments
@ebma Please fill in the details |
I updated the description @prayagd. |
Hey team! Please add your planning poker estimate with Zenhub @b-yap @bogdanS98 @ebma @gianfra-t @TorstenStueber |
Does this only apply to when the native asset (PEN) is part of Nabla @ebma ? |
No, it applies to all assets. |
I think it is actually good to implement this soon, now that Nabla will be live on Pendulum. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
Related to this ticket. Fixes to be made so that Nabla modals should show up as transferrable balance.
Our chain extension exposes functions conforming to the ERC-20 interface. In ERC-20, the only function to get the balance of an address is using the
balanceOf()
call. At the moment, we are returning the 'free' balance of a user, see here. However, thefree_balance
is not necessarily the transferable balance, as it does not take into account the locked or reserved tokens.See the relation of the
system::account()
query to the transferable amount.TODO
Change the
balance_of
function of the chain extension to return the transferable amount ie.free - reserved - frozen
.The text was updated successfully, but these errors were encountered: