Documentation Index
Fetch the complete documentation index at: https://docs.debridge.com/llms.txt
Use this file to discover all available pages before exploring further.
Helper to withdraw fees from DeBridgeGate and transfer them to a treasury.
Variables
debridgeGate
contract IDeBridgeGate public debridgeGate;
DeBridgeGate address
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