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
  • debridgeGate
  • treasury
  • Functions
  • initialize
  • pause
  • unpause
  • setDebridgeGate
  • setTreasury
  • withdrawFee
  • withdrawNativeFee
  • receive
  • getbDebridgeId
  • getDebridgeId
  • getChainId
  • _safeTransferETH
  • version

Was this helpful?

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

SimpleFeeProxy

Helper to withdraw fees from DeBridgeGate and transfer them to a treasury.

Variables

debridgeGate

  contract IDeBridgeGate public debridgeGate;

DeBridgeGate address

treasury

  address public treasury;

Treasury address

Functions

initialize

  function initialize(
            contract IDeBridgeGate _debridgeGate,
            address _treasury
  ) public

pause

  function pause(
  ) external

unpause

  function unpause(
  ) external

setDebridgeGate

  function setDebridgeGate(
            contract IDeBridgeGate _debridgeGate
  ) external

setTreasury

  function setTreasury(
            address _treasury
  ) external

withdrawFee

  function withdrawFee(
            address _tokenAddress
  ) external

Transfer collected fees for a token to the treasury.

Parameters:

Name
Type
Description

_tokenAddress

address

Address of a deToken on a current chain.

withdrawNativeFee

  function withdrawNativeFee(
  ) external

Transfer collected fees for a native token to the treasury.

receive

  function receive(
  ) external

getbDebridgeId

  function getbDebridgeId(
            uint256 _chainId,
            bytes _tokenAddress
  ) public returns (bytes32)

Calculates asset identifier.

Parameters:

Name
Type
Description

_chainId

uint256

Current chain id.

_tokenAddress

bytes

Address of the asset on the other chain.

getDebridgeId

  function getDebridgeId(
            uint256 _chainId,
            address _tokenAddress
  ) public returns (bytes32)

Calculates asset identifier.

Parameters:

Name
Type
Description

_chainId

uint256

Current chain id.

_tokenAddress

address

Address of the asset on the other chain.

getChainId

  function getChainId(
  ) public returns (uint256 cid)

Get current chain id

_safeTransferETH

  function _safeTransferETH(
            address to,
            uint256 value
  ) internal

transfer ETH to an address, revert if it fails.

Parameters:

Name
Type
Description

to

address

recipient of the transfer

value

uint256

the amount to send

version

  function version(
  ) external returns (uint256)

Get this contract's version

PreviousDeBridgeTokenProxyNextTransfers

Last updated 3 years ago

Was this helpful?