Sam44323 / BSC-ETH-Bridge

A complete BSC-ETH bridge package from frontend, backend to the contracts
9 stars 9 forks source link

I want to bridge an existing token on bsc to ethereum #1

Closed zakimzf closed 2 years ago

zakimzf commented 2 years ago

I already have an existing bsc token i want to bridge it to ethereum how do I implement this..i dont want to create a new token ..just bridge an existing token.

Sam44323 commented 2 years ago

You can do that @zakimzf. You just need to control the supply of the tokens. Ig, you are aware of the facts of wrapped tokens, you can apply this very similar concept. In my case, I used different tokens because I wanted to test the following

Hope it helps 😁!

zakimzf commented 2 years ago

It just went over my head. Can you atleast refer a repo that I could study and figure out.Or if you have already done this please link your work. Thanks.

Sam44323 commented 2 years ago

In a nutshell, what you can do is you can deploy the same token contract to both BSC and ETH and you can do it very easily cause both are EVM compatible. Now, If you want the total supply to be 1mil, then you can have 500K for BSC and 500K for ETH and then you can do the bridging respectively @zakimzf . You can follow this code snippet for pancake swap for reference if you want

https://github.com/pancakeswap/pancake-swap-core/blob/master/contracts/PancakePair.sol