Skip to content

POA-bridge-contracts 2.0.0

Compare
Choose a tag to compare
@akolotov akolotov released this 05 Oct 21:38
· 648 commits to master since this release
5d9f594

This version of POA bridge contracts supports bridging in two modes:

  • native coin to an bridgeable ERC20 token;
  • an ERC20 token to a bridgeable ERC20 token.

The Security Audit report: https://poanet.zendesk.com/hc/en-us/article_attachments/360013490473/POA-Network-Bridge-audit-report.pdf

These contracts does not work with Rust version of POA Bridge, the version based on NodeJS must be used.

The following changes were included:

  • The validator confirmations are collected on Home side of the bridge assuming that the Home bridge is the network with low gas price.
  • Unification of public bridge methods: the events UserRequestForSignature and UserRequestForAffirmation instead of Deposit and Withdraw, the methods executeSignatures and executeAffirmation instead of deposit and withdraw;
  • The bridgeable token could call onTokenFallback of the bridge contract automatically if transfer() is used to move tokens on the bridge contract address.
  • The token name, symbol and decimal for the bridgeable token must be specified through the configuration parameters.
  • Number of collected signatures recieved from the event CollectedSignatures as so the correct number of signatures will be collected even if the number of validators was changed.
  • getBridgeInterfacesVersion and getBridgeValidatorsInterfacesVersion could be used to get version of the bridge contracts.
  • getBridgeMode could be used to get the mode of the bridge.