Skip to content

Commit

Permalink
Restore interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Fletch153 committed Nov 20, 2024
1 parent cb6125c commit 31ac6fa
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion contracts/src/v0.8/llo-feeds/v0.5.0/Verifier.sol
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ contract Verifier is IVerifier, ConfirmedOwner, TypeAndVersionInterface {
}

/// @inheritdoc IVerifier
function setConfig(
function setConfigFromSource(
bytes32 configId,
uint256 sourceChainId,
address sourceAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface IVerifier is IERC165 {
* @param offchainConfig serialized configuration used by the oracles exclusively and only passed through the contract
* @param recipientAddressesAndWeights the addresses and weights of all the recipients to receive rewards
*/
function setConfig(
function setConfigFromSource(
bytes32 configId,
uint256 sourceChainId,
address sourceAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ contract Verifier_setConfig is BaseTest {
}

function testSetConfigSuccess_gas() public {
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ contract ErroredVerifier is IVerifier {
}


function setConfig(
function setConfigFromSource(
bytes32,
uint256,
address,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
Signer[] memory signers = _getSigners(MAX_ORACLES);

s_verifierProxy.initializeVerifier(address(s_verifier));
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -323,7 +323,7 @@ contract BaseTestWithConfiguredVerifierAndFeeManager is BaseTest {
bytes("")
);

s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID_V3,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -486,7 +486,7 @@ contract BaseTestWithMultipleConfiguredDigests is BaseTestWithConfiguredVerifier

// Verifier 1, Feed 1, Config 2
Signer[] memory secondSetOfSigners = _getSigners(8);
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -515,7 +515,7 @@ contract BaseTestWithMultipleConfiguredDigests is BaseTestWithConfiguredVerifier

// Verifier 1, Feed 1, Config 3
Signer[] memory thirdSetOfSigners = _getSigners(5);
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -542,7 +542,7 @@ contract BaseTestWithMultipleConfiguredDigests is BaseTestWithConfiguredVerifier
);

// Verifier 1, Feed 2, Config 1
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID_2,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -570,7 +570,7 @@ contract BaseTestWithMultipleConfiguredDigests is BaseTestWithConfiguredVerifier

// Verifier 2, Feed 3, Config 1
s_verifierProxy.initializeVerifier(address(s_verifier_2));
s_verifier_2.setConfig(
s_verifier_2.setConfigFromSource(
FEED_ID_3,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract VerifierSetConfigTest is BaseTest {
Signer[] memory signers = _getSigners(MAX_ORACLES);

changePrank(USER);
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -34,7 +34,7 @@ contract VerifierSetConfigTest is BaseTest {
function test_revertsIfSetWithTooManySigners() public {
address[] memory signers = new address[](MAX_ORACLES + 1);
vm.expectRevert(abi.encodeWithSelector(Verifier.ExcessSigners.selector, signers.length, MAX_ORACLES));
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -52,7 +52,7 @@ contract VerifierSetConfigTest is BaseTest {
function test_revertsIfFaultToleranceIsZero() public {
vm.expectRevert(abi.encodeWithSelector(Verifier.FaultToleranceMustBePositive.selector));
Signer[] memory signers = _getSigners(MAX_ORACLES);
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -75,7 +75,7 @@ contract VerifierSetConfigTest is BaseTest {
vm.expectRevert(
abi.encodeWithSelector(Verifier.InsufficientSigners.selector, signers.length, FAULT_TOLERANCE * 3 + 1)
);
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -95,7 +95,7 @@ contract VerifierSetConfigTest is BaseTest {
address[] memory signerAddrs = _getSignerAddresses(signers);
signerAddrs[0] = signerAddrs[1];
vm.expectRevert(abi.encodeWithSelector(Verifier.NonUniqueSignatures.selector));
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -115,7 +115,7 @@ contract VerifierSetConfigTest is BaseTest {
address[] memory signerAddrs = _getSignerAddresses(signers);
signerAddrs[0] = address(0);
vm.expectRevert(abi.encodeWithSelector(Verifier.ZeroAddress.selector));
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -134,7 +134,7 @@ contract VerifierSetConfigTest is BaseTest {
Signer[] memory signers = _getSigners(MAX_ORACLES);

s_verifierProxy.initializeVerifier(address(s_verifier));
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -171,7 +171,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl
function test_correctlyUpdatesTheDigestInTheProxy() public {
Signer[] memory newSigners = _getSigners(15);

s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -205,7 +205,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl
function test_correctlyUpdatesDigestsOnMultipleVerifiersInTheProxy() public {
Signer[] memory newSigners = _getSigners(15);

s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID_2,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -235,7 +235,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl
address verifierAddr = s_verifierProxy.getVerifier(configDigest);
assertEq(verifierAddr, address(s_verifier));

s_verifier_2.setConfig(
s_verifier_2.setConfigFromSource(
FEED_ID_3,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -271,7 +271,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl

Signer[] memory newSigners = _getSigners(15);

s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down Expand Up @@ -320,7 +320,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl

function test_revertsIfDuplicateConfigIsSet() public {
// Set initial config
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -336,7 +336,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl

// Try to set same config again
vm.expectRevert(abi.encodeWithSelector(Verifier.NonUniqueSignatures.selector));
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -353,7 +353,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl

function test_incrementalConfigUpdates() public {
// Set initial config
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -368,7 +368,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl
);

// Try to set same config again
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand All @@ -382,7 +382,7 @@ contract VerifierSetConfigWhenThereAreMultipleDigestsTest is BaseTestWithMultipl
new Common.AddressAndWeight[](0)
);

s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ contract VerifierVerifyMultipleConfigDigestTest is VerifierVerifyTest {
function setUp() public override {
VerifierVerifyTest.setUp();
s_oldConfigDigest = v1ConfigDigest;
s_verifier.setConfig(
s_verifier.setConfigFromSource(
FEED_ID,
SOURCE_CHAIN_ID,
SOURCE_ADDRESS,
Expand Down

0 comments on commit 31ac6fa

Please sign in to comment.