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:

NameTypeDescription
_tokenAddressaddressAddress 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:

NameTypeDescription
_chainIduint256Current chain id.
_tokenAddressbytesAddress of the asset on the other chain.

getDebridgeId

function getDebridgeId(
    uint256 _chainId,
    address _tokenAddress
) public returns (bytes32)
Calculates asset identifier.

Parameters:

NameTypeDescription
_chainIduint256Current chain id.
_tokenAddressaddressAddress 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:

NameTypeDescription
toaddressrecipient of the transfer
valueuint256the amount to send

version

function version() external returns (uint256)
Get this contract’s version