Skip to main content

Interaction with deBridge Infrastructure

Interaction with the deBridge infrastructure is as simple as calling the send method of the debridgeGate smart contract deployed on all supported blockchains. The method can be called by any arbitrary address — either EOA or smart contracts.

Method Parameters

If you integrate with or build applications on top of the deBridge infrastructure, make sure you specify your referral code that can be generated by pressing the INVITE FRIENDS button at https://app.debridge.com/. Governance may thank you later for being an early builder.

AutoParams Structure

_autoParams allows passing arbitrary messages and call data to be executed as an external call to the receiver address on the destination chain. It also enables setting an executionFee, which rewards the wallet/keeper that completes the transaction. It enables a crypto-economic design where gas fees are paid from the blockchain where the transaction is initiated. The _autoParams field has the following structure:

Flags

Flags are a bitmask that customize transaction execution flow on the destination chain. You can combine multiple flags by setting respective bits to 1 simultaneously.

PROXY_WITH_SENDER flag should be used if the receiving smart contract must validate that the message sender is trusted. When set, the deBridge protocol stores submissionNativeSender and submissionChainIdFrom, allowing the recipient contract to verify the sender. External Call The receiving smart contract can retrieve the callProxy address from the debridgeGate smart contract. Use onlyControllingAddress modifier or inherit from BridgeAppBase.sol to implement this validation logic properly.