Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ABI compatibility issues #15366

Merged
merged 3 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
246 changes: 123 additions & 123 deletions contracts/gas-snapshots/feeds.gas-snapshot
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
AcceptPayeeship:test_EmitsPayeeshipTransferred() (gas: 27068)
AcceptPayeeship:test_RevertIf_SenderIsNotProposed() (gas: 15287)
Constructor:test_constructor() (gas: 30920)
Description:test_ReturnsCorrectDescription() (gas: 12439)
GetAnswer:test_ReturnsPrimaryGetAnswer() (gas: 162522)
GetAnswer:test_ReturnsPrimaryGetAnswerAfterBlock() (gas: 163054)
GetAnswer:test_ReturnsPrimaryGetAnswerNotAllowed() (gas: 162630)
GetAnswer:test_ReturnsSecondaryGetAnswer() (gas: 165071)
GetAnswer:test_ReturnsSecondaryGetAnswerNotAllowed() (gas: 168103)
GetAnswer:test_ReturnsSecondaryGetAnswerSynced() (gas: 171758)
AcceptPayeeship:test_EmitsPayeeshipTransferred() (gas: 27024)
AcceptPayeeship:test_RevertIf_SenderIsNotProposed() (gas: 15243)
Constructor:test_constructor() (gas: 30723)
Description:test_ReturnsCorrectDescription() (gas: 12443)
GetAnswer:test_ReturnsPrimaryGetAnswer() (gas: 162543)
GetAnswer:test_ReturnsPrimaryGetAnswerAfterBlock() (gas: 163075)
GetAnswer:test_ReturnsPrimaryGetAnswerNotAllowed() (gas: 162651)
GetAnswer:test_ReturnsSecondaryGetAnswer() (gas: 165092)
GetAnswer:test_ReturnsSecondaryGetAnswerNotAllowed() (gas: 168146)
GetAnswer:test_ReturnsSecondaryGetAnswerSynced() (gas: 171801)
GetBilling:test_ReturnsBillingData() (gas: 16704)
GetBillingAccessController:test_ReturnsBillingAccessController() (gas: 11033)
GetLinkToken:test_ReturnsLinkToken() (gas: 13131)
GetRequesterAccessController:test_ReturnsRequesterAccessController() (gas: 18435)
GetRoundData:test_ReturnsPrimaryGetRoundData() (gas: 164690)
GetRoundData:test_ReturnsPrimaryGetRoundDataAfterBlock() (gas: 165261)
GetRoundData:test_ReturnsPrimaryGetRoundDataNotAllowed() (gas: 164699)
GetRoundData:test_ReturnsSecondaryGetRoundData() (gas: 167265)
GetRoundData:test_ReturnsSecondaryGetRoundDataNotAllowed() (gas: 170163)
GetRoundData:test_ReturnsSecondaryGetRoundDataSynced() (gas: 173952)
GetSyncPrimaryRound:test_returnSecondaryRoundId() (gas: 168659)
GetSyncPrimaryRound:test_returnSyncFourthRoundId() (gas: 167441)
GetSyncPrimaryRound:test_returnSyncLatestRoundId() (gas: 166174)
GetSyncPrimaryRound:test_zeroTransmissions() (gas: 12898)
GetTimestamp:test_ReturnsPrimaryGetTimestamp() (gas: 162479)
GetTimestamp:test_ReturnsPrimaryGetTimestampAfterBlock() (gas: 162990)
GetTimestamp:test_ReturnsPrimaryGetTimestampNotAllowed() (gas: 162586)
GetTimestamp:test_ReturnsSecondaryGetTimestamp() (gas: 165015)
GetTimestamp:test_ReturnsSecondaryGetTimestampNotAllowed() (gas: 168057)
GetTimestamp:test_ReturnsSecondaryGetTimestampSynced() (gas: 171747)
GetTransmitters:test_ReturnsTransmittersList() (gas: 161033)
GetValidatorConfig:test_ReturnsValidatorConfig() (gas: 37637)
LatestAnswer:test_ReturnsLatestPrimaryAnswer() (gas: 165220)
LatestAnswer:test_ReturnsLatestPrimaryAnswerAfterBlock() (gas: 165783)
LatestAnswer:test_ReturnsLatestSecondaryAnswer() (gas: 165915)
LatestAnswer:test_ReturnsPreviousPrimaryAnswer() (gas: 165559)
LatestAnswer:test_ReturnsSyncedAnswer() (gas: 170874)
LatestConfigDetails:test_ReturnsConfigDetails() (gas: 16815)
LatestConfigDigestAndEpoch:test_ReturnsLatestConfigDigestAndEpoch() (gas: 186558)
LatestRound:test_ReturnsLatestPrimaryRoundId() (gas: 165006)
LatestRound:test_ReturnsLatestPrimaryRoundIdAfterBlock() (gas: 165570)
LatestRound:test_ReturnsLatestSecondaryRoundId() (gas: 165699)
LatestRound:test_ReturnsPreviousPrimaryRoundId() (gas: 165323)
LatestRound:test_ReturnsSyncedRoundId() (gas: 170616)
LatestRoundData:test_ReturnsLatestPrimaryRoundData() (gas: 167386)
LatestRoundData:test_ReturnsLatestPrimaryRoundDataAfterBlock() (gas: 167903)
LatestRoundData:test_ReturnsLatestSecondaryRoundData() (gas: 168099)
LatestRoundData:test_ReturnsPreviousPrimaryRoundData() (gas: 167725)
LatestRoundData:test_ReturnsSyncedRoundData() (gas: 173057)
LatestTimestamp:test_ReturnsLatestPrimaryTimestamp() (gas: 165187)
LatestTimestamp:test_ReturnsLatestPrimaryTimestampAfterBlock() (gas: 165728)
LatestTimestamp:test_ReturnsLatestSecondaryTimestamp() (gas: 165903)
LatestTimestamp:test_ReturnsPreviousPrimaryTimestamp() (gas: 165483)
LatestTimestamp:test_ReturnsSyncedTimestamp() (gas: 170861)
LatestTransmissionDetails:test_ReturnsLatestTransmissionDetails() (gas: 19740)
LatestTransmissionDetails:test_RevertIf_NotEOA() (gas: 8558)
LinkAvailableForPayment:test_ReturnsBalanceWhenNothingDue() (gas: 189995)
LinkAvailableForPayment:test_ReturnsRemainingBalanceWhenHasDues() (gas: 369822)
OracleObservationCount:test_ReturnsCorrectObservationCount() (gas: 223310)
OracleObservationCount:test_ReturnsZeroWhenNoObservations() (gas: 20050)
OwedPayment:test_ReturnOwedAmount() (gas: 157914)
OwedPayment:test_ReturnZeroIfTransmitterNotActive() (gas: 11291)
RequestNewRound:test_RevertIf_NotRequester() (gas: 15094)
RequestNewRound:test_ShouldRequestNewRound() (gas: 32118)
GetBillingAccessController:test_ReturnsBillingAccessController() (gas: 10968)
GetLinkToken:test_ReturnsLinkToken() (gas: 13087)
GetRequesterAccessController:test_ReturnsRequesterAccessController() (gas: 18479)
GetRoundData:test_ReturnsPrimaryGetRoundData() (gas: 164778)
GetRoundData:test_ReturnsPrimaryGetRoundDataAfterBlock() (gas: 165349)
GetRoundData:test_ReturnsPrimaryGetRoundDataNotAllowed() (gas: 164787)
GetRoundData:test_ReturnsSecondaryGetRoundData() (gas: 167353)
GetRoundData:test_ReturnsSecondaryGetRoundDataNotAllowed() (gas: 170273)
GetRoundData:test_ReturnsSecondaryGetRoundDataSynced() (gas: 174062)
GetSyncPrimaryRound:test_returnSecondaryRoundId() (gas: 168680)
GetSyncPrimaryRound:test_returnSyncFourthRoundId() (gas: 167462)
GetSyncPrimaryRound:test_returnSyncLatestRoundId() (gas: 166195)
GetSyncPrimaryRound:test_zeroTransmissions() (gas: 12853)
GetTimestamp:test_ReturnsPrimaryGetTimestamp() (gas: 162567)
GetTimestamp:test_ReturnsPrimaryGetTimestampAfterBlock() (gas: 163078)
GetTimestamp:test_ReturnsPrimaryGetTimestampNotAllowed() (gas: 162674)
GetTimestamp:test_ReturnsSecondaryGetTimestamp() (gas: 165103)
GetTimestamp:test_ReturnsSecondaryGetTimestampNotAllowed() (gas: 168167)
GetTimestamp:test_ReturnsSecondaryGetTimestampSynced() (gas: 171857)
GetTransmitters:test_ReturnsTransmittersList() (gas: 161037)
GetValidatorConfig:test_ReturnsValidatorConfig() (gas: 37703)
LatestAnswer:test_ReturnsLatestPrimaryAnswer() (gas: 165286)
LatestAnswer:test_ReturnsLatestPrimaryAnswerAfterBlock() (gas: 165849)
LatestAnswer:test_ReturnsLatestSecondaryAnswer() (gas: 165981)
LatestAnswer:test_ReturnsPreviousPrimaryAnswer() (gas: 165625)
LatestAnswer:test_ReturnsSyncedAnswer() (gas: 170962)
LatestConfigDetails:test_ReturnsConfigDetails() (gas: 16837)
LatestConfigDigestAndEpoch:test_ReturnsLatestConfigDigestAndEpoch() (gas: 186602)
LatestRound:test_ReturnsLatestPrimaryRoundId() (gas: 165072)
LatestRound:test_ReturnsLatestPrimaryRoundIdAfterBlock() (gas: 165636)
LatestRound:test_ReturnsLatestSecondaryRoundId() (gas: 165765)
LatestRound:test_ReturnsPreviousPrimaryRoundId() (gas: 165389)
LatestRound:test_ReturnsSyncedRoundId() (gas: 170704)
LatestRoundData:test_ReturnsLatestPrimaryRoundData() (gas: 167474)
LatestRoundData:test_ReturnsLatestPrimaryRoundDataAfterBlock() (gas: 167991)
LatestRoundData:test_ReturnsLatestSecondaryRoundData() (gas: 168187)
LatestRoundData:test_ReturnsPreviousPrimaryRoundData() (gas: 167813)
LatestRoundData:test_ReturnsSyncedRoundData() (gas: 173167)
LatestTimestamp:test_ReturnsLatestPrimaryTimestamp() (gas: 165253)
LatestTimestamp:test_ReturnsLatestPrimaryTimestampAfterBlock() (gas: 165794)
LatestTimestamp:test_ReturnsLatestSecondaryTimestamp() (gas: 165969)
LatestTimestamp:test_ReturnsPreviousPrimaryTimestamp() (gas: 165549)
LatestTimestamp:test_ReturnsSyncedTimestamp() (gas: 170949)
LatestTransmissionDetails:test_ReturnsLatestTransmissionDetails() (gas: 19784)
LatestTransmissionDetails:test_RevertIf_NotEOA() (gas: 8602)
LinkAvailableForPayment:test_ReturnsBalanceWhenNothingDue() (gas: 190017)
LinkAvailableForPayment:test_ReturnsRemainingBalanceWhenHasDues() (gas: 369864)
OracleObservationCount:test_ReturnsCorrectObservationCount() (gas: 223374)
OracleObservationCount:test_ReturnsZeroWhenNoObservations() (gas: 20094)
OwedPayment:test_ReturnOwedAmount() (gas: 157980)
OwedPayment:test_ReturnZeroIfTransmitterNotActive() (gas: 11313)
RequestNewRound:test_RevertIf_NotRequester() (gas: 15003)
RequestNewRound:test_ShouldRequestNewRound() (gas: 31939)
SetBilling:test_EmitsBillingSet() (gas: 54689)
SetBilling:test_RevertIf_NotOwner() (gas: 15236)
SetBillingAccessController:test_EmitsBillingAccessControllerSet() (gas: 22778)
SetConfig:test_RevertIf_OracleLengthMismatch() (gas: 27450)
SetConfig:test_RevertIf_RepeatedSigner() (gas: 120296)
SetConfig:test_RevertIf_RepeatedTransmitter() (gas: 143058)
SetConfig:test_RevertIf_SignersTooLong() (gas: 27874)
SetConfig:test_RevertIf_fNotPositive() (gas: 14430)
SetConfig:test_RevertIf_fTooHigh() (gas: 14265)
SetConfig:test_RevertIf_onchainConfigInvalid() (gas: 27927)
SetConfig:test_SetsTheConfigAndEmitsEvent() (gas: 3103066)
SetConfig:test_ShouldBeAbleToRemoveSigners() (gas: 3641924)
SetLinkToken:test_PayOutOraclesBeforeSettingNewLinkToken() (gas: 1413513)
SetLinkToken:test_RevertIf_TransferFundsFailed() (gas: 1465964)
SetLinkToken:test_SetLinkTokenToSameToken() (gas: 21037)
SetPayees:test_EmitsPayeeshipTransferred() (gas: 941401)
SetPayees:test_RevertIf_SetPayeesUsedToUpdateExistingPayees() (gas: 879112)
SetPayees:test_RevertIf_TransmittersSizeNotEqualPayeeSize() (gas: 84394)
SetRequesterAccessController:test_EmitsRequesterAccessControllerSet() (gas: 18362)
SetValidatorConfig:test_EmitsValidatorConfigSet() (gas: 37293)
TransferPayeeship:test_EmitsPayeeshipTransferredRequested() (gas: 46313)
TransferPayeeship:test_RevertIf_SenderIsProposed() (gas: 19978)
TransferPayeeship:test_RevertIf_SenderNotCurrentPayee() (gas: 10713)
Transmit:test_BothFeedsStalledIncomingPrimaryReportIsFromBeforeCutoffTime() (gas: 417253)
Transmit:test_BothFeedsStalledIncomingReportIsFromAfterCutoffTime() (gas: 416789)
Transmit:test_BothFeedsStalledIncomingSecondaryReportIsFromBeforeCutoffTime() (gas: 457979)
Transmit:test_EmitsPrimaryFeedUnlockedWhenPrimaryFeedIsUnlocked() (gas: 239616)
Transmit:test_IncomingSecondaryReportHasNotBeenRecordedOlderThanLatestReportNewerThanCutoffTime() (gas: 491369)
Transmit:test_IncomingSecondaryReportHasNotBeenRecordedOlderThanLatestReportOlderThanCutoffTime() (gas: 508018)
Transmit:test_IncomingSecondaryReportRevertsDueToMaxIterations() (gas: 790891)
Transmit:test_OutOfSyncFeedsPrimaryIsSourcedFromSecondaryWithLockDelay() (gas: 414189)
Transmit:test_OutOfSyncFeedsSecondaryFeedFallbackToStandardFeed() (gas: 785492)
Transmit:test_ReadExpectedInitialState() (gas: 146325)
Transmit:test_RevertIf_CalldataLengthMismatch() (gas: 23351)
Transmit:test_RevertIf_ConfigDigestMismatch() (gas: 20923)
Transmit:test_RevertIf_DuplicateSigner() (gas: 89805)
Transmit:test_RevertIf_MedianIsOutOfMinMaxRange() (gas: 155167)
Transmit:test_RevertIf_NumObservationsOutOfBounds() (gas: 95636)
Transmit:test_RevertIf_ReportLengthMismatch() (gas: 78027)
Transmit:test_RevertIf_SendTheSameReportAlternateFirstPrimaryFeed() (gas: 337053)
Transmit:test_RevertIf_SendTheSameReportAlternateFirstSecondaryFeed() (gas: 335777)
Transmit:test_RevertIf_SendTheSameReportTwiceToThePrimaryFeed() (gas: 265437)
Transmit:test_RevertIf_SendTheSameReportTwiceToTheSecondaryFeed() (gas: 266129)
Transmit:test_RevertIf_SignatureError() (gas: 86518)
Transmit:test_RevertIf_SignaturesOutOfRegistration() (gas: 25139)
Transmit:test_RevertIf_TooFewValuesToTrustMedian() (gas: 69820)
Transmit:test_RevertIf_UnauthorizedTransmitter() (gas: 14171)
Transmit:test_RevertIf_WrongNumberOfSignatures() (gas: 25000)
Transmit:test_SyncFeedsTransmitSecondaryFirstAlwaysSameBlock() (gas: 467777)
Transmit:test_SyncFeedsTransmitSecondaryFirstNeverSameBlock() (gas: 468745)
Transmit:test_SyncFeedsTransmitStandardFirstAlwaysSameBlock() (gas: 466688)
Transmit:test_SyncFeedsTransmitStandardFirstNeverSameBlock() (gas: 508525)
TypeAndVersion:test_IsCorrect() (gas: 10130)
ValidateAnswer:test_RevertIf_InsufficientGas() (gas: 329840)
ValidateAnswer:test_ValidateWithContractAddress() (gas: 374097)
ValidateAnswer:test_ValidateWithZeroAddressContract() (gas: 244509)
SetBillingAccessController:test_EmitsBillingAccessControllerSet() (gas: 22800)
SetConfig:test_RevertIf_OracleLengthMismatch() (gas: 27427)
SetConfig:test_RevertIf_RepeatedSigner() (gas: 120273)
SetConfig:test_RevertIf_RepeatedTransmitter() (gas: 143035)
SetConfig:test_RevertIf_SignersTooLong() (gas: 27851)
SetConfig:test_RevertIf_fNotPositive() (gas: 14407)
SetConfig:test_RevertIf_fTooHigh() (gas: 14242)
SetConfig:test_RevertIf_onchainConfigInvalid() (gas: 27904)
SetConfig:test_SetsTheConfigAndEmitsEvent() (gas: 3103065)
SetConfig:test_ShouldBeAbleToRemoveSigners() (gas: 3641887)
SetLinkToken:test_PayOutOraclesBeforeSettingNewLinkToken() (gas: 1413579)
SetLinkToken:test_RevertIf_TransferFundsFailed() (gas: 1465986)
SetLinkToken:test_SetLinkTokenToSameToken() (gas: 20993)
SetPayees:test_EmitsPayeeshipTransferred() (gas: 941356)
SetPayees:test_RevertIf_SetPayeesUsedToUpdateExistingPayees() (gas: 879022)
SetPayees:test_RevertIf_TransmittersSizeNotEqualPayeeSize() (gas: 84349)
SetRequesterAccessController:test_EmitsRequesterAccessControllerSet() (gas: 18384)
SetValidatorConfig:test_EmitsValidatorConfigSet() (gas: 37337)
TransferPayeeship:test_EmitsPayeeshipTransferredRequested() (gas: 46357)
TransferPayeeship:test_RevertIf_SenderIsProposed() (gas: 20022)
TransferPayeeship:test_RevertIf_SenderNotCurrentPayee() (gas: 10757)
Transmit:test_BothFeedsStalledIncomingPrimaryReportIsFromBeforeCutoffTime() (gas: 417393)
Transmit:test_BothFeedsStalledIncomingReportIsFromAfterCutoffTime() (gas: 416929)
Transmit:test_BothFeedsStalledIncomingSecondaryReportIsFromBeforeCutoffTime() (gas: 458171)
Transmit:test_EmitsPrimaryFeedUnlockedWhenPrimaryFeedIsUnlocked() (gas: 239652)
Transmit:test_IncomingSecondaryReportHasNotBeenRecordedOlderThanLatestReportNewerThanCutoffTime() (gas: 491595)
Transmit:test_IncomingSecondaryReportHasNotBeenRecordedOlderThanLatestReportOlderThanCutoffTime() (gas: 508232)
Transmit:test_IncomingSecondaryReportRevertsDueToMaxIterations() (gas: 791219)
Transmit:test_OutOfSyncFeedsPrimaryIsSourcedFromSecondaryWithLockDelay() (gas: 414329)
Transmit:test_OutOfSyncFeedsSecondaryFeedFallbackToStandardFeed() (gas: 785896)
Transmit:test_ReadExpectedInitialState() (gas: 146373)
Transmit:test_RevertIf_CalldataLengthMismatch() (gas: 23373)
Transmit:test_RevertIf_ConfigDigestMismatch() (gas: 20945)
Transmit:test_RevertIf_DuplicateSigner() (gas: 89827)
Transmit:test_RevertIf_MedianIsOutOfMinMaxRange() (gas: 155211)
Transmit:test_RevertIf_NumObservationsOutOfBounds() (gas: 95658)
Transmit:test_RevertIf_ReportLengthMismatch() (gas: 78049)
Transmit:test_RevertIf_SendTheSameReportAlternateFirstPrimaryFeed() (gas: 337233)
Transmit:test_RevertIf_SendTheSameReportAlternateFirstSecondaryFeed() (gas: 335957)
Transmit:test_RevertIf_SendTheSameReportTwiceToThePrimaryFeed() (gas: 265527)
Transmit:test_RevertIf_SendTheSameReportTwiceToTheSecondaryFeed() (gas: 266219)
Transmit:test_RevertIf_SignatureError() (gas: 86540)
Transmit:test_RevertIf_SignaturesOutOfRegistration() (gas: 25161)
Transmit:test_RevertIf_TooFewValuesToTrustMedian() (gas: 69842)
Transmit:test_RevertIf_UnauthorizedTransmitter() (gas: 14193)
Transmit:test_RevertIf_WrongNumberOfSignatures() (gas: 25022)
Transmit:test_SyncFeedsTransmitSecondaryFirstAlwaysSameBlock() (gas: 468041)
Transmit:test_SyncFeedsTransmitSecondaryFirstNeverSameBlock() (gas: 469009)
Transmit:test_SyncFeedsTransmitStandardFirstAlwaysSameBlock() (gas: 466952)
Transmit:test_SyncFeedsTransmitStandardFirstNeverSameBlock() (gas: 508797)
TypeAndVersion:test_IsCorrect() (gas: 10156)
ValidateAnswer:test_RevertIf_InsufficientGas() (gas: 329910)
ValidateAnswer:test_ValidateWithContractAddress() (gas: 374161)
ValidateAnswer:test_ValidateWithZeroAddressContract() (gas: 244573)
Version:test_ReturnsTheCorrectVersion() (gas: 8703)
WithdrawFunds:test_RevertIf_InsufficientBalance() (gas: 337712)
WithdrawFunds:test_RevertIf_InsufficientFunds() (gas: 191296)
WithdrawFunds:test_RevertIf_NotOwner() (gas: 14903)
WithdrawPayment:test_PaysOracles() (gas: 234993)
WithdrawPayment:test_RevertIf_InsufficientFunds() (gas: 27406)
WithdrawPayment:test_RevertIf_NotPayee() (gas: 11361)
WithdrawFunds:test_RevertIf_InsufficientBalance() (gas: 337782)
WithdrawFunds:test_RevertIf_InsufficientFunds() (gas: 191318)
WithdrawFunds:test_RevertIf_NotOwner() (gas: 14925)
WithdrawPayment:test_PaysOracles() (gas: 235028)
WithdrawPayment:test_RevertIf_InsufficientFunds() (gas: 27428)
WithdrawPayment:test_RevertIf_NotPayee() (gas: 11383)
22 changes: 17 additions & 5 deletions contracts/src/v0.8/feeds/DualAggregator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import {AggregatorV2V3Interface} from "../shared/interfaces/AggregatorV2V3Interf
import {AggregatorValidatorInterface} from "../shared/interfaces/AggregatorValidatorInterface.sol";
import {LinkTokenInterface} from "../shared/interfaces/LinkTokenInterface.sol";

