izar-bridge / eth-contracts

Ethereum contracts for izar bridge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

eth contracts for izar bridge

The contracts can be divided into three layers:

  1. src/core contains the core logic of bridge, which supports arbitrary message passing between blockchains.
  2. src/lock_proxy is layered on top of src/core to implement asset bridging protocol.
  3. src/wrapper is layered on top of src/lock_proxy to deduct fees from users using the bridge.

workflow

  1. The initiating tx(ethereum -> aleo) will call WrapperV1.lock, which after deducting fees calls LockProxyV1.lock, which after locking the asset calls BridgeLogic.send.
  2. The withdrawing tx(aleo -> ethereum) will call BridgeLogic.receivePayload, which after verifying signatures of keepers calls BridgeProxy.receivePayloadFromLogic, which then calls LockProxyV1.onReceive to finally withdraw the locked asset.

About

Ethereum contracts for izar bridge


Languages

Language:Solidity 99.1%Language:Shell 0.9%