AccessManagerOmnichainFacet
Facet to manage access of Omnichain Data Managers to DataObjects
approveOmnichainDataManager
Approves a DataManager for a DataPoint allocated on another chain
Caller SHOULD send native coin with this call to pay omnichain fees
Refund will be sent to the caller, so if it's a contract it should have receive()
function
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint |
dm | address | DataManager |
approved | bool | approve (true) or remove approval (false) |
approveOmnichainDataManager
Approves a DataManager for a DataPoint allocated on another chain
Function SHOULD be restricted to DataPoint maintainer only
Caller SHOULD send native coin with this call to pay omnichain fees
Refund will be sent to the caller, so if it's a contract it should have receive()
function
NOTE: Here we support:
- Local DataPoint & local DataManager (send zero msg.value)
- Local DataPoint & remote DataManager
- Remote DataPoint & local DataManager
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint |
dm | OmnichainAddress | DataManager, can be on another chain |
approved | bool | approve (true) or remove approval (false) |
approveOmnichainDataManagers
Approves a list of DataManagers in different chains
Caller SHOULD send native coin with this call to pay omnichain fees
Amount can be calculated with estimateApproveOmnichainDataManagers()
NOTE: We only support local DataPoints here, DataManager can be both remote and local
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint (Should be allocated on current chain!) |
dms | OmnichainAddress[] | List of DataManagers to approve |
approved | bool | approve (true) or remove approval (false), this value will be applied to all DataManagers |
refundAddress | address payable | who will receive refund, if any |
estimateApproveOmnichainDataManagers
Calculates native coin fee required to call approveOmnichainDataManagers()
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | DataPoint (Should be allocated on current chain!) |
dms | OmnichainAddress[] | List of DataManagers to approve |
approved | bool | approve (true) or remove approval (false), this value will be applied to all DataManagers |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | native coin fee, which should be sent as msg.value |
approvedDataManager
Verifies if DataManager is allowed to write in specific DataPoint
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | Identifier of the DataPoint |
dm | OmnichainAddress | DataManager, can be on another chain |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | if write access is allowed |
approveDataManager
Defines if DataManager is allowed to write in specific DataPoint
Function SHOULD be restricted to DataPoint maintainer only
Parameters
Name | Type | Description |
---|---|---|
dp | DataPoint | Identifier of the DataPoint |
dm | OmnichainAddress | DataManager, can be on another chain |
approved | bool | if DataManager should be approved for the DataPoint |
approvedOmnichainDataObject
Verifies if remote DataObject is approved to access local one (with same address) via writeOmnichain() call
Parameters
Name | Type | Description |
---|---|---|
remoteDataObject | OmnichainAddress | Address and chainId of remote DataObject |
approveOmnichainDataObject
Approves DataObjects with same address as caller's local address to write to the caller for all DataPoints
Parameters
Name | Type | Description |
---|---|---|
chains | uint32[] | List of chains to approve |
approved | bool | if provided chains should be approved (true) or removed from approved list (false) |