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 functionsmethods 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 addressaddresses of the token contract,contracts, which must be resolved by the BridgeHome contract whenon messagethe isopposite beingside processed.of the bridge.
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 abstractAbstract contracts and interfaces
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.