b2network / b2-node

Ethermint is a Cosmos SDK library for running scalable and interoperable EVM chains
https://docs.evmos.org/
GNU Lesser General Public License v3.0
3 stars 7 forks source link

Describe the bridge contract process #69

Closed robertcc0410 closed 9 months ago

robertcc0410 commented 9 months ago
  1. describe bridge contract workflow
robertcc0410 commented 9 months ago

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.