InterfaceGasOracle
Functions
updateGasData
Fetches the latest gas data for the chain from Destination
contract,
and uses it to update the oracle values for the requested chain.
function updateGasData(uint32 domain) external;
Parameters
Name | Type | Description |
---|---|---|
domain | uint32 | Domain to update the gas data for |
getGasData
Returns the gas data for the local chain.
function getGasData() external view returns (uint256 paddedGasData);
getDecodedGasData
Returns the gas data for the given domain, in the decoded format.
function getDecodedGasData(uint32 domain)
external
view
returns (
uint256 gasPrice,
uint256 dataPrice,
uint256 execBuffer,
uint256 amortAttCost,
uint256 etherPrice,
uint256 markup
);
Parameters
Name | Type | Description |
---|---|---|
domain | uint32 | Domain of chain to get gas data for |
Returns
Name | Type | Description |
---|---|---|
gasPrice | uint256 | Gas price for the chain (in Wei per gas unit) |
dataPrice | uint256 | Calldata price (in Wei per byte of content) |
execBuffer | uint256 | Tx fee safety buffer for message execution (in Wei) |
amortAttCost | uint256 | Amortized cost for attestation submission (in Wei) |
etherPrice | uint256 | Ratio of Chain's Ether Price / Mainnet Ether Price (in BWAD) |
markup | uint256 | Markup for the message execution (in BWAD) |
getMinimumTips
Returns the minimum tips for sending a message to a given destination.
function getMinimumTips(uint32 destination, uint256 paddedRequest, uint256 contentLength)
external
view
returns (uint256 paddedTips);
Parameters
Name | Type | Description |
---|---|---|
destination | uint32 | Domain of destination chain |
paddedRequest | uint256 | Padded encoded message execution request on destination chain |
contentLength | uint256 | The length of the message content |
Returns
Name | Type | Description |
---|---|---|
paddedTips | uint256 | Padded encoded minimum tips information |