Variables
BPS_DENOMINATOR
GOVMONITORING_ROLE
SUBMISSION_PREFIX
submissionId
DEPLOY_PREFIX
deployId
deBridgeTokenDeployer
IDeBridgeTokenDeployer
contract
signatureVerifier
excessConfirmations
SignatureVerifier.minConfirmations
flashFeeBps
nonce
getDebridge
getDebridgeId
) => bridge-specific information.
getDebridgeFeeInfo
getDebridgeId
) => fee information
isSubmissionUsed
submissionId
was claimed.
isBlockedSubmission
submissionId
is blocked.
getAmountThreshold
debridgeId
(see getDebridgeId
) to threshold amount after which Math.max(excessConfirmations,SignatureVerifier.minConfirmations)
is used instead
of SignatureVerifier.minConfirmations
getChainToConfig
getChainFromConfig
feeDiscount
getNativeInfo
defiController
feeProxy
callProxy
weth
feeContractUpdater
globalFixedNativeFee
globalFixedNativeFee
globalTransferFeeBps
wethGate
lockedClaim
Functions
initialize
Parameters:
Name | Type | Description |
---|---|---|
_excessConfirmations | uint8 | Minimal required confirmations in case of too many confirmations |
_weth | contract IWETH | Wrapped native token contract |
send
Name | Type | Description |
---|---|---|
_tokenAddress | address | Asset identifier. |
_amount | uint256 | Amount to be transferred (note: the fee can be applied). |
_chainIdTo | uint256 | Chain id of the target chain. |
_receiver | bytes | Receiver address. |
_permit | bytes | deadline + signature for approving the spender by signature. |
_useAssetFee | bool | use assets fee for pay protocol fix (work only for specials token) |
_referralCode | uint32 | Referral code |
_autoParams | bytes | Auto params for external call in target network |
claim
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_amount | uint256 | Amount of the transferred asset (note: the fee can be applied). |
_chainIdFrom | uint256 | Chain where submission was sent |
_receiver | address | Receiver address. |
_nonce | uint256 | Submission id. |
_signatures | bytes | Validators signatures to confirm |
_autoParams | bytes | Auto params for external call |
flash
Name | Type | Description |
---|---|---|
_tokenAddress | address | An asset to loan |
_receiver | address | Where funds should be sent |
_amount | uint256 | Amount to loan |
_data | bytes | Data to pass to sender’s flashCallback function |
deployNewAsset
Name | Type | Description |
---|---|---|
_nativeTokenAddress | bytes | A token address on a native chain |
_nativeChainId | uint256 | The token native chain’s id |
_name | string | The token’s name |
_symbol | string | The token’s symbol |
_decimals | uint8 | The token’s decimals |
_signatures | bytes | Validators’ signatures |
autoUpdateFixedNativeFee
Name | Type | Description |
---|---|---|
_globalFixedNativeFee | uint256 | new value |
updateChainSupport
Name | Type | Description |
---|---|---|
_chainIds | uint256[] | Chain identifiers. |
_chainSupportInfo | struct IDeBridgeGate.ChainSupportInfo[] | Chain support info. |
_isChainFrom | bool | is true for editing getChainFromConfig. |
updateGlobalFee
Name | Type | Description |
---|---|---|
_globalFixedNativeFee | uint256 | Fallback fixed fee in native asset, used if a chain fixed fee is set to 0 |
_globalTransferFeeBps | uint16 | Fallback transfer fee in BPS, used if a chain transfer fee is set to 0 |
updateAssetFixedFees
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_supportedChainIds | uint256[] | Chain identifiers. |
_assetFeesInfo | uint256[] | Chain support info. |
updateExcessConfirmations
SignatureVerifier.minConfirmations
to have an effect.
Parameters:
Name | Type | Description |
---|---|---|
_excessConfirmations | uint8 | Minimal amount of required signatures |
setChainSupport
Name | Type | Description |
---|---|---|
_chainId | uint256 | Chain id where tokens are sent. |
_isSupported | bool | Whether the token is transferable to other chain. |
_isChainFrom | bool | Is true for editing getChainFromConfig. |
setCallProxy
Name | Type | Description |
---|---|---|
_callProxy | address | Address of the proxy that executes calls. |
updateAsset
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_maxAmount | uint256 | Maximum amount of current chain token to be wrapped. |
_minReservesBps | uint16 | Minimal reserve ratio in BPS. |
_amountThreshold | uint256 | Threshold amount after which Math.max(excessConfirmations,SignatureVerifier.minConfirmations) is used instead of SignatureVerifier.minConfirmations |
setSignatureVerifier
Name | Type | Description |
---|---|---|
_verifier | address | Signature verifier address. |
setDeBridgeTokenDeployer
Name | Type | Description |
---|---|---|
_deBridgeTokenDeployer | address | Asset deployer address. |
setDefiController
Name | Type | Description |
---|---|---|
_defiController | address | Defi controller address. |
setFeeContractUpdater
Name | Type | Description |
---|---|---|
_value | address | New contract address. |
setWethGate
Name | Type | Description |
---|---|---|
_wethGate | contract IWethGate | Address of new wethGate contract. |
pause
unpause
withdrawFee
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
requestReserves
Name | Type | Description |
---|---|---|
_tokenAddress | address | Asset address. |
_amount | uint256 | Amount to request. |
returnReserves
Name | Type | Description |
---|---|---|
_tokenAddress | address | Asset address. |
_amount | uint256 | Amount of tokens to claim. |
setFeeProxy
Name | Type | Description |
---|---|---|
_feeProxy | address | Fee proxy address. |
blockSubmission
Name | Type | Description |
---|---|---|
_submissionIds | bytes32[] | IDs of submissions to modify. |
isBlocked | bool | True to block, false to unblock. |
updateFlashFee
Name | Type | Description |
---|---|---|
_flashFeeBps | uint256 | New fee in BPS. |
updateFeeDiscount
Name | Type | Description |
---|---|---|
_address | address | Customer address. |
_discountFixBps | uint16 | Fix discount in BPS. |
_discountTransferBps | uint16 | Transfer % discount in BPS. |
receive
_checkConfirmations
_addAsset
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_tokenAddress | address | Address of the asset on this chain. |
_nativeAddress | bytes | Address of asset on native chain. |
_nativeChainId | uint256 | Native chain ID. |
_send
Name | Type | Description |
---|---|---|
_amount | bytes | Amount to be transferred (fee can be applied). |
_chainIdTo | address | Target chain ID. |
_permit | uint256 | Deadline + signature for permit. |
_publishSubmission
_applyDiscount
_validateToken
_claim
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_receiver | bytes32 | Receiver address. |
_amount | address | Amount of the transferred asset (note: fee can be applied). |
_mintOrTransfer
_safeTransferETH
_withdrawWeth
_normalizeTokenAmount
getDefiAvaliableReserves
Name | Type | Description |
---|---|---|
_tokenAddress | address | Token address. |
getDebridgeId
Name | Type | Description |
---|---|---|
_chainId | uint256 | Current chain id. |
_tokenAddress | address | Address of the asset on other chain. |
getbDebridgeId
Name | Type | Description |
---|---|---|
_chainId | uint256 | Current chain id. |
_tokenAddress | bytes | Address of the asset on other chain. |
getDebridgeChainAssetFixedFee
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_chainId | uint256 | Chain id. |
getSubmissionIdFrom
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Asset identifier. |
_chainIdFrom | uint256 | Chain identifier of the chain where tokens are sent from. |
_amount | uint256 | Amount of the transferred asset (note: the fee can be applied). |
_receiver | address | Receiver address. |
_nonce | uint256 | Submission id. |
_autoParams | struct IDeBridgeGate.SubmissionAutoParamsFrom | Auto params for external call. |
_hasAutoParams | bool | True if auto params are provided. |
_sender | address | Address that will call claim. |
getDeployId
Name | Type | Description |
---|---|---|
_debridgeId | bytes32 | Id of an asset, see getDebridgeId. |
_name | string | Asset’s name. |
_symbol | string | Asset’s symbol. |
_decimals | uint8 | Asset’s decimals. |