Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 1.35 KB

File metadata and controls

28 lines (21 loc) · 1.35 KB

Proxy contract for Allbridge Core bridge

This project contains reference implementation of smart contracts that act as a proxy for Allbridge Core bridge smart contracts across multiple blockchains.

Key features

  • Supports swaps and bridge of stable tokens by forwarding requests to Allbridge Core bridge contract which handles the operation.
  • These contracts share the same interface as Allbridge Core bridge contracts, which means they can be used with existing tools designed for Allbridge Core like Allbridge Core SDK.
  • Can retain a portion of transferred amount as protocol fee.

How to Deploy

Follow the deployment instructions for the relevant blockchain:

SDK Integration

To use Allbridge Core SDK with custom bridge proxy, replace field bridgeAddress in source token info object with the address of the deployed proxy-contract.

const chainDetailsMap = await sdk.chainDetailsMap();
const sourceToken = chainDetailsMap[ChainSymbol.SRB]
  .tokens
  .find((t) => t.symbol == "USDC");
sourceToken.bridgeAddress = proxyAddress;

Reference Allbridge SDK documentation to learn more about using SDK to swap and bridge stable tokens.