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

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 chains and assets and a set of 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 contains the standard bridge logic, but it does not contain a map of supported chains and assets. The only allowed opposite chain is BPX and 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

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

BridgedToken.sol

The smart contract of any token wrapped by the bridge. A classic ERC-20 implementation that does not perform any additional functions apart from minting and burning by the owner. The owner is always the bridge contract.