IDeBridgeGate
Functions
isSubmissionUsed
Returns whether the transfer with the submissionId was claimed. submissionId is generated in getSubmissionIdFrom
getNativeInfo
Returns native token info by wrapped token address
send
This method is used for the transfer of assets from the native chain. It locks an asset in the smart contract in the native chain and enables minting of deAsset on the secondary chain.
Parameters:
Name | Type | Description |
---|---|---|
| address | Asset identifier. |
| uint256 | Amount to be transferred (note: the fee can be applied). |
| uint256 | Chain id of the target chain. |
| bytes | Receiver address. |
| bytes | deadline + signature for approving the spender by signature. |
| bool | use assets fee for pay protocol fix (work only for specials token) |
| uint32 | Referral code |
| bytes | Auto params for external call in target network |
claim
Is used for transfers into the native chain to unlock the designated amount of asset from collateral and transfer it to the receiver.
Parameters:
Name | Type | Description |
---|---|---|
| bytes32 | Asset identifier. |
| uint256 | Amount of the transferred asset (note: the fee can be applied). |
| uint256 | Chain where submission was sent |
| address | Receiver address. |
| uint256 | Submission id. |
| bytes | Validators signatures to confirm |
| bytes | Auto params for external call |
flash
Get a flash loan, msg.sender must implement IFlashCallback
Parameters:
Name | Type | Description |
---|---|---|
| address | An asset to loan |
| address | Where funds should be sent |
| uint256 | Amount to loan |
| bytes | Data to pass to sender's flashCallback function |
getDefiAvaliableReserves
Get reserves of a token available to use in defi
Parameters:
Name | Type | Description |
---|---|---|
| address | Token address |
requestReserves
Request the assets to be used in DeFi protocol.
Parameters:
Name | Type | Description |
---|---|---|
| address | Asset address. |
| uint256 | Amount of tokens to request. |
returnReserves
Return the assets that were used in DeFi protocol.
Parameters:
Name | Type | Description |
---|---|---|
| address | Asset address. |
| uint256 | Amount of tokens to claim. |
withdrawFee
Withdraw collected fees to feeProxy
Parameters:
Name | Type | Description |
---|---|---|
| bytes32 | Asset identifier. |
getDebridgeChainAssetFixedFee
Returns asset fixed fee value for specified debridge and chainId.
Parameters:
Name | Type | Description |
---|---|---|
| bytes32 | Asset identifier. |
| uint256 | Chain id. |
Events
Sent
Emitted once the tokens are sent from the original(native) chain to the other chain; the transfer tokens are expected to be claimed by the users.
Claimed
Emitted once the tokens are transferred and withdrawn on a target chain
PairAdded
Emitted when new asset support is added.
MonitoringSendEvent
MonitoringClaimEvent
ChainSupportUpdated
Emitted when the asset is allowed/disallowed to be transferred to the chain.
ChainsSupportUpdated
Emitted when the supported chains are updated.
CallProxyUpdated
Emitted when the new call proxy is set.
AutoRequestExecuted
Emitted when the transfer request is executed.
Blocked
Emitted when a submission is blocked.
Unblocked
Emitted when a submission is unblocked.
Flash
Emitted when a flash loan is successfully returned.
WithdrawnFee
Emitted when fee is withdrawn.
FixedNativeFeeUpdated
Emitted when globalFixedNativeFee and globalTransferFeeBps are updated.
FixedNativeFeeAutoUpdated
Emitted when globalFixedNativeFee is updated by feeContractUpdater
Structs
TokenInfo
DebridgeInfo
DebridgeFeeInfo
ChainSupportInfo
DiscountInfo
SubmissionAutoParamsTo
SubmissionAutoParamsFrom
FeeParams
Last updated