Skip to content

Commit

Permalink
fix: add natspec
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed Aug 21, 2024
1 parent 6433041 commit ed705e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions solidity/contracts/DataReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ contract DataReceiver is IDataReceiver, Governable {
oracleFactory = _oracleFactory;
}

/// @inheritdoc IDataReceiver
function addObservations(
IOracleSidechain.ObservationData[] memory _observationsData,
bytes32 _poolSalt,
Expand Down Expand Up @@ -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();
Expand All @@ -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);
}
Expand Down
6 changes: 6 additions & 0 deletions solidity/interfaces/IDataReceiver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ed705e8

Please sign in to comment.