Skip to main content

Bridge Token Manager

The Bridge Token Manager is used for issuing new tokens with a 1-to-1 connection between donor and Exoswap tokens, revoking deprecated tokens (or after a bridge update), and fetching information about local token representation.

Base functionality

The core and important logic for token issuing by manager

issue

function issue(
address[] calldata tokens,
RToken.IssueType[] calldata issueTypes,
uint256 targetChainId
) external;
  • Allows SAO to add a new token/s with it issue type (DEFAULT means donor and MINTABLE means syndicated);
  • Should be protected from malicious changes and used by SAO;
  • Specified target represent for what chain is doing for and should always connect with current chain;

revoke

function revoke(address targetAddr) external;
  • Allows SAO to remove an existing token/s from connection with current chain;
  • Should be used by SAO;

getLocal

function getLocal(address sourceAddr, uint256 targetChainId)
external
view
returns (RToken.Token memory token);
  • Allows to fetch info about local token by Bridge Router during enter/exit processes;
  • If token does not exist for local chain, will return info about this;
  • Should always return what issue type it has;
  • Should always return what chain id it represents;

isZero

function isZero(uint256 targetChainId) external view returns (bool);
  • Allows to check info about local native token if it exists by Bridge Router during enter/exit processes;
  • Should not return false and must be set originally;
  • Just a wrapper on getLocal;