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

suggestion: transfer_from should take MessageInfo as an argument and work for native denominations #18

Open
0xekez opened this issue Sep 1, 2022 · 0 comments

Comments

@0xekez
Copy link

0xekez commented Sep 1, 2022

Feel free to close this if you think this is a silly idea. I think we can implement transfer_from for native tokens easily enough by having it take a MessageInfo struct and then doing may_pay on it and returning no messages to be executed.

It's a bit of a break from the normal interface of this package, but I think semantically those are the same thing. For example:

let maybe_message = asset.transfer_from("ekez", info)?;

If ekez is the sender and the funds are included in the funds field it feels to me that the cw20 and native versions are the same here.

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

1 participant