Buy tokens 1 with tokens 2?

Hi. I have two tokens, created with “@openzeppelin/contracts”: “^4.0.0”.
Then I give to user 100 tokens2.
How user can buy tokens1 with tokens2.

1 Like

Hi, welcome!

The easiest way is that you can add liquidity on the uniswap, such as 100 token1 + 100 token2, so now users can by tokens1 with tokens2.
Or you can write your own exchange contract to do the same thing.

1 Like

@Skyge Sorry. I mean smth another.

I need a user app(I think with web3) to send token 2 and mint token 1 to the user.

Can you help me with an example?

Sorry, I am not familiar with the front-end, maybe you can paste at here: Latest developer-wanted topics

1 Like