From ed705e82cc8cf2491b9a9d61f218a436ccc4e478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wei=C3=9Fer=20Hase?= Date: Wed, 21 Aug 2024 15:52:55 +0200 Subject: [PATCH] fix: add natspec --- solidity/contracts/DataReceiver.sol | 3 +++ solidity/interfaces/IDataReceiver.sol | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/solidity/contracts/DataReceiver.sol b/solidity/contracts/DataReceiver.sol index 7e8dac0..fd3d458 100644 --- a/solidity/contracts/DataReceiver.sol +++ b/solidity/contracts/DataReceiver.sol @@ -24,6 +24,7 @@ contract DataReceiver is IDataReceiver, Governable { oracleFactory = _oracleFactory; } + /// @inheritdoc IDataReceiver function addObservations( IOracleSidechain.ObservationData[] memory _observationsData, bytes32 _poolSalt, @@ -84,6 +85,7 @@ contract DataReceiver is IDataReceiver, Governable { } } + /// @inheritdoc IDataReceiver function syncObservations(bytes32 _poolSalt, uint256 _maxObservations) external { IOracleSidechain _oracle = deployedOracles[_poolSalt]; if (address(_oracle) == address(0)) revert ZeroAddress(); @@ -105,6 +107,7 @@ contract DataReceiver is IDataReceiver, Governable { if (_i == 0) revert ObservationsNotWritable(); } + /// @inheritdoc IDataReceiver function whitelistAdapter(IBridgeReceiverAdapter _receiverAdapter, bool _isWhitelisted) external onlyGovernor { _whitelistAdapter(_receiverAdapter, _isWhitelisted); } diff --git a/solidity/interfaces/IDataReceiver.sol b/solidity/interfaces/IDataReceiver.sol index a034ffc..6e3d417 100644 --- a/solidity/interfaces/IDataReceiver.sol +++ b/solidity/interfaces/IDataReceiver.sol @@ -61,6 +61,12 @@ interface IDataReceiver is IGovernable { uint24 _poolNonce ) external; + /// @notice Allows any address to attemt to insert cached observations + /// @param _poolSalt Identifier of the pool to fetch + /// @param _maxObservations Maximum number of observations to process + /// @dev Use _maxObservations = 0 to process all possible cached observations + function syncObservations(bytes32 _poolSalt, uint256 _maxObservations) external; + /// @notice Allows governance to set an adapter whitelisted state /// @param _receiverAdapter Address of the adapter /// @param _isWhitelisted New whitelisting status