The contracts can be divided into three layers:
src/core
contains the core logic of bridge, which supports arbitrary message passing between blockchains.src/lock_proxy
is layered on top ofsrc/core
to implement asset bridging protocol.src/wrapper
is layered on top ofsrc/lock_proxy
to deduct fees from users using the bridge.
- The initiating tx(ethereum -> aleo) will call
WrapperV1.lock
, which after deducting fees callsLockProxyV1.lock
, which after locking the asset callsBridgeLogic.send
. - The withdrawing tx(aleo -> ethereum) will call
BridgeLogic.receivePayload
, which after verifying signatures of keepers callsBridgeProxy.receivePayloadFromLogic
, which then callsLockProxyV1.onReceive
to finally withdraw the locked asset.
- BridgeProxy: 0xd73E1Accb6a22751FC0F6478c79bE83e9E544ac9
- BridgeData: 0x4afA839C8569220b80109634Ce2F2895e4c13943
- BridgeLogic: 0x654dDC5c45C59be6C2699DbCbAd0fA5Bd16F6eC0
- LockProxyV1: 0xd06Bcb4556f71cB3035891362A7e3d90e431551a
- WrapperV1: 0x26f8603fC1Da7D164c3fd353c816c3215Ef807a9