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.Original token address on the source chain
Chain ID where the original token exists
Token name (e.g., “deBridge ETH”)
Token symbol (e.g., “deETH”)
Token decimals (should match original token)
Address of the newly deployed wrapped token
Token Structure
Each deployed token consists of:- DeBridgeToken Implementation: The actual token logic
- DeBridgeTokenProxy: Upgradeable proxy pointing to the implementation
- UpgradeableBeacon: Manages implementation upgrades
All wrapped tokens share the same implementation through a beacon proxy pattern, making upgrades efficient.
Integration Example
Deploy Wrapped Token
Security Features
- Access controlled deployment
- Deterministic token addresses
- Immutable source chain references
- Upgradeability through beacon pattern
Related Contracts
DeBridgeToken
ERC-20 implementation for wrapped tokens
DeBridgeGate
Main bridge contract that uses the deployer