Skip to main content

Overview

The DeBridgeTokenDeployer contract is responsible for deploying wrapped tokens (deTokens) that represent assets from other chains. It creates ERC-20 compliant tokens with proxy patterns for upgradeability. Contract Location: contracts/transfers/DeBridgeTokenDeployer.sol

Key Responsibilities

  • Deploy new wrapped tokens for cross-chain assets
  • Manage token implementations and proxies
  • Maintain registry of deployed tokens
  • Handle token metadata (name, symbol, decimals)

Main Functions

deployNewToken

Deploys a new wrapped token for an asset from another chain.
function deployNewToken(
    address _originAddress,
    uint256 _originChainId,
    string memory _name,
    string memory _symbol,
    uint8 _decimals
) external returns (address)
_originAddress
address
required
Original token address on the source chain
_originChainId
uint256
required
Chain ID where the original token exists
_name
string
required
Token name (e.g., “deBridge ETH”)
_symbol
string
required
Token symbol (e.g., “deETH”)
_decimals
uint8
required
Token decimals (should match original token)
tokenAddress
address
Address of the newly deployed wrapped token

Token Structure

Each deployed token consists of:
  1. DeBridgeToken Implementation: The actual token logic
  2. DeBridgeTokenProxy: Upgradeable proxy pointing to the implementation
  3. UpgradeableBeacon: Manages implementation upgrades
All wrapped tokens share the same implementation through a beacon proxy pattern, making upgrades efficient.

Integration Example

Deploy Wrapped Token
// Called by DeBridgeGate when a new asset is registered
address wrappedToken = deployer.deployNewToken(
    0x1234...,              // Original USDC address on Ethereum
    1,                      // Ethereum chain ID
    "deBridge USDC",       // Name
    "deUSDC",              // Symbol
    6                       // Decimals
);

Security Features

Only the DeBridgeGate contract can deploy new tokens. This prevents unauthorized token creation.
  • Access controlled deployment
  • Deterministic token addresses
  • Immutable source chain references
  • Upgradeability through beacon pattern

DeBridgeToken

ERC-20 implementation for wrapped tokens

DeBridgeGate

Main bridge contract that uses the deployer

Build docs developers (and LLMs) love