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

Main contracts 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 methods 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 local addresses of the token contracts, which must be resolved by the BridgeHome contract on the opposite side of the bridge.

Proxy.sol

ProxyTypical Solidity proxy contract that enables future updates of the BridgeHome and BridgeForeign contracts.

BridgedToken.sol

The smart contract of eachany token wrapped by the bridge.

AbstractA contractsclassic ERC-20 implementation that does not perform any additional functions apart from minting and interfaces

burning

Bridge.sol

by

the owner. The mainowner contractis that implements most ofalways the bridge logic. This is an abstract contract from which the BridgeHome and BridgeForeign contracts inherit.contract.