Describe the bridge contract process
Closed this issue · 1 comments
robertcc0410 commented
- describe bridge contract workflow
robertcc0410 commented
- The user sends a btc transfer transaction to the b2-node locking address, such as 1btc
- The b2-node indexer-server service will retrieve the transaction and notify the committer-server
- Commiter-server will call the deposit method of the bridge contract on b2-zkevm-node to transfer the token to the user account address.
- When the user initiates a withdrawal operation, the withdraw method in the bridge contract will be called.
- When the listener-server listens to the withdraw event, it will unlock the btc in the locked address and return the corresponding amount of btc to the user.