import {Ownable2StepMsgSender} from "../shared/access/Ownable2StepMsgSender.sol";
import {SimpleReadAccessController} from "../shared/access/SimpleReadAccessController.sol";
import {CallWithExactGas} from "../shared/call/CallWithExactGas.sol";
import {OCR2Abstract} from "../shared/ocr2/OCR2Abstract.sol";

// This contract is a port of OCR2Aggregator from `libocr` it is being used
// for a new feeds based project that is ongoing, there will be some modernization
// that happens to this contract as the project progresses.
// solhint-disable max-states-count
contract DualAggregator is OCR2Abstract, Ownable2StepMsgSender, AggregatorV2V3Interface {
contract DualAggregator is OCR2Abstract, AggregatorV2V3Interface, SimpleReadAccessController {
string public constant override typeAndVersion = "DualAggregator 1.0.0";

// This contract is divided into sections. Each section defines a set of
Expand Down Expand Up @@ -87,10 +87,10 @@ contract DualAggregator is OCR2Abstract, Ownable2StepMsgSender, AggregatorV2V3In
HotVars internal s_hotVars;

/// @notice lowest answer the system is allowed to report in response to transmissions.
int192 public immutable i_minAnswer;
int192 internal immutable i_minAnswer;

/// @notice highest answer the system is allowed to report in response to transmissions.
int192 public immutable i_maxAnswer;
int192 internal immutable i_maxAnswer;

/// @param link address of the LINK contract.
/// @param minAnswer_ lowest answer the median of a report is allowed to be.
Expand Down Expand Up @@ -282,6 +282,18 @@ contract DualAggregator is OCR2Abstract, Ownable2StepMsgSender, AggregatorV2V3In
return s_transmittersList;
}

/// @notice Get the mininum answer value.
/// @return minAnswer the lowest answer the system is allowed to report in a transmission.
function minAnswer() public view returns (int256) {
return i_minAnswer;
}

/// @notice Get the maximum answer value.
/// @return maxAnswer the highest answer the system is allowed to report in a transmission.
function maxAnswer() public view returns (int256) {
return i_maxAnswer;
}

// ================================================================
// │ Onchain Validation │
// ================================================================
Expand Down Expand Up @@ -1019,7 +1031,7 @@ contract DualAggregator is OCR2Abstract, Ownable2StepMsgSender, AggregatorV2V3In
uint8 private immutable i_decimals;

/// @notice aggregator contract version.
uint256 public constant VERSION = 6;
uint256 internal constant VERSION = 6;

/// @notice human readable description.
string internal s_description;
Expand Down
Loading
Loading