Skip to main content

Smart contracts

All BPX Bridge smart contracts are open source and available in the public GitHub repository:
https://github.com/bpx-chain/bridge-contracts

Bridge.sol

The main contract that implements most of the bridge logic. This is an abstract contract from which the BridgeHome and BridgeForeignMain contracts inherit.

deployed

directly

BridgeHome.sol

This contract is deployed only on the BPX chain. In addition to the standard bridge logic, it contains a map of all supported assets and functions that resolve the local token contract address to the remote one and vice versa.

BridgeForeign.sol

This contract is deployed on all chains except BPX. It does not contain a map of supported assets, in all generated messages it includes the local address of the token contract, which must be resolved by the BridgeHome contract when message is being processed.

Proxy.sol

Proxy contract that enables future updates of BridgeHome and BridgeForeign contracts.

BridgedToken.sol

The smart contract of each token wrapped by the bridge.

Utilities abstract contracts

Bridge.sol

The main contract that implements most of the bridge logic. This is an abstract contract from which the BridgeHome and BridgeForeign contracts inherit.