Skip to content
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

XVM: payable calls from Wasm to EVM #1033

Closed
PierreOssun opened this issue Sep 27, 2023 · 2 comments
Closed

XVM: payable calls from Wasm to EVM #1033

PierreOssun opened this issue Sep 27, 2023 · 2 comments
Labels
project Issue is part of an ongoing project XVM Related to XVM

Comments

@PierreOssun
Copy link
Member

When executing an XVM payable call from Wasm to EVM, the AccountId of the contract hold some balance but it's H160 mapping address do not (it do not exist), resulting in the call to fail.
That why there is this line in test.

Suggestion:Check in XVM CE that if value is >0 the contract should have his H160 unified (if not unify it). The first payable XVM call will slightly have more weight than the following ones

@ashutoshvarma ashutoshvarma added XVM Related to XVM project Issue is part of an ongoing project labels Sep 27, 2023
@ashutoshvarma
Copy link
Member

Even with AU enabled for user, wasm smart contract has no way to get his/her mapped evm address, that makes it impossible to approve/transfer assets on his behalf using XVM since we don't know what his/her evm address will be in order to construct the XVM call to ERC20 evm contract
Solution: Add a getter method in XVM CE & Precompile to fetch the mapped address from AU respectively.

@ashutoshvarma
Copy link
Member

@PierreOssun this is fixed right and can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project Issue is part of an ongoing project XVM Related to XVM
Projects
None yet
Development

No branches or pull requests

2 participants