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

Add address asset and uint256 amount in the MessageContext on connected chain #426

Open
lumtis opened this issue Nov 8, 2024 · 1 comment

Comments

@lumtis
Copy link
Member

lumtis commented Nov 8, 2024

The onCall hook on connected chains has the following object:

struct MessageContext {
    address sender;
}

Amount passed of Ether can be obtained with msg.value but for ERC20 there is no such information, unless it is added manually in the message, but this is an overhead for the developers that shouldn't be necessary
We should add information such as amount and asset to the context:

struct MessageContext {
    address sender;
    address asset;
    uint256 amount;
}
@fadeev
Copy link
Member

fadeev commented Nov 21, 2024

This is very important! It's possible to add amount to the message, but I don't know if it possible to add the asset address, I don't think there is a mapping on ZetaChain where you can get underlying asset address from ZRC-20.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants