InterfaceGasOracle

Git Source

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

NameTypeDescription
domainuint32Domain 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

NameTypeDescription
domainuint32Domain of chain to get gas data for

Returns

NameTypeDescription
gasPriceuint256Gas price for the chain (in Wei per gas unit)
dataPriceuint256Calldata price (in Wei per byte of content)
execBufferuint256Tx fee safety buffer for message execution (in Wei)
amortAttCostuint256Amortized cost for attestation submission (in Wei)
etherPriceuint256Ratio of Chain's Ether Price / Mainnet Ether Price (in BWAD)
markupuint256Markup 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

NameTypeDescription
destinationuint32Domain of destination chain
paddedRequestuint256Padded encoded message execution request on destination chain
contentLengthuint256The length of the message content

Returns

NameTypeDescription
paddedTipsuint256Padded encoded minimum tips information