DeBridgeTokenDeployer

Deploys a deToken(DeBridgeTokenProxy) for an asset.

Variables

tokenImplementation

  address public tokenImplementation;

Address of deBridgeToken implementation

deBridgeTokenAdmin

  address public deBridgeTokenAdmin;

An addres to set as admin for any deployed deBridgeToken

debridgeAddress

  address public debridgeAddress;

Debridge gate address

getDeployedAssetAddress

  mapping(bytes32 => address) public getDeployedAssetAddress;

Maps debridge id to deBridgeToken address

overridedTokens

  mapping(bytes32 => struct DeBridgeTokenDeployer.OverridedTokenInfo) public overridedTokens;

Maps debridge id to overridden token info (name, symbol). Used when autogenerated values for a token are not ideal.

Functions

initialize

  function initialize(
            address _tokenImplementation,
            address _deBridgeTokenAdmin,
            address _debridgeAddress
  ) public

Constructor that initializes the most important configurations.

Parameters:

Name
Type
Description

_tokenImplementation

address

Address of deBridgeToken implementation

_deBridgeTokenAdmin

address

Address to set as admin for any deployed deBridgeToken

_debridgeAddress

address

DeBridge gate address

deployAsset

  function deployAsset(
            bytes32 _debridgeId,
            string _name,
            string _symbol,
            uint8 _decimals
  ) external returns (address deBridgeTokenAddress)

Deploy a deToken for an asset

Parameters:

Name
Type
Description

_debridgeId

bytes32

Asset identifier

_name

string

Asset name

_symbol

string

Asset symbol

_decimals

uint8

Asset decimals

implementation

  function implementation(
  ) public returns (address)

Beacon getter for the deBridgeToken contracts

setTokenImplementation

  function setTokenImplementation(
            address _impl
  ) external

Set deBridgeToken implementation contract address

Parameters:

Name
Type
Description

_impl

address

Wrapped asset implementation contract address.

setDeBridgeTokenAdmin

  function setDeBridgeTokenAdmin(
            address _deBridgeTokenAdmin
  ) external

Set admin for any deployed deBridgeToken.

Parameters:

Name
Type
Description

_deBridgeTokenAdmin

address

Admin address.

setDebridgeAddress

  function setDebridgeAddress(
            address _debridgeAddress
  ) external

Sets core debridge contract address.

Parameters:

Name
Type
Description

_debridgeAddress

address

Debridge address.

setOverridedTokenInfo

  function setOverridedTokenInfo(
            bytes32[] _debridgeIds,
            struct DeBridgeTokenDeployer.OverridedTokenInfo[] _tokens
  ) external

Override specific tokens name/symbol

Parameters:

Name
Type
Description

_debridgeIds

bytes32[]

Array of debridgeIds for tokens

_tokens

struct DeBridgeTokenDeployer.OverridedTokenInfo[]

Array of new name/symbols for tokens

version

  function version(
  ) external returns (uint256)

Get this contract's version

Structs

OverridedTokenInfo

struct OverridedTokenInfo {
    bool accept;
    string name;
    string symbol;
}

Last updated