charge storage fee to support non native asset#2045
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2045 +/- ##
==========================================
- Coverage 86.45% 0 -86.46%
==========================================
Files 99 0 -99
Lines 21240 0 -21240
==========================================
- Hits 18362 0 -18362
+ Misses 2878 0 -2878 Continue to review full report at Codecov.
|
Member
|
It is ok if Metamask can't handle it as that's basically the same behaviour of Ethereum. This however will be useful for polkadot.js extension user or dApp using EIP712 signature format. |
xlc
reviewed
Apr 28, 2022
xlc
reviewed
May 3, 2022
xlc
reviewed
May 7, 2022
xlc
previously approved these changes
May 9, 2022
ermalkaleci
reviewed
May 9, 2022
ermalkaleci
reviewed
May 9, 2022
xlc
previously approved these changes
May 16, 2022
xlc
approved these changes
May 16, 2022
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes: #2039
change evm reserve_storage from
T::Currency::reserve_named()toT::ChargeTransactionPayment::reserve_fee(), and we can add our own fee strategy in transaction payment module'sreserve_fee(). That is,reserve_feenow can support none native token.Acala/modules/evm/src/lib.rs
Line 1609 in 7c16cec
we do not need to change
unreserve_storageandcharge_storagein evm, becausereserve_storagehappend before those two operation. That is,unreserve_storageandcharge_storagealways have native token.If we have this feature, I think

bodhi.jsMetamask needs support this too, currently if an eth account not bind to substrate account, it have enough none-native token, but not enough native token, the transfer can't proceed