ODCinterfacesomnichain

IOmnichainProxy

Interface for the Omnichain Proxy contract.

NotEnoughFunds

error NotEnoughFunds(uint256 providedFunds, uint256 estimatedFee)

Error thrown when the provided funds are not enough for the estimated fee

IncorrectDataIndexImplementationAddress

error IncorrectDataIndexImplementationAddress(address dataIndexImpl)

Error thrown when the provided Data Index implementation address is invalid

CallerIsNotDataIndex

error CallerIsNotDataIndex(address dataIndexImpl, address msgSender)

Error thrown when caller is expected to be DataIndex implementation, but is not

MessageSent

event MessageSent(bytes32 guid)

Event emitted when a message is sent

OperationWithoutCallbackExecuted

event OperationWithoutCallbackExecuted(bytes32 guid, bytes result)

Event emitted when operation is executed and callback is not sent due to operation config

CallbackSent

event CallbackSent(bytes32 originalGuid, bytes32 callbackGuid)

Event emitted when a callback is sent

CallbackExecuted

event CallbackExecuted(bytes32 guid, address callbackReceiver)

Event emitted when a callback is executed

RefundSent

event RefundSent(bytes32 guid, address refundReceiver, uint256 amount)

Event emitted when a refund is sent

DataIndexImplementationSet

event DataIndexImplementationSet(address newDataIndexImpl)

Event emitted when the Data Index implementation is set

setDataIndexImplementation

function setDataIndexImplementation(address dataIndex) external

Set new Data Index implementation

implementation should support IERC165, IOmnichainData and IOmnichainGovernance interfaces

Parameters

NameTypeDescription
dataIndexaddressAddress of new Data Index implementation

queryIsDataPointAdmin

function queryIsDataPointAdmin(DataPoint dp, address account, uint128 destinationGasLimit, uint128 callbackGasLimit, address payable refundAddress) external payable returns (bytes32)

Query DataPoint Registry on the chain where DataPoint was generated and check if requested address is admin

Sender should implement IOmnichainCallbackReceiver to receive callback with query result

Parameters

NameTypeDescription
dpDataPointDataPoint to check
accountaddressAddress to check
destinationGasLimituint128Gas limit for the call on destination chain
callbackGasLimituint128Gas limit for result callback (on current chain)
refundAddressaddress payableAddress to send refund to

Return Values

NameTypeDescription
[0]bytes32ID of request (used for callback)

queryApproveDataManager

function queryApproveDataManager(DataPoint dp, OmnichainAddress dm, bool approve, OmnichainAddress sender, uint128 destinationGasLimit, address payable refundAddress) external payable returns (bytes32)

estimateApproveDataManager

function estimateApproveDataManager(DataPoint dp, OmnichainAddress dm, bool approve, OmnichainAddress sender, uint128 destinationGasLimit) external view returns (uint256)

queryDataObjectRead

function queryDataObjectRead(uint32 chainId, address dobj, DataPoint dp, bytes4 operation, bytes data, uint128 destinationGasLimit, uint128 callbackGasLimit, address payable refundAddress) external payable returns (bytes32)

Query DataObject.read() on another chain

Sender should implement IOmnichainCallbackReceiver to receive callback with query result

Parameters

NameTypeDescription
chainIduint32Chain to read from
dobjaddressAddress of DataObject
dpDataPointDataPoint to work with
operationbytes4Operation to execute
databytesData for the operation
destinationGasLimituint128Gas limit for the call on destination chain
callbackGasLimituint128Gas limit for result callback (on current chain)
refundAddressaddress payableAddress to send refund to

queryDataObjectWrite

function queryDataObjectWrite(uint32 chainId, address dobj, DataPoint dp, bytes4 operation, bytes data, uint128 destinationGasLimit, uint128 callbackGasLimit, address payable refundAddress) external payable returns (bytes32)

Query DataObject.write() on another chain

Sender should implement IOmnichainCallbackReceiver to receive callback with query result

Parameters

NameTypeDescription
chainIduint32Chain to write
dobjaddressAddress of DataObject
dpDataPointDataPoint to work with
operationbytes4Operation to execute
databytesData for the operation
destinationGasLimituint128Gas limit for the call on destination chain
callbackGasLimituint128Gas limit for result callback (on current chain)
refundAddressaddress payableAddress to send refund to

nextRequestId

function nextRequestId(uint32 chainId) external view returns (bytes32)

pause

function pause() external

Pause the contract

Only the owner can call this function

unpause

function unpause() external

Unpause the contract

Only the owner can call this function