Search code examples
swapmultiversx

Create an ESDT swap on the MultiversX blockchain


I've planned to do a project on the MultiversX Blockchain with an ESDT token.

On the platform, users should swap EGLD to the ESDT, but I can't see any doc on this.

Does someone have an idea about this?


Solution

  • I think you can look over this sample contract:

    https://github.com/multiversx/mx-sdk-rs/blob/master/contracts/core/wegld-swap/src/wegld.rs

    This is what you need, maybe adapt the ratio (in the sample contract is 1:1).