deBridge
  • Introduction
  • The deBridge Messaging Protocol
    • Protocol Overview
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Development Guides
      • Building an EVM-based dApp
        • EVM smart contract interfaces
          • Interfaces
            • ICallProxy
            • IDeBridgeGate
            • IDeBridgeToken
            • IDeBridgeTokenDeployer
            • IOraclesManager
            • ISignatureVerifier
            • IWethGate
          • Libraries
            • Flags
          • Periphery
            • CallProxy
            • DeBridgeToken
            • DeBridgeTokenProxy
            • SimpleFeeProxy
          • Transfers
            • DeBridgeGate
            • DeBridgeTokenDeployer
            • OraclesManager
            • SignatureVerifier
            • WethGate
      • Sending cross-chain messages from Solana
        • On-Chain external call preparation for Solana
        • Off-chain external call preparation for Solana
      • Lifecycle of a cross-chain call
      • Gathering data for the claim
    • Development Tools
    • Security
    • Slashing and Delegated Staking
  • 🔁DLN: The deBridge Liquidity Network Protocol
    • Introduction
    • Protocol Overview
    • deBridge Hooks
    • Fees and Supported Chains
    • 🟢Deployed Contracts
    • Market and Limit Orders
    • Integration Guidelines
      • Interacting with the API
        • Authentication
        • Creating an Order
          • Quick Start
          • API Parameters
            • Estimation-Only
            • prependOperatingExpenses
          • API Response
            • JSON Example
          • Refreshing Estimates
        • Tracking Order Status
          • Order States
        • Integrating deBridge hooks
          • Creating Hook data for Solana
        • Submitting an Order Creation Transaction
        • Cancelling the Order
      • deBridge Widget
      • Interacting with smart contracts
        • Placing orders
        • Filling orders
      • Under the Hood
        • Reserve Assets
        • Bridging Reserve Assets
        • Bridging Non-Reserve Assets
        • Order Fulfillment
          • Detecting the Order
          • Fulfilling the Order
            • Pre-Fill-Swap
          • Claiming the Order
      • Affiliate fees
        • Withdrawing Affiliate Fees
      • Fees and operating expenses
    • Interacting with the deBridge App
      • Custom Linking
    • Protocol specs
      • Deterministic order ID
      • Hook data
        • Anatomy of a Hook for the EVM-based chains
        • Anatomy of a Hook for Solana
  • 💸dePort
    • Getting started
    • Transfers Flow
  • ⚡deBridge Points
    • Referrers Overview
    • Integrators Overview
  • 🌐deBridge IaaS
    • Getting started
  • 🌐Legal
    • SDK & API License Agreement
  • External Links
    • deBridge Use Cases
      • 💡Examples
    • Talks, Videos, and Articles
    • Website
    • Github
    • Twitter
    • Social channels
      • Discord
      • Facebook
      • LinkedIn
      • Medium
      • Telegram
      • YouTube
Powered by GitBook
On this page
  • Variables
  • MINTER_ROLE
  • PAUSER_ROLE
  • DOMAIN_SEPARATOR
  • PERMIT_TYPEHASH
  • nonces
  • _decimals
  • Functions
  • initialize
  • mint
  • burn
  • permit
  • decimals
  • pause
  • unpause
  • _beforeTokenTransfer

Was this helpful?

  1. The deBridge Messaging Protocol
  2. Development Guides
  3. Building an EVM-based dApp
  4. EVM smart contract interfaces
  5. Periphery

DeBridgeToken

PreviousCallProxyNextDeBridgeTokenProxy

Last updated 3 years ago

Was this helpful?

ERC20 token that is used as wrapped asset to represent the native token value on the other chains.

Variables

MINTER_ROLE

  bytes32 public constant MINTER_ROLE;

Minter role identifier

PAUSER_ROLE

  bytes32 public constant PAUSER_ROLE;

Pauser role identifier

DOMAIN_SEPARATOR

  bytes32 public DOMAIN_SEPARATOR;

Domain separator as described in

PERMIT_TYPEHASH

  bytes32 public constant PERMIT_TYPEHASH;

Typehash as described in . =keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

nonces

  mapping(address => uint256) public nonces;

Transfers counter

_decimals

  uint8 internal _decimals;

Asset's decimals

Functions

initialize

  function initialize(
            string name_,
            string symbol_,
            uint8 decimals_,
            address admin,
            address[] minters
  ) public

Constructor that initializes the most important configurations.

Parameters:

Name
Type
Description

name_

string

Asset's name.

symbol_

string

Asset's symbol.

decimals_

uint8

Asset's decimals.

admin

address

Address to set as asset's admin.

minters

address[]

The accounts allowed to int new tokens.

mint

  function mint(
            address _receiver,
            uint256 _amount
  ) external

Issues new tokens.

Parameters:

Name
Type
Description

_receiver

address

Token's receiver.

_amount

uint256

Amount to be minted.

burn

  function burn(
            uint256 _amount
  ) external

Destroys existing tokens.

Parameters:

Name
Type
Description

_amount

uint256

Amount to be burnt.

permit

  function permit(
            address _owner,
            address _spender,
            uint256 _value,
            uint256 _deadline,
            uint8 _v,
            bytes32 _r,
            bytes32 _s
  ) external

Approves the spender by signature.

Parameters:

Name
Type
Description

_owner

address

Token's owner.

_spender

address

Account to be approved.

_value

uint256

Amount to be approved.

_deadline

uint256

The permit valid until.

_v

uint8

Signature part.

_r

bytes32

Signature part.

_s

bytes32

Signature part.

decimals

  function decimals(
  ) public returns (uint8)

Asset's decimals

pause

  function pause(
  ) public

Pauses all token transfers. The caller must have the PAUSER_ROLE.

unpause

  function unpause(
  ) public

Unpauses all token transfers. The caller must have the PAUSER_ROLE.

_beforeTokenTransfer

  function _beforeTokenTransfer(
            address from,
            address to,
            uint256 amount
  ) internal
EIP-712
EIP-712