Converting token for payment in the background #3254
DorianDaSilva
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the NFT Marketplace section of the course, Patrick suggests a challenge where we should write a code block allowing to convert any
ERC20 token
intoETH
in the background as method of payment.But I am not sure to understand how to do it.
How can I do the following:
1- Create a list of supported token for payment on the network
2- Automatically convert payments received in the supported token into ETH or any token I want (let's say a custom
token X
)3- Complete the transaction using ETH or token X deposited
This is what it would look like:
User issues payment in supported token => supported token is then converted into payment token (ETH or token X) => NFT is purchased using ETH or token X converted => complete transaction
Any ideas on how to do this or suggestion of resources I can read/watch that will help me write this function?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions