b2network/b2-node

Describe the bridge contract process

Closed this issue · 1 comments

  1. describe bridge contract workflow

Image

  1. The user sends a btc transfer transaction to the b2-node locking address, such as 1btc
  2. The b2-node indexer-server service will retrieve the transaction and notify the committer-server
  3. Commiter-server will call the deposit method of the bridge contract on b2-zkevm-node to transfer the token to the user account address.
  4. When the user initiates a withdrawal operation, the withdraw method in the bridge contract will be called.
  5. 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.