'Create an ESDT swap on the Elrond project

I've planned to do a project on the Elrond 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 1:[1]

I think you can look over this sample contract:

https://github.com/ElrondNetwork/elrond-wasm-rs/tree/master/contracts/examples/egld-esdt-swap

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mircea