web3p/web3.php

PancakeSwap

Razorholt opened this issue · 1 comments

Is there an example somewhere showing how to interact with pancakeswap? I would like to offer a way to swap directly from my website.

Thank you so much!

Of course, I just found the link, after posting... Sorry about that!
That's the link: https://github.com/web3p/examples/blob/master/swap_tokens.php

A few questions:

  1. I just have to replace $testaccount with the customer wallet?
  2. What are the 2 addresses listed in $path? USDC and DAI? So I just need to update $path with the base currency (first address) and then the token (second address)?

Thanks a lot!