Skip to content

Commit

Permalink
update wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixFan1992 committed Mar 7, 2024
1 parent 50d0954 commit 13fbeda
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 186 deletions.

Large diffs are not rendered by default.

27 changes: 3 additions & 24 deletions contracts/src/v0.8/automation/test/AutomationRegistry2_2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract AutomationRegistry2_2_SetUp is BaseTest {
address internal constant LINK_ETH_FEED = 0x1111111111111111111111111111111111111110;
address internal constant FAST_GAS_FEED = 0x1111111111111111111111111111111111111112;
address internal constant LINK_TOKEN = 0x1111111111111111111111111111111111111113;
address[] internal ALLOWED_READ_ONLY_ADDRESSES = [address(0)];
address internal constant ZERO_ADDRESS = address(0);

// Signer private keys used for these test
uint256 internal constant PRIVATE0 = 0x7b2e97fe057e6de99d6872a2ef2abf52c9b4469bc848c2465ac3fcd8d336e81d;
Expand Down Expand Up @@ -52,7 +52,7 @@ contract AutomationRegistry2_2_SetUp is BaseTest {
LINK_ETH_FEED,
FAST_GAS_FEED,
address(forwarderLogic),
ALLOWED_READ_ONLY_ADDRESSES
ZERO_ADDRESS
);
AutomationRegistryLogicA2_2 logicA2_2 = new AutomationRegistryLogicA2_2(logicB2_2);
registryMaster = IAutomationRegistryMaster(
Expand All @@ -77,12 +77,7 @@ contract AutomationRegistry2_2_CheckUpkeep is AutomationRegistry2_2_SetUp {

// The tx.origin is the DEFAULT_SENDER (0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38) of foundry
// Expecting a revert since the tx.origin is not address(0)
vm.expectRevert(
abi.encodeWithSelector(
IAutomationRegistryMaster.OnlySimulatedBackend.selector,
0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38
)
);
vm.expectRevert(abi.encodeWithSelector(IAutomationRegistryMaster.OnlySimulatedBackend.selector));
registryMaster.checkUpkeep(id, triggerData);
}
}
Expand Down Expand Up @@ -201,19 +196,3 @@ contract AutomationRegistry2_2_SetConfig is AutomationRegistry2_2_SetUp {
return bytes32((prefix & prefixMask) | (h & ~prefixMask));
}
}

contract AutomationRegistry2_2_SetAllowedReadOnlyAddresses is AutomationRegistry2_2_SetUp {
event AllowedReadOnlyAddressesUpdated(address[] addresses);

function testSetAllowedReadOnlyAddresses() public {
address[] memory addresses = new address[](3);
addresses[0] = address(0);
addresses[1] = address(1);
addresses[2] = address(2);

vm.expectEmit();
emit AllowedReadOnlyAddressesUpdated(addresses);

registryMaster.setAllowedReadOnlyAddresses(addresses);
}
}

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ flags_wrapper: ../../contracts/solc/v0.6/Flags/Flags.abi ../../contracts/solc/v0
flux_aggregator_wrapper: ../../contracts/solc/v0.6/FluxAggregator/FluxAggregator.abi ../../contracts/solc/v0.6/FluxAggregator/FluxAggregator.bin a3b0a6396c4aa3b5ee39b3c4bd45efc89789d4859379a8a92caca3a0496c5794
gas_wrapper: ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.bin 4a5dcdac486d18fcd58e3488c15c1710ae76b977556a3f3191bd269a4bc75723
gas_wrapper_mock: ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.bin a9b08f18da59125c6fc305855710241f3d35161b8b9f3e3f635a7b1d5c6da9c8
i_automation_registry_master_wrapper_2_2: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.bin 712020e04fa7cea0036b0cfbc12db21ae64ba578eb7b0f1dc208819588b84465
i_automation_registry_master_wrapper_2_2: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster/IAutomationRegistryMaster.bin 0886dd1df1f4dcf5b08012f8adcf30fd96caab28999610e70ce02beb2170c92f
i_automation_registry_master_wrapper_2_3: ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster.abi ../../contracts/solc/v0.8.19/IAutomationRegistryMaster2_3/IAutomationRegistryMaster.bin fa3527675516bccfbc266697e37b60b77aee45018b80a5e98e027008f5fe2dfd
i_automation_v2_common: ../../contracts/solc/v0.8.19/IAutomationV2Common/IAutomationV2Common.abi ../../contracts/solc/v0.8.19/IAutomationV2Common/IAutomationV2Common.bin 3e8096e76545ad23998d7f4ebee5d5030c5d6d34b1af9e21456869181adbf008
i_chain_module: ../../contracts/solc/v0.8.19/IChainModule/IChainModule.abi ../../contracts/solc/v0.8.19/IChainModule/IChainModule.bin 383611981c86c70522f41b8750719faacc7d7933a22849d5004799ebef3371fa
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ sonar.cpd.exclusions=\
**/core/services/ocr2/plugins/ocr2keeper/evm/**/*,\
**/core/services/ocr2/plugins/mercury/plugin.go,\
**/integration-tests/load/**/*,\
**/integration-tests/contracts/**/*,\
**/integration-tests/contracts/ethereum_keeper_contracts.go,\
integration-tests/contracts/ethereum_contracts_seth.go,\
integration-tests/contracts/ethereum_contracts_seth.go,\
integration-tests/actions/seth/actions.go
Expand Down

0 comments on commit 13fbeda

Please sign in to comment.