We’re using ERC20-to-ERC20 bridge and it works fine, at least while we are in development stage. We’re going to move our product (reward for surveys completing) to Production, and starting to think about any troubleshoots we might face in the future.
The main question is: What if we will need to redeploy the bridge from scratch?
(by any reason: issues, upgrade to new version of contacts, changing validator address, etc)
The problem here is that on every new redeployment it creates new token in Home net. Let’s imagine that users put their funds from Foreign network to our Private network and, actually, we want to keep the same ERC677 token as it was, to save users balances.
Is there any technically possiblity to redeploy all bridge contracts with existing token on Home side?
For example, transfer ownership of token from home bridge contract back to HOME_BRIDGE_OWNER, and then use this token again instead of newly deployed in deploy script. Will it work this way?
I predict that it would “forget” about total tokens amount transferred to Home net. Do they determine by balance of Foreign Bridge contact?
Is so, would it be possible to just put funds to new foreign bridge to make home–>foreign transfers possible with newly redeployed bridge?
And another recovery issue.
Let’s assume we lost private network that was totally funded from Foreign net. Would it be possible to unlock or return back all the tokens locked on Foreign Bridge contract?
You know there could be a lot of money, so we better have an access to them. Just in case, especially when they are not burned but just sit in bridge.
Any opinions are appreciated.
P.S. I know that validators / daily and tx limits are configurable, so it’s not required to redeploy the bridge to change them. However, I could not find scripts to do that.
Anyway, question is about emergency / recovery cases.