Can I swap ERC-20 token with USDT or other stable coins directly by published an ERC-20 token contract

Once I used the ERC-20 token contract template to publish a token, is it possible to swap directly? :eyes:

Hi, welcome to the community! :wave:

swap directly? Do you mean in your publish token contract?
And if possible, you can share your code at there.

1 Like

Thanks!

this is how my Contract was generated:

Openzeppelin Contract Wizard

you need to provide liquidiy to be able to swap any tokens.

1 Like

I do not find a function to swap in your code. So just like Team_X said, maybe you can provide liquidity in a DEX, like Uniswap, then users can swap, or you can add a function to swap in your original token contract.

1 Like

Good answer!

Thanks a lot!

1 Like