Hii can anyone help me how I can make bridge smart contract between two networks
Apr 28, 2021, 4:34 AM
You can't make it with just a contract, since it can't interact with other networks. You need some backend components to communicate between the two networks - and that probably means centralized servers
in general, it's probably a lot harder project than you anticipate
Apr 28, 2021, 5:02 AM
Yeah but how should I start with contract , I read many blog so they say I need to make two contract for both network , so how should I start like any idea is appreciated
Apr 28, 2021, 5:02 AM
if the bridge should work both ways the same way, then those two contracts are basically identical. When someone sends it tokens, it locks them and sends an event. Your backend system monitors those events and calls the other contract. The other contract mints or unlocks tokens and sends to the correct recipient. And vice versa.
Apr 28, 2021, 5:04 AM
So basically what I need that I made two identical contract which will have functionality to lock and mint token
Apr 28, 2021, 5:05 AM
the basic idea is rather straightforward, but the difficult part is making this reliable (not even talking about trying to make it decentralized)
Apr 28, 2021, 5:05 AM
And one backend event handler to handle that events
Right @Lauri_P ?
Apr 28, 2021, 5:07 AM
right
Apr 28, 2021, 5:07 AM
And after that this right sir @Lauri_P ?
Apr 28, 2021, 5:08 AM
well, that's what I said..
Apr 28, 2021, 5:08 AM
Cool I get the idea
Thanks @Lauri_P ☺️
Thanks @Lauri_P ☺️
Apr 28, 2021, 5:09 AM
It really depends on your approach. One possible method is using SPV/light wallet to verify blocks and txs on the other blockchain. See BTCRelay and PeaceRelay for reference.
Apr 28, 2021, 5:19 AM
Ohhh okk sure I will look out
Thank you soo much ☺️
Thank you soo much ☺️
Apr 28, 2021, 5:20 AM
Another approach is by using an oracle, kind of centralised solution.
Apr 28, 2021, 5:20 AM
Oraclise smart contract right...
Apr 28, 2021, 5:21 AM
it's not possible by just using smartcontracts. It needed a server and validator with a script to make it possible.
Apr 28, 2021, 9:33 AM