diff --git a/contracts/scripts/native_solc_compile_all_automation b/contracts/scripts/native_solc_compile_all_automation index 32a7b2d60eb..e61fbfb0e87 100755 --- a/contracts/scripts/native_solc_compile_all_automation +++ b/contracts/scripts/native_solc_compile_all_automation @@ -30,22 +30,11 @@ compileContract () { } compileContract automation/upkeeps/CronUpkeepFactory.sol -compileContract automation/v1_2/KeeperRegistrar1_2.sol -compileContract automation/v1_2/KeeperRegistry1_2.sol -compileContract automation/v1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.sol -compileContract automation/v1_3/KeeperRegistry1_3.sol -compileContract automation/v1_3/KeeperRegistryLogic1_3.sol -compileContract automation/v2_0/KeeperRegistrar2_0.sol -compileContract automation/v2_0/KeeperRegistry2_0.sol -compileContract automation/v2_0/KeeperRegistryLogic2_0.sol compileContract automation/UpkeepTranscoder.sol compileContract automation/mocks/MockAggregatorProxy.sol compileContract automation/testhelpers/LogUpkeepCounter.sol compileContract automation/testhelpers/SimpleLogUpkeepCounter.sol -compileContract automation/mocks/KeeperRegistrar1_2Mock.sol -compileContract automation/mocks/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.sol - SOLC_VERSION="0.8.16" solc-select install $SOLC_VERSION diff --git a/contracts/src/v0.8/automation/mocks/KeeperRegistrar1_2Mock.sol b/contracts/src/v0.8/automation/mocks/KeeperRegistrar1_2Mock.sol deleted file mode 100644 index b147c98e9ae..00000000000 --- a/contracts/src/v0.8/automation/mocks/KeeperRegistrar1_2Mock.sol +++ /dev/null @@ -1,122 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.6; - -contract KeeperRegistrar1_2Mock { - event AutoApproveAllowedSenderSet(address indexed senderAddress, bool allowed); - event ConfigChanged( - uint8 autoApproveConfigType, - uint32 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ); - event OwnershipTransferRequested(address indexed from, address indexed to); - event OwnershipTransferred(address indexed from, address indexed to); - event RegistrationApproved(bytes32 indexed hash, string displayName, uint256 indexed upkeepId); - event RegistrationRejected(bytes32 indexed hash); - event RegistrationRequested( - bytes32 indexed hash, - string name, - bytes encryptedEmail, - address indexed upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes checkData, - uint96 amount, - uint8 indexed source - ); - - function emitAutoApproveAllowedSenderSet(address senderAddress, bool allowed) public { - emit AutoApproveAllowedSenderSet(senderAddress, allowed); - } - - function emitConfigChanged( - uint8 autoApproveConfigType, - uint32 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ) public { - emit ConfigChanged(autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels); - } - - function emitOwnershipTransferRequested(address from, address to) public { - emit OwnershipTransferRequested(from, to); - } - - function emitOwnershipTransferred(address from, address to) public { - emit OwnershipTransferred(from, to); - } - - function emitRegistrationApproved(bytes32 hash, string memory displayName, uint256 upkeepId) public { - emit RegistrationApproved(hash, displayName, upkeepId); - } - - function emitRegistrationRejected(bytes32 hash) public { - emit RegistrationRejected(hash); - } - - function emitRegistrationRequested( - bytes32 hash, - string memory name, - bytes memory encryptedEmail, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes memory checkData, - uint96 amount, - uint8 source - ) public { - emit RegistrationRequested( - hash, - name, - encryptedEmail, - upkeepContract, - gasLimit, - adminAddress, - checkData, - amount, - source - ); - } - - enum AutoApproveType { - DISABLED, - ENABLED_SENDER_ALLOWLIST, - ENABLED_ALL - } - - AutoApproveType public s_autoApproveConfigType; - uint32 public s_autoApproveMaxAllowed; - uint32 public s_approvedCount; - address public s_keeperRegistry; - uint256 public s_minLINKJuels; - - // Function to set mock return data for the getRegistrationConfig function - function setRegistrationConfig( - AutoApproveType _autoApproveConfigType, - uint32 _autoApproveMaxAllowed, - uint32 _approvedCount, - address _keeperRegistry, - uint256 _minLINKJuels - ) external { - s_autoApproveConfigType = _autoApproveConfigType; - s_autoApproveMaxAllowed = _autoApproveMaxAllowed; - s_approvedCount = _approvedCount; - s_keeperRegistry = _keeperRegistry; - s_minLINKJuels = _minLINKJuels; - } - - // Mock getRegistrationConfig function - function getRegistrationConfig() - external - view - returns ( - AutoApproveType autoApproveConfigType, - uint32 autoApproveMaxAllowed, - uint32 approvedCount, - address keeperRegistry, - uint256 minLINKJuels - ) - { - return (s_autoApproveConfigType, s_autoApproveMaxAllowed, s_approvedCount, s_keeperRegistry, s_minLINKJuels); - } -} diff --git a/contracts/src/v0.8/automation/mocks/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.sol b/contracts/src/v0.8/automation/mocks/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.sol deleted file mode 100644 index 87e93c637ee..00000000000 --- a/contracts/src/v0.8/automation/mocks/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.sol +++ /dev/null @@ -1,32 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity ^0.8.6; - -contract KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock { - event OwnershipTransferRequested(address indexed from, address indexed to); - event OwnershipTransferred(address indexed from, address indexed to); - - function emitOwnershipTransferRequested(address from, address to) public { - emit OwnershipTransferRequested(from, to); - } - - function emitOwnershipTransferred(address from, address to) public { - emit OwnershipTransferred(from, to); - } - - bool public s_mockResult; - bytes public s_mockPayload; - uint256 public s_mockGas; - - // Function to set mock return data for the measureCheckGas function - function setMeasureCheckGasResult(bool result, bytes memory payload, uint256 gas) external { - s_mockResult = result; - s_mockPayload = payload; - s_mockGas = gas; - } - - // Mock measureCheckGas function - function measureCheckGas(uint256 id, address from) external returns (bool, bytes memory, uint256) { - return (s_mockResult, s_mockPayload, s_mockGas); - } -} diff --git a/contracts/src/v0.8/automation/v1_2/KeeperRegistrar1_2.sol b/contracts/src/v0.8/automation/v1_2/KeeperRegistrar1_2.sol deleted file mode 100644 index d2b6e560487..00000000000 --- a/contracts/src/v0.8/automation/v1_2/KeeperRegistrar1_2.sol +++ /dev/null @@ -1,425 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "../interfaces/v1_2/KeeperRegistryInterface1_2.sol"; -import "../../shared/interfaces/ITypeAndVersion.sol"; -import "../../shared/interfaces/LinkTokenInterface.sol"; -import "../../shared/access/ConfirmedOwner.sol"; -import "../../shared/interfaces/IERC677Receiver.sol"; - -/** - * @notice Contract to accept requests for upkeep registrations - * @dev There are 2 registration workflows in this contract - * Flow 1. auto approve OFF / manual registration - UI calls `register` function on this contract, this contract owner at a later time then manually - * calls `approve` to register upkeep and emit events to inform UI and others interested. - * Flow 2. auto approve ON / real time registration - UI calls `register` function as before, which calls the `registerUpkeep` function directly on - * keeper registry and then emits approved event to finish the flow automatically without manual intervention. - * The idea is to have same interface(functions,events) for UI or anyone using this contract irrespective of auto approve being enabled or not. - * they can just listen to `RegistrationRequested` & `RegistrationApproved` events and know the status on registrations. - */ -contract KeeperRegistrar is ITypeAndVersion, ConfirmedOwner, IERC677Receiver { - /** - * DISABLED: No auto approvals, all new upkeeps should be approved manually. - * ENABLED_SENDER_ALLOWLIST: Auto approvals for allowed senders subject to max allowed. Manual for rest. - * ENABLED_ALL: Auto approvals for all new upkeeps subject to max allowed. - */ - enum AutoApproveType { - DISABLED, - ENABLED_SENDER_ALLOWLIST, - ENABLED_ALL - } - - bytes4 private constant REGISTER_REQUEST_SELECTOR = this.register.selector; - - mapping(bytes32 => PendingRequest) private s_pendingRequests; - - LinkTokenInterface public immutable LINK; - - /** - * @notice versions: - * - KeeperRegistrar 1.1.0: Add functionality for sender allowlist in auto approve - * : Remove rate limit and add max allowed for auto approve - * - KeeperRegistrar 1.0.0: initial release - */ - string public constant override typeAndVersion = "KeeperRegistrar 1.1.0"; - - struct Config { - AutoApproveType autoApproveConfigType; - uint32 autoApproveMaxAllowed; - uint32 approvedCount; - KeeperRegistryBaseInterface keeperRegistry; - uint96 minLINKJuels; - } - - struct PendingRequest { - address admin; - uint96 balance; - } - - Config private s_config; - // Only applicable if s_config.configType is ENABLED_SENDER_ALLOWLIST - mapping(address => bool) private s_autoApproveAllowedSenders; - - event RegistrationRequested( - bytes32 indexed hash, - string name, - bytes encryptedEmail, - address indexed upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes checkData, - uint96 amount, - uint8 indexed source - ); - - event RegistrationApproved(bytes32 indexed hash, string displayName, uint256 indexed upkeepId); - - event RegistrationRejected(bytes32 indexed hash); - - event AutoApproveAllowedSenderSet(address indexed senderAddress, bool allowed); - - event ConfigChanged( - AutoApproveType autoApproveConfigType, - uint32 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ); - - error InvalidAdminAddress(); - error RequestNotFound(); - error HashMismatch(); - error OnlyAdminOrOwner(); - error InsufficientPayment(); - error RegistrationRequestFailed(); - error OnlyLink(); - error AmountMismatch(); - error SenderMismatch(); - error FunctionNotPermitted(); - error LinkTransferFailed(address to); - error InvalidDataLength(); - - /* - * @param LINKAddress Address of Link token - * @param autoApproveConfigType setting for auto-approve registrations - * @param autoApproveMaxAllowed max number of registrations that can be auto approved - * @param keeperRegistry keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with - */ - constructor( - address LINKAddress, - AutoApproveType autoApproveConfigType, - uint16 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ) ConfirmedOwner(msg.sender) { - LINK = LinkTokenInterface(LINKAddress); - setRegistrationConfig(autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels); - } - - //EXTERNAL - - /** - * @notice register can only be called through transferAndCall on LINK contract - * @param name string of the upkeep to be registered - * @param encryptedEmail email address of upkeep contact - * @param upkeepContract address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when performing upkeep - * @param adminAddress address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - * @param amount quantity of LINK upkeep is funded with (specified in Juels) - * @param source application sending this request - * @param sender address of the sender making the request - */ - function register( - string memory name, - bytes calldata encryptedEmail, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes calldata checkData, - uint96 amount, - uint8 source, - address sender - ) external onlyLINK { - if (adminAddress == address(0)) { - revert InvalidAdminAddress(); - } - bytes32 hash = keccak256(abi.encode(upkeepContract, gasLimit, adminAddress, checkData)); - - emit RegistrationRequested( - hash, - name, - encryptedEmail, - upkeepContract, - gasLimit, - adminAddress, - checkData, - amount, - source - ); - - Config memory config = s_config; - if (_shouldAutoApprove(config, sender)) { - s_config.approvedCount = config.approvedCount + 1; - - _approve(name, upkeepContract, gasLimit, adminAddress, checkData, amount, hash); - } else { - uint96 newBalance = s_pendingRequests[hash].balance + amount; - s_pendingRequests[hash] = PendingRequest({admin: adminAddress, balance: newBalance}); - } - } - - /** - * @dev register upkeep on KeeperRegistry contract and emit RegistrationApproved event - */ - function approve( - string memory name, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes calldata checkData, - bytes32 hash - ) external onlyOwner { - PendingRequest memory request = s_pendingRequests[hash]; - if (request.admin == address(0)) { - revert RequestNotFound(); - } - bytes32 expectedHash = keccak256(abi.encode(upkeepContract, gasLimit, adminAddress, checkData)); - if (hash != expectedHash) { - revert HashMismatch(); - } - delete s_pendingRequests[hash]; - _approve(name, upkeepContract, gasLimit, adminAddress, checkData, request.balance, hash); - } - - /** - * @notice cancel will remove a registration request and return the refunds to the msg.sender - * @param hash the request hash - */ - function cancel(bytes32 hash) external { - PendingRequest memory request = s_pendingRequests[hash]; - if (!(msg.sender == request.admin || msg.sender == owner())) { - revert OnlyAdminOrOwner(); - } - if (request.admin == address(0)) { - revert RequestNotFound(); - } - delete s_pendingRequests[hash]; - bool success = LINK.transfer(msg.sender, request.balance); - if (!success) { - revert LinkTransferFailed(msg.sender); - } - emit RegistrationRejected(hash); - } - - /** - * @notice owner calls this function to set if registration requests should be sent directly to the Keeper Registry - * @param autoApproveConfigType setting for auto-approve registrations - * note: autoApproveAllowedSenders list persists across config changes irrespective of type - * @param autoApproveMaxAllowed max number of registrations that can be auto approved - * @param keeperRegistry new keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with - */ - function setRegistrationConfig( - AutoApproveType autoApproveConfigType, - uint16 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ) public onlyOwner { - uint32 approvedCount = s_config.approvedCount; - s_config = Config({ - autoApproveConfigType: autoApproveConfigType, - autoApproveMaxAllowed: autoApproveMaxAllowed, - approvedCount: approvedCount, - minLINKJuels: minLINKJuels, - keeperRegistry: KeeperRegistryBaseInterface(keeperRegistry) - }); - - emit ConfigChanged(autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels); - } - - /** - * @notice owner calls this function to set allowlist status for senderAddress - * @param senderAddress senderAddress to set the allowlist status for - * @param allowed true if senderAddress needs to be added to allowlist, false if needs to be removed - */ - function setAutoApproveAllowedSender(address senderAddress, bool allowed) external onlyOwner { - s_autoApproveAllowedSenders[senderAddress] = allowed; - - emit AutoApproveAllowedSenderSet(senderAddress, allowed); - } - - /** - * @notice read the allowlist status of senderAddress - * @param senderAddress address to read the allowlist status for - */ - function getAutoApproveAllowedSender(address senderAddress) external view returns (bool) { - return s_autoApproveAllowedSenders[senderAddress]; - } - - /** - * @notice read the current registration configuration - */ - function getRegistrationConfig() - external - view - returns ( - AutoApproveType autoApproveConfigType, - uint32 autoApproveMaxAllowed, - uint32 approvedCount, - address keeperRegistry, - uint256 minLINKJuels - ) - { - Config memory config = s_config; - return ( - config.autoApproveConfigType, - config.autoApproveMaxAllowed, - config.approvedCount, - address(config.keeperRegistry), - config.minLINKJuels - ); - } - - /** - * @notice gets the admin address and the current balance of a registration request - */ - function getPendingRequest(bytes32 hash) external view returns (address, uint96) { - PendingRequest memory request = s_pendingRequests[hash]; - return (request.admin, request.balance); - } - - /** - * @notice Called when LINK is sent to the contract via `transferAndCall` - * @param sender Address of the sender transfering LINK - * @param amount Amount of LINK sent (specified in Juels) - * @param data Payload of the transaction - */ - function onTokenTransfer( - address sender, - uint256 amount, - bytes calldata data - ) - external - override - onlyLINK - permittedFunctionsForLINK(data) - isActualAmount(amount, data) - isActualSender(sender, data) - { - if (data.length < 292) revert InvalidDataLength(); - if (amount < s_config.minLINKJuels) { - revert InsufficientPayment(); - } - (bool success, ) = address(this).delegatecall(data); - // calls register - if (!success) { - revert RegistrationRequestFailed(); - } - } - - //PRIVATE - - /** - * @dev register upkeep on KeeperRegistry contract and emit RegistrationApproved event - */ - function _approve( - string memory name, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes calldata checkData, - uint96 amount, - bytes32 hash - ) private { - KeeperRegistryBaseInterface keeperRegistry = s_config.keeperRegistry; - - // register upkeep - uint256 upkeepId = keeperRegistry.registerUpkeep(upkeepContract, gasLimit, adminAddress, checkData); - // fund upkeep - bool success = LINK.transferAndCall(address(keeperRegistry), amount, abi.encode(upkeepId)); - if (!success) { - revert LinkTransferFailed(address(keeperRegistry)); - } - - emit RegistrationApproved(hash, name, upkeepId); - } - - /** - * @dev verify sender allowlist if needed and check max limit - */ - function _shouldAutoApprove(Config memory config, address sender) private returns (bool) { - if (config.autoApproveConfigType == AutoApproveType.DISABLED) { - return false; - } - if ( - config.autoApproveConfigType == AutoApproveType.ENABLED_SENDER_ALLOWLIST && (!s_autoApproveAllowedSenders[sender]) - ) { - return false; - } - if (config.approvedCount < config.autoApproveMaxAllowed) { - return true; - } - return false; - } - - //MODIFIERS - - /** - * @dev Reverts if not sent from the LINK token - */ - modifier onlyLINK() { - if (msg.sender != address(LINK)) { - revert OnlyLink(); - } - _; - } - - /** - * @dev Reverts if the given data does not begin with the `register` function selector - * @param _data The data payload of the request - */ - modifier permittedFunctionsForLINK(bytes memory _data) { - bytes4 funcSelector; - assembly { - // solhint-disable-next-line avoid-low-level-calls - funcSelector := mload(add(_data, 32)) // First 32 bytes contain length of data - } - if (funcSelector != REGISTER_REQUEST_SELECTOR) { - revert FunctionNotPermitted(); - } - _; - } - - /** - * @dev Reverts if the actual amount passed does not match the expected amount - * @param expected amount that should match the actual amount - * @param data bytes - */ - modifier isActualAmount(uint256 expected, bytes memory data) { - uint256 actual; - assembly { - actual := mload(add(data, 228)) - } - if (expected != actual) { - revert AmountMismatch(); - } - _; - } - - /** - * @dev Reverts if the actual sender address does not match the expected sender address - * @param expected address that should match the actual sender address - * @param data bytes - */ - modifier isActualSender(address expected, bytes memory data) { - address actual; - assembly { - actual := mload(add(data, 292)) - } - if (expected != actual) { - revert SenderMismatch(); - } - _; - } -} diff --git a/contracts/src/v0.8/automation/v1_2/KeeperRegistry1_2.sol b/contracts/src/v0.8/automation/v1_2/KeeperRegistry1_2.sol deleted file mode 100644 index 5e1c8dacd48..00000000000 --- a/contracts/src/v0.8/automation/v1_2/KeeperRegistry1_2.sol +++ /dev/null @@ -1,909 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; -import "@openzeppelin/contracts/utils/Address.sol"; -import "@openzeppelin/contracts/security/Pausable.sol"; -import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; -import "../KeeperBase.sol"; -import "../../shared/interfaces/ITypeAndVersion.sol"; -import "../../shared/interfaces/AggregatorV3Interface.sol"; -import "../interfaces/KeeperCompatibleInterface.sol"; -import "../interfaces/v1_2/KeeperRegistryInterface1_2.sol"; -import "../interfaces/MigratableKeeperRegistryInterface.sol"; -import "../interfaces/UpkeepTranscoderInterface.sol"; -import "../../shared/interfaces/IERC677Receiver.sol"; -import "../../shared/interfaces/LinkTokenInterface.sol"; -import "../../shared/access/ConfirmedOwner.sol"; - -struct Upkeep { - uint96 balance; - address lastKeeper; // 1 storage slot full - uint32 executeGas; - uint64 maxValidBlocknumber; - address target; // 2 storage slots full - uint96 amountSpent; - address admin; // 3 storage slots full -} - -/** - * @notice Registry for adding work for Chainlink Keepers to perform on client - * contracts. Clients must support the Upkeep interface. - */ -contract KeeperRegistry1_2 is - ITypeAndVersion, - ConfirmedOwner, - KeeperBase, - ReentrancyGuard, - Pausable, - KeeperRegistryExecutableInterface, - MigratableKeeperRegistryInterface, - IERC677Receiver -{ - using Address for address; - using EnumerableSet for EnumerableSet.UintSet; - - address private constant ZERO_ADDRESS = address(0); - address private constant IGNORE_ADDRESS = 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF; - bytes4 private constant CHECK_SELECTOR = KeeperCompatibleInterface.checkUpkeep.selector; - bytes4 private constant PERFORM_SELECTOR = KeeperCompatibleInterface.performUpkeep.selector; - uint256 private constant PERFORM_GAS_MIN = 2_300; - uint256 private constant CANCELATION_DELAY = 50; - uint256 private constant PERFORM_GAS_CUSHION = 5_000; - uint256 private constant REGISTRY_GAS_OVERHEAD = 80_000; - uint256 private constant PPB_BASE = 1_000_000_000; - uint64 private constant UINT64_MAX = 2 ** 64 - 1; - uint96 private constant LINK_TOTAL_SUPPLY = 1e27; - - address[] private s_keeperList; - EnumerableSet.UintSet private s_upkeepIDs; - mapping(uint256 => Upkeep) private s_upkeep; - mapping(address => KeeperInfo) private s_keeperInfo; - mapping(address => address) private s_proposedPayee; - mapping(uint256 => bytes) private s_checkData; - mapping(address => MigrationPermission) private s_peerRegistryMigrationPermission; - Storage private s_storage; - uint256 private s_fallbackGasPrice; // not in config object for gas savings - uint256 private s_fallbackLinkPrice; // not in config object for gas savings - uint96 private s_ownerLinkBalance; - uint256 private s_expectedLinkBalance; - address private s_transcoder; - address private s_registrar; - - LinkTokenInterface public immutable LINK; - AggregatorV3Interface public immutable LINK_ETH_FEED; - AggregatorV3Interface public immutable FAST_GAS_FEED; - - /** - * @notice versions: - * - KeeperRegistry 1.2.0: allow funding within performUpkeep - * : allow configurable registry maxPerformGas - * : add function to let admin change upkeep gas limit - * : add minUpkeepSpend requirement - : upgrade to solidity v0.8 - * - KeeperRegistry 1.1.0: added flatFeeMicroLink - * - KeeperRegistry 1.0.0: initial release - */ - string public constant override typeAndVersion = "KeeperRegistry 1.2.0"; - - error CannotCancel(); - error UpkeepNotActive(); - error MigrationNotPermitted(); - error UpkeepNotCanceled(); - error UpkeepNotNeeded(); - error NotAContract(); - error PaymentGreaterThanAllLINK(); - error OnlyActiveKeepers(); - error InsufficientFunds(); - error KeepersMustTakeTurns(); - error ParameterLengthError(); - error OnlyCallableByOwnerOrAdmin(); - error OnlyCallableByLINKToken(); - error InvalidPayee(); - error DuplicateEntry(); - error ValueNotChanged(); - error IndexOutOfRange(); - error TranscoderNotSet(); - error ArrayHasNoEntries(); - error GasLimitOutsideRange(); - error OnlyCallableByPayee(); - error OnlyCallableByProposedPayee(); - error GasLimitCanOnlyIncrease(); - error OnlyCallableByAdmin(); - error OnlyCallableByOwnerOrRegistrar(); - error InvalidRecipient(); - error InvalidDataLength(); - error TargetCheckReverted(bytes reason); - - enum MigrationPermission { - NONE, - OUTGOING, - INCOMING, - BIDIRECTIONAL - } - - /** - * @notice storage of the registry, contains a mix of config and state data - */ - struct Storage { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; - uint24 blockCountPerTurn; - uint32 checkGasLimit; - uint24 stalenessSeconds; - uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; // 1 evm word - uint32 maxPerformGas; - uint32 nonce; // 2 evm words - } - - struct KeeperInfo { - address payee; - uint96 balance; - bool active; - } - - struct PerformParams { - address from; - uint256 id; - bytes performData; - uint256 maxLinkPayment; - uint256 gasLimit; - uint256 adjustedGasWei; - uint256 linkEth; - } - - event UpkeepRegistered(uint256 indexed id, uint32 executeGas, address admin); - event UpkeepPerformed( - uint256 indexed id, - bool indexed success, - address indexed from, - uint96 payment, - bytes performData - ); - event UpkeepCanceled(uint256 indexed id, uint64 indexed atBlockHeight); - event FundsAdded(uint256 indexed id, address indexed from, uint96 amount); - event FundsWithdrawn(uint256 indexed id, uint256 amount, address to); - event OwnerFundsWithdrawn(uint96 amount); - event UpkeepMigrated(uint256 indexed id, uint256 remainingBalance, address destination); - event UpkeepReceived(uint256 indexed id, uint256 startingBalance, address importedFrom); - event ConfigSet(Config config); - event KeepersUpdated(address[] keepers, address[] payees); - event PaymentWithdrawn(address indexed keeper, uint256 indexed amount, address indexed to, address payee); - event PayeeshipTransferRequested(address indexed keeper, address indexed from, address indexed to); - event PayeeshipTransferred(address indexed keeper, address indexed from, address indexed to); - event UpkeepGasLimitSet(uint256 indexed id, uint96 gasLimit); - - /** - * @param link address of the LINK Token - * @param linkEthFeed address of the LINK/ETH price feed - * @param fastGasFeed address of the Fast Gas price feed - * @param config registry config settings - */ - constructor(address link, address linkEthFeed, address fastGasFeed, Config memory config) ConfirmedOwner(msg.sender) { - LINK = LinkTokenInterface(link); - LINK_ETH_FEED = AggregatorV3Interface(linkEthFeed); - FAST_GAS_FEED = AggregatorV3Interface(fastGasFeed); - setConfig(config); - } - - // ACTIONS - - /** - * @notice adds a new upkeep - * @param target address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when - * performing upkeep - * @param admin address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - */ - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes calldata checkData - ) external override onlyOwnerOrRegistrar returns (uint256 id) { - id = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), address(this), s_storage.nonce))); - _createUpkeep(id, target, gasLimit, admin, 0, checkData); - s_storage.nonce++; - emit UpkeepRegistered(id, gasLimit, admin); - return id; - } - - /** - * @notice simulated by keepers via eth_call to see if the upkeep needs to be - * performed. If upkeep is needed, the call then simulates performUpkeep - * to make sure it succeeds. Finally, it returns the success status along with - * payment information and the perform data payload. - * @param id identifier of the upkeep to check - * @param from the address to simulate performing the upkeep from - */ - function checkUpkeep( - uint256 id, - address from - ) - external - override - cannotExecute - returns ( - bytes memory performData, - uint256 maxLinkPayment, - uint256 gasLimit, - uint256 adjustedGasWei, - uint256 linkEth - ) - { - Upkeep memory upkeep = s_upkeep[id]; - - bytes memory callData = abi.encodeWithSelector(CHECK_SELECTOR, s_checkData[id]); - (bool success, bytes memory result) = upkeep.target.call{gas: s_storage.checkGasLimit}(callData); - - if (!success) revert TargetCheckReverted(result); - - (success, performData) = abi.decode(result, (bool, bytes)); - if (!success) revert UpkeepNotNeeded(); - - PerformParams memory params = _generatePerformParams(from, id, performData, false); - _prePerformUpkeep(upkeep, params.from, params.maxLinkPayment); - - return (performData, params.maxLinkPayment, params.gasLimit, params.adjustedGasWei, params.linkEth); - } - - /** - * @notice executes the upkeep with the perform data returned from - * checkUpkeep, validates the keeper's permissions, and pays the keeper. - * @param id identifier of the upkeep to execute the data with. - * @param performData calldata parameter to be passed to the target upkeep. - */ - function performUpkeep( - uint256 id, - bytes calldata performData - ) external override whenNotPaused returns (bool success) { - return _performUpkeepWithParams(_generatePerformParams(msg.sender, id, performData, true)); - } - - /** - * @notice prevent an upkeep from being performed in the future - * @param id upkeep to be canceled - */ - function cancelUpkeep(uint256 id) external override { - uint64 maxValid = s_upkeep[id].maxValidBlocknumber; - bool canceled = maxValid != UINT64_MAX; - bool isOwner = msg.sender == owner(); - - if (canceled && !(isOwner && maxValid > block.number)) revert CannotCancel(); - if (!isOwner && msg.sender != s_upkeep[id].admin) revert OnlyCallableByOwnerOrAdmin(); - - uint256 height = block.number; - if (!isOwner) { - height = height + CANCELATION_DELAY; - } - s_upkeep[id].maxValidBlocknumber = uint64(height); - s_upkeepIDs.remove(id); - - emit UpkeepCanceled(id, uint64(height)); - } - - /** - * @notice adds LINK funding for an upkeep by transferring from the sender's - * LINK balance - * @param id upkeep to fund - * @param amount number of LINK to transfer - */ - function addFunds(uint256 id, uint96 amount) external override onlyActiveUpkeep(id) { - s_upkeep[id].balance = s_upkeep[id].balance + amount; - s_expectedLinkBalance = s_expectedLinkBalance + amount; - LINK.transferFrom(msg.sender, address(this), amount); - emit FundsAdded(id, msg.sender, amount); - } - - /** - * @notice uses LINK's transferAndCall to LINK and add funding to an upkeep - * @dev safe to cast uint256 to uint96 as total LINK supply is under UINT96MAX - * @param sender the account which transferred the funds - * @param amount number of LINK transfer - */ - function onTokenTransfer(address sender, uint256 amount, bytes calldata data) external override { - if (msg.sender != address(LINK)) revert OnlyCallableByLINKToken(); - if (data.length != 32) revert InvalidDataLength(); - uint256 id = abi.decode(data, (uint256)); - if (s_upkeep[id].maxValidBlocknumber != UINT64_MAX) revert UpkeepNotActive(); - - s_upkeep[id].balance = s_upkeep[id].balance + uint96(amount); - s_expectedLinkBalance = s_expectedLinkBalance + amount; - - emit FundsAdded(id, sender, uint96(amount)); - } - - /** - * @notice removes funding from a canceled upkeep - * @param id upkeep to withdraw funds from - * @param to destination address for sending remaining funds - */ - function withdrawFunds(uint256 id, address to) external validRecipient(to) onlyUpkeepAdmin(id) { - if (s_upkeep[id].maxValidBlocknumber > block.number) revert UpkeepNotCanceled(); - - uint96 minUpkeepSpend = s_storage.minUpkeepSpend; - uint96 amountLeft = s_upkeep[id].balance; - uint96 amountSpent = s_upkeep[id].amountSpent; - - uint96 cancellationFee = 0; - // cancellationFee is supposed to be min(max(minUpkeepSpend - amountSpent,0), amountLeft) - if (amountSpent < minUpkeepSpend) { - cancellationFee = minUpkeepSpend - amountSpent; - if (cancellationFee > amountLeft) { - cancellationFee = amountLeft; - } - } - uint96 amountToWithdraw = amountLeft - cancellationFee; - - s_upkeep[id].balance = 0; - s_ownerLinkBalance = s_ownerLinkBalance + cancellationFee; - - s_expectedLinkBalance = s_expectedLinkBalance - amountToWithdraw; - emit FundsWithdrawn(id, amountToWithdraw, to); - - LINK.transfer(to, amountToWithdraw); - } - - /** - * @notice withdraws LINK funds collected through cancellation fees - */ - function withdrawOwnerFunds() external onlyOwner { - uint96 amount = s_ownerLinkBalance; - - s_expectedLinkBalance = s_expectedLinkBalance - amount; - s_ownerLinkBalance = 0; - - emit OwnerFundsWithdrawn(amount); - LINK.transfer(msg.sender, amount); - } - - /** - * @notice allows the admin of an upkeep to modify gas limit - * @param id upkeep to be change the gas limit for - * @param gasLimit new gas limit for the upkeep - */ - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external override onlyActiveUpkeep(id) onlyUpkeepAdmin(id) { - if (gasLimit < PERFORM_GAS_MIN || gasLimit > s_storage.maxPerformGas) revert GasLimitOutsideRange(); - - s_upkeep[id].executeGas = gasLimit; - - emit UpkeepGasLimitSet(id, gasLimit); - } - - /** - * @notice recovers LINK funds improperly transferred to the registry - * @dev In principle this function’s execution cost could exceed block - * gas limit. However, in our anticipated deployment, the number of upkeeps and - * keepers will be low enough to avoid this problem. - */ - function recoverFunds() external onlyOwner { - uint256 total = LINK.balanceOf(address(this)); - LINK.transfer(msg.sender, total - s_expectedLinkBalance); - } - - /** - * @notice withdraws a keeper's payment, callable only by the keeper's payee - * @param from keeper address - * @param to address to send the payment to - */ - function withdrawPayment(address from, address to) external validRecipient(to) { - KeeperInfo memory keeper = s_keeperInfo[from]; - if (keeper.payee != msg.sender) revert OnlyCallableByPayee(); - - s_keeperInfo[from].balance = 0; - s_expectedLinkBalance = s_expectedLinkBalance - keeper.balance; - emit PaymentWithdrawn(from, keeper.balance, to, msg.sender); - - LINK.transfer(to, keeper.balance); - } - - /** - * @notice proposes the safe transfer of a keeper's payee to another address - * @param keeper address of the keeper to transfer payee role - * @param proposed address to nominate for next payeeship - */ - function transferPayeeship(address keeper, address proposed) external { - if (s_keeperInfo[keeper].payee != msg.sender) revert OnlyCallableByPayee(); - if (proposed == msg.sender) revert ValueNotChanged(); - - if (s_proposedPayee[keeper] != proposed) { - s_proposedPayee[keeper] = proposed; - emit PayeeshipTransferRequested(keeper, msg.sender, proposed); - } - } - - /** - * @notice accepts the safe transfer of payee role for a keeper - * @param keeper address to accept the payee role for - */ - function acceptPayeeship(address keeper) external { - if (s_proposedPayee[keeper] != msg.sender) revert OnlyCallableByProposedPayee(); - address past = s_keeperInfo[keeper].payee; - s_keeperInfo[keeper].payee = msg.sender; - s_proposedPayee[keeper] = ZERO_ADDRESS; - - emit PayeeshipTransferred(keeper, past, msg.sender); - } - - /** - * @notice signals to keepers that they should not perform upkeeps until the - * contract has been unpaused - */ - function pause() external onlyOwner { - _pause(); - } - - /** - * @notice signals to keepers that they can perform upkeeps once again after - * having been paused - */ - function unpause() external onlyOwner { - _unpause(); - } - - // SETTERS - - /** - * @notice updates the configuration of the registry - * @param config registry config fields - */ - function setConfig(Config memory config) public onlyOwner { - if (config.maxPerformGas < s_storage.maxPerformGas) revert GasLimitCanOnlyIncrease(); - s_storage = Storage({ - paymentPremiumPPB: config.paymentPremiumPPB, - flatFeeMicroLink: config.flatFeeMicroLink, - blockCountPerTurn: config.blockCountPerTurn, - checkGasLimit: config.checkGasLimit, - stalenessSeconds: config.stalenessSeconds, - gasCeilingMultiplier: config.gasCeilingMultiplier, - minUpkeepSpend: config.minUpkeepSpend, - maxPerformGas: config.maxPerformGas, - nonce: s_storage.nonce - }); - s_fallbackGasPrice = config.fallbackGasPrice; - s_fallbackLinkPrice = config.fallbackLinkPrice; - s_transcoder = config.transcoder; - s_registrar = config.registrar; - emit ConfigSet(config); - } - - /** - * @notice update the list of keepers allowed to perform upkeep - * @param keepers list of addresses allowed to perform upkeep - * @param payees addresses corresponding to keepers who are allowed to - * move payments which have been accrued - */ - function setKeepers(address[] calldata keepers, address[] calldata payees) external onlyOwner { - if (keepers.length != payees.length || keepers.length < 2) revert ParameterLengthError(); - for (uint256 i = 0; i < s_keeperList.length; i++) { - address keeper = s_keeperList[i]; - s_keeperInfo[keeper].active = false; - } - for (uint256 i = 0; i < keepers.length; i++) { - address keeper = keepers[i]; - KeeperInfo storage s_keeper = s_keeperInfo[keeper]; - address oldPayee = s_keeper.payee; - address newPayee = payees[i]; - if ( - (newPayee == ZERO_ADDRESS) || (oldPayee != ZERO_ADDRESS && oldPayee != newPayee && newPayee != IGNORE_ADDRESS) - ) revert InvalidPayee(); - if (s_keeper.active) revert DuplicateEntry(); - s_keeper.active = true; - if (newPayee != IGNORE_ADDRESS) { - s_keeper.payee = newPayee; - } - } - s_keeperList = keepers; - emit KeepersUpdated(keepers, payees); - } - - // GETTERS - - /** - * @notice read all of the details about an upkeep - */ - function getUpkeep( - uint256 id - ) - external - view - override - returns ( - address target, - uint32 executeGas, - bytes memory checkData, - uint96 balance, - address lastKeeper, - address admin, - uint64 maxValidBlocknumber, - uint96 amountSpent - ) - { - Upkeep memory reg = s_upkeep[id]; - return ( - reg.target, - reg.executeGas, - s_checkData[id], - reg.balance, - reg.lastKeeper, - reg.admin, - reg.maxValidBlocknumber, - reg.amountSpent - ); - } - - /** - * @notice retrieve active upkeep IDs - * @param startIndex starting index in list - * @param maxCount max count to retrieve (0 = unlimited) - * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one - * should consider keeping the blockheight constant to ensure a wholistic picture of the contract state - */ - function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view override returns (uint256[] memory) { - uint256 maxIdx = s_upkeepIDs.length(); - if (startIndex >= maxIdx) revert IndexOutOfRange(); - if (maxCount == 0) { - maxCount = maxIdx - startIndex; - } - uint256[] memory ids = new uint256[](maxCount); - for (uint256 idx = 0; idx < maxCount; idx++) { - ids[idx] = s_upkeepIDs.at(startIndex + idx); - } - return ids; - } - - /** - * @notice read the current info about any keeper address - */ - function getKeeperInfo(address query) external view override returns (address payee, bool active, uint96 balance) { - KeeperInfo memory keeper = s_keeperInfo[query]; - return (keeper.payee, keeper.active, keeper.balance); - } - - /** - * @notice read the current state of the registry - */ - function getState() - external - view - override - returns (State memory state, Config memory config, address[] memory keepers) - { - Storage memory store = s_storage; - state.nonce = store.nonce; - state.ownerLinkBalance = s_ownerLinkBalance; - state.expectedLinkBalance = s_expectedLinkBalance; - state.numUpkeeps = s_upkeepIDs.length(); - config.paymentPremiumPPB = store.paymentPremiumPPB; - config.flatFeeMicroLink = store.flatFeeMicroLink; - config.blockCountPerTurn = store.blockCountPerTurn; - config.checkGasLimit = store.checkGasLimit; - config.stalenessSeconds = store.stalenessSeconds; - config.gasCeilingMultiplier = store.gasCeilingMultiplier; - config.minUpkeepSpend = store.minUpkeepSpend; - config.maxPerformGas = store.maxPerformGas; - config.fallbackGasPrice = s_fallbackGasPrice; - config.fallbackLinkPrice = s_fallbackLinkPrice; - config.transcoder = s_transcoder; - config.registrar = s_registrar; - return (state, config, s_keeperList); - } - - /** - * @notice calculates the minimum balance required for an upkeep to remain eligible - * @param id the upkeep id to calculate minimum balance for - */ - function getMinBalanceForUpkeep(uint256 id) external view returns (uint96 minBalance) { - return getMaxPaymentForGas(s_upkeep[id].executeGas); - } - - /** - * @notice calculates the maximum payment for a given gas limit - * @param gasLimit the gas to calculate payment for - */ - function getMaxPaymentForGas(uint256 gasLimit) public view returns (uint96 maxPayment) { - (uint256 gasWei, uint256 linkEth) = _getFeedData(); - uint256 adjustedGasWei = _adjustGasPrice(gasWei, false); - return _calculatePaymentAmount(gasLimit, adjustedGasWei, linkEth); - } - - /** - * @notice retrieves the migration permission for a peer registry - */ - function getPeerRegistryMigrationPermission(address peer) external view returns (MigrationPermission) { - return s_peerRegistryMigrationPermission[peer]; - } - - /** - * @notice sets the peer registry migration permission - */ - function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external onlyOwner { - s_peerRegistryMigrationPermission[peer] = permission; - } - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - function migrateUpkeeps(uint256[] calldata ids, address destination) external override { - if ( - s_peerRegistryMigrationPermission[destination] != MigrationPermission.OUTGOING && - s_peerRegistryMigrationPermission[destination] != MigrationPermission.BIDIRECTIONAL - ) revert MigrationNotPermitted(); - if (s_transcoder == ZERO_ADDRESS) revert TranscoderNotSet(); - if (ids.length == 0) revert ArrayHasNoEntries(); - uint256 id; - Upkeep memory upkeep; - uint256 totalBalanceRemaining; - bytes[] memory checkDatas = new bytes[](ids.length); - Upkeep[] memory upkeeps = new Upkeep[](ids.length); - for (uint256 idx = 0; idx < ids.length; idx++) { - id = ids[idx]; - upkeep = s_upkeep[id]; - if (upkeep.admin != msg.sender) revert OnlyCallableByAdmin(); - if (upkeep.maxValidBlocknumber != UINT64_MAX) revert UpkeepNotActive(); - upkeeps[idx] = upkeep; - checkDatas[idx] = s_checkData[id]; - totalBalanceRemaining = totalBalanceRemaining + upkeep.balance; - delete s_upkeep[id]; - delete s_checkData[id]; - s_upkeepIDs.remove(id); - emit UpkeepMigrated(id, upkeep.balance, destination); - } - s_expectedLinkBalance = s_expectedLinkBalance - totalBalanceRemaining; - bytes memory encodedUpkeeps = abi.encode(ids, upkeeps, checkDatas); - MigratableKeeperRegistryInterface(destination).receiveUpkeeps( - UpkeepTranscoderInterface(s_transcoder).transcodeUpkeeps( - UpkeepFormat.V1, - MigratableKeeperRegistryInterface(destination).upkeepTranscoderVersion(), - encodedUpkeeps - ) - ); - LINK.transfer(destination, totalBalanceRemaining); - } - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - UpkeepFormat public constant override upkeepTranscoderVersion = UpkeepFormat.V1; - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - function receiveUpkeeps(bytes calldata encodedUpkeeps) external override { - if ( - s_peerRegistryMigrationPermission[msg.sender] != MigrationPermission.INCOMING && - s_peerRegistryMigrationPermission[msg.sender] != MigrationPermission.BIDIRECTIONAL - ) revert MigrationNotPermitted(); - (uint256[] memory ids, Upkeep[] memory upkeeps, bytes[] memory checkDatas) = abi.decode( - encodedUpkeeps, - (uint256[], Upkeep[], bytes[]) - ); - for (uint256 idx = 0; idx < ids.length; idx++) { - _createUpkeep( - ids[idx], - upkeeps[idx].target, - upkeeps[idx].executeGas, - upkeeps[idx].admin, - upkeeps[idx].balance, - checkDatas[idx] - ); - emit UpkeepReceived(ids[idx], upkeeps[idx].balance, msg.sender); - } - } - - /** - * @notice creates a new upkeep with the given fields - * @param target address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when - * performing upkeep - * @param admin address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - */ - function _createUpkeep( - uint256 id, - address target, - uint32 gasLimit, - address admin, - uint96 balance, - bytes memory checkData - ) internal whenNotPaused { - if (!target.isContract()) revert NotAContract(); - if (gasLimit < PERFORM_GAS_MIN || gasLimit > s_storage.maxPerformGas) revert GasLimitOutsideRange(); - s_upkeep[id] = Upkeep({ - target: target, - executeGas: gasLimit, - balance: balance, - admin: admin, - maxValidBlocknumber: UINT64_MAX, - lastKeeper: ZERO_ADDRESS, - amountSpent: 0 - }); - s_expectedLinkBalance = s_expectedLinkBalance + balance; - s_checkData[id] = checkData; - s_upkeepIDs.add(id); - } - - /** - * @dev retrieves feed data for fast gas/eth and link/eth prices. if the feed - * data is stale it uses the configured fallback price. Once a price is picked - * for gas it takes the min of gas price in the transaction or the fast gas - * price in order to reduce costs for the upkeep clients. - */ - function _getFeedData() private view returns (uint256 gasWei, uint256 linkEth) { - uint32 stalenessSeconds = s_storage.stalenessSeconds; - bool staleFallback = stalenessSeconds > 0; - uint256 timestamp; - int256 feedValue; - (, feedValue, , timestamp, ) = FAST_GAS_FEED.latestRoundData(); - if ((staleFallback && stalenessSeconds < block.timestamp - timestamp) || feedValue <= 0) { - gasWei = s_fallbackGasPrice; - } else { - gasWei = uint256(feedValue); - } - (, feedValue, , timestamp, ) = LINK_ETH_FEED.latestRoundData(); - if ((staleFallback && stalenessSeconds < block.timestamp - timestamp) || feedValue <= 0) { - linkEth = s_fallbackLinkPrice; - } else { - linkEth = uint256(feedValue); - } - return (gasWei, linkEth); - } - - /** - * @dev calculates LINK paid for gas spent plus a configure premium percentage - */ - function _calculatePaymentAmount( - uint256 gasLimit, - uint256 gasWei, - uint256 linkEth - ) private view returns (uint96 payment) { - uint256 weiForGas = gasWei * (gasLimit + REGISTRY_GAS_OVERHEAD); - uint256 premium = PPB_BASE + s_storage.paymentPremiumPPB; - uint256 total = ((weiForGas * (1e9) * (premium)) / (linkEth)) + (uint256(s_storage.flatFeeMicroLink) * (1e12)); - if (total > LINK_TOTAL_SUPPLY) revert PaymentGreaterThanAllLINK(); - return uint96(total); // LINK_TOTAL_SUPPLY < UINT96_MAX - } - - /** - * @dev calls target address with exactly gasAmount gas and data as calldata - * or reverts if at least gasAmount gas is not available - */ - function _callWithExactGas(uint256 gasAmount, address target, bytes memory data) private returns (bool success) { - assembly { - let g := gas() - // Compute g -= PERFORM_GAS_CUSHION and check for underflow - if lt(g, PERFORM_GAS_CUSHION) { - revert(0, 0) - } - g := sub(g, PERFORM_GAS_CUSHION) - // if g - g//64 <= gasAmount, revert - // (we subtract g//64 because of EIP-150) - if iszero(gt(sub(g, div(g, 64)), gasAmount)) { - revert(0, 0) - } - // solidity calls check that a contract actually exists at the destination, so we do the same - if iszero(extcodesize(target)) { - revert(0, 0) - } - // call and return whether we succeeded. ignore return data - success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0) - } - return success; - } - - /** - * @dev calls the Upkeep target with the performData param passed in by the - * keeper and the exact gas required by the Upkeep - */ - function _performUpkeepWithParams( - PerformParams memory params - ) private nonReentrant validUpkeep(params.id) returns (bool success) { - Upkeep memory upkeep = s_upkeep[params.id]; - _prePerformUpkeep(upkeep, params.from, params.maxLinkPayment); - - uint256 gasUsed = gasleft(); - bytes memory callData = abi.encodeWithSelector(PERFORM_SELECTOR, params.performData); - success = _callWithExactGas(params.gasLimit, upkeep.target, callData); - gasUsed = gasUsed - gasleft(); - - uint96 payment = _calculatePaymentAmount(gasUsed, params.adjustedGasWei, params.linkEth); - - s_upkeep[params.id].balance = s_upkeep[params.id].balance - payment; - s_upkeep[params.id].amountSpent = s_upkeep[params.id].amountSpent + payment; - s_upkeep[params.id].lastKeeper = params.from; - s_keeperInfo[params.from].balance = s_keeperInfo[params.from].balance + payment; - - emit UpkeepPerformed(params.id, success, params.from, payment, params.performData); - return success; - } - - /** - * @dev ensures all required checks are passed before an upkeep is performed - */ - function _prePerformUpkeep(Upkeep memory upkeep, address from, uint256 maxLinkPayment) private view { - if (!s_keeperInfo[from].active) revert OnlyActiveKeepers(); - if (upkeep.balance < maxLinkPayment) revert InsufficientFunds(); - if (upkeep.lastKeeper == from) revert KeepersMustTakeTurns(); - } - - /** - * @dev adjusts the gas price to min(ceiling, tx.gasprice) or just uses the ceiling if tx.gasprice is disabled - */ - function _adjustGasPrice(uint256 gasWei, bool useTxGasPrice) private view returns (uint256 adjustedPrice) { - adjustedPrice = gasWei * s_storage.gasCeilingMultiplier; - if (useTxGasPrice && tx.gasprice < adjustedPrice) { - adjustedPrice = tx.gasprice; - } - } - - /** - * @dev generates a PerformParams struct for use in _performUpkeepWithParams() - */ - function _generatePerformParams( - address from, - uint256 id, - bytes memory performData, - bool useTxGasPrice - ) private view returns (PerformParams memory) { - uint256 gasLimit = s_upkeep[id].executeGas; - (uint256 gasWei, uint256 linkEth) = _getFeedData(); - uint256 adjustedGasWei = _adjustGasPrice(gasWei, useTxGasPrice); - uint96 maxLinkPayment = _calculatePaymentAmount(gasLimit, adjustedGasWei, linkEth); - - return - PerformParams({ - from: from, - id: id, - performData: performData, - maxLinkPayment: maxLinkPayment, - gasLimit: gasLimit, - adjustedGasWei: adjustedGasWei, - linkEth: linkEth - }); - } - - // MODIFIERS - - /** - * @dev ensures a upkeep is valid - */ - modifier validUpkeep(uint256 id) { - if (s_upkeep[id].maxValidBlocknumber <= block.number) revert UpkeepNotActive(); - _; - } - - /** - * @dev Reverts if called by anyone other than the admin of upkeep #id - */ - modifier onlyUpkeepAdmin(uint256 id) { - if (msg.sender != s_upkeep[id].admin) revert OnlyCallableByAdmin(); - _; - } - - /** - * @dev Reverts if called on a cancelled upkeep - */ - modifier onlyActiveUpkeep(uint256 id) { - if (s_upkeep[id].maxValidBlocknumber != UINT64_MAX) revert UpkeepNotActive(); - _; - } - - /** - * @dev ensures that burns don't accidentally happen by sending to the zero - * address - */ - modifier validRecipient(address to) { - if (to == ZERO_ADDRESS) revert InvalidRecipient(); - _; - } - - /** - * @dev Reverts if called by anyone other than the contract owner or registrar. - */ - modifier onlyOwnerOrRegistrar() { - if (msg.sender != owner() && msg.sender != s_registrar) revert OnlyCallableByOwnerOrRegistrar(); - _; - } -} diff --git a/contracts/src/v0.8/automation/v1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.sol b/contracts/src/v0.8/automation/v1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.sol deleted file mode 100644 index 253a421a5a0..00000000000 --- a/contracts/src/v0.8/automation/v1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.sol +++ /dev/null @@ -1,48 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import {AutomationRegistryExecutableInterface} from "../interfaces/v1_2/AutomationRegistryInterface1_2.sol"; -import {ConfirmedOwner} from "../../shared/access/ConfirmedOwner.sol"; - -/** - * @notice This contract serves as a wrapper around a keeper registry's checkUpkeep function. - */ -contract KeeperRegistryCheckUpkeepGasUsageWrapper1_2 is ConfirmedOwner { - AutomationRegistryExecutableInterface private immutable i_keeperRegistry; - - /** - * @param keeperRegistry address of a keeper registry - */ - constructor(AutomationRegistryExecutableInterface keeperRegistry) ConfirmedOwner(msg.sender) { - i_keeperRegistry = keeperRegistry; - } - - /** - * @return the keeper registry - */ - function getKeeperRegistry() external view returns (AutomationRegistryExecutableInterface) { - return i_keeperRegistry; - } - - /** - * @notice This function is called by monitoring service to estimate how much gas checkUpkeep functions will consume. - * @param id identifier of the upkeep to check - * @param from the address to simulate performing the upkeep from - */ - function measureCheckGas(uint256 id, address from) external returns (bool, bytes memory, uint256) { - uint256 startGas = gasleft(); - try i_keeperRegistry.checkUpkeep(id, from) returns ( - bytes memory performData, - uint256 maxLinkPayment, - uint256 gasLimit, - uint256 adjustedGasWei, - uint256 linkEth - ) { - uint256 gasUsed = startGas - gasleft(); - return (true, performData, gasUsed); - } catch { - uint256 gasUsed = startGas - gasleft(); - return (false, "", gasUsed); - } - } -} diff --git a/contracts/src/v0.8/automation/v1_3/KeeperRegistry1_3.sol b/contracts/src/v0.8/automation/v1_3/KeeperRegistry1_3.sol deleted file mode 100644 index 2d56443822b..00000000000 --- a/contracts/src/v0.8/automation/v1_3/KeeperRegistry1_3.sol +++ /dev/null @@ -1,548 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "@openzeppelin/contracts/proxy/Proxy.sol"; -import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; -import "@openzeppelin/contracts/utils/Address.sol"; -import "./KeeperRegistryBase1_3.sol"; -import "./KeeperRegistryLogic1_3.sol"; -import {AutomationRegistryExecutableInterface, State} from "../interfaces/v1_3/AutomationRegistryInterface1_3.sol"; -import "../interfaces/MigratableKeeperRegistryInterface.sol"; -import "../../shared/interfaces/ITypeAndVersion.sol"; -import "../../shared/interfaces/IERC677Receiver.sol"; - -/** - * @notice Registry for adding work for Chainlink Keepers to perform on client - * contracts. Clients must support the Upkeep interface. - */ -contract KeeperRegistry1_3 is - KeeperRegistryBase1_3, - Proxy, - ITypeAndVersion, - AutomationRegistryExecutableInterface, - MigratableKeeperRegistryInterface, - IERC677Receiver -{ - using Address for address; - using EnumerableSet for EnumerableSet.UintSet; - - address public immutable KEEPER_REGISTRY_LOGIC; - - /** - * @notice versions: - * - KeeperRegistry 1.3.0: split contract into Proxy and Logic - * : account for Arbitrum and Optimism L1 gas fee - * : allow users to configure upkeeps - * - KeeperRegistry 1.2.0: allow funding within performUpkeep - * : allow configurable registry maxPerformGas - * : add function to let admin change upkeep gas limit - * : add minUpkeepSpend requirement - : upgrade to solidity v0.8 - * - KeeperRegistry 1.1.0: added flatFeeMicroLink - * - KeeperRegistry 1.0.0: initial release - */ - string public constant override typeAndVersion = "KeeperRegistry 1.3.0"; - - /** - * @param keeperRegistryLogic the address of keeper registry logic - * @param config registry config settings - */ - constructor( - KeeperRegistryLogic1_3 keeperRegistryLogic, - Config memory config - ) - KeeperRegistryBase1_3( - keeperRegistryLogic.PAYMENT_MODEL(), - keeperRegistryLogic.REGISTRY_GAS_OVERHEAD(), - address(keeperRegistryLogic.LINK()), - address(keeperRegistryLogic.LINK_ETH_FEED()), - address(keeperRegistryLogic.FAST_GAS_FEED()) - ) - { - KEEPER_REGISTRY_LOGIC = address(keeperRegistryLogic); - setConfig(config); - } - - // ACTIONS - - /** - * @notice adds a new upkeep - * @param target address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when - * performing upkeep - * @param admin address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - */ - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes calldata checkData - ) external override returns (uint256 id) { - // Executed through logic contract - _fallback(); - } - - /** - * @notice simulated by keepers via eth_call to see if the upkeep needs to be - * performed. If upkeep is needed, the call then simulates performUpkeep - * to make sure it succeeds. Finally, it returns the success status along with - * payment information and the perform data payload. - * @param id identifier of the upkeep to check - * @param from the address to simulate performing the upkeep from - */ - function checkUpkeep( - uint256 id, - address from - ) - external - override - cannotExecute - returns ( - bytes memory performData, - uint256 maxLinkPayment, - uint256 gasLimit, - uint256 adjustedGasWei, - uint256 linkEth - ) - { - // Executed through logic contract - _fallback(); - } - - /** - * @notice executes the upkeep with the perform data returned from - * checkUpkeep, validates the keeper's permissions, and pays the keeper. - * @param id identifier of the upkeep to execute the data with. - * @param performData calldata parameter to be passed to the target upkeep. - */ - function performUpkeep( - uint256 id, - bytes calldata performData - ) external override whenNotPaused returns (bool success) { - return _performUpkeepWithParams(_generatePerformParams(msg.sender, id, performData, true)); - } - - /** - * @notice prevent an upkeep from being performed in the future - * @param id upkeep to be canceled - */ - function cancelUpkeep(uint256 id) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice pause an upkeep - * @param id upkeep to be paused - */ - function pauseUpkeep(uint256 id) external override { - Upkeep memory upkeep = s_upkeep[id]; - requireAdminAndNotCancelled(upkeep); - if (upkeep.paused) revert OnlyUnpausedUpkeep(); - s_upkeep[id].paused = true; - s_upkeepIDs.remove(id); - emit UpkeepPaused(id); - } - - /** - * @notice unpause an upkeep - * @param id upkeep to be resumed - */ - function unpauseUpkeep(uint256 id) external override { - Upkeep memory upkeep = s_upkeep[id]; - requireAdminAndNotCancelled(upkeep); - if (!upkeep.paused) revert OnlyPausedUpkeep(); - s_upkeep[id].paused = false; - s_upkeepIDs.add(id); - emit UpkeepUnpaused(id); - } - - /** - * @notice update the check data of an upkeep - * @param id the id of the upkeep whose check data needs to be updated - * @param newCheckData the new check data - */ - function updateCheckData(uint256 id, bytes calldata newCheckData) external override { - Upkeep memory upkeep = s_upkeep[id]; - requireAdminAndNotCancelled(upkeep); - s_checkData[id] = newCheckData; - emit UpkeepCheckDataUpdated(id, newCheckData); - } - - /** - * @notice adds LINK funding for an upkeep by transferring from the sender's - * LINK balance - * @param id upkeep to fund - * @param amount number of LINK to transfer - */ - function addFunds(uint256 id, uint96 amount) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice uses LINK's transferAndCall to LINK and add funding to an upkeep - * @dev safe to cast uint256 to uint96 as total LINK supply is under UINT96MAX - * @param sender the account which transferred the funds - * @param amount number of LINK transfer - */ - function onTokenTransfer(address sender, uint256 amount, bytes calldata data) external override { - if (msg.sender != address(LINK)) revert OnlyCallableByLINKToken(); - if (data.length != 32) revert InvalidDataLength(); - uint256 id = abi.decode(data, (uint256)); - if (s_upkeep[id].maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - - s_upkeep[id].balance = s_upkeep[id].balance + uint96(amount); - s_expectedLinkBalance = s_expectedLinkBalance + amount; - - emit FundsAdded(id, sender, uint96(amount)); - } - - /** - * @notice removes funding from a canceled upkeep - * @param id upkeep to withdraw funds from - * @param to destination address for sending remaining funds - */ - function withdrawFunds(uint256 id, address to) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice withdraws LINK funds collected through cancellation fees - */ - function withdrawOwnerFunds() external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice allows the admin of an upkeep to modify gas limit - * @param id upkeep to be change the gas limit for - * @param gasLimit new gas limit for the upkeep - */ - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice recovers LINK funds improperly transferred to the registry - * @dev In principle this function’s execution cost could exceed block - * gas limit. However, in our anticipated deployment, the number of upkeeps and - * keepers will be low enough to avoid this problem. - */ - function recoverFunds() external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice withdraws a keeper's payment, callable only by the keeper's payee - * @param from keeper address - * @param to address to send the payment to - */ - function withdrawPayment(address from, address to) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice proposes the safe transfer of a keeper's payee to another address - * @param keeper address of the keeper to transfer payee role - * @param proposed address to nominate for next payeeship - */ - function transferPayeeship(address keeper, address proposed) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice accepts the safe transfer of payee role for a keeper - * @param keeper address to accept the payee role for - */ - function acceptPayeeship(address keeper) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice proposes the safe transfer of an upkeep's admin role to another address - * @param id the upkeep id to transfer admin - * @param proposed address to nominate for the new upkeep admin - */ - function transferUpkeepAdmin(uint256 id, address proposed) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice accepts the safe transfer of admin role for an upkeep - * @param id the upkeep id - */ - function acceptUpkeepAdmin(uint256 id) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice signals to keepers that they should not perform upkeeps until the - * contract has been unpaused - */ - function pause() external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice signals to keepers that they can perform upkeeps once again after - * having been paused - */ - function unpause() external { - // Executed through logic contract - _fallback(); - } - - // SETTERS - - /** - * @notice updates the configuration of the registry - * @param config registry config fields - */ - function setConfig(Config memory config) public onlyOwner { - if (config.maxPerformGas < s_storage.maxPerformGas) revert GasLimitCanOnlyIncrease(); - s_storage = Storage({ - paymentPremiumPPB: config.paymentPremiumPPB, - flatFeeMicroLink: config.flatFeeMicroLink, - blockCountPerTurn: config.blockCountPerTurn, - checkGasLimit: config.checkGasLimit, - stalenessSeconds: config.stalenessSeconds, - gasCeilingMultiplier: config.gasCeilingMultiplier, - minUpkeepSpend: config.minUpkeepSpend, - maxPerformGas: config.maxPerformGas, - nonce: s_storage.nonce - }); - s_fallbackGasPrice = config.fallbackGasPrice; - s_fallbackLinkPrice = config.fallbackLinkPrice; - s_transcoder = config.transcoder; - s_registrar = config.registrar; - emit ConfigSet(config); - } - - /** - * @notice update the list of keepers allowed to perform upkeep - * @param keepers list of addresses allowed to perform upkeep - * @param payees addresses corresponding to keepers who are allowed to - * move payments which have been accrued - */ - function setKeepers(address[] calldata keepers, address[] calldata payees) external { - // Executed through logic contract - _fallback(); - } - - // GETTERS - - /** - * @notice read all of the details about an upkeep - */ - function getUpkeep( - uint256 id - ) - external - view - override - returns ( - address target, - uint32 executeGas, - bytes memory checkData, - uint96 balance, - address lastKeeper, - address admin, - uint64 maxValidBlocknumber, - uint96 amountSpent, - bool paused - ) - { - Upkeep memory reg = s_upkeep[id]; - return ( - reg.target, - reg.executeGas, - s_checkData[id], - reg.balance, - reg.lastKeeper, - reg.admin, - reg.maxValidBlocknumber, - reg.amountSpent, - reg.paused - ); - } - - /** - * @notice retrieve active upkeep IDs. Active upkeep is defined as an upkeep which is not paused and not canceled. - * @param startIndex starting index in list - * @param maxCount max count to retrieve (0 = unlimited) - * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one - * should consider keeping the blockheight constant to ensure a holistic picture of the contract state - */ - function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view override returns (uint256[] memory) { - uint256 maxIdx = s_upkeepIDs.length(); - if (startIndex >= maxIdx) revert IndexOutOfRange(); - if (maxCount == 0) { - maxCount = maxIdx - startIndex; - } - uint256[] memory ids = new uint256[](maxCount); - for (uint256 idx = 0; idx < maxCount; idx++) { - ids[idx] = s_upkeepIDs.at(startIndex + idx); - } - return ids; - } - - /** - * @notice read the current info about any keeper address - */ - function getKeeperInfo(address query) external view override returns (address payee, bool active, uint96 balance) { - KeeperInfo memory keeper = s_keeperInfo[query]; - return (keeper.payee, keeper.active, keeper.balance); - } - - /** - * @notice read the current state of the registry - */ - function getState() - external - view - override - returns (State memory state, Config memory config, address[] memory keepers) - { - Storage memory store = s_storage; - state.nonce = store.nonce; - state.ownerLinkBalance = s_ownerLinkBalance; - state.expectedLinkBalance = s_expectedLinkBalance; - state.numUpkeeps = s_upkeepIDs.length(); - config.paymentPremiumPPB = store.paymentPremiumPPB; - config.flatFeeMicroLink = store.flatFeeMicroLink; - config.blockCountPerTurn = store.blockCountPerTurn; - config.checkGasLimit = store.checkGasLimit; - config.stalenessSeconds = store.stalenessSeconds; - config.gasCeilingMultiplier = store.gasCeilingMultiplier; - config.minUpkeepSpend = store.minUpkeepSpend; - config.maxPerformGas = store.maxPerformGas; - config.fallbackGasPrice = s_fallbackGasPrice; - config.fallbackLinkPrice = s_fallbackLinkPrice; - config.transcoder = s_transcoder; - config.registrar = s_registrar; - return (state, config, s_keeperList); - } - - /** - * @notice calculates the minimum balance required for an upkeep to remain eligible - * @param id the upkeep id to calculate minimum balance for - */ - function getMinBalanceForUpkeep(uint256 id) external view returns (uint96 minBalance) { - return getMaxPaymentForGas(s_upkeep[id].executeGas); - } - - /** - * @notice calculates the maximum payment for a given gas limit - * @param gasLimit the gas to calculate payment for - */ - function getMaxPaymentForGas(uint256 gasLimit) public view returns (uint96 maxPayment) { - (uint256 fastGasWei, uint256 linkEth) = _getFeedData(); - return _calculatePaymentAmount(gasLimit, fastGasWei, linkEth, false); - } - - /** - * @notice retrieves the migration permission for a peer registry - */ - function getPeerRegistryMigrationPermission(address peer) external view returns (MigrationPermission) { - return s_peerRegistryMigrationPermission[peer]; - } - - /** - * @notice sets the peer registry migration permission - */ - function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external { - // Executed through logic contract - _fallback(); - } - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - function migrateUpkeeps(uint256[] calldata ids, address destination) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - UpkeepFormat public constant override upkeepTranscoderVersion = UPKEEP_TRANSCODER_VERSION_BASE; - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - function receiveUpkeeps(bytes calldata encodedUpkeeps) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @dev This is the address to which proxy functions are delegated to - */ - function _implementation() internal view override returns (address) { - return KEEPER_REGISTRY_LOGIC; - } - - /** - * @dev calls target address with exactly gasAmount gas and data as calldata - * or reverts if at least gasAmount gas is not available - */ - function _callWithExactGas(uint256 gasAmount, address target, bytes memory data) private returns (bool success) { - assembly { - let g := gas() - // Compute g -= PERFORM_GAS_CUSHION and check for underflow - if lt(g, PERFORM_GAS_CUSHION) { - revert(0, 0) - } - g := sub(g, PERFORM_GAS_CUSHION) - // if g - g//64 <= gasAmount, revert - // (we subtract g//64 because of EIP-150) - if iszero(gt(sub(g, div(g, 64)), gasAmount)) { - revert(0, 0) - } - // solidity calls check that a contract actually exists at the destination, so we do the same - if iszero(extcodesize(target)) { - revert(0, 0) - } - // call and return whether we succeeded. ignore return data - success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0) - } - return success; - } - - /** - * @dev calls the Upkeep target with the performData param passed in by the - * keeper and the exact gas required by the Upkeep - */ - function _performUpkeepWithParams(PerformParams memory params) private nonReentrant returns (bool success) { - Upkeep memory upkeep = s_upkeep[params.id]; - if (upkeep.maxValidBlocknumber <= block.number) revert UpkeepCancelled(); - _prePerformUpkeep(upkeep, params.from, params.maxLinkPayment); - - uint256 gasUsed = gasleft(); - bytes memory callData = abi.encodeWithSelector(PERFORM_SELECTOR, params.performData); - success = _callWithExactGas(params.gasLimit, upkeep.target, callData); - gasUsed = gasUsed - gasleft(); - uint96 payment = _calculatePaymentAmount(gasUsed, params.fastGasWei, params.linkEth, true); - - s_upkeep[params.id].balance = s_upkeep[params.id].balance - payment; - s_upkeep[params.id].amountSpent = s_upkeep[params.id].amountSpent + payment; - s_upkeep[params.id].lastKeeper = params.from; - s_keeperInfo[params.from].balance = s_keeperInfo[params.from].balance + payment; - - emit UpkeepPerformed(params.id, success, params.from, payment, params.performData); - return success; - } -} diff --git a/contracts/src/v0.8/automation/v1_3/KeeperRegistryBase1_3.sol b/contracts/src/v0.8/automation/v1_3/KeeperRegistryBase1_3.sol deleted file mode 100644 index c21f3a73912..00000000000 --- a/contracts/src/v0.8/automation/v1_3/KeeperRegistryBase1_3.sol +++ /dev/null @@ -1,304 +0,0 @@ -pragma solidity 0.8.6; - -import "@openzeppelin/contracts/security/Pausable.sol"; -import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; -import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; -import "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; -import "../../vendor/@eth-optimism/contracts/v0.8.6/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; -import "../ExecutionPrevention.sol"; -import {Config, Upkeep} from "../interfaces/v1_3/AutomationRegistryInterface1_3.sol"; -import "../../shared/access/ConfirmedOwner.sol"; -import "../../shared/interfaces/AggregatorV3Interface.sol"; -import "../../shared/interfaces/LinkTokenInterface.sol"; -import "../interfaces/KeeperCompatibleInterface.sol"; -import "../interfaces/UpkeepTranscoderInterface.sol"; - -/** - * @notice Base Keeper Registry contract, contains shared logic between - * KeeperRegistry and KeeperRegistryLogic - */ -abstract contract KeeperRegistryBase1_3 is ConfirmedOwner, ExecutionPrevention, ReentrancyGuard, Pausable { - address internal constant ZERO_ADDRESS = address(0); - address internal constant IGNORE_ADDRESS = 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF; - bytes4 internal constant CHECK_SELECTOR = KeeperCompatibleInterface.checkUpkeep.selector; - bytes4 internal constant PERFORM_SELECTOR = KeeperCompatibleInterface.performUpkeep.selector; - uint256 internal constant PERFORM_GAS_MIN = 2_300; - uint256 internal constant CANCELLATION_DELAY = 50; - uint256 internal constant PERFORM_GAS_CUSHION = 5_000; - uint256 internal constant PPB_BASE = 1_000_000_000; - uint32 internal constant UINT32_MAX = type(uint32).max; - uint96 internal constant LINK_TOTAL_SUPPLY = 1e27; - UpkeepFormat internal constant UPKEEP_TRANSCODER_VERSION_BASE = UpkeepFormat.V2; - // L1_FEE_DATA_PADDING includes 35 bytes for L1 data padding for Optimism - bytes internal constant L1_FEE_DATA_PADDING = - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - // MAX_INPUT_DATA represents the estimated max size of the sum of L1 data padding and msg.data in performUpkeep - // function, which includes 4 bytes for function selector, 32 bytes for upkeep id, 35 bytes for data padding, and - // 64 bytes for estimated perform data - bytes internal constant MAX_INPUT_DATA = - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - - address[] internal s_keeperList; - EnumerableSet.UintSet internal s_upkeepIDs; - mapping(uint256 => Upkeep) internal s_upkeep; - mapping(address => KeeperInfo) internal s_keeperInfo; - mapping(address => address) internal s_proposedPayee; - mapping(uint256 => address) internal s_proposedAdmin; - mapping(uint256 => bytes) internal s_checkData; - mapping(address => MigrationPermission) internal s_peerRegistryMigrationPermission; - Storage internal s_storage; - uint256 internal s_fallbackGasPrice; // not in config object for gas savings - uint256 internal s_fallbackLinkPrice; // not in config object for gas savings - uint96 internal s_ownerLinkBalance; - uint256 internal s_expectedLinkBalance; - address internal s_transcoder; - address internal s_registrar; - - LinkTokenInterface public immutable LINK; - AggregatorV3Interface public immutable LINK_ETH_FEED; - AggregatorV3Interface public immutable FAST_GAS_FEED; - OVM_GasPriceOracle public immutable OPTIMISM_ORACLE = OVM_GasPriceOracle(0x420000000000000000000000000000000000000F); - ArbGasInfo public immutable ARB_NITRO_ORACLE = ArbGasInfo(0x000000000000000000000000000000000000006C); - PaymentModel public immutable PAYMENT_MODEL; - uint256 public immutable REGISTRY_GAS_OVERHEAD; - - error ArrayHasNoEntries(); - error CannotCancel(); - error DuplicateEntry(); - error EmptyAddress(); - error GasLimitCanOnlyIncrease(); - error GasLimitOutsideRange(); - error IndexOutOfRange(); - error InsufficientFunds(); - error InvalidDataLength(); - error InvalidPayee(); - error InvalidRecipient(); - error KeepersMustTakeTurns(); - error MigrationNotPermitted(); - error NotAContract(); - error OnlyActiveKeepers(); - error OnlyCallableByAdmin(); - error OnlyCallableByLINKToken(); - error OnlyCallableByOwnerOrAdmin(); - error OnlyCallableByOwnerOrRegistrar(); - error OnlyCallableByPayee(); - error OnlyCallableByProposedAdmin(); - error OnlyCallableByProposedPayee(); - error OnlyPausedUpkeep(); - error OnlyUnpausedUpkeep(); - error ParameterLengthError(); - error PaymentGreaterThanAllLINK(); - error TargetCheckReverted(bytes reason); - error TranscoderNotSet(); - error UpkeepCancelled(); - error UpkeepNotCanceled(); - error UpkeepNotNeeded(); - error ValueNotChanged(); - - enum MigrationPermission { - NONE, - OUTGOING, - INCOMING, - BIDIRECTIONAL - } - - enum PaymentModel { - DEFAULT, - ARBITRUM, - OPTIMISM - } - - /** - * @notice storage of the registry, contains a mix of config and state data - */ - struct Storage { - uint32 paymentPremiumPPB; - uint32 flatFeeMicroLink; - uint24 blockCountPerTurn; - uint32 checkGasLimit; - uint24 stalenessSeconds; - uint16 gasCeilingMultiplier; - uint96 minUpkeepSpend; // 1 full evm word - uint32 maxPerformGas; - uint32 nonce; - } - - struct KeeperInfo { - address payee; - uint96 balance; - bool active; - } - - struct PerformParams { - address from; - uint256 id; - bytes performData; - uint256 maxLinkPayment; - uint256 gasLimit; - uint256 fastGasWei; - uint256 linkEth; - } - - event ConfigSet(Config config); - event FundsAdded(uint256 indexed id, address indexed from, uint96 amount); - event FundsWithdrawn(uint256 indexed id, uint256 amount, address to); - event KeepersUpdated(address[] keepers, address[] payees); - event OwnerFundsWithdrawn(uint96 amount); - event PayeeshipTransferRequested(address indexed keeper, address indexed from, address indexed to); - event PayeeshipTransferred(address indexed keeper, address indexed from, address indexed to); - event PaymentWithdrawn(address indexed keeper, uint256 indexed amount, address indexed to, address payee); - event UpkeepAdminTransferRequested(uint256 indexed id, address indexed from, address indexed to); - event UpkeepAdminTransferred(uint256 indexed id, address indexed from, address indexed to); - event UpkeepCanceled(uint256 indexed id, uint64 indexed atBlockHeight); - event UpkeepCheckDataUpdated(uint256 indexed id, bytes newCheckData); - event UpkeepGasLimitSet(uint256 indexed id, uint96 gasLimit); - event UpkeepMigrated(uint256 indexed id, uint256 remainingBalance, address destination); - event UpkeepPaused(uint256 indexed id); - event UpkeepPerformed( - uint256 indexed id, - bool indexed success, - address indexed from, - uint96 payment, - bytes performData - ); - event UpkeepReceived(uint256 indexed id, uint256 startingBalance, address importedFrom); - event UpkeepUnpaused(uint256 indexed id); - event UpkeepRegistered(uint256 indexed id, uint32 executeGas, address admin); - - /** - * @param paymentModel the payment model of default, Arbitrum, or Optimism - * @param registryGasOverhead the gas overhead used by registry in performUpkeep - * @param link address of the LINK Token - * @param linkEthFeed address of the LINK/ETH price feed - * @param fastGasFeed address of the Fast Gas price feed - */ - constructor( - PaymentModel paymentModel, - uint256 registryGasOverhead, - address link, - address linkEthFeed, - address fastGasFeed - ) ConfirmedOwner(msg.sender) { - PAYMENT_MODEL = paymentModel; - REGISTRY_GAS_OVERHEAD = registryGasOverhead; - if (ZERO_ADDRESS == link || ZERO_ADDRESS == linkEthFeed || ZERO_ADDRESS == fastGasFeed) { - revert EmptyAddress(); - } - LINK = LinkTokenInterface(link); - LINK_ETH_FEED = AggregatorV3Interface(linkEthFeed); - FAST_GAS_FEED = AggregatorV3Interface(fastGasFeed); - } - - /** - * @dev retrieves feed data for fast gas/eth and link/eth prices. if the feed - * data is stale it uses the configured fallback price. Once a price is picked - * for gas it takes the min of gas price in the transaction or the fast gas - * price in order to reduce costs for the upkeep clients. - */ - function _getFeedData() internal view returns (uint256 gasWei, uint256 linkEth) { - uint32 stalenessSeconds = s_storage.stalenessSeconds; - bool staleFallback = stalenessSeconds > 0; - uint256 timestamp; - int256 feedValue; - (, feedValue, , timestamp, ) = FAST_GAS_FEED.latestRoundData(); - if ((staleFallback && stalenessSeconds < block.timestamp - timestamp) || feedValue <= 0) { - gasWei = s_fallbackGasPrice; - } else { - gasWei = uint256(feedValue); - } - (, feedValue, , timestamp, ) = LINK_ETH_FEED.latestRoundData(); - if ((staleFallback && stalenessSeconds < block.timestamp - timestamp) || feedValue <= 0) { - linkEth = s_fallbackLinkPrice; - } else { - linkEth = uint256(feedValue); - } - return (gasWei, linkEth); - } - - /** - * @dev calculates LINK paid for gas spent plus a configure premium percentage - * @param gasLimit the amount of gas used - * @param fastGasWei the fast gas price - * @param linkEth the exchange ratio between LINK and ETH - * @param isExecution if this is triggered by a perform upkeep function - */ - function _calculatePaymentAmount( - uint256 gasLimit, - uint256 fastGasWei, - uint256 linkEth, - bool isExecution - ) internal view returns (uint96 payment) { - Storage memory store = s_storage; - uint256 gasWei = fastGasWei * store.gasCeilingMultiplier; - // in case it's actual execution use actual gas price, capped by fastGasWei * gasCeilingMultiplier - if (isExecution && tx.gasprice < gasWei) { - gasWei = tx.gasprice; - } - - uint256 weiForGas = gasWei * (gasLimit + REGISTRY_GAS_OVERHEAD); - uint256 premium = PPB_BASE + store.paymentPremiumPPB; - uint256 l1CostWei = 0; - if (PAYMENT_MODEL == PaymentModel.OPTIMISM) { - bytes memory txCallData = new bytes(0); - if (isExecution) { - txCallData = bytes.concat(msg.data, L1_FEE_DATA_PADDING); - } else { - txCallData = MAX_INPUT_DATA; - } - l1CostWei = OPTIMISM_ORACLE.getL1Fee(txCallData); - } else if (PAYMENT_MODEL == PaymentModel.ARBITRUM) { - l1CostWei = ARB_NITRO_ORACLE.getCurrentTxL1GasFees(); - } - // if it's not performing upkeeps, use gas ceiling multiplier to estimate the upper bound - if (!isExecution) { - l1CostWei = store.gasCeilingMultiplier * l1CostWei; - } - - uint256 total = ((weiForGas + l1CostWei) * 1e9 * premium) / linkEth + uint256(store.flatFeeMicroLink) * 1e12; - if (total > LINK_TOTAL_SUPPLY) revert PaymentGreaterThanAllLINK(); - return uint96(total); // LINK_TOTAL_SUPPLY < UINT96_MAX - } - - /** - * @dev ensures all required checks are passed before an upkeep is performed - */ - function _prePerformUpkeep(Upkeep memory upkeep, address from, uint256 maxLinkPayment) internal view { - if (upkeep.paused) revert OnlyUnpausedUpkeep(); - if (!s_keeperInfo[from].active) revert OnlyActiveKeepers(); - if (upkeep.balance < maxLinkPayment) revert InsufficientFunds(); - if (upkeep.lastKeeper == from) revert KeepersMustTakeTurns(); - } - - /** - * @dev ensures the upkeep is not cancelled and the caller is the upkeep admin - */ - function requireAdminAndNotCancelled(Upkeep memory upkeep) internal view { - if (msg.sender != upkeep.admin) revert OnlyCallableByAdmin(); - if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - } - - /** - * @dev generates a PerformParams struct for use in _performUpkeepWithParams() - */ - function _generatePerformParams( - address from, - uint256 id, - bytes memory performData, - bool isExecution - ) internal view returns (PerformParams memory) { - uint256 gasLimit = s_upkeep[id].executeGas; - (uint256 fastGasWei, uint256 linkEth) = _getFeedData(); - uint96 maxLinkPayment = _calculatePaymentAmount(gasLimit, fastGasWei, linkEth, isExecution); - - return - PerformParams({ - from: from, - id: id, - performData: performData, - maxLinkPayment: maxLinkPayment, - gasLimit: gasLimit, - fastGasWei: fastGasWei, - linkEth: linkEth - }); - } -} diff --git a/contracts/src/v0.8/automation/v1_3/KeeperRegistryLogic1_3.sol b/contracts/src/v0.8/automation/v1_3/KeeperRegistryLogic1_3.sol deleted file mode 100644 index fd7c3afdc1c..00000000000 --- a/contracts/src/v0.8/automation/v1_3/KeeperRegistryLogic1_3.sol +++ /dev/null @@ -1,404 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; -import "@openzeppelin/contracts/utils/Address.sol"; -import "./KeeperRegistryBase1_3.sol"; -import "../interfaces/MigratableKeeperRegistryInterface.sol"; -import "../interfaces/UpkeepTranscoderInterface.sol"; - -/** - * @notice Logic contract, works in tandem with KeeperRegistry as a proxy - */ -contract KeeperRegistryLogic1_3 is KeeperRegistryBase1_3 { - using Address for address; - using EnumerableSet for EnumerableSet.UintSet; - - /** - * @param paymentModel one of Default, Arbitrum, Optimism - * @param registryGasOverhead the gas overhead used by registry in performUpkeep - * @param link address of the LINK Token - * @param linkEthFeed address of the LINK/ETH price feed - * @param fastGasFeed address of the Fast Gas price feed - */ - constructor( - PaymentModel paymentModel, - uint256 registryGasOverhead, - address link, - address linkEthFeed, - address fastGasFeed - ) KeeperRegistryBase1_3(paymentModel, registryGasOverhead, link, linkEthFeed, fastGasFeed) {} - - function checkUpkeep( - uint256 id, - address from - ) - external - cannotExecute - returns ( - bytes memory performData, - uint256 maxLinkPayment, - uint256 gasLimit, - uint256 adjustedGasWei, - uint256 linkEth - ) - { - Upkeep memory upkeep = s_upkeep[id]; - - bytes memory callData = abi.encodeWithSelector(CHECK_SELECTOR, s_checkData[id]); - (bool success, bytes memory result) = upkeep.target.call{gas: s_storage.checkGasLimit}(callData); - - if (!success) revert TargetCheckReverted(result); - - (success, performData) = abi.decode(result, (bool, bytes)); - if (!success) revert UpkeepNotNeeded(); - - PerformParams memory params = _generatePerformParams(from, id, performData, false); - _prePerformUpkeep(upkeep, params.from, params.maxLinkPayment); - - return ( - performData, - params.maxLinkPayment, - params.gasLimit, - // adjustedGasWei equals fastGasWei multiplies gasCeilingMultiplier in non-execution cases - params.fastGasWei * s_storage.gasCeilingMultiplier, - params.linkEth - ); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function withdrawOwnerFunds() external onlyOwner { - uint96 amount = s_ownerLinkBalance; - - s_expectedLinkBalance = s_expectedLinkBalance - amount; - s_ownerLinkBalance = 0; - - emit OwnerFundsWithdrawn(amount); - LINK.transfer(msg.sender, amount); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function recoverFunds() external onlyOwner { - uint256 total = LINK.balanceOf(address(this)); - LINK.transfer(msg.sender, total - s_expectedLinkBalance); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setKeepers(address[] calldata keepers, address[] calldata payees) external onlyOwner { - if (keepers.length != payees.length || keepers.length < 2) revert ParameterLengthError(); - for (uint256 i = 0; i < s_keeperList.length; i++) { - address keeper = s_keeperList[i]; - s_keeperInfo[keeper].active = false; - } - for (uint256 i = 0; i < keepers.length; i++) { - address keeper = keepers[i]; - KeeperInfo storage s_keeper = s_keeperInfo[keeper]; - address oldPayee = s_keeper.payee; - address newPayee = payees[i]; - if ( - (newPayee == ZERO_ADDRESS) || (oldPayee != ZERO_ADDRESS && oldPayee != newPayee && newPayee != IGNORE_ADDRESS) - ) revert InvalidPayee(); - if (s_keeper.active) revert DuplicateEntry(); - s_keeper.active = true; - if (newPayee != IGNORE_ADDRESS) { - s_keeper.payee = newPayee; - } - } - s_keeperList = keepers; - emit KeepersUpdated(keepers, payees); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function pause() external onlyOwner { - _pause(); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function unpause() external onlyOwner { - _unpause(); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external onlyOwner { - s_peerRegistryMigrationPermission[peer] = permission; - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes calldata checkData - ) external returns (uint256 id) { - if (msg.sender != owner() && msg.sender != s_registrar) revert OnlyCallableByOwnerOrRegistrar(); - - id = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), address(this), s_storage.nonce))); - _createUpkeep(id, target, gasLimit, admin, 0, checkData, false); - s_storage.nonce++; - emit UpkeepRegistered(id, gasLimit, admin); - return id; - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function cancelUpkeep(uint256 id) external { - Upkeep memory upkeep = s_upkeep[id]; - bool canceled = upkeep.maxValidBlocknumber != UINT32_MAX; - bool isOwner = msg.sender == owner(); - - if (canceled && !(isOwner && upkeep.maxValidBlocknumber > block.number)) revert CannotCancel(); - if (!isOwner && msg.sender != upkeep.admin) revert OnlyCallableByOwnerOrAdmin(); - - uint256 height = block.number; - if (!isOwner) { - height = height + CANCELLATION_DELAY; - } - s_upkeep[id].maxValidBlocknumber = uint32(height); - s_upkeepIDs.remove(id); - - // charge the cancellation fee if the minUpkeepSpend is not met - uint96 minUpkeepSpend = s_storage.minUpkeepSpend; - uint96 cancellationFee = 0; - // cancellationFee is supposed to be min(max(minUpkeepSpend - amountSpent,0), amountLeft) - if (upkeep.amountSpent < minUpkeepSpend) { - cancellationFee = minUpkeepSpend - upkeep.amountSpent; - if (cancellationFee > upkeep.balance) { - cancellationFee = upkeep.balance; - } - } - s_upkeep[id].balance = upkeep.balance - cancellationFee; - s_ownerLinkBalance = s_ownerLinkBalance + cancellationFee; - - emit UpkeepCanceled(id, uint64(height)); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function addFunds(uint256 id, uint96 amount) external { - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - - s_upkeep[id].balance = upkeep.balance + amount; - s_expectedLinkBalance = s_expectedLinkBalance + amount; - LINK.transferFrom(msg.sender, address(this), amount); - emit FundsAdded(id, msg.sender, amount); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function withdrawFunds(uint256 id, address to) external { - if (to == ZERO_ADDRESS) revert InvalidRecipient(); - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.admin != msg.sender) revert OnlyCallableByAdmin(); - if (upkeep.maxValidBlocknumber > block.number) revert UpkeepNotCanceled(); - - uint96 amountToWithdraw = s_upkeep[id].balance; - s_expectedLinkBalance = s_expectedLinkBalance - amountToWithdraw; - s_upkeep[id].balance = 0; - emit FundsWithdrawn(id, amountToWithdraw, to); - - LINK.transfer(to, amountToWithdraw); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external { - if (gasLimit < PERFORM_GAS_MIN || gasLimit > s_storage.maxPerformGas) revert GasLimitOutsideRange(); - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - if (upkeep.admin != msg.sender) revert OnlyCallableByAdmin(); - - s_upkeep[id].executeGas = gasLimit; - - emit UpkeepGasLimitSet(id, gasLimit); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function withdrawPayment(address from, address to) external { - if (to == ZERO_ADDRESS) revert InvalidRecipient(); - KeeperInfo memory keeper = s_keeperInfo[from]; - if (keeper.payee != msg.sender) revert OnlyCallableByPayee(); - - s_keeperInfo[from].balance = 0; - s_expectedLinkBalance = s_expectedLinkBalance - keeper.balance; - emit PaymentWithdrawn(from, keeper.balance, to, msg.sender); - - LINK.transfer(to, keeper.balance); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function transferPayeeship(address keeper, address proposed) external { - if (s_keeperInfo[keeper].payee != msg.sender) revert OnlyCallableByPayee(); - if (proposed == msg.sender) revert ValueNotChanged(); - - if (s_proposedPayee[keeper] != proposed) { - s_proposedPayee[keeper] = proposed; - emit PayeeshipTransferRequested(keeper, msg.sender, proposed); - } - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function acceptPayeeship(address keeper) external { - if (s_proposedPayee[keeper] != msg.sender) revert OnlyCallableByProposedPayee(); - address past = s_keeperInfo[keeper].payee; - s_keeperInfo[keeper].payee = msg.sender; - s_proposedPayee[keeper] = ZERO_ADDRESS; - - emit PayeeshipTransferred(keeper, past, msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function transferUpkeepAdmin(uint256 id, address proposed) external { - Upkeep memory upkeep = s_upkeep[id]; - requireAdminAndNotCancelled(upkeep); - if (proposed == msg.sender) revert ValueNotChanged(); - if (proposed == ZERO_ADDRESS) revert InvalidRecipient(); - - if (s_proposedAdmin[id] != proposed) { - s_proposedAdmin[id] = proposed; - emit UpkeepAdminTransferRequested(id, msg.sender, proposed); - } - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function acceptUpkeepAdmin(uint256 id) external { - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - if (s_proposedAdmin[id] != msg.sender) revert OnlyCallableByProposedAdmin(); - address past = upkeep.admin; - s_upkeep[id].admin = msg.sender; - s_proposedAdmin[id] = ZERO_ADDRESS; - - emit UpkeepAdminTransferred(id, past, msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function migrateUpkeeps(uint256[] calldata ids, address destination) external { - if ( - s_peerRegistryMigrationPermission[destination] != MigrationPermission.OUTGOING && - s_peerRegistryMigrationPermission[destination] != MigrationPermission.BIDIRECTIONAL - ) revert MigrationNotPermitted(); - if (s_transcoder == ZERO_ADDRESS) revert TranscoderNotSet(); - if (ids.length == 0) revert ArrayHasNoEntries(); - uint256 id; - Upkeep memory upkeep; - uint256 totalBalanceRemaining; - bytes[] memory checkDatas = new bytes[](ids.length); - Upkeep[] memory upkeeps = new Upkeep[](ids.length); - for (uint256 idx = 0; idx < ids.length; idx++) { - id = ids[idx]; - upkeep = s_upkeep[id]; - requireAdminAndNotCancelled(upkeep); - upkeeps[idx] = upkeep; - checkDatas[idx] = s_checkData[id]; - totalBalanceRemaining = totalBalanceRemaining + upkeep.balance; - delete s_upkeep[id]; - delete s_checkData[id]; - // nullify existing proposed admin change if an upkeep is being migrated - delete s_proposedAdmin[id]; - s_upkeepIDs.remove(id); - emit UpkeepMigrated(id, upkeep.balance, destination); - } - s_expectedLinkBalance = s_expectedLinkBalance - totalBalanceRemaining; - bytes memory encodedUpkeeps = abi.encode(ids, upkeeps, checkDatas); - MigratableKeeperRegistryInterface(destination).receiveUpkeeps( - UpkeepTranscoderInterface(s_transcoder).transcodeUpkeeps( - UPKEEP_TRANSCODER_VERSION_BASE, - MigratableKeeperRegistryInterface(destination).upkeepTranscoderVersion(), - encodedUpkeeps - ) - ); - LINK.transfer(destination, totalBalanceRemaining); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function receiveUpkeeps(bytes calldata encodedUpkeeps) external { - if ( - s_peerRegistryMigrationPermission[msg.sender] != MigrationPermission.INCOMING && - s_peerRegistryMigrationPermission[msg.sender] != MigrationPermission.BIDIRECTIONAL - ) revert MigrationNotPermitted(); - (uint256[] memory ids, Upkeep[] memory upkeeps, bytes[] memory checkDatas) = abi.decode( - encodedUpkeeps, - (uint256[], Upkeep[], bytes[]) - ); - for (uint256 idx = 0; idx < ids.length; idx++) { - _createUpkeep( - ids[idx], - upkeeps[idx].target, - upkeeps[idx].executeGas, - upkeeps[idx].admin, - upkeeps[idx].balance, - checkDatas[idx], - upkeeps[idx].paused - ); - emit UpkeepReceived(ids[idx], upkeeps[idx].balance, msg.sender); - } - } - - /** - * @notice creates a new upkeep with the given fields - * @param target address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when - * performing upkeep - * @param admin address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - * @param paused if this upkeep is paused - */ - function _createUpkeep( - uint256 id, - address target, - uint32 gasLimit, - address admin, - uint96 balance, - bytes memory checkData, - bool paused - ) internal whenNotPaused { - if (!target.isContract()) revert NotAContract(); - if (gasLimit < PERFORM_GAS_MIN || gasLimit > s_storage.maxPerformGas) revert GasLimitOutsideRange(); - s_upkeep[id] = Upkeep({ - target: target, - executeGas: gasLimit, - balance: balance, - admin: admin, - maxValidBlocknumber: UINT32_MAX, - lastKeeper: ZERO_ADDRESS, - amountSpent: 0, - paused: paused - }); - s_expectedLinkBalance = s_expectedLinkBalance + balance; - s_checkData[id] = checkData; - s_upkeepIDs.add(id); - } -} diff --git a/contracts/src/v0.8/automation/v2_0/KeeperRegistrar2_0.sol b/contracts/src/v0.8/automation/v2_0/KeeperRegistrar2_0.sol deleted file mode 100644 index 78cc06a8b20..00000000000 --- a/contracts/src/v0.8/automation/v2_0/KeeperRegistrar2_0.sol +++ /dev/null @@ -1,489 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "../../shared/interfaces/LinkTokenInterface.sol"; -import "../interfaces/v2_0/AutomationRegistryInterface2_0.sol"; -import "../../shared/interfaces/ITypeAndVersion.sol"; -import "../../shared/access/ConfirmedOwner.sol"; -import "../../shared/interfaces/IERC677Receiver.sol"; - -/** - * @notice Contract to accept requests for upkeep registrations - * @dev There are 2 registration workflows in this contract - * Flow 1. auto approve OFF / manual registration - UI calls `register` function on this contract, this contract owner at a later time then manually - * calls `approve` to register upkeep and emit events to inform UI and others interested. - * Flow 2. auto approve ON / real time registration - UI calls `register` function as before, which calls the `registerUpkeep` function directly on - * keeper registry and then emits approved event to finish the flow automatically without manual intervention. - * The idea is to have same interface(functions,events) for UI or anyone using this contract irrespective of auto approve being enabled or not. - * they can just listen to `RegistrationRequested` & `RegistrationApproved` events and know the status on registrations. - */ -contract KeeperRegistrar2_0 is ITypeAndVersion, ConfirmedOwner, IERC677Receiver { - /** - * DISABLED: No auto approvals, all new upkeeps should be approved manually. - * ENABLED_SENDER_ALLOWLIST: Auto approvals for allowed senders subject to max allowed. Manual for rest. - * ENABLED_ALL: Auto approvals for all new upkeeps subject to max allowed. - */ - enum AutoApproveType { - DISABLED, - ENABLED_SENDER_ALLOWLIST, - ENABLED_ALL - } - - bytes4 private constant REGISTER_REQUEST_SELECTOR = this.register.selector; - - mapping(bytes32 => PendingRequest) private s_pendingRequests; - - LinkTokenInterface public immutable LINK; - - /** - * @notice versions: - * - KeeperRegistrar 2.0.0: Remove source from register - * Breaks our example of "Register an Upkeep using your own deployed contract" - * - KeeperRegistrar 1.1.0: Add functionality for sender allowlist in auto approve - * : Remove rate limit and add max allowed for auto approve - * - KeeperRegistrar 1.0.0: initial release - */ - string public constant override typeAndVersion = "KeeperRegistrar 2.0.0"; - - struct RegistrarConfig { - AutoApproveType autoApproveConfigType; - uint32 autoApproveMaxAllowed; - uint32 approvedCount; - AutomationRegistryBaseInterface keeperRegistry; - uint96 minLINKJuels; - } - - struct PendingRequest { - address admin; - uint96 balance; - } - - struct RegistrationParams { - string name; - bytes encryptedEmail; - address upkeepContract; - uint32 gasLimit; - address adminAddress; - bytes checkData; - bytes offchainConfig; - uint96 amount; - } - - RegistrarConfig private s_config; - // Only applicable if s_config.configType is ENABLED_SENDER_ALLOWLIST - mapping(address => bool) private s_autoApproveAllowedSenders; - - event RegistrationRequested( - bytes32 indexed hash, - string name, - bytes encryptedEmail, - address indexed upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes checkData, - uint96 amount - ); - - event RegistrationApproved(bytes32 indexed hash, string displayName, uint256 indexed upkeepId); - - event RegistrationRejected(bytes32 indexed hash); - - event AutoApproveAllowedSenderSet(address indexed senderAddress, bool allowed); - - event ConfigChanged( - AutoApproveType autoApproveConfigType, - uint32 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ); - - error InvalidAdminAddress(); - error RequestNotFound(); - error HashMismatch(); - error OnlyAdminOrOwner(); - error InsufficientPayment(); - error RegistrationRequestFailed(); - error OnlyLink(); - error AmountMismatch(); - error SenderMismatch(); - error FunctionNotPermitted(); - error LinkTransferFailed(address to); - error InvalidDataLength(); - - /* - * @param LINKAddress Address of Link token - * @param autoApproveConfigType setting for auto-approve registrations - * @param autoApproveMaxAllowed max number of registrations that can be auto approved - * @param keeperRegistry keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with - */ - constructor( - address LINKAddress, - AutoApproveType autoApproveConfigType, - uint16 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ) ConfirmedOwner(msg.sender) { - LINK = LinkTokenInterface(LINKAddress); - setRegistrationConfig(autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels); - } - - //EXTERNAL - - /** - * @notice register can only be called through transferAndCall on LINK contract - * @param name string of the upkeep to be registered - * @param encryptedEmail email address of upkeep contact - * @param upkeepContract address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when performing upkeep - * @param adminAddress address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - * @param amount quantity of LINK upkeep is funded with (specified in Juels) - * @param offchainConfig offchainConfig for upkeep in bytes - * @param sender address of the sender making the request - */ - function register( - string memory name, - bytes calldata encryptedEmail, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes calldata checkData, - bytes calldata offchainConfig, - uint96 amount, - address sender - ) external onlyLINK { - _register( - RegistrationParams({ - name: name, - encryptedEmail: encryptedEmail, - upkeepContract: upkeepContract, - gasLimit: gasLimit, - adminAddress: adminAddress, - checkData: checkData, - offchainConfig: offchainConfig, - amount: amount - }), - sender - ); - } - - /** - * @notice Allows external users to register upkeeps; assumes amount is approved for transfer by the contract - * @param requestParams struct of all possible registration parameters - */ - function registerUpkeep(RegistrationParams calldata requestParams) external returns (uint256) { - if (requestParams.amount < s_config.minLINKJuels) { - revert InsufficientPayment(); - } - - LINK.transferFrom(msg.sender, address(this), requestParams.amount); - - return _register(requestParams, msg.sender); - } - - /** - * @dev register upkeep on KeeperRegistry contract and emit RegistrationApproved event - */ - function approve( - string memory name, - address upkeepContract, - uint32 gasLimit, - address adminAddress, - bytes calldata checkData, - bytes calldata offchainConfig, - bytes32 hash - ) external onlyOwner { - PendingRequest memory request = s_pendingRequests[hash]; - if (request.admin == address(0)) { - revert RequestNotFound(); - } - bytes32 expectedHash = keccak256(abi.encode(upkeepContract, gasLimit, adminAddress, checkData, offchainConfig)); - if (hash != expectedHash) { - revert HashMismatch(); - } - delete s_pendingRequests[hash]; - _approve( - RegistrationParams({ - name: name, - encryptedEmail: "", - upkeepContract: upkeepContract, - gasLimit: gasLimit, - adminAddress: adminAddress, - checkData: checkData, - offchainConfig: offchainConfig, - amount: request.balance - }), - expectedHash - ); - } - - /** - * @notice cancel will remove a registration request and return the refunds to the request.admin - * @param hash the request hash - */ - function cancel(bytes32 hash) external { - PendingRequest memory request = s_pendingRequests[hash]; - if (!(msg.sender == request.admin || msg.sender == owner())) { - revert OnlyAdminOrOwner(); - } - if (request.admin == address(0)) { - revert RequestNotFound(); - } - delete s_pendingRequests[hash]; - bool success = LINK.transfer(request.admin, request.balance); - if (!success) { - revert LinkTransferFailed(request.admin); - } - emit RegistrationRejected(hash); - } - - /** - * @notice owner calls this function to set if registration requests should be sent directly to the Keeper Registry - * @param autoApproveConfigType setting for auto-approve registrations - * note: autoApproveAllowedSenders list persists across config changes irrespective of type - * @param autoApproveMaxAllowed max number of registrations that can be auto approved - * @param keeperRegistry new keeper registry address - * @param minLINKJuels minimum LINK that new registrations should fund their upkeep with - */ - function setRegistrationConfig( - AutoApproveType autoApproveConfigType, - uint16 autoApproveMaxAllowed, - address keeperRegistry, - uint96 minLINKJuels - ) public onlyOwner { - uint32 approvedCount = s_config.approvedCount; - s_config = RegistrarConfig({ - autoApproveConfigType: autoApproveConfigType, - autoApproveMaxAllowed: autoApproveMaxAllowed, - approvedCount: approvedCount, - minLINKJuels: minLINKJuels, - keeperRegistry: AutomationRegistryBaseInterface(keeperRegistry) - }); - - emit ConfigChanged(autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels); - } - - /** - * @notice owner calls this function to set allowlist status for senderAddress - * @param senderAddress senderAddress to set the allowlist status for - * @param allowed true if senderAddress needs to be added to allowlist, false if needs to be removed - */ - function setAutoApproveAllowedSender(address senderAddress, bool allowed) external onlyOwner { - s_autoApproveAllowedSenders[senderAddress] = allowed; - - emit AutoApproveAllowedSenderSet(senderAddress, allowed); - } - - /** - * @notice read the allowlist status of senderAddress - * @param senderAddress address to read the allowlist status for - */ - function getAutoApproveAllowedSender(address senderAddress) external view returns (bool) { - return s_autoApproveAllowedSenders[senderAddress]; - } - - /** - * @notice read the current registration configuration - */ - function getRegistrationConfig() - external - view - returns ( - AutoApproveType autoApproveConfigType, - uint32 autoApproveMaxAllowed, - uint32 approvedCount, - address keeperRegistry, - uint256 minLINKJuels - ) - { - RegistrarConfig memory config = s_config; - return ( - config.autoApproveConfigType, - config.autoApproveMaxAllowed, - config.approvedCount, - address(config.keeperRegistry), - config.minLINKJuels - ); - } - - /** - * @notice gets the admin address and the current balance of a registration request - */ - function getPendingRequest(bytes32 hash) external view returns (address, uint96) { - PendingRequest memory request = s_pendingRequests[hash]; - return (request.admin, request.balance); - } - - /** - * @notice Called when LINK is sent to the contract via `transferAndCall` - * @param sender Address of the sender transfering LINK - * @param amount Amount of LINK sent (specified in Juels) - * @param data Payload of the transaction - */ - function onTokenTransfer( - address sender, - uint256 amount, - bytes calldata data - ) - external - override - onlyLINK - permittedFunctionsForLINK(data) - isActualAmount(amount, data) - isActualSender(sender, data) - { - if (data.length < 292) revert InvalidDataLength(); - if (amount < s_config.minLINKJuels) { - revert InsufficientPayment(); - } - (bool success, ) = address(this).delegatecall(data); - // calls register - if (!success) { - revert RegistrationRequestFailed(); - } - } - - //PRIVATE - - /** - * @dev verify registration request and emit RegistrationRequested event - */ - function _register(RegistrationParams memory params, address sender) private returns (uint256) { - if (params.adminAddress == address(0)) { - revert InvalidAdminAddress(); - } - bytes32 hash = keccak256( - abi.encode(params.upkeepContract, params.gasLimit, params.adminAddress, params.checkData, params.offchainConfig) - ); - - emit RegistrationRequested( - hash, - params.name, - params.encryptedEmail, - params.upkeepContract, - params.gasLimit, - params.adminAddress, - params.checkData, - params.amount - ); - - uint256 upkeepId; - RegistrarConfig memory config = s_config; - if (_shouldAutoApprove(config, sender)) { - s_config.approvedCount = config.approvedCount + 1; - - upkeepId = _approve(params, hash); - } else { - uint96 newBalance = s_pendingRequests[hash].balance + params.amount; - s_pendingRequests[hash] = PendingRequest({admin: params.adminAddress, balance: newBalance}); - } - - return upkeepId; - } - - /** - * @dev register upkeep on KeeperRegistry contract and emit RegistrationApproved event - */ - function _approve(RegistrationParams memory params, bytes32 hash) private returns (uint256) { - AutomationRegistryBaseInterface keeperRegistry = s_config.keeperRegistry; - - // register upkeep - uint256 upkeepId = keeperRegistry.registerUpkeep( - params.upkeepContract, - params.gasLimit, - params.adminAddress, - params.checkData, - params.offchainConfig - ); - // fund upkeep - bool success = LINK.transferAndCall(address(keeperRegistry), params.amount, abi.encode(upkeepId)); - if (!success) { - revert LinkTransferFailed(address(keeperRegistry)); - } - - emit RegistrationApproved(hash, params.name, upkeepId); - - return upkeepId; - } - - /** - * @dev verify sender allowlist if needed and check max limit - */ - function _shouldAutoApprove(RegistrarConfig memory config, address sender) private view returns (bool) { - if (config.autoApproveConfigType == AutoApproveType.DISABLED) { - return false; - } - if ( - config.autoApproveConfigType == AutoApproveType.ENABLED_SENDER_ALLOWLIST && (!s_autoApproveAllowedSenders[sender]) - ) { - return false; - } - if (config.approvedCount < config.autoApproveMaxAllowed) { - return true; - } - return false; - } - - //MODIFIERS - - /** - * @dev Reverts if not sent from the LINK token - */ - modifier onlyLINK() { - if (msg.sender != address(LINK)) { - revert OnlyLink(); - } - _; - } - - /** - * @dev Reverts if the given data does not begin with the `register` function selector - * @param _data The data payload of the request - */ - modifier permittedFunctionsForLINK(bytes memory _data) { - bytes4 funcSelector; - assembly { - // solhint-disable-next-line avoid-low-level-calls - funcSelector := mload(add(_data, 32)) // First 32 bytes contain length of data - } - if (funcSelector != REGISTER_REQUEST_SELECTOR) { - revert FunctionNotPermitted(); - } - _; - } - - /** - * @dev Reverts if the actual amount passed does not match the expected amount - * @param expected amount that should match the actual amount - * @param data bytes - */ - modifier isActualAmount(uint256 expected, bytes calldata data) { - // decode register function arguments to get actual amount - (, , , , , , , uint96 amount, ) = abi.decode( - data[4:], - (string, bytes, address, uint32, address, bytes, bytes, uint96, address) - ); - if (expected != amount) { - revert AmountMismatch(); - } - _; - } - - /** - * @dev Reverts if the actual sender address does not match the expected sender address - * @param expected address that should match the actual sender address - * @param data bytes - */ - modifier isActualSender(address expected, bytes calldata data) { - // decode register function arguments to get actual sender - (, , , , , , , , address sender) = abi.decode( - data[4:], - (string, bytes, address, uint32, address, bytes, bytes, uint96, address) - ); - if (expected != sender) { - revert SenderMismatch(); - } - _; - } -} diff --git a/contracts/src/v0.8/automation/v2_0/KeeperRegistry2_0.sol b/contracts/src/v0.8/automation/v2_0/KeeperRegistry2_0.sol deleted file mode 100644 index bd3c78e45a7..00000000000 --- a/contracts/src/v0.8/automation/v2_0/KeeperRegistry2_0.sol +++ /dev/null @@ -1,1012 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/proxy/Proxy.sol"; -import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; -import "./KeeperRegistryBase2_0.sol"; -import {AutomationRegistryExecutableInterface, UpkeepInfo, State, OnchainConfig, UpkeepFailureReason} from "../interfaces/v2_0/AutomationRegistryInterface2_0.sol"; -import "../interfaces/MigratableKeeperRegistryInterface.sol"; -import "../interfaces/MigratableKeeperRegistryInterfaceV2.sol"; -import "../../shared/interfaces/IERC677Receiver.sol"; -import {OCR2Abstract} from "../../shared/ocr2/OCR2Abstract.sol"; - -/** - _. _|_ _ ._ _ _._|_o _ ._ o _ _ ._ _| _ __|_o._ -(_||_||_(_)| | |(_| |_|(_)| | |_> (_)|_|| (_|(/__> |_|| |\/ - / - */ -/** - * @notice Registry for adding work for Chainlink Keepers to perform on client - * contracts. Clients must support the Upkeep interface. - */ -contract KeeperRegistry2_0 is - KeeperRegistryBase2_0, - Proxy, - OCR2Abstract, - AutomationRegistryExecutableInterface, - MigratableKeeperRegistryInterface, - MigratableKeeperRegistryInterfaceV2, - IERC677Receiver -{ - using Address for address; - using EnumerableSet for EnumerableSet.UintSet; - - // Immutable address of logic contract where some functionality is delegated to - address private immutable i_keeperRegistryLogic; - - /** - * @notice versions: - * - KeeperRegistry 2.0.2: pass revert bytes as performData when target contract reverts - * : fixes issue with arbitrum block number - * : does an early return in case of stale report instead of revert - * - KeeperRegistry 2.0.1: implements workaround for buggy migrate function in 1.X - * - KeeperRegistry 2.0.0: implement OCR interface - * - KeeperRegistry 1.3.0: split contract into Proxy and Logic - * : account for Arbitrum and Optimism L1 gas fee - * : allow users to configure upkeeps - * - KeeperRegistry 1.2.0: allow funding within performUpkeep - * : allow configurable registry maxPerformGas - * : add function to let admin change upkeep gas limit - * : add minUpkeepSpend requirement - * : upgrade to solidity v0.8 - * - KeeperRegistry 1.1.0: added flatFeeMicroLink - * - KeeperRegistry 1.0.0: initial release - */ - string public constant override typeAndVersion = "KeeperRegistry 2.0.2"; - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - - UpkeepFormat public constant override upkeepTranscoderVersion = UPKEEP_TRANSCODER_VERSION_BASE; - - /** - * @inheritdoc MigratableKeeperRegistryInterfaceV2 - */ - uint8 public constant override upkeepVersion = UPKEEP_VERSION_BASE; - - /** - * @param keeperRegistryLogic address of the logic contract - */ - constructor( - KeeperRegistryBase2_0 keeperRegistryLogic - ) - KeeperRegistryBase2_0( - keeperRegistryLogic.getMode(), - keeperRegistryLogic.getLinkAddress(), - keeperRegistryLogic.getLinkNativeFeedAddress(), - keeperRegistryLogic.getFastGasFeedAddress() - ) - { - i_keeperRegistryLogic = address(keeperRegistryLogic); - } - - //////// - // ACTIONS - //////// - - /** - * @dev This struct is used to maintain run time information about an upkeep in transmit function - * @member upkeep the upkeep struct - * @member earlyChecksPassed whether the upkeep passed early checks before perform - * @member paymentParams the paymentParams for this upkeep - * @member performSuccess whether the perform was successful - * @member gasUsed gasUsed by this upkeep in perform - */ - struct UpkeepTransmitInfo { - Upkeep upkeep; - bool earlyChecksPassed; - uint96 maxLinkPayment; - bool performSuccess; - uint256 gasUsed; - uint256 gasOverhead; - } - - /** - * @inheritdoc OCR2Abstract - */ - function transmit( - bytes32[3] calldata reportContext, - bytes calldata rawReport, - bytes32[] calldata rs, - bytes32[] calldata ss, - bytes32 rawVs - ) external override { - uint256 gasOverhead = gasleft(); - HotVars memory hotVars = s_hotVars; - - if (hotVars.paused) revert RegistryPaused(); - if (!s_transmitters[msg.sender].active) revert OnlyActiveTransmitters(); - - Report memory report = _decodeReport(rawReport); - UpkeepTransmitInfo[] memory upkeepTransmitInfo = new UpkeepTransmitInfo[](report.upkeepIds.length); - uint16 numUpkeepsPassedChecks; - - for (uint256 i = 0; i < report.upkeepIds.length; i++) { - upkeepTransmitInfo[i].upkeep = s_upkeep[report.upkeepIds[i]]; - - upkeepTransmitInfo[i].maxLinkPayment = _getMaxLinkPayment( - hotVars, - upkeepTransmitInfo[i].upkeep.executeGas, - uint32(report.wrappedPerformDatas[i].performData.length), - report.fastGasWei, - report.linkNative, - true - ); - upkeepTransmitInfo[i].earlyChecksPassed = _prePerformChecks( - report.upkeepIds[i], - report.wrappedPerformDatas[i], - upkeepTransmitInfo[i].upkeep, - upkeepTransmitInfo[i].maxLinkPayment - ); - - if (upkeepTransmitInfo[i].earlyChecksPassed) { - numUpkeepsPassedChecks += 1; - } - } - // No upkeeps to be performed in this report - if (numUpkeepsPassedChecks == 0) { - return; - } - - // Verify signatures - if (s_latestConfigDigest != reportContext[0]) revert ConfigDigestMismatch(); - if (rs.length != hotVars.f + 1 || rs.length != ss.length) revert IncorrectNumberOfSignatures(); - _verifyReportSignature(reportContext, rawReport, rs, ss, rawVs); - - // Actually perform upkeeps - for (uint256 i = 0; i < report.upkeepIds.length; i++) { - if (upkeepTransmitInfo[i].earlyChecksPassed) { - // Check if this upkeep was already performed in this report - if (s_upkeep[report.upkeepIds[i]].lastPerformBlockNumber == uint32(_blockNum())) { - revert InvalidReport(); - } - - // Actually perform the target upkeep - (upkeepTransmitInfo[i].performSuccess, upkeepTransmitInfo[i].gasUsed) = _performUpkeep( - upkeepTransmitInfo[i].upkeep, - report.wrappedPerformDatas[i].performData - ); - - // Deduct that gasUsed by upkeep from our running counter - gasOverhead -= upkeepTransmitInfo[i].gasUsed; - - // Store last perform block number for upkeep - s_upkeep[report.upkeepIds[i]].lastPerformBlockNumber = uint32(_blockNum()); - } - } - - // This is the overall gas overhead that will be split across performed upkeeps - // Take upper bound of 16 gas per callData bytes, which is approximated to be reportLength - // Rest of msg.data is accounted for in accounting overheads - gasOverhead = - (gasOverhead - gasleft() + 16 * rawReport.length) + - ACCOUNTING_FIXED_GAS_OVERHEAD + - (ACCOUNTING_PER_SIGNER_GAS_OVERHEAD * (hotVars.f + 1)); - gasOverhead = gasOverhead / numUpkeepsPassedChecks + ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD; - - uint96 totalReimbursement; - uint96 totalPremium; - { - uint96 reimbursement; - uint96 premium; - for (uint256 i = 0; i < report.upkeepIds.length; i++) { - if (upkeepTransmitInfo[i].earlyChecksPassed) { - upkeepTransmitInfo[i].gasOverhead = _getCappedGasOverhead( - gasOverhead, - uint32(report.wrappedPerformDatas[i].performData.length), - hotVars.f - ); - - (reimbursement, premium) = _postPerformPayment( - hotVars, - report.upkeepIds[i], - upkeepTransmitInfo[i], - report.fastGasWei, - report.linkNative, - numUpkeepsPassedChecks - ); - totalPremium += premium; - totalReimbursement += reimbursement; - - emit UpkeepPerformed( - report.upkeepIds[i], - upkeepTransmitInfo[i].performSuccess, - report.wrappedPerformDatas[i].checkBlockNumber, - upkeepTransmitInfo[i].gasUsed, - upkeepTransmitInfo[i].gasOverhead, - reimbursement + premium - ); - } - } - } - // record payments - s_transmitters[msg.sender].balance += totalReimbursement; - s_hotVars.totalPremium += totalPremium; - - uint40 epochAndRound = uint40(uint256(reportContext[1])); - uint32 epoch = uint32(epochAndRound >> 8); - if (epoch > hotVars.latestEpoch) { - s_hotVars.latestEpoch = epoch; - } - } - - /** - * @notice simulates the upkeep with the perform data returned from - * checkUpkeep - * @param id identifier of the upkeep to execute the data with. - * @param performData calldata parameter to be passed to the target upkeep. - */ - function simulatePerformUpkeep( - uint256 id, - bytes calldata performData - ) external cannotExecute returns (bool success, uint256 gasUsed) { - if (s_hotVars.paused) revert RegistryPaused(); - - Upkeep memory upkeep = s_upkeep[id]; - return _performUpkeep(upkeep, performData); - } - - /** - * @notice uses LINK's transferAndCall to LINK and add funding to an upkeep - * @dev safe to cast uint256 to uint96 as total LINK supply is under UINT96MAX - * @param sender the account which transferred the funds - * @param amount number of LINK transfer - */ - function onTokenTransfer(address sender, uint256 amount, bytes calldata data) external override { - if (msg.sender != address(i_link)) revert OnlyCallableByLINKToken(); - if (data.length != 32) revert InvalidDataLength(); - uint256 id = abi.decode(data, (uint256)); - if (s_upkeep[id].maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - - s_upkeep[id].balance = s_upkeep[id].balance + uint96(amount); - s_expectedLinkBalance = s_expectedLinkBalance + amount; - - emit FundsAdded(id, sender, uint96(amount)); - } - - //////// - // SETTERS - //////// - - /** - * @inheritdoc OCR2Abstract - */ - function setConfig( - address[] memory signers, - address[] memory transmitters, - uint8 f, - bytes memory onchainConfig, - uint64 offchainConfigVersion, - bytes memory offchainConfig - ) external override onlyOwner { - if (signers.length > MAX_NUM_ORACLES) revert TooManyOracles(); - if (f == 0) revert IncorrectNumberOfFaultyOracles(); - if (signers.length != transmitters.length || signers.length <= 3 * f) revert IncorrectNumberOfSigners(); - - // move all pooled payments out of the pool to each transmitter's balance - uint96 totalPremium = s_hotVars.totalPremium; - uint96 oldLength = uint96(s_transmittersList.length); - for (uint256 i = 0; i < oldLength; i++) { - _updateTransmitterBalanceFromPool(s_transmittersList[i], totalPremium, oldLength); - } - - // remove any old signer/transmitter addresses - address signerAddress; - address transmitterAddress; - for (uint256 i = 0; i < oldLength; i++) { - signerAddress = s_signersList[i]; - transmitterAddress = s_transmittersList[i]; - delete s_signers[signerAddress]; - // Do not delete the whole transmitter struct as it has balance information stored - s_transmitters[transmitterAddress].active = false; - } - delete s_signersList; - delete s_transmittersList; - - // add new signer/transmitter addresses - { - Transmitter memory transmitter; - address temp; - for (uint256 i = 0; i < signers.length; i++) { - if (s_signers[signers[i]].active) revert RepeatedSigner(); - s_signers[signers[i]] = Signer({active: true, index: uint8(i)}); - - temp = transmitters[i]; - transmitter = s_transmitters[temp]; - if (transmitter.active) revert RepeatedTransmitter(); - transmitter.active = true; - transmitter.index = uint8(i); - transmitter.lastCollected = totalPremium; - s_transmitters[temp] = transmitter; - } - } - s_signersList = signers; - s_transmittersList = transmitters; - - // Set the onchain config - OnchainConfig memory onchainConfigStruct = abi.decode(onchainConfig, (OnchainConfig)); - if (onchainConfigStruct.maxPerformGas < s_storage.maxPerformGas) revert GasLimitCanOnlyIncrease(); - if (onchainConfigStruct.maxCheckDataSize < s_storage.maxCheckDataSize) revert MaxCheckDataSizeCanOnlyIncrease(); - if (onchainConfigStruct.maxPerformDataSize < s_storage.maxPerformDataSize) - revert MaxPerformDataSizeCanOnlyIncrease(); - - s_hotVars = HotVars({ - f: f, - paymentPremiumPPB: onchainConfigStruct.paymentPremiumPPB, - flatFeeMicroLink: onchainConfigStruct.flatFeeMicroLink, - stalenessSeconds: onchainConfigStruct.stalenessSeconds, - gasCeilingMultiplier: onchainConfigStruct.gasCeilingMultiplier, - paused: false, - reentrancyGuard: false, - totalPremium: totalPremium, - latestEpoch: 0 - }); - - s_storage = Storage({ - checkGasLimit: onchainConfigStruct.checkGasLimit, - minUpkeepSpend: onchainConfigStruct.minUpkeepSpend, - maxPerformGas: onchainConfigStruct.maxPerformGas, - transcoder: onchainConfigStruct.transcoder, - registrar: onchainConfigStruct.registrar, - maxCheckDataSize: onchainConfigStruct.maxCheckDataSize, - maxPerformDataSize: onchainConfigStruct.maxPerformDataSize, - nonce: s_storage.nonce, - configCount: s_storage.configCount, - latestConfigBlockNumber: s_storage.latestConfigBlockNumber, - ownerLinkBalance: s_storage.ownerLinkBalance - }); - s_fallbackGasPrice = onchainConfigStruct.fallbackGasPrice; - s_fallbackLinkPrice = onchainConfigStruct.fallbackLinkPrice; - - uint32 previousConfigBlockNumber = s_storage.latestConfigBlockNumber; - s_storage.latestConfigBlockNumber = uint32(_blockNum()); - s_storage.configCount += 1; - - s_latestConfigDigest = _configDigestFromConfigData( - block.chainid, - address(this), - s_storage.configCount, - signers, - transmitters, - f, - onchainConfig, - offchainConfigVersion, - offchainConfig - ); - - emit ConfigSet( - previousConfigBlockNumber, - s_latestConfigDigest, - s_storage.configCount, - signers, - transmitters, - f, - onchainConfig, - offchainConfigVersion, - offchainConfig - ); - } - - //////// - // GETTERS - //////// - - /** - * @notice read all of the details about an upkeep - */ - function getUpkeep(uint256 id) external view override returns (UpkeepInfo memory upkeepInfo) { - Upkeep memory reg = s_upkeep[id]; - upkeepInfo = UpkeepInfo({ - target: reg.target, - executeGas: reg.executeGas, - checkData: s_checkData[id], - balance: reg.balance, - admin: s_upkeepAdmin[id], - maxValidBlocknumber: reg.maxValidBlocknumber, - lastPerformBlockNumber: reg.lastPerformBlockNumber, - amountSpent: reg.amountSpent, - paused: reg.paused, - offchainConfig: s_upkeepOffchainConfig[id] - }); - return upkeepInfo; - } - - /** - * @notice retrieve active upkeep IDs. Active upkeep is defined as an upkeep which is not paused and not canceled. - * @param startIndex starting index in list - * @param maxCount max count to retrieve (0 = unlimited) - * @dev the order of IDs in the list is **not guaranteed**, therefore, if making successive calls, one - * should consider keeping the blockheight constant to ensure a holistic picture of the contract state - */ - function getActiveUpkeepIDs(uint256 startIndex, uint256 maxCount) external view override returns (uint256[] memory) { - uint256 maxIdx = s_upkeepIDs.length(); - if (startIndex >= maxIdx) revert IndexOutOfRange(); - if (maxCount == 0) { - maxCount = maxIdx - startIndex; - } - uint256[] memory ids = new uint256[](maxCount); - for (uint256 idx = 0; idx < maxCount; idx++) { - ids[idx] = s_upkeepIDs.at(startIndex + idx); - } - return ids; - } - - /** - * @notice read the current info about any transmitter address - */ - function getTransmitterInfo( - address query - ) external view override returns (bool active, uint8 index, uint96 balance, uint96 lastCollected, address payee) { - Transmitter memory transmitter = s_transmitters[query]; - uint96 totalDifference = s_hotVars.totalPremium - transmitter.lastCollected; - uint96 pooledShare = totalDifference / uint96(s_transmittersList.length); - - return ( - transmitter.active, - transmitter.index, - (transmitter.balance + pooledShare), - transmitter.lastCollected, - s_transmitterPayees[query] - ); - } - - /** - * @notice read the current info about any signer address - */ - function getSignerInfo(address query) external view returns (bool active, uint8 index) { - Signer memory signer = s_signers[query]; - return (signer.active, signer.index); - } - - /** - * @notice read the current state of the registry - */ - function getState() - external - view - override - returns ( - State memory state, - OnchainConfig memory config, - address[] memory signers, - address[] memory transmitters, - uint8 f - ) - { - state = State({ - nonce: s_storage.nonce, - ownerLinkBalance: s_storage.ownerLinkBalance, - expectedLinkBalance: s_expectedLinkBalance, - totalPremium: s_hotVars.totalPremium, - numUpkeeps: s_upkeepIDs.length(), - configCount: s_storage.configCount, - latestConfigBlockNumber: s_storage.latestConfigBlockNumber, - latestConfigDigest: s_latestConfigDigest, - latestEpoch: s_hotVars.latestEpoch, - paused: s_hotVars.paused - }); - - config = OnchainConfig({ - paymentPremiumPPB: s_hotVars.paymentPremiumPPB, - flatFeeMicroLink: s_hotVars.flatFeeMicroLink, - checkGasLimit: s_storage.checkGasLimit, - stalenessSeconds: s_hotVars.stalenessSeconds, - gasCeilingMultiplier: s_hotVars.gasCeilingMultiplier, - minUpkeepSpend: s_storage.minUpkeepSpend, - maxPerformGas: s_storage.maxPerformGas, - maxCheckDataSize: s_storage.maxCheckDataSize, - maxPerformDataSize: s_storage.maxPerformDataSize, - fallbackGasPrice: s_fallbackGasPrice, - fallbackLinkPrice: s_fallbackLinkPrice, - transcoder: s_storage.transcoder, - registrar: s_storage.registrar - }); - - return (state, config, s_signersList, s_transmittersList, s_hotVars.f); - } - - /** - * @notice calculates the minimum balance required for an upkeep to remain eligible - * @param id the upkeep id to calculate minimum balance for - */ - function getMinBalanceForUpkeep(uint256 id) external view returns (uint96 minBalance) { - return getMaxPaymentForGas(s_upkeep[id].executeGas); - } - - /** - * @notice calculates the maximum payment for a given gas limit - * @param gasLimit the gas to calculate payment for - */ - function getMaxPaymentForGas(uint32 gasLimit) public view returns (uint96 maxPayment) { - HotVars memory hotVars = s_hotVars; - (uint256 fastGasWei, uint256 linkNative) = _getFeedData(hotVars); - return _getMaxLinkPayment(hotVars, gasLimit, s_storage.maxPerformDataSize, fastGasWei, linkNative, false); - } - - /** - * @notice retrieves the migration permission for a peer registry - */ - function getPeerRegistryMigrationPermission(address peer) external view returns (MigrationPermission) { - return s_peerRegistryMigrationPermission[peer]; - } - - /** - * @notice retrieves the address of the logic address - */ - function getKeeperRegistryLogicAddress() external view returns (address) { - return i_keeperRegistryLogic; - } - - /** - * @inheritdoc OCR2Abstract - */ - function latestConfigDetails() - external - view - override - returns (uint32 configCount, uint32 blockNumber, bytes32 configDigest) - { - return (s_storage.configCount, s_storage.latestConfigBlockNumber, s_latestConfigDigest); - } - - /** - * @inheritdoc OCR2Abstract - */ - function latestConfigDigestAndEpoch() - external - view - override - returns (bool scanLogs, bytes32 configDigest, uint32 epoch) - { - return (false, s_latestConfigDigest, s_hotVars.latestEpoch); - } - - //////// - // INTERNAL FUNCTIONS - //////// - - /** - * @dev This is the address to which proxy functions are delegated to - */ - function _implementation() internal view override returns (address) { - return i_keeperRegistryLogic; - } - - /** - * @dev calls target address with exactly gasAmount gas and data as calldata - * or reverts if at least gasAmount gas is not available - */ - function _callWithExactGas(uint256 gasAmount, address target, bytes memory data) private returns (bool success) { - assembly { - let g := gas() - // Compute g -= PERFORM_GAS_CUSHION and check for underflow - if lt(g, PERFORM_GAS_CUSHION) { - revert(0, 0) - } - g := sub(g, PERFORM_GAS_CUSHION) - // if g - g//64 <= gasAmount, revert - // (we subtract g//64 because of EIP-150) - if iszero(gt(sub(g, div(g, 64)), gasAmount)) { - revert(0, 0) - } - // solidity calls check that a contract actually exists at the destination, so we do the same - if iszero(extcodesize(target)) { - revert(0, 0) - } - // call and return whether we succeeded. ignore return data - success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0) - } - return success; - } - - /** - * @dev _decodeReport decodes a serialized report into a Report struct - */ - function _decodeReport(bytes memory rawReport) internal pure returns (Report memory) { - ( - uint256 fastGasWei, - uint256 linkNative, - uint256[] memory upkeepIds, - PerformDataWrapper[] memory wrappedPerformDatas - ) = abi.decode(rawReport, (uint256, uint256, uint256[], PerformDataWrapper[])); - if (upkeepIds.length != wrappedPerformDatas.length) revert InvalidReport(); - - return - Report({ - fastGasWei: fastGasWei, - linkNative: linkNative, - upkeepIds: upkeepIds, - wrappedPerformDatas: wrappedPerformDatas - }); - } - - /** - * @dev Does some early sanity checks before actually performing an upkeep - */ - function _prePerformChecks( - uint256 upkeepId, - PerformDataWrapper memory wrappedPerformData, - Upkeep memory upkeep, - uint96 maxLinkPayment - ) internal returns (bool) { - if (wrappedPerformData.checkBlockNumber < upkeep.lastPerformBlockNumber) { - // Can happen when another report performed this upkeep after this report was generated - emit StaleUpkeepReport(upkeepId); - return false; - } - - if (_blockHash(wrappedPerformData.checkBlockNumber) != wrappedPerformData.checkBlockhash) { - // Can happen when the block on which report was generated got reorged - // We will also revert if checkBlockNumber is older than 256 blocks. In this case we rely on a new transmission - // with the latest checkBlockNumber - emit ReorgedUpkeepReport(upkeepId); - return false; - } - - if (upkeep.maxValidBlocknumber <= _blockNum()) { - // Can happen when an upkeep got cancelled after report was generated. - // However we have a CANCELLATION_DELAY of 50 blocks so shouldn't happen in practice - emit CancelledUpkeepReport(upkeepId); - return false; - } - - if (upkeep.balance < maxLinkPayment) { - // Can happen due to flucutations in gas / link prices - emit InsufficientFundsUpkeepReport(upkeepId); - return false; - } - - return true; - } - - /** - * @dev Verify signatures attached to report - */ - function _verifyReportSignature( - bytes32[3] calldata reportContext, - bytes calldata report, - bytes32[] calldata rs, - bytes32[] calldata ss, - bytes32 rawVs - ) internal view { - bytes32 h = keccak256(abi.encode(keccak256(report), reportContext)); - // i-th byte counts number of sigs made by i-th signer - uint256 signedCount = 0; - - Signer memory signer; - address signerAddress; - for (uint256 i = 0; i < rs.length; i++) { - signerAddress = ecrecover(h, uint8(rawVs[i]) + 27, rs[i], ss[i]); - signer = s_signers[signerAddress]; - if (!signer.active) revert OnlyActiveSigners(); - unchecked { - signedCount += 1 << (8 * signer.index); - } - } - - if (signedCount & ORACLE_MASK != signedCount) revert DuplicateSigners(); - } - - /** - * @dev calls the Upkeep target with the performData param passed in by the - * transmitter and the exact gas required by the Upkeep - */ - function _performUpkeep( - Upkeep memory upkeep, - bytes memory performData - ) private nonReentrant returns (bool success, uint256 gasUsed) { - gasUsed = gasleft(); - bytes memory callData = abi.encodeWithSelector(PERFORM_SELECTOR, performData); - success = _callWithExactGas(upkeep.executeGas, upkeep.target, callData); - gasUsed = gasUsed - gasleft(); - - return (success, gasUsed); - } - - /** - * @dev does postPerform payment processing for an upkeep. Deducts upkeep's balance and increases - * amount spent. - */ - function _postPerformPayment( - HotVars memory hotVars, - uint256 upkeepId, - UpkeepTransmitInfo memory upkeepTransmitInfo, - uint256 fastGasWei, - uint256 linkNative, - uint16 numBatchedUpkeeps - ) internal returns (uint96 gasReimbursement, uint96 premium) { - (gasReimbursement, premium) = _calculatePaymentAmount( - hotVars, - upkeepTransmitInfo.gasUsed, - upkeepTransmitInfo.gasOverhead, - fastGasWei, - linkNative, - numBatchedUpkeeps, - true - ); - - uint96 payment = gasReimbursement + premium; - s_upkeep[upkeepId].balance -= payment; - s_upkeep[upkeepId].amountSpent += payment; - - return (gasReimbursement, premium); - } - - /** - * @dev Caps the gas overhead by the constant overhead used within initial payment checks in order to - * prevent a revert in payment processing. - */ - function _getCappedGasOverhead( - uint256 calculatedGasOverhead, - uint32 performDataLength, - uint8 f - ) private pure returns (uint256 cappedGasOverhead) { - cappedGasOverhead = _getMaxGasOverhead(performDataLength, f); - if (calculatedGasOverhead < cappedGasOverhead) { - return calculatedGasOverhead; - } - return cappedGasOverhead; - } - - //////// - // PROXY FUNCTIONS - EXECUTED THROUGH FALLBACK - //////// - - /** - * @notice adds a new upkeep - * @param target address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when - * performing upkeep - * @param admin address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - */ - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes calldata checkData, - bytes calldata offchainConfig - ) external override returns (uint256 id) { - // Executed through logic contract - _fallback(); - } - - /** - * @notice simulated by keepers via eth_call to see if the upkeep needs to be - * performed. It returns the success status / failure reason along with the perform data payload. - * @param id identifier of the upkeep to check - */ - function checkUpkeep( - uint256 id - ) - external - override - cannotExecute - returns ( - bool upkeepNeeded, - bytes memory performData, - UpkeepFailureReason upkeepFailureReason, - uint256 gasUsed, - uint256 fastGasWei, - uint256 linkNative - ) - { - // Executed through logic contract - _fallback(); - } - - /** - * @notice prevent an upkeep from being performed in the future - * @param id upkeep to be canceled - */ - function cancelUpkeep(uint256 id) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice pause an upkeep - * @param id upkeep to be paused - */ - function pauseUpkeep(uint256 id) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice unpause an upkeep - * @param id upkeep to be resumed - */ - function unpauseUpkeep(uint256 id) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice update the check data of an upkeep - * @param id the id of the upkeep whose check data needs to be updated - * @param newCheckData the new check data - */ - function updateCheckData(uint256 id, bytes calldata newCheckData) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice adds LINK funding for an upkeep by transferring from the sender's - * LINK balance - * @param id upkeep to fund - * @param amount number of LINK to transfer - */ - function addFunds(uint256 id, uint96 amount) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice removes funding from a canceled upkeep - * @param id upkeep to withdraw funds from - * @param to destination address for sending remaining funds - */ - function withdrawFunds(uint256 id, address to) external { - // Executed through logic contract - // Restricted to nonRentrant in logic contract as this is not callable from a user's performUpkeep - _fallback(); - } - - /** - * @notice allows the admin of an upkeep to modify gas limit - * @param id upkeep to be change the gas limit for - * @param gasLimit new gas limit for the upkeep - */ - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice allows the admin of an upkeep to modify the offchain config - * @param id upkeep to be change the gas limit for - * @param config instructs oracles of offchain config preferences - */ - function setUpkeepOffchainConfig(uint256 id, bytes calldata config) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice withdraws a transmitter's payment, callable only by the transmitter's payee - * @param from transmitter address - * @param to address to send the payment to - */ - function withdrawPayment(address from, address to) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice proposes the safe transfer of a transmitter's payee to another address - * @param transmitter address of the transmitter to transfer payee role - * @param proposed address to nominate for next payeeship - */ - function transferPayeeship(address transmitter, address proposed) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice accepts the safe transfer of payee role for a transmitter - * @param transmitter address to accept the payee role for - */ - function acceptPayeeship(address transmitter) external { - // Executed through logic contract - _fallback(); - } - - /** - * @notice proposes the safe transfer of an upkeep's admin role to another address - * @param id the upkeep id to transfer admin - * @param proposed address to nominate for the new upkeep admin - */ - function transferUpkeepAdmin(uint256 id, address proposed) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @notice accepts the safe transfer of admin role for an upkeep - * @param id the upkeep id - */ - function acceptUpkeepAdmin(uint256 id) external override { - // Executed through logic contract - _fallback(); - } - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - function migrateUpkeeps( - uint256[] calldata ids, - address destination - ) external override(MigratableKeeperRegistryInterface, MigratableKeeperRegistryInterfaceV2) { - // Executed through logic contract - _fallback(); - } - - /** - * @inheritdoc MigratableKeeperRegistryInterface - */ - function receiveUpkeeps( - bytes calldata encodedUpkeeps - ) external override(MigratableKeeperRegistryInterface, MigratableKeeperRegistryInterfaceV2) { - // Executed through logic contract - _fallback(); - } - - //////// - // OWNER RESTRICTED FUNCTIONS - //////// - - /** - * @notice recovers LINK funds improperly transferred to the registry - * @dev In principle this function’s execution cost could exceed block - * gas limit. However, in our anticipated deployment, the number of upkeeps and - * transmitters will be low enough to avoid this problem. - */ - function recoverFunds() external { - // Executed through logic contract - // Restricted to onlyOwner in logic contract - _fallback(); - } - - /** - * @notice withdraws LINK funds collected through cancellation fees - */ - function withdrawOwnerFunds() external { - // Executed through logic contract - // Restricted to onlyOwner in logic contract - _fallback(); - } - - /** - * @notice update the list of payees corresponding to the transmitters - * @param payees addresses corresponding to transmitters who are allowed to - * move payments which have been accrued - */ - function setPayees(address[] calldata payees) external { - // Executed through logic contract - // Restricted to onlyOwner in logic contract - _fallback(); - } - - /** - * @notice signals to transmitters that they should not perform upkeeps until the - * contract has been unpaused - */ - function pause() external { - // Executed through logic contract - // Restricted to onlyOwner in logic contract - _fallback(); - } - - /** - * @notice signals to transmitters that they can perform upkeeps once again after - * having been paused - */ - function unpause() external { - // Executed through logic contract - // Restricted to onlyOwner in logic contract - _fallback(); - } - - /** - * @notice sets the peer registry migration permission - */ - function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external { - // Executed through logic contract - // Restricted to onlyOwner in logic contract - _fallback(); - } -} diff --git a/contracts/src/v0.8/automation/v2_0/KeeperRegistryBase2_0.sol b/contracts/src/v0.8/automation/v2_0/KeeperRegistryBase2_0.sol deleted file mode 100644 index 9b78e5806ff..00000000000 --- a/contracts/src/v0.8/automation/v2_0/KeeperRegistryBase2_0.sol +++ /dev/null @@ -1,479 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbGasInfo.sol"; -import "../../vendor/@eth-optimism/contracts/v0.8.6/contracts/L2/predeploys/OVM_GasPriceOracle.sol"; -import {ArbSys} from "../../vendor/@arbitrum/nitro-contracts/src/precompiles/ArbSys.sol"; -import "../ExecutionPrevention.sol"; -import "../../shared/access/ConfirmedOwner.sol"; -import "../../shared/interfaces/AggregatorV3Interface.sol"; -import "../../shared/interfaces/LinkTokenInterface.sol"; -import "../interfaces/KeeperCompatibleInterface.sol"; -import "../interfaces/UpkeepTranscoderInterface.sol"; - -/** - * @notice relevant state of an upkeep which is used in transmit function - * @member executeGas the gas limit of upkeep execution - * @member maxValidBlocknumber until which block this upkeep is valid - * @member paused if this upkeep has been paused - * @member target the contract which needs to be serviced - * @member amountSpent the amount this upkeep has spent - * @member balance the balance of this upkeep - * @member lastPerformBlockNumber the last block number when this upkeep was performed - */ -struct Upkeep { - uint32 executeGas; - uint32 maxValidBlocknumber; - bool paused; - address target; - // 3 bytes left in 1st EVM word - not written to in transmit - uint96 amountSpent; - uint96 balance; - uint32 lastPerformBlockNumber; - // 4 bytes left in 2nd EVM word - written in transmit path -} - -/** - * @notice Base Keeper Registry contract, contains shared logic between - * KeeperRegistry and KeeperRegistryLogic - */ -abstract contract KeeperRegistryBase2_0 is ConfirmedOwner, ExecutionPrevention { - address internal constant ZERO_ADDRESS = address(0); - address internal constant IGNORE_ADDRESS = 0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF; - bytes4 internal constant CHECK_SELECTOR = KeeperCompatibleInterface.checkUpkeep.selector; - bytes4 internal constant PERFORM_SELECTOR = KeeperCompatibleInterface.performUpkeep.selector; - uint256 internal constant PERFORM_GAS_MIN = 2_300; - uint256 internal constant CANCELLATION_DELAY = 50; - uint256 internal constant PERFORM_GAS_CUSHION = 5_000; - uint256 internal constant PPB_BASE = 1_000_000_000; - uint32 internal constant UINT32_MAX = type(uint32).max; - uint96 internal constant LINK_TOTAL_SUPPLY = 1e27; - // The first byte of the mask can be 0, because we only ever have 31 oracles - uint256 internal constant ORACLE_MASK = 0x0001010101010101010101010101010101010101010101010101010101010101; - /** - * @dev UPKEEP_TRANSCODER_VERSION_BASE is temporary necessity for backwards compatibility with - * MigratableKeeperRegistryInterfaceV1 - it should be removed in future versions in favor of - * UPKEEP_VERSION_BASE and MigratableKeeperRegistryInterfaceV2 - */ - UpkeepFormat internal constant UPKEEP_TRANSCODER_VERSION_BASE = UpkeepFormat.V1; - uint8 internal constant UPKEEP_VERSION_BASE = uint8(UpkeepFormat.V3); - // L1_FEE_DATA_PADDING includes 35 bytes for L1 data padding for Optimism - bytes internal constant L1_FEE_DATA_PADDING = - "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"; - - uint256 internal constant REGISTRY_GAS_OVERHEAD = 70_000; // Used only in maxPayment estimation, not in actual payment - uint256 internal constant REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD = 20; // Used only in maxPayment estimation, not in actual payment. Value scales with performData length. - uint256 internal constant REGISTRY_PER_SIGNER_GAS_OVERHEAD = 7_500; // Used only in maxPayment estimation, not in actual payment. Value scales with f. - - uint256 internal constant ACCOUNTING_FIXED_GAS_OVERHEAD = 26_900; // Used in actual payment. Fixed overhead per tx - uint256 internal constant ACCOUNTING_PER_SIGNER_GAS_OVERHEAD = 1_100; // Used in actual payment. overhead per signer - uint256 internal constant ACCOUNTING_PER_UPKEEP_GAS_OVERHEAD = 5_800; // Used in actual payment. overhead per upkeep performed - - OVM_GasPriceOracle internal constant OPTIMISM_ORACLE = OVM_GasPriceOracle(0x420000000000000000000000000000000000000F); - ArbGasInfo internal constant ARB_NITRO_ORACLE = ArbGasInfo(0x000000000000000000000000000000000000006C); - ArbSys internal constant ARB_SYS = ArbSys(0x0000000000000000000000000000000000000064); - - LinkTokenInterface internal immutable i_link; - AggregatorV3Interface internal immutable i_linkNativeFeed; - AggregatorV3Interface internal immutable i_fastGasFeed; - Mode internal immutable i_mode; - - // @dev - The storage is gas optimised for one and only function - transmit. All the storage accessed in transmit - // is stored compactly. Rest of the storage layout is not of much concern as transmit is the only hot path - // Upkeep storage - EnumerableSet.UintSet internal s_upkeepIDs; - mapping(uint256 => Upkeep) internal s_upkeep; // accessed during transmit - mapping(uint256 => address) internal s_upkeepAdmin; - mapping(uint256 => address) internal s_proposedAdmin; - mapping(uint256 => bytes) internal s_checkData; - // Registry config and state - mapping(address => Transmitter) internal s_transmitters; - mapping(address => Signer) internal s_signers; - address[] internal s_signersList; // s_signersList contains the signing address of each oracle - address[] internal s_transmittersList; // s_transmittersList contains the transmission address of each oracle - mapping(address => address) internal s_transmitterPayees; // s_payees contains the mapping from transmitter to payee. - mapping(address => address) internal s_proposedPayee; // proposed payee for a transmitter - bytes32 internal s_latestConfigDigest; // Read on transmit path in case of signature verification - HotVars internal s_hotVars; // Mixture of config and state, used in transmit - Storage internal s_storage; // Mixture of config and state, not used in transmit - uint256 internal s_fallbackGasPrice; - uint256 internal s_fallbackLinkPrice; - uint256 internal s_expectedLinkBalance; // Used in case of erroneous LINK transfers to contract - mapping(address => MigrationPermission) internal s_peerRegistryMigrationPermission; // Permissions for migration to and fro - mapping(uint256 => bytes) internal s_upkeepOffchainConfig; // general configuration preferences - - error ArrayHasNoEntries(); - error CannotCancel(); - error DuplicateEntry(); - error GasLimitCanOnlyIncrease(); - error GasLimitOutsideRange(); - error IndexOutOfRange(); - error InsufficientFunds(); - error InvalidDataLength(); - error InvalidPayee(); - error InvalidRecipient(); - error MigrationNotPermitted(); - error NotAContract(); - error OnlyActiveTransmitters(); - error OnlyCallableByAdmin(); - error OnlyCallableByLINKToken(); - error OnlyCallableByOwnerOrAdmin(); - error OnlyCallableByOwnerOrRegistrar(); - error OnlyCallableByPayee(); - error OnlyCallableByProposedAdmin(); - error OnlyCallableByProposedPayee(); - error OnlyPausedUpkeep(); - error OnlyUnpausedUpkeep(); - error ParameterLengthError(); - error PaymentGreaterThanAllLINK(); - error TargetCheckReverted(bytes reason); - error TranscoderNotSet(); - error UpkeepCancelled(); - error UpkeepNotCanceled(); - error UpkeepNotNeeded(); - error ValueNotChanged(); - error ConfigDigestMismatch(); - error IncorrectNumberOfSignatures(); - error OnlyActiveSigners(); - error DuplicateSigners(); - error TooManyOracles(); - error IncorrectNumberOfSigners(); - error IncorrectNumberOfFaultyOracles(); - error RepeatedSigner(); - error RepeatedTransmitter(); - error OnchainConfigNonEmpty(); - error CheckDataExceedsLimit(); - error MaxCheckDataSizeCanOnlyIncrease(); - error MaxPerformDataSizeCanOnlyIncrease(); - error InvalidReport(); - error RegistryPaused(); - error ReentrantCall(); - error UpkeepAlreadyExists(); - - enum MigrationPermission { - NONE, - OUTGOING, - INCOMING, - BIDIRECTIONAL - } - - enum Mode { - DEFAULT, - ARBITRUM, - OPTIMISM - } - - // Config + State storage struct which is on hot transmit path - struct HotVars { - uint8 f; // maximum number of faulty oracles - uint32 paymentPremiumPPB; // premium percentage charged to user over tx cost - uint32 flatFeeMicroLink; // flat fee charged to user for every perform - uint24 stalenessSeconds; // Staleness tolerance for feeds - uint16 gasCeilingMultiplier; // multiplier on top of fast gas feed for upper bound - bool paused; // pause switch for all upkeeps in the registry - bool reentrancyGuard; // guard against reentrancy - uint96 totalPremium; // total historical payment to oracles for premium - uint32 latestEpoch; // latest epoch for which a report was transmitted - // 1 EVM word full - } - - // Config + State storage struct which is not on hot transmit path - struct Storage { - uint96 minUpkeepSpend; // Minimum amount an upkeep must spend - address transcoder; // Address of transcoder contract used in migrations - // 1 EVM word full - uint96 ownerLinkBalance; // Balance of owner, accumulates minUpkeepSpend in case it is not spent - address registrar; // Address of registrar used to register upkeeps - // 2 EVM word full - uint32 checkGasLimit; // Gas limit allowed in checkUpkeep - uint32 maxPerformGas; // Max gas an upkeep can use on this registry - uint32 nonce; // Nonce for each upkeep created - uint32 configCount; // incremented each time a new config is posted, The count - // is incorporated into the config digest to prevent replay attacks. - uint32 latestConfigBlockNumber; // makes it easier for offchain systems to extract config from logs - uint32 maxCheckDataSize; // max length of checkData bytes - uint32 maxPerformDataSize; // max length of performData bytes - // 4 bytes to 3rd EVM word - } - - struct Transmitter { - bool active; - uint8 index; // Index of oracle in s_signersList/s_transmittersList - uint96 balance; - uint96 lastCollected; - } - - struct Signer { - bool active; - // Index of oracle in s_signersList/s_transmittersList - uint8 index; - } - - // This struct is used to pack information about the user's check function - struct PerformDataWrapper { - uint32 checkBlockNumber; // Block number-1 on which check was simulated - bytes32 checkBlockhash; // blockhash of checkBlockNumber. Used for reorg protection - bytes performData; // actual performData that user's check returned - } - - // Report transmitted by OCR to transmit function - struct Report { - uint256 fastGasWei; - uint256 linkNative; - uint256[] upkeepIds; // Ids of upkeeps - PerformDataWrapper[] wrappedPerformDatas; // Contains checkInfo and performData for the corresponding upkeeps - } - - event FundsAdded(uint256 indexed id, address indexed from, uint96 amount); - event FundsWithdrawn(uint256 indexed id, uint256 amount, address to); - event OwnerFundsWithdrawn(uint96 amount); - event PayeesUpdated(address[] transmitters, address[] payees); - event PayeeshipTransferRequested(address indexed transmitter, address indexed from, address indexed to); - event PayeeshipTransferred(address indexed transmitter, address indexed from, address indexed to); - event PaymentWithdrawn(address indexed transmitter, uint256 indexed amount, address indexed to, address payee); - event UpkeepAdminTransferRequested(uint256 indexed id, address indexed from, address indexed to); - event UpkeepAdminTransferred(uint256 indexed id, address indexed from, address indexed to); - event UpkeepCanceled(uint256 indexed id, uint64 indexed atBlockHeight); - event UpkeepCheckDataUpdated(uint256 indexed id, bytes newCheckData); - event UpkeepGasLimitSet(uint256 indexed id, uint96 gasLimit); - event UpkeepOffchainConfigSet(uint256 indexed id, bytes offchainConfig); - event UpkeepMigrated(uint256 indexed id, uint256 remainingBalance, address destination); - event UpkeepPaused(uint256 indexed id); - event UpkeepPerformed( - uint256 indexed id, - bool indexed success, - uint32 checkBlockNumber, - uint256 gasUsed, - uint256 gasOverhead, - uint96 totalPayment - ); - event UpkeepReceived(uint256 indexed id, uint256 startingBalance, address importedFrom); - event UpkeepUnpaused(uint256 indexed id); - event UpkeepRegistered(uint256 indexed id, uint32 executeGas, address admin); - event StaleUpkeepReport(uint256 indexed id); - event ReorgedUpkeepReport(uint256 indexed id); - event InsufficientFundsUpkeepReport(uint256 indexed id); - event CancelledUpkeepReport(uint256 indexed id); - event Paused(address account); - event Unpaused(address account); - - /** - * @param mode the contract mode of default, Arbitrum, or Optimism - * @param link address of the LINK Token - * @param linkNativeFeed address of the LINK/Native price feed - * @param fastGasFeed address of the Fast Gas price feed - */ - constructor(Mode mode, address link, address linkNativeFeed, address fastGasFeed) ConfirmedOwner(msg.sender) { - i_mode = mode; - i_link = LinkTokenInterface(link); - i_linkNativeFeed = AggregatorV3Interface(linkNativeFeed); - i_fastGasFeed = AggregatorV3Interface(fastGasFeed); - } - - //////// - // GETTERS - //////// - - function getMode() external view returns (Mode) { - return i_mode; - } - - function getLinkAddress() external view returns (address) { - return address(i_link); - } - - function getLinkNativeFeedAddress() external view returns (address) { - return address(i_linkNativeFeed); - } - - function getFastGasFeedAddress() external view returns (address) { - return address(i_fastGasFeed); - } - - //////// - // INTERNAL - //////// - - /** - * @dev retrieves feed data for fast gas/native and link/native prices. if the feed - * data is stale it uses the configured fallback price. Once a price is picked - * for gas it takes the min of gas price in the transaction or the fast gas - * price in order to reduce costs for the upkeep clients. - */ - function _getFeedData(HotVars memory hotVars) internal view returns (uint256 gasWei, uint256 linkNative) { - uint32 stalenessSeconds = hotVars.stalenessSeconds; - bool staleFallback = stalenessSeconds > 0; - uint256 timestamp; - int256 feedValue; - (, feedValue, , timestamp, ) = i_fastGasFeed.latestRoundData(); - if ( - feedValue <= 0 || block.timestamp < timestamp || (staleFallback && stalenessSeconds < block.timestamp - timestamp) - ) { - gasWei = s_fallbackGasPrice; - } else { - gasWei = uint256(feedValue); - } - (, feedValue, , timestamp, ) = i_linkNativeFeed.latestRoundData(); - if ( - feedValue <= 0 || block.timestamp < timestamp || (staleFallback && stalenessSeconds < block.timestamp - timestamp) - ) { - linkNative = s_fallbackLinkPrice; - } else { - linkNative = uint256(feedValue); - } - return (gasWei, linkNative); - } - - /** - * @dev calculates LINK paid for gas spent plus a configure premium percentage - * @param gasLimit the amount of gas used - * @param gasOverhead the amount of gas overhead - * @param fastGasWei the fast gas price - * @param linkNative the exchange ratio between LINK and Native token - * @param numBatchedUpkeeps the number of upkeeps in this batch. Used to divide the L1 cost - * @param isExecution if this is triggered by a perform upkeep function - */ - function _calculatePaymentAmount( - HotVars memory hotVars, - uint256 gasLimit, - uint256 gasOverhead, - uint256 fastGasWei, - uint256 linkNative, - uint16 numBatchedUpkeeps, - bool isExecution - ) internal view returns (uint96, uint96) { - uint256 gasWei = fastGasWei * hotVars.gasCeilingMultiplier; - // in case it's actual execution use actual gas price, capped by fastGasWei * gasCeilingMultiplier - if (isExecution && tx.gasprice < gasWei) { - gasWei = tx.gasprice; - } - - uint256 l1CostWei = 0; - if (i_mode == Mode.OPTIMISM) { - bytes memory txCallData = new bytes(0); - if (isExecution) { - txCallData = bytes.concat(msg.data, L1_FEE_DATA_PADDING); - } else { - // @dev fee is 4 per 0 byte, 16 per non-zero byte. Worst case we can have - // s_storage.maxPerformDataSize non zero-bytes. Instead of setting bytes to non-zero - // we initialize 'new bytes' of length 4*maxPerformDataSize to cover for zero bytes. - txCallData = new bytes(4 * s_storage.maxPerformDataSize); - } - l1CostWei = OPTIMISM_ORACLE.getL1Fee(txCallData); - } else if (i_mode == Mode.ARBITRUM) { - l1CostWei = ARB_NITRO_ORACLE.getCurrentTxL1GasFees(); - } - // if it's not performing upkeeps, use gas ceiling multiplier to estimate the upper bound - if (!isExecution) { - l1CostWei = hotVars.gasCeilingMultiplier * l1CostWei; - } - // Divide l1CostWei among all batched upkeeps. Spare change from division is not charged - l1CostWei = l1CostWei / numBatchedUpkeeps; - - uint256 gasPayment = ((gasWei * (gasLimit + gasOverhead) + l1CostWei) * 1e18) / linkNative; - uint256 premium = (((gasWei * gasLimit) + l1CostWei) * 1e9 * hotVars.paymentPremiumPPB) / - linkNative + - uint256(hotVars.flatFeeMicroLink) * - 1e12; - // LINK_TOTAL_SUPPLY < UINT96_MAX - if (gasPayment + premium > LINK_TOTAL_SUPPLY) revert PaymentGreaterThanAllLINK(); - return (uint96(gasPayment), uint96(premium)); - } - - /** - * @dev generates the max link payment for an upkeep - */ - function _getMaxLinkPayment( - HotVars memory hotVars, - uint32 executeGas, - uint32 performDataLength, - uint256 fastGasWei, - uint256 linkNative, - bool isExecution // Whether this is an actual perform execution or just a simulation - ) internal view returns (uint96) { - uint256 gasOverhead = _getMaxGasOverhead(performDataLength, hotVars.f); - (uint96 reimbursement, uint96 premium) = _calculatePaymentAmount( - hotVars, - executeGas, - gasOverhead, - fastGasWei, - linkNative, - 1, // Consider only 1 upkeep in batch to get maxPayment - isExecution - ); - - return reimbursement + premium; - } - - /** - * @dev returns the max gas overhead that can be charged for an upkeep - */ - function _getMaxGasOverhead(uint32 performDataLength, uint8 f) internal pure returns (uint256) { - // performData causes additional overhead in report length and memory operations - return - REGISTRY_GAS_OVERHEAD + - (REGISTRY_PER_SIGNER_GAS_OVERHEAD * (f + 1)) + - (REGISTRY_PER_PERFORM_BYTE_GAS_OVERHEAD * performDataLength); - } - - /** - * @dev move a transmitter's balance from total pool to withdrawable balance - */ - function _updateTransmitterBalanceFromPool( - address transmitterAddress, - uint96 totalPremium, - uint96 payeeCount - ) internal returns (uint96) { - Transmitter memory transmitter = s_transmitters[transmitterAddress]; - - uint96 uncollected = totalPremium - transmitter.lastCollected; - uint96 due = uncollected / payeeCount; - transmitter.balance += due; - transmitter.lastCollected = totalPremium; - - // Transfer spare change to owner - s_storage.ownerLinkBalance += (uncollected - due * payeeCount); - s_transmitters[transmitterAddress] = transmitter; - - return transmitter.balance; - } - - /** - * @notice returns the current block number in a chain agnostic manner - */ - function _blockNum() internal view returns (uint256) { - if (i_mode == Mode.ARBITRUM) { - return ARB_SYS.arbBlockNumber(); - } else { - return block.number; - } - } - - /** - * @notice returns the blockhash of the provided block number in a chain agnostic manner - * @param n the blocknumber to retrieve the blockhash for - * @return blockhash the blockhash of block number n, or 0 if n is out queryable of range - */ - function _blockHash(uint256 n) internal view returns (bytes32) { - if (i_mode == Mode.ARBITRUM) { - uint256 blockNum = ARB_SYS.arbBlockNumber(); - if (n >= blockNum || blockNum - n > 256) { - return ""; - } - return ARB_SYS.arbBlockHash(n); - } else { - return blockhash(n); - } - } - - /** - * @notice replicates Open Zeppelin's ReentrancyGuard but optimized to fit our storage - */ - modifier nonReentrant() { - if (s_hotVars.reentrancyGuard) revert ReentrantCall(); - s_hotVars.reentrancyGuard = true; - _; - s_hotVars.reentrancyGuard = false; - } -} diff --git a/contracts/src/v0.8/automation/v2_0/KeeperRegistryLogic2_0.sol b/contracts/src/v0.8/automation/v2_0/KeeperRegistryLogic2_0.sol deleted file mode 100644 index 7eacc3cb61e..00000000000 --- a/contracts/src/v0.8/automation/v2_0/KeeperRegistryLogic2_0.sol +++ /dev/null @@ -1,474 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.6; - -import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/structs/EnumerableSet.sol"; -import "../../vendor/openzeppelin-solidity/v4.7.3/contracts/utils/Address.sol"; -import "./KeeperRegistryBase2_0.sol"; -import {UpkeepFailureReason} from "../interfaces/v2_0/AutomationRegistryInterface2_0.sol"; -import "../interfaces/MigratableKeeperRegistryInterfaceV2.sol"; -import "../interfaces/UpkeepTranscoderInterfaceV2.sol"; - -/** - * @notice Logic contract, works in tandem with KeeperRegistry as a proxy - */ -contract KeeperRegistryLogic2_0 is KeeperRegistryBase2_0 { - using Address for address; - using EnumerableSet for EnumerableSet.UintSet; - - /** - * @param mode one of Default, Arbitrum, Optimism - * @param link address of the LINK Token - * @param linkNativeFeed address of the LINK/Native price feed - * @param fastGasFeed address of the Fast Gas price feed - */ - constructor( - Mode mode, - address link, - address linkNativeFeed, - address fastGasFeed - ) KeeperRegistryBase2_0(mode, link, linkNativeFeed, fastGasFeed) {} - - function checkUpkeep( - uint256 id - ) - external - cannotExecute - returns ( - bool upkeepNeeded, - bytes memory performData, - UpkeepFailureReason upkeepFailureReason, - uint256 gasUsed, - uint256 fastGasWei, - uint256 linkNative - ) - { - HotVars memory hotVars = s_hotVars; - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.maxValidBlocknumber != UINT32_MAX) - return (false, bytes(""), UpkeepFailureReason.UPKEEP_CANCELLED, gasUsed, 0, 0); - if (upkeep.paused) return (false, bytes(""), UpkeepFailureReason.UPKEEP_PAUSED, gasUsed, 0, 0); - - (fastGasWei, linkNative) = _getFeedData(hotVars); - uint96 maxLinkPayment = _getMaxLinkPayment( - hotVars, - upkeep.executeGas, - s_storage.maxPerformDataSize, - fastGasWei, - linkNative, - false - ); - if (upkeep.balance < maxLinkPayment) - return (false, bytes(""), UpkeepFailureReason.INSUFFICIENT_BALANCE, gasUsed, fastGasWei, linkNative); - - gasUsed = gasleft(); - bytes memory callData = abi.encodeWithSelector(CHECK_SELECTOR, s_checkData[id]); - (bool success, bytes memory result) = upkeep.target.call{gas: s_storage.checkGasLimit}(callData); - gasUsed = gasUsed - gasleft(); - - if (!success) { - upkeepFailureReason = UpkeepFailureReason.TARGET_CHECK_REVERTED; - } else { - (upkeepNeeded, result) = abi.decode(result, (bool, bytes)); - if (!upkeepNeeded) - return (false, bytes(""), UpkeepFailureReason.UPKEEP_NOT_NEEDED, gasUsed, fastGasWei, linkNative); - if (result.length > s_storage.maxPerformDataSize) - return (false, bytes(""), UpkeepFailureReason.PERFORM_DATA_EXCEEDS_LIMIT, gasUsed, fastGasWei, linkNative); - } - - performData = abi.encode( - PerformDataWrapper({ - checkBlockNumber: uint32(_blockNum() - 1), - checkBlockhash: _blockHash(_blockNum() - 1), - performData: result - }) - ); - - return (success, performData, upkeepFailureReason, gasUsed, fastGasWei, linkNative); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function withdrawOwnerFunds() external onlyOwner { - uint96 amount = s_storage.ownerLinkBalance; - - s_expectedLinkBalance = s_expectedLinkBalance - amount; - s_storage.ownerLinkBalance = 0; - - emit OwnerFundsWithdrawn(amount); - i_link.transfer(msg.sender, amount); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function recoverFunds() external onlyOwner { - uint256 total = i_link.balanceOf(address(this)); - i_link.transfer(msg.sender, total - s_expectedLinkBalance); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setPayees(address[] calldata payees) external onlyOwner { - if (s_transmittersList.length != payees.length) revert ParameterLengthError(); - for (uint256 i = 0; i < s_transmittersList.length; i++) { - address transmitter = s_transmittersList[i]; - address oldPayee = s_transmitterPayees[transmitter]; - address newPayee = payees[i]; - if ( - (newPayee == ZERO_ADDRESS) || (oldPayee != ZERO_ADDRESS && oldPayee != newPayee && newPayee != IGNORE_ADDRESS) - ) revert InvalidPayee(); - if (newPayee != IGNORE_ADDRESS) { - s_transmitterPayees[transmitter] = newPayee; - } - } - emit PayeesUpdated(s_transmittersList, payees); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function pause() external onlyOwner { - s_hotVars.paused = true; - - emit Paused(msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function unpause() external onlyOwner { - s_hotVars.paused = false; - - emit Unpaused(msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setPeerRegistryMigrationPermission(address peer, MigrationPermission permission) external onlyOwner { - s_peerRegistryMigrationPermission[peer] = permission; - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function registerUpkeep( - address target, - uint32 gasLimit, - address admin, - bytes calldata checkData, - bytes calldata offchainConfig - ) external returns (uint256 id) { - if (msg.sender != owner() && msg.sender != s_storage.registrar) revert OnlyCallableByOwnerOrRegistrar(); - - id = uint256(keccak256(abi.encode(_blockHash(_blockNum() - 1), address(this), s_storage.nonce))); - _createUpkeep(id, target, gasLimit, admin, 0, checkData, false); - s_storage.nonce++; - s_upkeepOffchainConfig[id] = offchainConfig; - emit UpkeepRegistered(id, gasLimit, admin); - return id; - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function cancelUpkeep(uint256 id) external { - Upkeep memory upkeep = s_upkeep[id]; - bool canceled = upkeep.maxValidBlocknumber != UINT32_MAX; - bool isOwner = msg.sender == owner(); - - if (canceled && !(isOwner && upkeep.maxValidBlocknumber > _blockNum())) revert CannotCancel(); - if (!isOwner && msg.sender != s_upkeepAdmin[id]) revert OnlyCallableByOwnerOrAdmin(); - - uint256 height = _blockNum(); - if (!isOwner) { - height = height + CANCELLATION_DELAY; - } - s_upkeep[id].maxValidBlocknumber = uint32(height); - s_upkeepIDs.remove(id); - - // charge the cancellation fee if the minUpkeepSpend is not met - uint96 minUpkeepSpend = s_storage.minUpkeepSpend; - uint96 cancellationFee = 0; - // cancellationFee is supposed to be min(max(minUpkeepSpend - amountSpent,0), amountLeft) - if (upkeep.amountSpent < minUpkeepSpend) { - cancellationFee = minUpkeepSpend - upkeep.amountSpent; - if (cancellationFee > upkeep.balance) { - cancellationFee = upkeep.balance; - } - } - s_upkeep[id].balance = upkeep.balance - cancellationFee; - s_storage.ownerLinkBalance = s_storage.ownerLinkBalance + cancellationFee; - - emit UpkeepCanceled(id, uint64(height)); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function addFunds(uint256 id, uint96 amount) external { - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - - s_upkeep[id].balance = upkeep.balance + amount; - s_expectedLinkBalance = s_expectedLinkBalance + amount; - i_link.transferFrom(msg.sender, address(this), amount); - emit FundsAdded(id, msg.sender, amount); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function withdrawFunds(uint256 id, address to) external nonReentrant { - if (to == ZERO_ADDRESS) revert InvalidRecipient(); - Upkeep memory upkeep = s_upkeep[id]; - if (s_upkeepAdmin[id] != msg.sender) revert OnlyCallableByAdmin(); - if (upkeep.maxValidBlocknumber > _blockNum()) revert UpkeepNotCanceled(); - - uint96 amountToWithdraw = s_upkeep[id].balance; - s_expectedLinkBalance = s_expectedLinkBalance - amountToWithdraw; - s_upkeep[id].balance = 0; - i_link.transfer(to, amountToWithdraw); - emit FundsWithdrawn(id, amountToWithdraw, to); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setUpkeepGasLimit(uint256 id, uint32 gasLimit) external { - if (gasLimit < PERFORM_GAS_MIN || gasLimit > s_storage.maxPerformGas) revert GasLimitOutsideRange(); - _requireAdminAndNotCancelled(id); - s_upkeep[id].executeGas = gasLimit; - - emit UpkeepGasLimitSet(id, gasLimit); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function setUpkeepOffchainConfig(uint256 id, bytes calldata config) external { - _requireAdminAndNotCancelled(id); - - s_upkeepOffchainConfig[id] = config; - - emit UpkeepOffchainConfigSet(id, config); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function withdrawPayment(address from, address to) external { - if (to == ZERO_ADDRESS) revert InvalidRecipient(); - if (s_transmitterPayees[from] != msg.sender) revert OnlyCallableByPayee(); - - uint96 balance = _updateTransmitterBalanceFromPool(from, s_hotVars.totalPremium, uint96(s_transmittersList.length)); - s_transmitters[from].balance = 0; - s_expectedLinkBalance = s_expectedLinkBalance - balance; - - i_link.transfer(to, balance); - - emit PaymentWithdrawn(from, balance, to, msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function transferPayeeship(address transmitter, address proposed) external { - if (s_transmitterPayees[transmitter] != msg.sender) revert OnlyCallableByPayee(); - if (proposed == msg.sender) revert ValueNotChanged(); - - if (s_proposedPayee[transmitter] != proposed) { - s_proposedPayee[transmitter] = proposed; - emit PayeeshipTransferRequested(transmitter, msg.sender, proposed); - } - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function acceptPayeeship(address transmitter) external { - if (s_proposedPayee[transmitter] != msg.sender) revert OnlyCallableByProposedPayee(); - address past = s_transmitterPayees[transmitter]; - s_transmitterPayees[transmitter] = msg.sender; - s_proposedPayee[transmitter] = ZERO_ADDRESS; - - emit PayeeshipTransferred(transmitter, past, msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function transferUpkeepAdmin(uint256 id, address proposed) external { - _requireAdminAndNotCancelled(id); - if (proposed == msg.sender) revert ValueNotChanged(); - if (proposed == ZERO_ADDRESS) revert InvalidRecipient(); - - if (s_proposedAdmin[id] != proposed) { - s_proposedAdmin[id] = proposed; - emit UpkeepAdminTransferRequested(id, msg.sender, proposed); - } - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function acceptUpkeepAdmin(uint256 id) external { - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - if (s_proposedAdmin[id] != msg.sender) revert OnlyCallableByProposedAdmin(); - address past = s_upkeepAdmin[id]; - s_upkeepAdmin[id] = msg.sender; - s_proposedAdmin[id] = ZERO_ADDRESS; - - emit UpkeepAdminTransferred(id, past, msg.sender); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function pauseUpkeep(uint256 id) external { - _requireAdminAndNotCancelled(id); - Upkeep memory upkeep = s_upkeep[id]; - if (upkeep.paused) revert OnlyUnpausedUpkeep(); - s_upkeep[id].paused = true; - s_upkeepIDs.remove(id); - emit UpkeepPaused(id); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function unpauseUpkeep(uint256 id) external { - _requireAdminAndNotCancelled(id); - Upkeep memory upkeep = s_upkeep[id]; - if (!upkeep.paused) revert OnlyPausedUpkeep(); - s_upkeep[id].paused = false; - s_upkeepIDs.add(id); - emit UpkeepUnpaused(id); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function updateCheckData(uint256 id, bytes calldata newCheckData) external { - _requireAdminAndNotCancelled(id); - if (newCheckData.length > s_storage.maxCheckDataSize) revert CheckDataExceedsLimit(); - s_checkData[id] = newCheckData; - emit UpkeepCheckDataUpdated(id, newCheckData); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function migrateUpkeeps(uint256[] calldata ids, address destination) external { - if ( - s_peerRegistryMigrationPermission[destination] != MigrationPermission.OUTGOING && - s_peerRegistryMigrationPermission[destination] != MigrationPermission.BIDIRECTIONAL - ) revert MigrationNotPermitted(); - if (s_storage.transcoder == ZERO_ADDRESS) revert TranscoderNotSet(); - if (ids.length == 0) revert ArrayHasNoEntries(); - uint256 id; - Upkeep memory upkeep; - uint256 totalBalanceRemaining; - bytes[] memory checkDatas = new bytes[](ids.length); - address[] memory admins = new address[](ids.length); - Upkeep[] memory upkeeps = new Upkeep[](ids.length); - for (uint256 idx = 0; idx < ids.length; idx++) { - id = ids[idx]; - upkeep = s_upkeep[id]; - _requireAdminAndNotCancelled(id); - upkeeps[idx] = upkeep; - checkDatas[idx] = s_checkData[id]; - admins[idx] = s_upkeepAdmin[id]; - totalBalanceRemaining = totalBalanceRemaining + upkeep.balance; - delete s_upkeep[id]; - delete s_checkData[id]; - // nullify existing proposed admin change if an upkeep is being migrated - delete s_proposedAdmin[id]; - s_upkeepIDs.remove(id); - emit UpkeepMigrated(id, upkeep.balance, destination); - } - s_expectedLinkBalance = s_expectedLinkBalance - totalBalanceRemaining; - bytes memory encodedUpkeeps = abi.encode(ids, upkeeps, checkDatas, admins); - MigratableKeeperRegistryInterfaceV2(destination).receiveUpkeeps( - UpkeepTranscoderInterfaceV2(s_storage.transcoder).transcodeUpkeeps( - UPKEEP_VERSION_BASE, - MigratableKeeperRegistryInterfaceV2(destination).upkeepVersion(), - encodedUpkeeps - ) - ); - i_link.transfer(destination, totalBalanceRemaining); - } - - /** - * @dev Called through KeeperRegistry main contract - */ - function receiveUpkeeps(bytes calldata encodedUpkeeps) external { - if ( - s_peerRegistryMigrationPermission[msg.sender] != MigrationPermission.INCOMING && - s_peerRegistryMigrationPermission[msg.sender] != MigrationPermission.BIDIRECTIONAL - ) revert MigrationNotPermitted(); - (uint256[] memory ids, Upkeep[] memory upkeeps, bytes[] memory checkDatas, address[] memory upkeepAdmins) = abi - .decode(encodedUpkeeps, (uint256[], Upkeep[], bytes[], address[])); - for (uint256 idx = 0; idx < ids.length; idx++) { - _createUpkeep( - ids[idx], - upkeeps[idx].target, - upkeeps[idx].executeGas, - upkeepAdmins[idx], - upkeeps[idx].balance, - checkDatas[idx], - upkeeps[idx].paused - ); - emit UpkeepReceived(ids[idx], upkeeps[idx].balance, msg.sender); - } - } - - /** - * @notice creates a new upkeep with the given fields - * @param target address to perform upkeep on - * @param gasLimit amount of gas to provide the target contract when - * performing upkeep - * @param admin address to cancel upkeep and withdraw remaining funds - * @param checkData data passed to the contract when checking for upkeep - * @param paused if this upkeep is paused - */ - function _createUpkeep( - uint256 id, - address target, - uint32 gasLimit, - address admin, - uint96 balance, - bytes memory checkData, - bool paused - ) internal { - if (s_hotVars.paused) revert RegistryPaused(); - if (!target.isContract()) revert NotAContract(); - if (checkData.length > s_storage.maxCheckDataSize) revert CheckDataExceedsLimit(); - if (gasLimit < PERFORM_GAS_MIN || gasLimit > s_storage.maxPerformGas) revert GasLimitOutsideRange(); - if (s_upkeep[id].target != address(0)) revert UpkeepAlreadyExists(); - s_upkeep[id] = Upkeep({ - target: target, - executeGas: gasLimit, - balance: balance, - maxValidBlocknumber: UINT32_MAX, - lastPerformBlockNumber: 0, - amountSpent: 0, - paused: paused - }); - s_upkeepAdmin[id] = admin; - s_expectedLinkBalance = s_expectedLinkBalance + balance; - s_checkData[id] = checkData; - s_upkeepIDs.add(id); - } - - /** - * @dev ensures the upkeep is not cancelled and the caller is the upkeep admin - */ - function _requireAdminAndNotCancelled(uint256 upkeepId) internal view { - if (msg.sender != s_upkeepAdmin[upkeepId]) revert OnlyCallableByAdmin(); - if (s_upkeep[upkeepId].maxValidBlocknumber != UINT32_MAX) revert UpkeepCancelled(); - } -} diff --git a/contracts/src/v0.8/automation/v2_0/UpkeepTranscoder3_0.sol b/contracts/src/v0.8/automation/v2_0/UpkeepTranscoder3_0.sol deleted file mode 100644 index df8368de691..00000000000 --- a/contracts/src/v0.8/automation/v2_0/UpkeepTranscoder3_0.sol +++ /dev/null @@ -1,104 +0,0 @@ -// SPDX-License-Identifier: MIT - -pragma solidity 0.8.6; - -import "../../automation/interfaces/UpkeepTranscoderInterface.sol"; -import "../../shared/interfaces/ITypeAndVersion.sol"; -import {Upkeep as UpkeepV1} from "../../automation/v1_2/KeeperRegistry1_2.sol"; -import {Upkeep as UpkeepV2} from "../../automation/v1_3/KeeperRegistryBase1_3.sol"; -import {Upkeep as UpkeepV3} from "../../automation/v2_0/KeeperRegistryBase2_0.sol"; -import "../../automation/UpkeepFormat.sol"; - -/** - * @notice UpkeepTranscoder 3_0 allows converting upkeep data from previous keeper registry versions 1.2 and 1.3 to - * registry 2.0 - */ -contract UpkeepTranscoder3_0 is UpkeepTranscoderInterface, ITypeAndVersion { - error InvalidTranscoding(); - - /** - * @notice versions: - * - UpkeepTranscoder 3.0.0: version 3.0.0 works with registry 2.0; adds temporary workaround for UpkeepFormat enum bug - */ - string public constant override typeAndVersion = "UpkeepTranscoder 3.0.0"; - uint32 internal constant UINT32_MAX = type(uint32).max; - - /** - * @notice transcodeUpkeeps transforms upkeep data from the format expected by - * one registry to the format expected by another. It future-proofs migrations - * by allowing keepers team to customize migration paths and set sensible defaults - * when new fields are added - * @param fromVersion struct version the upkeep is migrating from - * @param encodedUpkeeps encoded upkeep data - * @dev this transcoder should ONLY be use for V1/V2 --> V3 migrations - * @dev this transcoder **ignores** the toVersion param, as it assumes all migrations are - * for the V3 version. Therefore, it is the responsibility of the deployer of this contract - * to ensure it is not used in any other migration paths. - */ - function transcodeUpkeeps( - UpkeepFormat fromVersion, - UpkeepFormat, - bytes calldata encodedUpkeeps - ) external view override returns (bytes memory) { - // this transcoder only handles upkeep V1/V2 to V3, all other formats are invalid. - if (fromVersion == UpkeepFormat.V1) { - (uint256[] memory ids, UpkeepV1[] memory upkeepsV1, bytes[] memory checkDatas) = abi.decode( - encodedUpkeeps, - (uint256[], UpkeepV1[], bytes[]) - ); - - if (ids.length != upkeepsV1.length || ids.length != checkDatas.length) { - revert InvalidTranscoding(); - } - - address[] memory admins = new address[](ids.length); - UpkeepV3[] memory newUpkeeps = new UpkeepV3[](ids.length); - UpkeepV1 memory upkeepV1; - for (uint256 idx = 0; idx < ids.length; idx++) { - upkeepV1 = upkeepsV1[idx]; - newUpkeeps[idx] = UpkeepV3({ - executeGas: upkeepV1.executeGas, - maxValidBlocknumber: UINT32_MAX, // maxValidBlocknumber is uint64 in V1, hence a new default value is provided - paused: false, // migrated upkeeps are not paused by default - target: upkeepV1.target, - amountSpent: upkeepV1.amountSpent, - balance: upkeepV1.balance, - lastPerformBlockNumber: 0 - }); - admins[idx] = upkeepV1.admin; - } - return abi.encode(ids, newUpkeeps, checkDatas, admins); - } - - if (fromVersion == UpkeepFormat.V2) { - (uint256[] memory ids, UpkeepV2[] memory upkeepsV2, bytes[] memory checkDatas) = abi.decode( - encodedUpkeeps, - (uint256[], UpkeepV2[], bytes[]) - ); - - if (ids.length != upkeepsV2.length || ids.length != checkDatas.length) { - revert InvalidTranscoding(); - } - - address[] memory admins = new address[](ids.length); - UpkeepV3[] memory newUpkeeps = new UpkeepV3[](ids.length); - UpkeepV2 memory upkeepV2; - for (uint256 idx = 0; idx < ids.length; idx++) { - upkeepV2 = upkeepsV2[idx]; - newUpkeeps[idx] = UpkeepV3({ - executeGas: upkeepV2.executeGas, - maxValidBlocknumber: upkeepV2.maxValidBlocknumber, - paused: upkeepV2.paused, - target: upkeepV2.target, - amountSpent: upkeepV2.amountSpent, - balance: upkeepV2.balance, - lastPerformBlockNumber: 0 - }); - admins[idx] = upkeepV2.admin; - } - return abi.encode(ids, newUpkeeps, checkDatas, admins); - } - - revert InvalidTranscoding(); - } -} diff --git a/core/gethwrappers/generated/gas_wrapper/gas_wrapper.go b/core/gethwrappers/generated/gas_wrapper/gas_wrapper.go deleted file mode 100644 index eec0cf855f3..00000000000 --- a/core/gethwrappers/generated/gas_wrapper/gas_wrapper.go +++ /dev/null @@ -1,576 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package gas_wrapper - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -var KeeperRegistryCheckUpkeepGasUsageWrapperMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractAutomationRegistryExecutableInterface\",\"name\":\"keeperRegistry\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getKeeperRegistry\",\"outputs\":[{\"internalType\":\"contractAutomationRegistryExecutableInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"measureCheckGas\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60a060405234801561001057600080fd5b5060405161092f38038061092f83398101604081905261002f91610177565b33806000816100855760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156100b5576100b5816100cd565b50505060601b6001600160601b0319166080526101a7565b6001600160a01b0381163314156101265760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161007c565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60006020828403121561018957600080fd5b81516001600160a01b03811681146101a057600080fd5b9392505050565b60805160601c6107646101cb6000396000818160e2015261017001526107646000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80638da5cb5b116100505780638da5cb5b146100a1578063a33c0660146100e0578063f2fde38b1461010657600080fd5b80636bf490301461006c57806379ba509714610097575b600080fd5b61007f61007a36600461062c565b610119565b60405161008e93929190610658565b60405180910390f35b61009f610262565b005b60005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008e565b7f00000000000000000000000000000000000000000000000000000000000000006100bb565b61009f61011436600461051a565b610364565b600060606000805a6040517fc41b813a0000000000000000000000000000000000000000000000000000000081526004810188905273ffffffffffffffffffffffffffffffffffffffff87811660248301529192507f00000000000000000000000000000000000000000000000000000000000000009091169063c41b813a90604401600060405180830381600087803b1580156101b657600080fd5b505af192505050801561020957506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201604052610206919081019061053c565b60015b6102385760005a61021a90836106ba565b6040805160208101909152600080825296509450925061025b915050565b60005a61024590886106ba565b60019a5095985094965061025b95505050505050565b9250925092565b60015473ffffffffffffffffffffffffffffffffffffffff1633146102e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b61036c610378565b610375816103fb565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103f9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016102df565b565b73ffffffffffffffffffffffffffffffffffffffff811633141561047b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016102df565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff8116811461051557600080fd5b919050565b60006020828403121561052c57600080fd5b610535826104f1565b9392505050565b600080600080600060a0868803121561055457600080fd5b855167ffffffffffffffff8082111561056c57600080fd5b818801915088601f83011261058057600080fd5b81518181111561059257610592610728565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156105d8576105d8610728565b816040528281528b60208487010111156105f157600080fd5b6106028360208301602088016106f8565b60208b015160408c015160608d01516080909d0151929e919d509b9a509098509650505050505050565b6000806040838503121561063f57600080fd5b8235915061064f602084016104f1565b90509250929050565b8315158152606060208201526000835180606084015261067f8160808501602088016106f8565b604083019390935250601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160160800192915050565b6000828210156106f3577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500390565b60005b838110156107135781810151838201526020016106fb565b83811115610722576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", -} - -var KeeperRegistryCheckUpkeepGasUsageWrapperABI = KeeperRegistryCheckUpkeepGasUsageWrapperMetaData.ABI - -var KeeperRegistryCheckUpkeepGasUsageWrapperBin = KeeperRegistryCheckUpkeepGasUsageWrapperMetaData.Bin - -func DeployKeeperRegistryCheckUpkeepGasUsageWrapper(auth *bind.TransactOpts, backend bind.ContractBackend, keeperRegistry common.Address) (common.Address, *types.Transaction, *KeeperRegistryCheckUpkeepGasUsageWrapper, error) { - parsed, err := KeeperRegistryCheckUpkeepGasUsageWrapperMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryCheckUpkeepGasUsageWrapperBin), backend, keeperRegistry) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistryCheckUpkeepGasUsageWrapper{address: address, abi: *parsed, KeeperRegistryCheckUpkeepGasUsageWrapperCaller: KeeperRegistryCheckUpkeepGasUsageWrapperCaller{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperTransactor: KeeperRegistryCheckUpkeepGasUsageWrapperTransactor{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperFilterer: KeeperRegistryCheckUpkeepGasUsageWrapperFilterer{contract: contract}}, nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapper struct { - address common.Address - abi abi.ABI - KeeperRegistryCheckUpkeepGasUsageWrapperCaller - KeeperRegistryCheckUpkeepGasUsageWrapperTransactor - KeeperRegistryCheckUpkeepGasUsageWrapperFilterer -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperSession struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapper - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperCallerSession struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperCaller - CallOpts bind.CallOpts -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperTransactorSession struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperRaw struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapper -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperCallerRaw struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperCaller -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperTransactorRaw struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperTransactor -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapper(address common.Address, backend bind.ContractBackend) (*KeeperRegistryCheckUpkeepGasUsageWrapper, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistryCheckUpkeepGasUsageWrapperABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapper(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapper{address: address, abi: abi, KeeperRegistryCheckUpkeepGasUsageWrapperCaller: KeeperRegistryCheckUpkeepGasUsageWrapperCaller{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperTransactor: KeeperRegistryCheckUpkeepGasUsageWrapperTransactor{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperFilterer: KeeperRegistryCheckUpkeepGasUsageWrapperFilterer{contract: contract}}, nil -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistryCheckUpkeepGasUsageWrapperCaller, error) { - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapper(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperCaller{contract: contract}, nil -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistryCheckUpkeepGasUsageWrapperTransactor, error) { - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapper(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperTransactor{contract: contract}, nil -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistryCheckUpkeepGasUsageWrapperFilterer, error) { - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapper(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperFilterer{contract: contract}, nil -} - -func bindKeeperRegistryCheckUpkeepGasUsageWrapper(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistryCheckUpkeepGasUsageWrapperMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.KeeperRegistryCheckUpkeepGasUsageWrapperCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.KeeperRegistryCheckUpkeepGasUsageWrapperTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.KeeperRegistryCheckUpkeepGasUsageWrapperTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperCaller) GetKeeperRegistry(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.Call(opts, &out, "getKeeperRegistry") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperSession) GetKeeperRegistry() (common.Address, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.GetKeeperRegistry(&_KeeperRegistryCheckUpkeepGasUsageWrapper.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperCallerSession) GetKeeperRegistry() (common.Address, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.GetKeeperRegistry(&_KeeperRegistryCheckUpkeepGasUsageWrapper.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperSession) Owner() (common.Address, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.Owner(&_KeeperRegistryCheckUpkeepGasUsageWrapper.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperCallerSession) Owner() (common.Address, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.Owner(&_KeeperRegistryCheckUpkeepGasUsageWrapper.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.Transact(opts, "acceptOwnership") -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.AcceptOwnership(&_KeeperRegistryCheckUpkeepGasUsageWrapper.TransactOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.AcceptOwnership(&_KeeperRegistryCheckUpkeepGasUsageWrapper.TransactOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactor) MeasureCheckGas(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.Transact(opts, "measureCheckGas", id, from) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperSession) MeasureCheckGas(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.MeasureCheckGas(&_KeeperRegistryCheckUpkeepGasUsageWrapper.TransactOpts, id, from) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactorSession) MeasureCheckGas(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.MeasureCheckGas(&_KeeperRegistryCheckUpkeepGasUsageWrapper.TransactOpts, id, from) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.Transact(opts, "transferOwnership", to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.TransferOwnership(&_KeeperRegistryCheckUpkeepGasUsageWrapper.TransactOpts, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.Contract.TransferOwnership(&_KeeperRegistryCheckUpkeepGasUsageWrapper.TransactOpts, to) -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator struct { - Event *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator{contract: _KeeperRegistryCheckUpkeepGasUsageWrapper.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested, error) { - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator struct { - Event *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator{contract: _KeeperRegistryCheckUpkeepGasUsageWrapper.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapperFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred, error) { - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapper.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapper) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistryCheckUpkeepGasUsageWrapper.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistryCheckUpkeepGasUsageWrapper.ParseOwnershipTransferRequested(log) - case _KeeperRegistryCheckUpkeepGasUsageWrapper.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistryCheckUpkeepGasUsageWrapper.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapper *KeeperRegistryCheckUpkeepGasUsageWrapper) Address() common.Address { - return _KeeperRegistryCheckUpkeepGasUsageWrapper.address -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperInterface interface { - GetKeeperRegistry(opts *bind.CallOpts) (common.Address, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - MeasureCheckGas(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/gas_wrapper_mock/gas_wrapper_mock.go b/core/gethwrappers/generated/gas_wrapper_mock/gas_wrapper_mock.go deleted file mode 100644 index 93803ce9938..00000000000 --- a/core/gethwrappers/generated/gas_wrapper_mock/gas_wrapper_mock.go +++ /dev/null @@ -1,614 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package gas_wrapper_mock - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -var KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"emitOwnershipTransferRequested\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"emitOwnershipTransferred\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"measureCheckGas\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_mockGas\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_mockPayload\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_mockResult\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"payload\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"setMeasureCheckGasResult\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506106b9806100206000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063846811931161005b57806384681193146100d5578063b019b4e8146100f2578063b023145014610105578063f7420bc21461011a57600080fd5b80632dae06f51461008257806356343496146100975780636bf49030146100b3575b600080fd5b610095610090366004610466565b61012d565b005b6100a060025481565b6040519081526020015b60405180910390f35b6100c66100c1366004610556565b610174565b6040516100aa939291906105e4565b6000546100e29060ff1681565b60405190151581526020016100aa565b610095610100366004610433565b610227565b61010d610285565b6040516100aa919061060f565b610095610128366004610433565b610313565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016841515179055815161016c906001906020850190610371565b506002555050565b6000606060008060009054906101000a900460ff16600160025481805461019a90610629565b80601f01602080910402602001604051908101604052809291908181526020018280546101c690610629565b80156102135780601f106101e857610100808354040283529160200191610213565b820191906000526020600020905b8154815290600101906020018083116101f657829003601f168201915b505050505091509250925092509250925092565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001805461029290610629565b80601f01602080910402602001604051908101604052809291908181526020018280546102be90610629565b801561030b5780601f106102e05761010080835404028352916020019161030b565b820191906000526020600020905b8154815290600101906020018083116102ee57829003601f168201915b505050505081565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127860405160405180910390a35050565b82805461037d90610629565b90600052602060002090601f01602090048101928261039f57600085556103e5565b82601f106103b857805160ff19168380011785556103e5565b828001600101855582156103e5579182015b828111156103e55782518255916020019190600101906103ca565b506103f19291506103f5565b5090565b5b808211156103f157600081556001016103f6565b803573ffffffffffffffffffffffffffffffffffffffff8116811461042e57600080fd5b919050565b6000806040838503121561044657600080fd5b61044f8361040a565b915061045d6020840161040a565b90509250929050565b60008060006060848603121561047b57600080fd5b8335801515811461048b57600080fd5b9250602084013567ffffffffffffffff808211156104a857600080fd5b818601915086601f8301126104bc57600080fd5b8135818111156104ce576104ce61067d565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156105145761051461067d565b8160405282815289602084870101111561052d57600080fd5b826020860160208301376000602084830101528096505050505050604084013590509250925092565b6000806040838503121561056957600080fd5b8235915061045d6020840161040a565b6000815180845260005b8181101561059f57602081850181015186830182015201610583565b818111156105b1576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b83151581526060602082015260006105ff6060830185610579565b9050826040830152949350505050565b6020815260006106226020830184610579565b9392505050565b600181811c9082168061063d57607f821691505b60208210811415610677577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", -} - -var KeeperRegistryCheckUpkeepGasUsageWrapperMockABI = KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.ABI - -var KeeperRegistryCheckUpkeepGasUsageWrapperMockBin = KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.Bin - -func DeployKeeperRegistryCheckUpkeepGasUsageWrapperMock(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KeeperRegistryCheckUpkeepGasUsageWrapperMock, error) { - parsed, err := KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryCheckUpkeepGasUsageWrapperMockBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistryCheckUpkeepGasUsageWrapperMock{address: address, abi: *parsed, KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller: KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor: KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer: KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer{contract: contract}}, nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMock struct { - address common.Address - abi abi.ABI - KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller - KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor - KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockSession struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperMock - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockCallerSession struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller - CallOpts bind.CallOpts -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorSession struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockRaw struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperMock -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockCallerRaw struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorRaw struct { - Contract *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperMock(address common.Address, backend bind.ContractBackend) (*KeeperRegistryCheckUpkeepGasUsageWrapperMock, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistryCheckUpkeepGasUsageWrapperMockABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapperMock(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperMock{address: address, abi: abi, KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller: KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor: KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor{contract: contract}, KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer: KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer{contract: contract}}, nil -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperMockCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller, error) { - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapperMock(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller{contract: contract}, nil -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor, error) { - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapperMock(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor{contract: contract}, nil -} - -func NewKeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer, error) { - contract, err := bindKeeperRegistryCheckUpkeepGasUsageWrapperMock(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer{contract: contract}, nil -} - -func bindKeeperRegistryCheckUpkeepGasUsageWrapperMock(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller) SMockGas(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Call(opts, &out, "s_mockGas") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) SMockGas() (*big.Int, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SMockGas(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCallerSession) SMockGas() (*big.Int, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SMockGas(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller) SMockPayload(opts *bind.CallOpts) ([]byte, error) { - var out []interface{} - err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Call(opts, &out, "s_mockPayload") - - if err != nil { - return *new([]byte), err - } - - out0 := *abi.ConvertType(out[0], new([]byte)).(*[]byte) - - return out0, err - -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) SMockPayload() ([]byte, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SMockPayload(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCallerSession) SMockPayload() ([]byte, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SMockPayload(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCaller) SMockResult(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Call(opts, &out, "s_mockResult") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) SMockResult() (bool, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SMockResult(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockCallerSession) SMockResult() (bool, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SMockResult(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.CallOpts) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor) EmitOwnershipTransferRequested(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Transact(opts, "emitOwnershipTransferRequested", from, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) EmitOwnershipTransferRequested(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.EmitOwnershipTransferRequested(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, from, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorSession) EmitOwnershipTransferRequested(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.EmitOwnershipTransferRequested(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, from, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor) EmitOwnershipTransferred(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Transact(opts, "emitOwnershipTransferred", from, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) EmitOwnershipTransferred(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.EmitOwnershipTransferred(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, from, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorSession) EmitOwnershipTransferred(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.EmitOwnershipTransferred(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, from, to) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor) MeasureCheckGas(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Transact(opts, "measureCheckGas", id, from) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) MeasureCheckGas(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.MeasureCheckGas(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, id, from) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorSession) MeasureCheckGas(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.MeasureCheckGas(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, id, from) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactor) SetMeasureCheckGasResult(opts *bind.TransactOpts, result bool, payload []byte, gas *big.Int) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.Transact(opts, "setMeasureCheckGasResult", result, payload, gas) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockSession) SetMeasureCheckGasResult(result bool, payload []byte, gas *big.Int) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SetMeasureCheckGasResult(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, result, payload, gas) -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockTransactorSession) SetMeasureCheckGasResult(result bool, payload []byte, gas *big.Int) (*types.Transaction, error) { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.Contract.SetMeasureCheckGasResult(&_KeeperRegistryCheckUpkeepGasUsageWrapperMock.TransactOpts, result, payload, gas) -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator struct { - Event *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator{contract: _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested, error) { - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator struct { - Event *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator{contract: _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMockFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred, error) { - event := new(KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred) - if err := _KeeperRegistryCheckUpkeepGasUsageWrapperMock.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMock) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistryCheckUpkeepGasUsageWrapperMock.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.ParseOwnershipTransferRequested(log) - case _KeeperRegistryCheckUpkeepGasUsageWrapperMock.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.ParseOwnershipTransferred(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (_KeeperRegistryCheckUpkeepGasUsageWrapperMock *KeeperRegistryCheckUpkeepGasUsageWrapperMock) Address() common.Address { - return _KeeperRegistryCheckUpkeepGasUsageWrapperMock.address -} - -type KeeperRegistryCheckUpkeepGasUsageWrapperMockInterface interface { - SMockGas(opts *bind.CallOpts) (*big.Int, error) - - SMockPayload(opts *bind.CallOpts) ([]byte, error) - - SMockResult(opts *bind.CallOpts) (bool, error) - - EmitOwnershipTransferRequested(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - EmitOwnershipTransferred(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - MeasureCheckGas(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) - - SetMeasureCheckGasResult(opts *bind.TransactOpts, result bool, payload []byte, gas *big.Int) (*types.Transaction, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistryCheckUpkeepGasUsageWrapperMockOwnershipTransferred, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go b/core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go deleted file mode 100644 index 45564b662d0..00000000000 --- a/core/gethwrappers/generated/keeper_registrar_wrapper1_2/keeper_registrar_wrapper1_2.go +++ /dev/null @@ -1,1493 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package keeper_registrar_wrapper1_2 - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -var KeeperRegistrarMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"LINKAddress\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AmountMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FunctionNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"HashMismatch\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPayment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAdminAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"LinkTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyAdminOrOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyLink\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RegistrationRequestFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RequestNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SenderMismatch\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"cancel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"}],\"name\":\"getAutoApproveAllowedSender\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"getPendingRequest\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistrationConfig\",\"outputs\":[{\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minLINKJuels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"register\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"setAutoApproveAllowedSender\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumKeeperRegistrar.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint16\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"setRegistrationConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60a06040523480156200001157600080fd5b506040516200234638038062002346833981016040819052620000349162000394565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be81620000ec565b5050506001600160601b0319606086901b16608052620000e18484848462000198565b50505050506200048d565b6001600160a01b038116331415620001475760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001a262000319565b6003546040805160a081019091526501000000000090910463ffffffff169080866002811115620001d757620001d762000477565b815261ffff8616602082015263ffffffff831660408201526001600160a01b03851660608201526001600160601b038416608090910152805160038054909190829060ff1916600183600281111562000234576200023462000477565b0217905550602082015181546040808501516060860151610100600160481b031990931661010063ffffffff9586160263ffffffff60281b19161765010000000000949091169390930292909217600160481b600160e81b03191669010000000000000000006001600160a01b0390921691909102178255608090920151600190910180546001600160601b0319166001600160601b03909216919091179055517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd906200030a90879087908790879062000422565b60405180910390a15050505050565b6000546001600160a01b03163314620003755760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b03811681146200038f57600080fd5b919050565b600080600080600060a08688031215620003ad57600080fd5b620003b88662000377565b9450602086015160038110620003cd57600080fd5b604087015190945061ffff81168114620003e657600080fd5b9250620003f66060870162000377565b60808701519092506001600160601b03811681146200041457600080fd5b809150509295509295909350565b60808101600386106200044557634e487b7160e01b600052602160045260246000fd5b94815261ffff9390931660208401526001600160a01b039190911660408301526001600160601b031660609091015290565b634e487b7160e01b600052602160045260246000fd5b60805160601c611e7e620004c86000396000818161015b015281816104a601528181610a410152818161110b01526113500152611e7e6000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063850af0cb1161008c578063a4c0ed3611610066578063a4c0ed36146102fd578063a793ab8b14610310578063c4d252f514610323578063f2fde38b1461033657600080fd5b8063850af0cb1461021957806388b12d55146102325780638da5cb5b146102df57600080fd5b80633659d666116100c85780633659d666146101a2578063367b9b4f146101b557806379ba5097146101c85780637e776f7f146101d057600080fd5b8063181f5a77146100ef578063183310b3146101415780631b6b6d2314610156575b600080fd5b61012b6040518060400160405280601581526020017f4b656570657252656769737472617220312e312e30000000000000000000000081525081565b6040516101389190611cf1565b60405180910390f35b61015461014f3660046118fc565b610349565b005b61017d7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610138565b6101546101b03660046119a1565b61048e565b6101546101c33660046117d2565b6107b4565b610154610846565b6102096101de3660046117b0565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205460ff1690565b6040519015158152602001610138565b610221610948565b604051610138959493929190611ca1565b6102a6610240366004611880565b60009081526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff169290910182905291565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526bffffffffffffffffffffffff909116602083015201610138565b60005473ffffffffffffffffffffffffffffffffffffffff1661017d565b61015461030b366004611809565b610a29565b61015461031e366004611899565b610d7c565b610154610331366004611880565b610f91565b6101546103443660046117b0565b6111f2565b610351611206565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff16918301919091526103ea576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008787878787604051602001610405959493929190611bb3565b604051602081830303815290604052805190602001209050808314610456576040517f3f4d605300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600260209081526040822091909155820151610483908a908a908a908a908a908a908a611289565b505050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146104fd576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff861661054a576040517f05bb467c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008888888888604051602001610565959493929190611bb3565b6040516020818303038152906040528051906020012090508260ff168973ffffffffffffffffffffffffffffffffffffffff16827fc3f5df4aefec026f610a3fcb08f19476492d69d2cb78b1c2eba259a8820e6a788f8f8f8e8e8e8e8e6040516105d6989796959493929190611d04565b60405180910390a46040805160a08101909152600380546000929190829060ff16600281111561060857610608611e05565b600281111561061957610619611e05565b8152815463ffffffff61010082048116602084015265010000000000820416604083015273ffffffffffffffffffffffffffffffffffffffff69010000000000000000009091041660608201526001909101546bffffffffffffffffffffffff16608090910152905061068c81846114b5565b156106f55760408101516106a1906001611d8b565b6003805463ffffffff9290921665010000000000027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff9092169190911790556106f08d8b8b8b8b8b8b89611289565b6107a5565b6000828152600260205260408120546107359087907401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16611db3565b60408051808201825273ffffffffffffffffffffffffffffffffffffffff808d1682526bffffffffffffffffffffffff9384166020808401918252600089815260029091529390932091519251909316740100000000000000000000000000000000000000000291909216179055505b50505050505050505050505050565b6107bc611206565b73ffffffffffffffffffffffffffffffffffffffff821660008181526005602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685151590811790915591519182527f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356910160405180910390a25050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146108cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6040805160a081019091526003805460009283928392839283928392829060ff16600281111561097a5761097a611e05565b600281111561098b5761098b611e05565b81528154610100810463ffffffff908116602080850191909152650100000000008304909116604080850191909152690100000000000000000090920473ffffffffffffffffffffffffffffffffffffffff166060808501919091526001909401546bffffffffffffffffffffffff90811660809485015285519186015192860151948601519590930151909b919a50929850929650169350915050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610a98576040517f018d10be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81818080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060208101517fffffffff0000000000000000000000000000000000000000000000000000000081167f3659d6660000000000000000000000000000000000000000000000000000000014610b4e576040517fe3d6792100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8484848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060e4810151828114610bc3576040517f55e97b0d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8887878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505061012481015173ffffffffffffffffffffffffffffffffffffffff83811690821614610c52576040517ff8c5638e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610124891015610c8e576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6004546bffffffffffffffffffffffff168b1015610cd8576040517fcd1c886700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60003073ffffffffffffffffffffffffffffffffffffffff168b8b604051610d01929190611ba3565b600060405180830381855af49150503d8060008114610d3c576040519150601f19603f3d011682016040523d82523d6000602084013e610d41565b606091505b50509050806107a5576040517f649bf81000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610d84611206565b6003546040805160a081019091526501000000000090910463ffffffff169080866002811115610db657610db6611e05565b815261ffff8616602082015263ffffffff8316604082015273ffffffffffffffffffffffffffffffffffffffff851660608201526bffffffffffffffffffffffff841660809091015280516003805490919082907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836002811115610e4057610e40611e05565b02179055506020820151815460408085015160608601517fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff90931661010063ffffffff958616027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff1617650100000000009490911693909302929092177fffffff0000000000000000000000000000000000000000ffffffffffffffffff16690100000000000000000073ffffffffffffffffffffffffffffffffffffffff90921691909102178255608090920151600190910180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff909216919091179055517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd90610f82908790879087908790611c50565b60405180910390a15050505050565b60008181526002602090815260409182902082518084019093525473ffffffffffffffffffffffffffffffffffffffff8116808452740100000000000000000000000000000000000000009091046bffffffffffffffffffffffff1691830191909152331480611018575060005473ffffffffffffffffffffffffffffffffffffffff1633145b61104e576040517f61685c2b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805173ffffffffffffffffffffffffffffffffffffffff1661109c576040517f4b13b31e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526002602090815260408083208390559083015190517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff909116602482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b15801561114f57600080fd5b505af1158015611163573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111879190611863565b9050806111c2576040517fc2e4dce80000000000000000000000000000000000000000000000000000000081523360048201526024016108c3565b60405183907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a2505050565b6111fa611206565b6112038161155c565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314611287576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016108c3565b565b6003546040517fda5c6741000000000000000000000000000000000000000000000000000000008152690100000000000000000090910473ffffffffffffffffffffffffffffffffffffffff1690600090829063da5c6741906112f8908c908c908c908c908c90600401611bb3565b602060405180830381600087803b15801561131257600080fd5b505af1158015611326573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134a9190611a9b565b905060007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16634000aea084878560405160200161139f91815260200190565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016113cc93929190611c04565b602060405180830381600087803b1580156113e657600080fd5b505af11580156113fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061141e9190611863565b90508061146f576040517fc2e4dce800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024016108c3565b81847fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b8d6040516114a09190611cf1565b60405180910390a35050505050505050505050565b600080835160028111156114cb576114cb611e05565b14156114d957506000611556565b6001835160028111156114ee576114ee611e05565b148015611521575073ffffffffffffffffffffffffffffffffffffffff821660009081526005602052604090205460ff16155b1561152e57506000611556565b826020015163ffffffff16836040015163ffffffff16101561155257506001611556565b5060005b92915050565b73ffffffffffffffffffffffffffffffffffffffff81163314156115dc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016108c3565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b803573ffffffffffffffffffffffffffffffffffffffff8116811461167657600080fd5b919050565b60008083601f84011261168d57600080fd5b50813567ffffffffffffffff8111156116a557600080fd5b6020830191508360208285010111156116bd57600080fd5b9250929050565b600082601f8301126116d557600080fd5b813567ffffffffffffffff808211156116f0576116f0611e34565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190828211818310171561173657611736611e34565b8160405283815286602085880101111561174f57600080fd5b836020870160208301376000602085830101528094505050505092915050565b803563ffffffff8116811461167657600080fd5b803560ff8116811461167657600080fd5b80356bffffffffffffffffffffffff8116811461167657600080fd5b6000602082840312156117c257600080fd5b6117cb82611652565b9392505050565b600080604083850312156117e557600080fd5b6117ee83611652565b915060208301356117fe81611e63565b809150509250929050565b6000806000806060858703121561181f57600080fd5b61182885611652565b935060208501359250604085013567ffffffffffffffff81111561184b57600080fd5b6118578782880161167b565b95989497509550505050565b60006020828403121561187557600080fd5b81516117cb81611e63565b60006020828403121561189257600080fd5b5035919050565b600080600080608085870312156118af57600080fd5b8435600381106118be57600080fd5b9350602085013561ffff811681146118d557600080fd5b92506118e360408601611652565b91506118f160608601611794565b905092959194509250565b600080600080600080600060c0888a03121561191757600080fd5b873567ffffffffffffffff8082111561192f57600080fd5b61193b8b838c016116c4565b985061194960208b01611652565b975061195760408b0161176f565b965061196560608b01611652565b955060808a013591508082111561197b57600080fd5b506119888a828b0161167b565b989b979a5095989497959660a090950135949350505050565b60008060008060008060008060008060006101208c8e0312156119c357600080fd5b67ffffffffffffffff808d3511156119da57600080fd5b6119e78e8e358f016116c4565b9b508060208e013511156119fa57600080fd5b611a0a8e60208f01358f0161167b565b909b509950611a1b60408e01611652565b9850611a2960608e0161176f565b9750611a3760808e01611652565b96508060a08e01351115611a4a57600080fd5b50611a5b8d60a08e01358e0161167b565b9095509350611a6c60c08d01611794565b9250611a7a60e08d01611783565b9150611a896101008d01611652565b90509295989b509295989b9093969950565b600060208284031215611aad57600080fd5b5051919050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6000815180845260005b81811015611b2357602081850181015186830182015201611b07565b81811115611b35576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110611b9f577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b8183823760009101908152919050565b600073ffffffffffffffffffffffffffffffffffffffff808816835263ffffffff8716602084015280861660408401525060806060830152611bf9608083018486611ab4565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff841681526bffffffffffffffffffffffff83166020820152606060408201526000611c476060830184611afd565b95945050505050565b60808101611c5e8287611b68565b61ffff8516602083015273ffffffffffffffffffffffffffffffffffffffff841660408301526bffffffffffffffffffffffff8316606083015295945050505050565b60a08101611caf8288611b68565b63ffffffff808716602084015280861660408401525073ffffffffffffffffffffffffffffffffffffffff841660608301528260808301529695505050505050565b6020815260006117cb6020830184611afd565b60c081526000611d1760c083018b611afd565b8281036020840152611d2a818a8c611ab4565b905063ffffffff8816604084015273ffffffffffffffffffffffffffffffffffffffff871660608401528281036080840152611d67818688611ab4565b9150506bffffffffffffffffffffffff831660a08301529998505050505050505050565b600063ffffffff808316818516808303821115611daa57611daa611dd6565b01949350505050565b60006bffffffffffffffffffffffff808316818516808303821115611daa57611daa5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b801515811461120357600080fdfea164736f6c6343000806000a", -} - -var KeeperRegistrarABI = KeeperRegistrarMetaData.ABI - -var KeeperRegistrarBin = KeeperRegistrarMetaData.Bin - -func DeployKeeperRegistrar(auth *bind.TransactOpts, backend bind.ContractBackend, LINKAddress common.Address, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (common.Address, *types.Transaction, *KeeperRegistrar, error) { - parsed, err := KeeperRegistrarMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistrarBin), backend, LINKAddress, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistrar{address: address, abi: *parsed, KeeperRegistrarCaller: KeeperRegistrarCaller{contract: contract}, KeeperRegistrarTransactor: KeeperRegistrarTransactor{contract: contract}, KeeperRegistrarFilterer: KeeperRegistrarFilterer{contract: contract}}, nil -} - -type KeeperRegistrar struct { - address common.Address - abi abi.ABI - KeeperRegistrarCaller - KeeperRegistrarTransactor - KeeperRegistrarFilterer -} - -type KeeperRegistrarCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistrarTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistrarFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistrarSession struct { - Contract *KeeperRegistrar - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistrarCallerSession struct { - Contract *KeeperRegistrarCaller - CallOpts bind.CallOpts -} - -type KeeperRegistrarTransactorSession struct { - Contract *KeeperRegistrarTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistrarRaw struct { - Contract *KeeperRegistrar -} - -type KeeperRegistrarCallerRaw struct { - Contract *KeeperRegistrarCaller -} - -type KeeperRegistrarTransactorRaw struct { - Contract *KeeperRegistrarTransactor -} - -func NewKeeperRegistrar(address common.Address, backend bind.ContractBackend) (*KeeperRegistrar, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistrarABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistrar(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistrar{address: address, abi: abi, KeeperRegistrarCaller: KeeperRegistrarCaller{contract: contract}, KeeperRegistrarTransactor: KeeperRegistrarTransactor{contract: contract}, KeeperRegistrarFilterer: KeeperRegistrarFilterer{contract: contract}}, nil -} - -func NewKeeperRegistrarCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistrarCaller, error) { - contract, err := bindKeeperRegistrar(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistrarCaller{contract: contract}, nil -} - -func NewKeeperRegistrarTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistrarTransactor, error) { - contract, err := bindKeeperRegistrar(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistrarTransactor{contract: contract}, nil -} - -func NewKeeperRegistrarFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistrarFilterer, error) { - contract, err := bindKeeperRegistrar(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistrarFilterer{contract: contract}, nil -} - -func bindKeeperRegistrar(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistrarMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistrar *KeeperRegistrarRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistrar.Contract.KeeperRegistrarCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistrar *KeeperRegistrarRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.KeeperRegistrarTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistrar *KeeperRegistrarRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.KeeperRegistrarTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistrar.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistrar *KeeperRegistrarCaller) LINK(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistrar.contract.Call(opts, &out, "LINK") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistrar *KeeperRegistrarSession) LINK() (common.Address, error) { - return _KeeperRegistrar.Contract.LINK(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerSession) LINK() (common.Address, error) { - return _KeeperRegistrar.Contract.LINK(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCaller) GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) { - var out []interface{} - err := _KeeperRegistrar.contract.Call(opts, &out, "getAutoApproveAllowedSender", senderAddress) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_KeeperRegistrar *KeeperRegistrarSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { - return _KeeperRegistrar.Contract.GetAutoApproveAllowedSender(&_KeeperRegistrar.CallOpts, senderAddress) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetAutoApproveAllowedSender(senderAddress common.Address) (bool, error) { - return _KeeperRegistrar.Contract.GetAutoApproveAllowedSender(&_KeeperRegistrar.CallOpts, senderAddress) -} - -func (_KeeperRegistrar *KeeperRegistrarCaller) GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) { - var out []interface{} - err := _KeeperRegistrar.contract.Call(opts, &out, "getPendingRequest", hash) - - if err != nil { - return *new(common.Address), *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - - return out0, out1, err - -} - -func (_KeeperRegistrar *KeeperRegistrarSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { - return _KeeperRegistrar.Contract.GetPendingRequest(&_KeeperRegistrar.CallOpts, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetPendingRequest(hash [32]byte) (common.Address, *big.Int, error) { - return _KeeperRegistrar.Contract.GetPendingRequest(&_KeeperRegistrar.CallOpts, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarCaller) GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, - - error) { - var out []interface{} - err := _KeeperRegistrar.contract.Call(opts, &out, "getRegistrationConfig") - - outstruct := new(GetRegistrationConfig) - if err != nil { - return *outstruct, err - } - - outstruct.AutoApproveConfigType = *abi.ConvertType(out[0], new(uint8)).(*uint8) - outstruct.AutoApproveMaxAllowed = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.ApprovedCount = *abi.ConvertType(out[2], new(uint32)).(*uint32) - outstruct.KeeperRegistry = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - outstruct.MinLINKJuels = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_KeeperRegistrar *KeeperRegistrarSession) GetRegistrationConfig() (GetRegistrationConfig, - - error) { - return _KeeperRegistrar.Contract.GetRegistrationConfig(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerSession) GetRegistrationConfig() (GetRegistrationConfig, - - error) { - return _KeeperRegistrar.Contract.GetRegistrationConfig(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistrar.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistrar *KeeperRegistrarSession) Owner() (common.Address, error) { - return _KeeperRegistrar.Contract.Owner(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerSession) Owner() (common.Address, error) { - return _KeeperRegistrar.Contract.Owner(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _KeeperRegistrar.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_KeeperRegistrar *KeeperRegistrarSession) TypeAndVersion() (string, error) { - return _KeeperRegistrar.Contract.TypeAndVersion(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarCallerSession) TypeAndVersion() (string, error) { - return _KeeperRegistrar.Contract.TypeAndVersion(&_KeeperRegistrar.CallOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "acceptOwnership") -} - -func (_KeeperRegistrar *KeeperRegistrarSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistrar.Contract.AcceptOwnership(&_KeeperRegistrar.TransactOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistrar.Contract.AcceptOwnership(&_KeeperRegistrar.TransactOpts) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "approve", name, upkeepContract, gasLimit, adminAddress, checkData, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.Approve(&_KeeperRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, checkData, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Approve(name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.Approve(&_KeeperRegistrar.TransactOpts, name, upkeepContract, gasLimit, adminAddress, checkData, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "cancel", hash) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) Cancel(hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.Cancel(&_KeeperRegistrar.TransactOpts, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Cancel(hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.Cancel(&_KeeperRegistrar.TransactOpts, hash) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "onTokenTransfer", sender, amount, data) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.OnTokenTransfer(&_KeeperRegistrar.TransactOpts, sender, amount, data) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.OnTokenTransfer(&_KeeperRegistrar.TransactOpts, sender, amount, data) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "register", name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source, sender) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.Register(&_KeeperRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source, sender) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) Register(name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.Register(&_KeeperRegistrar.TransactOpts, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source, sender) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "setAutoApproveAllowedSender", senderAddress, allowed) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.SetAutoApproveAllowedSender(&_KeeperRegistrar.TransactOpts, senderAddress, allowed) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) SetAutoApproveAllowedSender(senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.SetAutoApproveAllowedSender(&_KeeperRegistrar.TransactOpts, senderAddress, allowed) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) SetRegistrationConfig(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "setRegistrationConfig", autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.SetRegistrationConfig(&_KeeperRegistrar.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.SetRegistrationConfig(&_KeeperRegistrar.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrar.contract.Transact(opts, "transferOwnership", to) -} - -func (_KeeperRegistrar *KeeperRegistrarSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.TransferOwnership(&_KeeperRegistrar.TransactOpts, to) -} - -func (_KeeperRegistrar *KeeperRegistrarTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistrar.Contract.TransferOwnership(&_KeeperRegistrar.TransactOpts, to) -} - -type KeeperRegistrarAutoApproveAllowedSenderSetIterator struct { - Event *KeeperRegistrarAutoApproveAllowedSenderSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarAutoApproveAllowedSenderSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarAutoApproveAllowedSenderSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarAutoApproveAllowedSenderSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarAutoApproveAllowedSenderSet struct { - SenderAddress common.Address - Allowed bool - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarAutoApproveAllowedSenderSetIterator, error) { - - var senderAddressRule []interface{} - for _, senderAddressItem := range senderAddress { - senderAddressRule = append(senderAddressRule, senderAddressItem) - } - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarAutoApproveAllowedSenderSetIterator{contract: _KeeperRegistrar.contract, event: "AutoApproveAllowedSenderSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) { - - var senderAddressRule []interface{} - for _, senderAddressItem := range senderAddress { - senderAddressRule = append(senderAddressRule, senderAddressItem) - } - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarAutoApproveAllowedSenderSet) - if err := _KeeperRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarAutoApproveAllowedSenderSet, error) { - event := new(KeeperRegistrarAutoApproveAllowedSenderSet) - if err := _KeeperRegistrar.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarConfigChangedIterator struct { - Event *KeeperRegistrarConfigChanged - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarConfigChangedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarConfigChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarConfigChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarConfigChangedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarConfigChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarConfigChanged struct { - AutoApproveConfigType uint8 - AutoApproveMaxAllowed uint32 - KeeperRegistry common.Address - MinLINKJuels *big.Int - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarConfigChangedIterator, error) { - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "ConfigChanged") - if err != nil { - return nil, err - } - return &KeeperRegistrarConfigChangedIterator{contract: _KeeperRegistrar.contract, event: "ConfigChanged", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarConfigChanged) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "ConfigChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarConfigChanged) - if err := _KeeperRegistrar.contract.UnpackLog(event, "ConfigChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseConfigChanged(log types.Log) (*KeeperRegistrarConfigChanged, error) { - event := new(KeeperRegistrarConfigChanged) - if err := _KeeperRegistrar.contract.UnpackLog(event, "ConfigChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarOwnershipTransferRequestedIterator struct { - Event *KeeperRegistrarOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarOwnershipTransferRequestedIterator{contract: _KeeperRegistrar.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarOwnershipTransferRequested) - if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarOwnershipTransferRequested, error) { - event := new(KeeperRegistrarOwnershipTransferRequested) - if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarOwnershipTransferredIterator struct { - Event *KeeperRegistrarOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarOwnershipTransferredIterator{contract: _KeeperRegistrar.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarOwnershipTransferred) - if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarOwnershipTransferred, error) { - event := new(KeeperRegistrarOwnershipTransferred) - if err := _KeeperRegistrar.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarRegistrationApprovedIterator struct { - Event *KeeperRegistrarRegistrationApproved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarRegistrationApprovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarRegistrationApproved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarRegistrationApproved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarRegistrationApprovedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarRegistrationApprovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarRegistrationApproved struct { - Hash [32]byte - DisplayName string - UpkeepId *big.Int - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarRegistrationApprovedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepIdRule []interface{} - for _, upkeepIdItem := range upkeepId { - upkeepIdRule = append(upkeepIdRule, upkeepIdItem) - } - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarRegistrationApprovedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationApproved", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepIdRule []interface{} - for _, upkeepIdItem := range upkeepId { - upkeepIdRule = append(upkeepIdRule, upkeepIdItem) - } - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarRegistrationApproved) - if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationApproved(log types.Log) (*KeeperRegistrarRegistrationApproved, error) { - event := new(KeeperRegistrarRegistrationApproved) - if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarRegistrationRejectedIterator struct { - Event *KeeperRegistrarRegistrationRejected - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarRegistrationRejectedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarRegistrationRejected) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarRegistrationRejected) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarRegistrationRejectedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarRegistrationRejectedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarRegistrationRejected struct { - Hash [32]byte - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarRegistrationRejectedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationRejected", hashRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarRegistrationRejectedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationRejected", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationRejected", hashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarRegistrationRejected) - if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationRejected(log types.Log) (*KeeperRegistrarRegistrationRejected, error) { - event := new(KeeperRegistrarRegistrationRejected) - if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarRegistrationRequestedIterator struct { - Event *KeeperRegistrarRegistrationRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarRegistrationRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarRegistrationRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarRegistrationRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarRegistrationRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarRegistrationRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarRegistrationRequested struct { - Hash [32]byte - Name string - EncryptedEmail []byte - UpkeepContract common.Address - GasLimit uint32 - AdminAddress common.Address - CheckData []byte - Amount *big.Int - Source uint8 - Raw types.Log -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address, source []uint8) (*KeeperRegistrarRegistrationRequestedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepContractRule []interface{} - for _, upkeepContractItem := range upkeepContract { - upkeepContractRule = append(upkeepContractRule, upkeepContractItem) - } - - var sourceRule []interface{} - for _, sourceItem := range source { - sourceRule = append(sourceRule, sourceItem) - } - - logs, sub, err := _KeeperRegistrar.contract.FilterLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule, sourceRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarRegistrationRequestedIterator{contract: _KeeperRegistrar.contract, event: "RegistrationRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address, source []uint8) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepContractRule []interface{} - for _, upkeepContractItem := range upkeepContract { - upkeepContractRule = append(upkeepContractRule, upkeepContractItem) - } - - var sourceRule []interface{} - for _, sourceItem := range source { - sourceRule = append(sourceRule, sourceItem) - } - - logs, sub, err := _KeeperRegistrar.contract.WatchLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule, sourceRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarRegistrationRequested) - if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrar *KeeperRegistrarFilterer) ParseRegistrationRequested(log types.Log) (*KeeperRegistrarRegistrationRequested, error) { - event := new(KeeperRegistrarRegistrationRequested) - if err := _KeeperRegistrar.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetRegistrationConfig struct { - AutoApproveConfigType uint8 - AutoApproveMaxAllowed uint32 - ApprovedCount uint32 - KeeperRegistry common.Address - MinLINKJuels *big.Int -} - -func (_KeeperRegistrar *KeeperRegistrar) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistrar.abi.Events["AutoApproveAllowedSenderSet"].ID: - return _KeeperRegistrar.ParseAutoApproveAllowedSenderSet(log) - case _KeeperRegistrar.abi.Events["ConfigChanged"].ID: - return _KeeperRegistrar.ParseConfigChanged(log) - case _KeeperRegistrar.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistrar.ParseOwnershipTransferRequested(log) - case _KeeperRegistrar.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistrar.ParseOwnershipTransferred(log) - case _KeeperRegistrar.abi.Events["RegistrationApproved"].ID: - return _KeeperRegistrar.ParseRegistrationApproved(log) - case _KeeperRegistrar.abi.Events["RegistrationRejected"].ID: - return _KeeperRegistrar.ParseRegistrationRejected(log) - case _KeeperRegistrar.abi.Events["RegistrationRequested"].ID: - return _KeeperRegistrar.ParseRegistrationRequested(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistrarAutoApproveAllowedSenderSet) Topic() common.Hash { - return common.HexToHash("0x20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356") -} - -func (KeeperRegistrarConfigChanged) Topic() common.Hash { - return common.HexToHash("0x6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd") -} - -func (KeeperRegistrarOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistrarOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (KeeperRegistrarRegistrationApproved) Topic() common.Hash { - return common.HexToHash("0xb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b") -} - -func (KeeperRegistrarRegistrationRejected) Topic() common.Hash { - return common.HexToHash("0x3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a22") -} - -func (KeeperRegistrarRegistrationRequested) Topic() common.Hash { - return common.HexToHash("0xc3f5df4aefec026f610a3fcb08f19476492d69d2cb78b1c2eba259a8820e6a78") -} - -func (_KeeperRegistrar *KeeperRegistrar) Address() common.Address { - return _KeeperRegistrar.address -} - -type KeeperRegistrarInterface interface { - LINK(opts *bind.CallOpts) (common.Address, error) - - GetAutoApproveAllowedSender(opts *bind.CallOpts, senderAddress common.Address) (bool, error) - - GetPendingRequest(opts *bind.CallOpts, hash [32]byte) (common.Address, *big.Int, error) - - GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, - - error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - Approve(opts *bind.TransactOpts, name string, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, hash [32]byte) (*types.Transaction, error) - - Cancel(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) - - OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) - - Register(opts *bind.TransactOpts, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8, sender common.Address) (*types.Transaction, error) - - SetAutoApproveAllowedSender(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) - - SetRegistrationConfig(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint16, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarAutoApproveAllowedSenderSetIterator, error) - - WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) - - ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarAutoApproveAllowedSenderSet, error) - - FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarConfigChangedIterator, error) - - WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarConfigChanged) (event.Subscription, error) - - ParseConfigChanged(log types.Log) (*KeeperRegistrarConfigChanged, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarOwnershipTransferred, error) - - FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarRegistrationApprovedIterator, error) - - WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) - - ParseRegistrationApproved(log types.Log) (*KeeperRegistrarRegistrationApproved, error) - - FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarRegistrationRejectedIterator, error) - - WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRejected, hash [][32]byte) (event.Subscription, error) - - ParseRegistrationRejected(log types.Log) (*KeeperRegistrarRegistrationRejected, error) - - FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address, source []uint8) (*KeeperRegistrarRegistrationRequestedIterator, error) - - WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarRegistrationRequested, hash [][32]byte, upkeepContract []common.Address, source []uint8) (event.Subscription, error) - - ParseRegistrationRequested(log types.Log) (*KeeperRegistrarRegistrationRequested, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/keeper_registrar_wrapper1_2_mock/keeper_registrar_wrapper1_2_mock.go b/core/gethwrappers/generated/keeper_registrar_wrapper1_2_mock/keeper_registrar_wrapper1_2_mock.go deleted file mode 100644 index d83fd9a4314..00000000000 --- a/core/gethwrappers/generated/keeper_registrar_wrapper1_2_mock/keeper_registrar_wrapper1_2_mock.go +++ /dev/null @@ -1,1492 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package keeper_registrar_wrapper1_2_mock - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -var KeeperRegistrarMockMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"AutoApproveAllowedSenderSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"ConfigChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"RegistrationApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"RegistrationRejected\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"indexed\":true,\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"}],\"name\":\"RegistrationRequested\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"senderAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"allowed\",\"type\":\"bool\"}],\"name\":\"emitAutoApproveAllowedSenderSet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint96\",\"name\":\"minLINKJuels\",\"type\":\"uint96\"}],\"name\":\"emitConfigChanged\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"emitOwnershipTransferRequested\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"emitOwnershipTransferred\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"displayName\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"upkeepId\",\"type\":\"uint256\"}],\"name\":\"emitRegistrationApproved\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"name\":\"emitRegistrationRejected\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"bytes\",\"name\":\"encryptedEmail\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"upkeepContract\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"adminAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"},{\"internalType\":\"uint8\",\"name\":\"source\",\"type\":\"uint8\"}],\"name\":\"emitRegistrationRequested\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRegistrationConfig\",\"outputs\":[{\"internalType\":\"enumKeeperRegistrar1_2Mock.AutoApproveType\",\"name\":\"autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"approvedCount\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"minLINKJuels\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_approvedCount\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_autoApproveConfigType\",\"outputs\":[{\"internalType\":\"enumKeeperRegistrar1_2Mock.AutoApproveType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_autoApproveMaxAllowed\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"\",\"type\":\"uint32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_keeperRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"s_minLINKJuels\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"enumKeeperRegistrar1_2Mock.AutoApproveType\",\"name\":\"_autoApproveConfigType\",\"type\":\"uint8\"},{\"internalType\":\"uint32\",\"name\":\"_autoApproveMaxAllowed\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"_approvedCount\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"_keeperRegistry\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_minLINKJuels\",\"type\":\"uint256\"}],\"name\":\"setRegistrationConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50610ba0806100206000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063aee052f31161008c578063b59d75eb11610066578063b59d75eb14610259578063bb98fe561461026c578063ca40bcd314610285578063f7420bc21461029857600080fd5b8063aee052f314610220578063b019b4e814610233578063b49fd35b1461024657600080fd5b806384638bb6116100c857806384638bb61461014a578063850af0cb146101645780639e105f95146101bb578063adeab0b71461020d57600080fd5b80631701f938146100ef5780634882b5bd1461010457806355e8b24814610120575b600080fd5b6101026100fd36600461093a565b6102ab565b005b61010d60015481565b6040519081526020015b60405180910390f35b60005461013590610100900463ffffffff1681565b60405163ffffffff9091168152602001610117565b6000546101579060ff1681565b6040516101179190610a34565b6000546001546040516101179260ff811692610100820463ffffffff90811693650100000000008404909116926901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff169190610a48565b6000546101e8906901000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610117565b61010261021b366004610789565b610322565b61010261022e366004610888565b610350565b61010261024136600461071a565b61038e565b6101026102543660046108d8565b6103ec565b6101026102673660046107a2565b6104e9565b6000546101359065010000000000900463ffffffff1681565b61010261029336600461074d565b610551565b6101026102a636600461071a565b6105a7565b6040805160ff8616815263ffffffff8516602082015273ffffffffffffffffffffffffffffffffffffffff8416818301526bffffffffffffffffffffffff8316606082015290517f6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd9181900360800190a150505050565b60405181907f3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a2290600090a250565b80837fb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b846040516103819190610a98565b60405180910390a3505050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080548691907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600281111561042957610429610b35565b0217905550600080547fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000ff1661010063ffffffff968716027fffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffffff1617650100000000009490951693909302939093177fffffff0000000000000000000000000000000000000000ffffffffffffffffff16690100000000000000000073ffffffffffffffffffffffffffffffffffffffff929092169190910217905560015550565b8060ff168673ffffffffffffffffffffffffffffffffffffffff168a7fc3f5df4aefec026f610a3fcb08f19476492d69d2cb78b1c2eba259a8820e6a788b8b8a8a8a8a60405161053e96959493929190610ab2565b60405180910390a4505050505050505050565b8173ffffffffffffffffffffffffffffffffffffffff167f20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad3568260405161059b911515815260200190565b60405180910390a25050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae127860405160405180910390a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461062957600080fd5b919050565b600082601f83011261063f57600080fd5b813567ffffffffffffffff8082111561065a5761065a610b64565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156106a0576106a0610b64565b816040528381528660208588010111156106b957600080fd5b836020870160208301376000602085830101528094505050505092915050565b803563ffffffff8116811461062957600080fd5b803560ff8116811461062957600080fd5b80356bffffffffffffffffffffffff8116811461062957600080fd5b6000806040838503121561072d57600080fd5b61073683610605565b915061074460208401610605565b90509250929050565b6000806040838503121561076057600080fd5b61076983610605565b91506020830135801515811461077e57600080fd5b809150509250929050565b60006020828403121561079b57600080fd5b5035919050565b60008060008060008060008060006101208a8c0312156107c157600080fd5b8935985060208a013567ffffffffffffffff808211156107e057600080fd5b6107ec8d838e0161062e565b995060408c013591508082111561080257600080fd5b61080e8d838e0161062e565b985061081c60608d01610605565b975061082a60808d016106d9565b965061083860a08d01610605565b955060c08c013591508082111561084e57600080fd5b5061085b8c828d0161062e565b93505061086a60e08b016106fe565b91506108796101008b016106ed565b90509295985092959850929598565b60008060006060848603121561089d57600080fd5b83359250602084013567ffffffffffffffff8111156108bb57600080fd5b6108c78682870161062e565b925050604084013590509250925092565b600080600080600060a086880312156108f057600080fd5b8535600381106108ff57600080fd5b945061090d602087016106d9565b935061091b604087016106d9565b925061092960608701610605565b949793965091946080013592915050565b6000806000806080858703121561095057600080fd5b610959856106ed565b9350610967602086016106d9565b925061097560408601610605565b9150610983606086016106fe565b905092959194509250565b6000815180845260005b818110156109b457602081850181015186830182015201610998565b818111156109c6576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60038110610a30577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9052565b60208101610a4282846109f9565b92915050565b60a08101610a5682886109f9565b63ffffffff808716602084015280861660408401525073ffffffffffffffffffffffffffffffffffffffff841660608301528260808301529695505050505050565b602081526000610aab602083018461098e565b9392505050565b60c081526000610ac560c083018961098e565b8281036020840152610ad7818961098e565b905063ffffffff8716604084015273ffffffffffffffffffffffffffffffffffffffff861660608401528281036080840152610b13818661098e565b9150506bffffffffffffffffffffffff831660a0830152979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", -} - -var KeeperRegistrarMockABI = KeeperRegistrarMockMetaData.ABI - -var KeeperRegistrarMockBin = KeeperRegistrarMockMetaData.Bin - -func DeployKeeperRegistrarMock(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *KeeperRegistrarMock, error) { - parsed, err := KeeperRegistrarMockMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistrarMockBin), backend) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistrarMock{address: address, abi: *parsed, KeeperRegistrarMockCaller: KeeperRegistrarMockCaller{contract: contract}, KeeperRegistrarMockTransactor: KeeperRegistrarMockTransactor{contract: contract}, KeeperRegistrarMockFilterer: KeeperRegistrarMockFilterer{contract: contract}}, nil -} - -type KeeperRegistrarMock struct { - address common.Address - abi abi.ABI - KeeperRegistrarMockCaller - KeeperRegistrarMockTransactor - KeeperRegistrarMockFilterer -} - -type KeeperRegistrarMockCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistrarMockTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistrarMockFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistrarMockSession struct { - Contract *KeeperRegistrarMock - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistrarMockCallerSession struct { - Contract *KeeperRegistrarMockCaller - CallOpts bind.CallOpts -} - -type KeeperRegistrarMockTransactorSession struct { - Contract *KeeperRegistrarMockTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistrarMockRaw struct { - Contract *KeeperRegistrarMock -} - -type KeeperRegistrarMockCallerRaw struct { - Contract *KeeperRegistrarMockCaller -} - -type KeeperRegistrarMockTransactorRaw struct { - Contract *KeeperRegistrarMockTransactor -} - -func NewKeeperRegistrarMock(address common.Address, backend bind.ContractBackend) (*KeeperRegistrarMock, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistrarMockABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistrarMock(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistrarMock{address: address, abi: abi, KeeperRegistrarMockCaller: KeeperRegistrarMockCaller{contract: contract}, KeeperRegistrarMockTransactor: KeeperRegistrarMockTransactor{contract: contract}, KeeperRegistrarMockFilterer: KeeperRegistrarMockFilterer{contract: contract}}, nil -} - -func NewKeeperRegistrarMockCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistrarMockCaller, error) { - contract, err := bindKeeperRegistrarMock(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockCaller{contract: contract}, nil -} - -func NewKeeperRegistrarMockTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistrarMockTransactor, error) { - contract, err := bindKeeperRegistrarMock(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockTransactor{contract: contract}, nil -} - -func NewKeeperRegistrarMockFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistrarMockFilterer, error) { - contract, err := bindKeeperRegistrarMock(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockFilterer{contract: contract}, nil -} - -func bindKeeperRegistrarMock(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistrarMockMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistrarMock.Contract.KeeperRegistrarMockCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.KeeperRegistrarMockTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.KeeperRegistrarMockTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistrarMock.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCaller) GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, - - error) { - var out []interface{} - err := _KeeperRegistrarMock.contract.Call(opts, &out, "getRegistrationConfig") - - outstruct := new(GetRegistrationConfig) - if err != nil { - return *outstruct, err - } - - outstruct.AutoApproveConfigType = *abi.ConvertType(out[0], new(uint8)).(*uint8) - outstruct.AutoApproveMaxAllowed = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.ApprovedCount = *abi.ConvertType(out[2], new(uint32)).(*uint32) - outstruct.KeeperRegistry = *abi.ConvertType(out[3], new(common.Address)).(*common.Address) - outstruct.MinLINKJuels = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) GetRegistrationConfig() (GetRegistrationConfig, - - error) { - return _KeeperRegistrarMock.Contract.GetRegistrationConfig(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerSession) GetRegistrationConfig() (GetRegistrationConfig, - - error) { - return _KeeperRegistrarMock.Contract.GetRegistrationConfig(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCaller) SApprovedCount(opts *bind.CallOpts) (uint32, error) { - var out []interface{} - err := _KeeperRegistrarMock.contract.Call(opts, &out, "s_approvedCount") - - if err != nil { - return *new(uint32), err - } - - out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) - - return out0, err - -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) SApprovedCount() (uint32, error) { - return _KeeperRegistrarMock.Contract.SApprovedCount(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerSession) SApprovedCount() (uint32, error) { - return _KeeperRegistrarMock.Contract.SApprovedCount(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCaller) SAutoApproveConfigType(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _KeeperRegistrarMock.contract.Call(opts, &out, "s_autoApproveConfigType") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) SAutoApproveConfigType() (uint8, error) { - return _KeeperRegistrarMock.Contract.SAutoApproveConfigType(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerSession) SAutoApproveConfigType() (uint8, error) { - return _KeeperRegistrarMock.Contract.SAutoApproveConfigType(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCaller) SAutoApproveMaxAllowed(opts *bind.CallOpts) (uint32, error) { - var out []interface{} - err := _KeeperRegistrarMock.contract.Call(opts, &out, "s_autoApproveMaxAllowed") - - if err != nil { - return *new(uint32), err - } - - out0 := *abi.ConvertType(out[0], new(uint32)).(*uint32) - - return out0, err - -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) SAutoApproveMaxAllowed() (uint32, error) { - return _KeeperRegistrarMock.Contract.SAutoApproveMaxAllowed(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerSession) SAutoApproveMaxAllowed() (uint32, error) { - return _KeeperRegistrarMock.Contract.SAutoApproveMaxAllowed(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCaller) SKeeperRegistry(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistrarMock.contract.Call(opts, &out, "s_keeperRegistry") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) SKeeperRegistry() (common.Address, error) { - return _KeeperRegistrarMock.Contract.SKeeperRegistry(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerSession) SKeeperRegistry() (common.Address, error) { - return _KeeperRegistrarMock.Contract.SKeeperRegistry(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCaller) SMinLINKJuels(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistrarMock.contract.Call(opts, &out, "s_minLINKJuels") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) SMinLINKJuels() (*big.Int, error) { - return _KeeperRegistrarMock.Contract.SMinLINKJuels(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockCallerSession) SMinLINKJuels() (*big.Int, error) { - return _KeeperRegistrarMock.Contract.SMinLINKJuels(&_KeeperRegistrarMock.CallOpts) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitAutoApproveAllowedSenderSet(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitAutoApproveAllowedSenderSet", senderAddress, allowed) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitAutoApproveAllowedSenderSet(senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitAutoApproveAllowedSenderSet(&_KeeperRegistrarMock.TransactOpts, senderAddress, allowed) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitAutoApproveAllowedSenderSet(senderAddress common.Address, allowed bool) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitAutoApproveAllowedSenderSet(&_KeeperRegistrarMock.TransactOpts, senderAddress, allowed) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitConfigChanged(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint32, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitConfigChanged", autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitConfigChanged(autoApproveConfigType uint8, autoApproveMaxAllowed uint32, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitConfigChanged(&_KeeperRegistrarMock.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitConfigChanged(autoApproveConfigType uint8, autoApproveMaxAllowed uint32, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitConfigChanged(&_KeeperRegistrarMock.TransactOpts, autoApproveConfigType, autoApproveMaxAllowed, keeperRegistry, minLINKJuels) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitOwnershipTransferRequested(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitOwnershipTransferRequested", from, to) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitOwnershipTransferRequested(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitOwnershipTransferRequested(&_KeeperRegistrarMock.TransactOpts, from, to) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitOwnershipTransferRequested(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitOwnershipTransferRequested(&_KeeperRegistrarMock.TransactOpts, from, to) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitOwnershipTransferred(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitOwnershipTransferred", from, to) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitOwnershipTransferred(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitOwnershipTransferred(&_KeeperRegistrarMock.TransactOpts, from, to) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitOwnershipTransferred(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitOwnershipTransferred(&_KeeperRegistrarMock.TransactOpts, from, to) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitRegistrationApproved(opts *bind.TransactOpts, hash [32]byte, displayName string, upkeepId *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitRegistrationApproved", hash, displayName, upkeepId) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitRegistrationApproved(hash [32]byte, displayName string, upkeepId *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitRegistrationApproved(&_KeeperRegistrarMock.TransactOpts, hash, displayName, upkeepId) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitRegistrationApproved(hash [32]byte, displayName string, upkeepId *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitRegistrationApproved(&_KeeperRegistrarMock.TransactOpts, hash, displayName, upkeepId) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitRegistrationRejected(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitRegistrationRejected", hash) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitRegistrationRejected(hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitRegistrationRejected(&_KeeperRegistrarMock.TransactOpts, hash) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitRegistrationRejected(hash [32]byte) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitRegistrationRejected(&_KeeperRegistrarMock.TransactOpts, hash) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) EmitRegistrationRequested(opts *bind.TransactOpts, hash [32]byte, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "emitRegistrationRequested", hash, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) EmitRegistrationRequested(hash [32]byte, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitRegistrationRequested(&_KeeperRegistrarMock.TransactOpts, hash, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) EmitRegistrationRequested(hash [32]byte, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.EmitRegistrationRequested(&_KeeperRegistrarMock.TransactOpts, hash, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactor) SetRegistrationConfig(opts *bind.TransactOpts, _autoApproveConfigType uint8, _autoApproveMaxAllowed uint32, _approvedCount uint32, _keeperRegistry common.Address, _minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.contract.Transact(opts, "setRegistrationConfig", _autoApproveConfigType, _autoApproveMaxAllowed, _approvedCount, _keeperRegistry, _minLINKJuels) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockSession) SetRegistrationConfig(_autoApproveConfigType uint8, _autoApproveMaxAllowed uint32, _approvedCount uint32, _keeperRegistry common.Address, _minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.SetRegistrationConfig(&_KeeperRegistrarMock.TransactOpts, _autoApproveConfigType, _autoApproveMaxAllowed, _approvedCount, _keeperRegistry, _minLINKJuels) -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockTransactorSession) SetRegistrationConfig(_autoApproveConfigType uint8, _autoApproveMaxAllowed uint32, _approvedCount uint32, _keeperRegistry common.Address, _minLINKJuels *big.Int) (*types.Transaction, error) { - return _KeeperRegistrarMock.Contract.SetRegistrationConfig(&_KeeperRegistrarMock.TransactOpts, _autoApproveConfigType, _autoApproveMaxAllowed, _approvedCount, _keeperRegistry, _minLINKJuels) -} - -type KeeperRegistrarMockAutoApproveAllowedSenderSetIterator struct { - Event *KeeperRegistrarMockAutoApproveAllowedSenderSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockAutoApproveAllowedSenderSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockAutoApproveAllowedSenderSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockAutoApproveAllowedSenderSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockAutoApproveAllowedSenderSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockAutoApproveAllowedSenderSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockAutoApproveAllowedSenderSet struct { - SenderAddress common.Address - Allowed bool - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarMockAutoApproveAllowedSenderSetIterator, error) { - - var senderAddressRule []interface{} - for _, senderAddressItem := range senderAddress { - senderAddressRule = append(senderAddressRule, senderAddressItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockAutoApproveAllowedSenderSetIterator{contract: _KeeperRegistrarMock.contract, event: "AutoApproveAllowedSenderSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) { - - var senderAddressRule []interface{} - for _, senderAddressItem := range senderAddress { - senderAddressRule = append(senderAddressRule, senderAddressItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "AutoApproveAllowedSenderSet", senderAddressRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockAutoApproveAllowedSenderSet) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarMockAutoApproveAllowedSenderSet, error) { - event := new(KeeperRegistrarMockAutoApproveAllowedSenderSet) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "AutoApproveAllowedSenderSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarMockConfigChangedIterator struct { - Event *KeeperRegistrarMockConfigChanged - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockConfigChangedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockConfigChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockConfigChanged) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockConfigChangedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockConfigChangedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockConfigChanged struct { - AutoApproveConfigType uint8 - AutoApproveMaxAllowed uint32 - KeeperRegistry common.Address - MinLINKJuels *big.Int - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarMockConfigChangedIterator, error) { - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "ConfigChanged") - if err != nil { - return nil, err - } - return &KeeperRegistrarMockConfigChangedIterator{contract: _KeeperRegistrarMock.contract, event: "ConfigChanged", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockConfigChanged) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "ConfigChanged") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockConfigChanged) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "ConfigChanged", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseConfigChanged(log types.Log) (*KeeperRegistrarMockConfigChanged, error) { - event := new(KeeperRegistrarMockConfigChanged) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "ConfigChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarMockOwnershipTransferRequestedIterator struct { - Event *KeeperRegistrarMockOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarMockOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockOwnershipTransferRequestedIterator{contract: _KeeperRegistrarMock.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockOwnershipTransferRequested) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarMockOwnershipTransferRequested, error) { - event := new(KeeperRegistrarMockOwnershipTransferRequested) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarMockOwnershipTransferredIterator struct { - Event *KeeperRegistrarMockOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarMockOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockOwnershipTransferredIterator{contract: _KeeperRegistrarMock.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockOwnershipTransferred) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarMockOwnershipTransferred, error) { - event := new(KeeperRegistrarMockOwnershipTransferred) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarMockRegistrationApprovedIterator struct { - Event *KeeperRegistrarMockRegistrationApproved - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockRegistrationApprovedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockRegistrationApproved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockRegistrationApproved) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockRegistrationApprovedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockRegistrationApprovedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockRegistrationApproved struct { - Hash [32]byte - DisplayName string - UpkeepId *big.Int - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarMockRegistrationApprovedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepIdRule []interface{} - for _, upkeepIdItem := range upkeepId { - upkeepIdRule = append(upkeepIdRule, upkeepIdItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockRegistrationApprovedIterator{contract: _KeeperRegistrarMock.contract, event: "RegistrationApproved", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepIdRule []interface{} - for _, upkeepIdItem := range upkeepId { - upkeepIdRule = append(upkeepIdRule, upkeepIdItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "RegistrationApproved", hashRule, upkeepIdRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockRegistrationApproved) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseRegistrationApproved(log types.Log) (*KeeperRegistrarMockRegistrationApproved, error) { - event := new(KeeperRegistrarMockRegistrationApproved) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "RegistrationApproved", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarMockRegistrationRejectedIterator struct { - Event *KeeperRegistrarMockRegistrationRejected - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockRegistrationRejectedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockRegistrationRejected) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockRegistrationRejected) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockRegistrationRejectedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockRegistrationRejectedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockRegistrationRejected struct { - Hash [32]byte - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarMockRegistrationRejectedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "RegistrationRejected", hashRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockRegistrationRejectedIterator{contract: _KeeperRegistrarMock.contract, event: "RegistrationRejected", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockRegistrationRejected, hash [][32]byte) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "RegistrationRejected", hashRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockRegistrationRejected) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseRegistrationRejected(log types.Log) (*KeeperRegistrarMockRegistrationRejected, error) { - event := new(KeeperRegistrarMockRegistrationRejected) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "RegistrationRejected", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistrarMockRegistrationRequestedIterator struct { - Event *KeeperRegistrarMockRegistrationRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistrarMockRegistrationRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockRegistrationRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistrarMockRegistrationRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistrarMockRegistrationRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistrarMockRegistrationRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistrarMockRegistrationRequested struct { - Hash [32]byte - Name string - EncryptedEmail []byte - UpkeepContract common.Address - GasLimit uint32 - AdminAddress common.Address - CheckData []byte - Amount *big.Int - Source uint8 - Raw types.Log -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address, source []uint8) (*KeeperRegistrarMockRegistrationRequestedIterator, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepContractRule []interface{} - for _, upkeepContractItem := range upkeepContract { - upkeepContractRule = append(upkeepContractRule, upkeepContractItem) - } - - var sourceRule []interface{} - for _, sourceItem := range source { - sourceRule = append(sourceRule, sourceItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.FilterLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule, sourceRule) - if err != nil { - return nil, err - } - return &KeeperRegistrarMockRegistrationRequestedIterator{contract: _KeeperRegistrarMock.contract, event: "RegistrationRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockRegistrationRequested, hash [][32]byte, upkeepContract []common.Address, source []uint8) (event.Subscription, error) { - - var hashRule []interface{} - for _, hashItem := range hash { - hashRule = append(hashRule, hashItem) - } - - var upkeepContractRule []interface{} - for _, upkeepContractItem := range upkeepContract { - upkeepContractRule = append(upkeepContractRule, upkeepContractItem) - } - - var sourceRule []interface{} - for _, sourceItem := range source { - sourceRule = append(sourceRule, sourceItem) - } - - logs, sub, err := _KeeperRegistrarMock.contract.WatchLogs(opts, "RegistrationRequested", hashRule, upkeepContractRule, sourceRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistrarMockRegistrationRequested) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistrarMock *KeeperRegistrarMockFilterer) ParseRegistrationRequested(log types.Log) (*KeeperRegistrarMockRegistrationRequested, error) { - event := new(KeeperRegistrarMockRegistrationRequested) - if err := _KeeperRegistrarMock.contract.UnpackLog(event, "RegistrationRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetRegistrationConfig struct { - AutoApproveConfigType uint8 - AutoApproveMaxAllowed uint32 - ApprovedCount uint32 - KeeperRegistry common.Address - MinLINKJuels *big.Int -} - -func (_KeeperRegistrarMock *KeeperRegistrarMock) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistrarMock.abi.Events["AutoApproveAllowedSenderSet"].ID: - return _KeeperRegistrarMock.ParseAutoApproveAllowedSenderSet(log) - case _KeeperRegistrarMock.abi.Events["ConfigChanged"].ID: - return _KeeperRegistrarMock.ParseConfigChanged(log) - case _KeeperRegistrarMock.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistrarMock.ParseOwnershipTransferRequested(log) - case _KeeperRegistrarMock.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistrarMock.ParseOwnershipTransferred(log) - case _KeeperRegistrarMock.abi.Events["RegistrationApproved"].ID: - return _KeeperRegistrarMock.ParseRegistrationApproved(log) - case _KeeperRegistrarMock.abi.Events["RegistrationRejected"].ID: - return _KeeperRegistrarMock.ParseRegistrationRejected(log) - case _KeeperRegistrarMock.abi.Events["RegistrationRequested"].ID: - return _KeeperRegistrarMock.ParseRegistrationRequested(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistrarMockAutoApproveAllowedSenderSet) Topic() common.Hash { - return common.HexToHash("0x20c6237dac83526a849285a9f79d08a483291bdd3a056a0ef9ae94ecee1ad356") -} - -func (KeeperRegistrarMockConfigChanged) Topic() common.Hash { - return common.HexToHash("0x6293a703ec7145dfa23c5cde2e627d6a02e153fc2e9c03b14d1e22cbb4a7e9cd") -} - -func (KeeperRegistrarMockOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistrarMockOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (KeeperRegistrarMockRegistrationApproved) Topic() common.Hash { - return common.HexToHash("0xb9a292fb7e3edd920cd2d2829a3615a640c43fd7de0a0820aa0668feb4c37d4b") -} - -func (KeeperRegistrarMockRegistrationRejected) Topic() common.Hash { - return common.HexToHash("0x3663fb28ebc87645eb972c9dad8521bf665c623f287e79f1c56f1eb374b82a22") -} - -func (KeeperRegistrarMockRegistrationRequested) Topic() common.Hash { - return common.HexToHash("0xc3f5df4aefec026f610a3fcb08f19476492d69d2cb78b1c2eba259a8820e6a78") -} - -func (_KeeperRegistrarMock *KeeperRegistrarMock) Address() common.Address { - return _KeeperRegistrarMock.address -} - -type KeeperRegistrarMockInterface interface { - GetRegistrationConfig(opts *bind.CallOpts) (GetRegistrationConfig, - - error) - - SApprovedCount(opts *bind.CallOpts) (uint32, error) - - SAutoApproveConfigType(opts *bind.CallOpts) (uint8, error) - - SAutoApproveMaxAllowed(opts *bind.CallOpts) (uint32, error) - - SKeeperRegistry(opts *bind.CallOpts) (common.Address, error) - - SMinLINKJuels(opts *bind.CallOpts) (*big.Int, error) - - EmitAutoApproveAllowedSenderSet(opts *bind.TransactOpts, senderAddress common.Address, allowed bool) (*types.Transaction, error) - - EmitConfigChanged(opts *bind.TransactOpts, autoApproveConfigType uint8, autoApproveMaxAllowed uint32, keeperRegistry common.Address, minLINKJuels *big.Int) (*types.Transaction, error) - - EmitOwnershipTransferRequested(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - EmitOwnershipTransferred(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - EmitRegistrationApproved(opts *bind.TransactOpts, hash [32]byte, displayName string, upkeepId *big.Int) (*types.Transaction, error) - - EmitRegistrationRejected(opts *bind.TransactOpts, hash [32]byte) (*types.Transaction, error) - - EmitRegistrationRequested(opts *bind.TransactOpts, hash [32]byte, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8) (*types.Transaction, error) - - SetRegistrationConfig(opts *bind.TransactOpts, _autoApproveConfigType uint8, _autoApproveMaxAllowed uint32, _approvedCount uint32, _keeperRegistry common.Address, _minLINKJuels *big.Int) (*types.Transaction, error) - - FilterAutoApproveAllowedSenderSet(opts *bind.FilterOpts, senderAddress []common.Address) (*KeeperRegistrarMockAutoApproveAllowedSenderSetIterator, error) - - WatchAutoApproveAllowedSenderSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockAutoApproveAllowedSenderSet, senderAddress []common.Address) (event.Subscription, error) - - ParseAutoApproveAllowedSenderSet(log types.Log) (*KeeperRegistrarMockAutoApproveAllowedSenderSet, error) - - FilterConfigChanged(opts *bind.FilterOpts) (*KeeperRegistrarMockConfigChangedIterator, error) - - WatchConfigChanged(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockConfigChanged) (event.Subscription, error) - - ParseConfigChanged(log types.Log) (*KeeperRegistrarMockConfigChanged, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarMockOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistrarMockOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistrarMockOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistrarMockOwnershipTransferred, error) - - FilterRegistrationApproved(opts *bind.FilterOpts, hash [][32]byte, upkeepId []*big.Int) (*KeeperRegistrarMockRegistrationApprovedIterator, error) - - WatchRegistrationApproved(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockRegistrationApproved, hash [][32]byte, upkeepId []*big.Int) (event.Subscription, error) - - ParseRegistrationApproved(log types.Log) (*KeeperRegistrarMockRegistrationApproved, error) - - FilterRegistrationRejected(opts *bind.FilterOpts, hash [][32]byte) (*KeeperRegistrarMockRegistrationRejectedIterator, error) - - WatchRegistrationRejected(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockRegistrationRejected, hash [][32]byte) (event.Subscription, error) - - ParseRegistrationRejected(log types.Log) (*KeeperRegistrarMockRegistrationRejected, error) - - FilterRegistrationRequested(opts *bind.FilterOpts, hash [][32]byte, upkeepContract []common.Address, source []uint8) (*KeeperRegistrarMockRegistrationRequestedIterator, error) - - WatchRegistrationRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistrarMockRegistrationRequested, hash [][32]byte, upkeepContract []common.Address, source []uint8) (event.Subscription, error) - - ParseRegistrationRequested(log types.Log) (*KeeperRegistrarMockRegistrationRequested, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/keeper_registry_logic1_3/keeper_registry_logic1_3.go b/core/gethwrappers/generated/keeper_registry_logic1_3/keeper_registry_logic1_3.go deleted file mode 100644 index 11856a0c8ff..00000000000 --- a/core/gethwrappers/generated/keeper_registry_logic1_3/keeper_registry_logic1_3.go +++ /dev/null @@ -1,4021 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package keeper_registry_logic1_3 - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type Config struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 - BlockCountPerTurn *big.Int - CheckGasLimit uint32 - StalenessSeconds *big.Int - GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int - MaxPerformGas uint32 - FallbackGasPrice *big.Int - FallbackLinkPrice *big.Int - Transcoder common.Address - Registrar common.Address -} - -var KeeperRegistryLogicMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"enumKeeperRegistryBase1_3.PaymentModel\",\"name\":\"paymentModel\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"registryGasOverhead\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeepersMustTakeTurns\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveKeepers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"KeepersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ARB_NITRO_ORACLE\",\"outputs\":[{\"internalType\":\"contractArbGasInfo\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FAST_GAS_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_ETH_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPTIMISM_ORACLE\",\"outputs\":[{\"internalType\":\"contractOVM_GasPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAYMENT_MODEL\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase1_3.PaymentModel\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTRY_GAS_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxLinkPayment\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adjustedGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkEth\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setKeepers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase1_3.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x6101606040527f420000000000000000000000000000000000000f00000000000000000000000060e0526c6c000000000000000000000000610100523480156200004857600080fd5b50604051620058fa380380620058fa8339810160408190526200006b916200028f565b84848484843380600081620000c75760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000fa57620000fa81620001c6565b5050600160029081556003805460ff19169055869150811115620001225762000122620002fc565b6101208160028111156200013a576200013a620002fc565b60f81b9052506101408490526001600160a01b03831615806200016457506001600160a01b038216155b806200017757506001600160a01b038116155b156200019657604051637138356f60e01b815260040160405180910390fd5b6001600160601b0319606093841b811660805291831b821660a05290911b1660c052506200031295505050505050565b6001600160a01b038116331415620002215760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401620000be565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b80516001600160a01b03811681146200028a57600080fd5b919050565b600080600080600060a08688031215620002a857600080fd5b855160038110620002b857600080fd5b60208701519095509350620002d06040870162000272565b9250620002e06060870162000272565b9150620002f06080870162000272565b90509295509295909350565b634e487b7160e01b600052602160045260246000fd5b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160f81c61014051615519620003e16000396000818161028c0152613ec801526000818161036301528181613f1b01526140970152600081816102fa01526140cf01526000818161032901526140060152600081816102650152613bfc0152600081816104010152613cdd01526000818161020c01528181610a4601528181610ca30152818161150e0152818161197301528181611c6301528181612273015261230601526155196000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c80638da5cb5b11610104578063b148ab6b116100a2578063c804802211610071578063c804802214610488578063da5c67411461049b578063eb5dcd6c146104ae578063f2fde38b146104c157600080fd5b8063b148ab6b14610436578063b79550be14610449578063b7fdb43614610451578063c41b813a1461046457600080fd5b8063a710b221116100de578063a710b221146103d6578063a72aa27e146103e9578063ad178361146103fc578063b121e1471461042357600080fd5b80638da5cb5b146103925780638e86139b146103b0578063948108f7146103c357600080fd5b8063744bfe611161017c5780638456cb591161014b5780638456cb591461031c578063850cce341461032457806385c1b0ba1461034b5780638811cbe81461035e57600080fd5b8063744bfe61146102d257806379ba5097146102e55780637d9b97e0146102ed5780637f37618e146102f557600080fd5b80633f4ba83a116101b85780633f4ba83a146102585780634584a419146102605780635077b210146102875780635c975abb146102bc57600080fd5b8063187256e8146101df5780631a2af011146101f45780631b6b6d2314610207575b600080fd5b6101f26101ed366004614747565b6104d4565b005b6101f2610202366004614adb565b610545565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101f2610770565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b6102ae7f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161024f565b60035460ff16604051901515815260200161024f565b6101f26102e0366004614adb565b610782565b6101f2610ac9565b6101f2610bcb565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b6101f2610d39565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b6101f2610359366004614864565b610d49565b6103857f000000000000000000000000000000000000000000000000000000000000000081565b60405161024f9190614f73565b60005473ffffffffffffffffffffffffffffffffffffffff1661022e565b6101f26103be366004614a11565b611598565b6101f26103d1366004614b21565b6117b6565b6101f26103e4366004614714565b611a4f565b6101f26103f7366004614afe565b611ce7565b61022e7f000000000000000000000000000000000000000000000000000000000000000081565b6101f26104313660046146f9565b611f20565b6101f2610444366004614aa9565b612018565b6101f261223a565b6101f261045f3660046147f8565b6123a5565b610477610472366004614adb565b612706565b60405161024f959493929190614e5d565b6101f2610496366004614aa9565b612a18565b6102ae6104a9366004614782565b612d92565b6101f26104bc366004614714565b612f89565b6101f26104cf3660046146f9565b6130e8565b6104dc6130fc565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600c6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600183600381111561053c5761053c6152b3565b02179055505050565b60008281526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff808216608085015264010000000082041660a084015268010000000000000000810490911660c083015260ff7c010000000000000000000000000000000000000000000000000000000090910416151560e08201526106248161317d565b73ffffffffffffffffffffffffffffffffffffffff8216331415610674576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166106c1576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600a602052604090205473ffffffffffffffffffffffffffffffffffffffff83811691161461076b576000838152600a602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff861690811790915590519091339186917fb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b3591a45b505050565b6107786130fc565b61078061322a565b565b73ffffffffffffffffffffffffffffffffffffffff81166107cf576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff9081169584019590955260018401549081169583019590955290930482166060840181905260029091015463ffffffff808216608086015264010000000082041660a085015268010000000000000000810490921660c08401527c010000000000000000000000000000000000000000000000000000000090910460ff16151560e083015233146108e2576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b438160a0015163ffffffff161115610926576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600760205260409020546012546bffffffffffffffffffffffff90911690610954908290615163565b60125560008481526007602090815260409182902080547fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016905581516bffffffffffffffffffffffff8416815273ffffffffffffffffffffffffffffffffffffffff86169181019190915285917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a26040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb90604401602060405180830381600087803b158015610a8a57600080fd5b505af1158015610a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac2919061499c565b5050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610b4f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610bd36130fc565b6011546012546bffffffffffffffffffffffff90911690610bf5908290615163565b601255601180547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b602060405180830381600087803b158015610cfd57600080fd5b505af1158015610d11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d35919061499c565b5050565b610d416130fc565b6107806132a7565b600173ffffffffffffffffffffffffffffffffffffffff82166000908152600c602052604090205460ff166003811115610d8557610d856152b3565b14158015610dcd5750600373ffffffffffffffffffffffffffffffffffffffff82166000908152600c602052604090205460ff166003811115610dca57610dca6152b3565b14155b15610e04576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60135473ffffffffffffffffffffffffffffffffffffffff16610e53576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81610e8a576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526000808567ffffffffffffffff811115610ee657610ee6615340565b604051908082528060200260200182016040528015610f1957816020015b6060815260200190600190039081610f045790505b50905060008667ffffffffffffffff811115610f3757610f37615340565b604051908082528060200260200182016040528015610fc457816020015b604080516101008101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c0820181905260e082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff909201910181610f555790505b50905060005b878110156112ce57888882818110610fe457610fe4615311565b6020908102929092013560008181526007845260409081902081516101008101835281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff90811698840198909852600184015490811694830194909452909204851660608301526002015463ffffffff808216608084015264010000000082041660a083015268010000000000000000810490941660c08201527c010000000000000000000000000000000000000000000000000000000090930460ff16151560e084015297509095506110d290508561317d565b848282815181106110e5576110e5615311565b6020026020010181905250600b6000878152602001908152602001600020805461110e906151d3565b80601f016020809104026020016040519081016040528092919081815260200182805461113a906151d3565b80156111875780601f1061115c57610100808354040283529160200191611187565b820191906000526020600020905b81548152906001019060200180831161116a57829003601f168201915b505050505083828151811061119e5761119e615311565b602090810291909101015284516111c3906bffffffffffffffffffffffff16856150a3565b60008781526007602090815260408083208381556001810184905560020180547fffffff0000000000000000000000000000000000000000000000000000000000169055600b909152812091955061121b9190614284565b6000868152600a6020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905561125a600587613302565b508451604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8916602083015287917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a2806112c681615227565b915050610fca565b50826012546112dd9190615163565b6012556040516000906112fa908a908a9085908790602001614cec565b60405160208183030381529060405290508673ffffffffffffffffffffffffffffffffffffffff16638e86139b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c71249ab60018b73ffffffffffffffffffffffffffffffffffffffff166348013d7b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ad57600080fd5b505afa1580156113c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e59190614a88565b866040518463ffffffff1660e01b815260040161140493929190614f86565b60006040518083038186803b15801561141c57600080fd5b505afa158015611430573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526114769190810190614a53565b6040518263ffffffff1660e01b81526004016114929190614e4a565b600060405180830381600087803b1580156114ac57600080fd5b505af11580156114c0573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152602482018890527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401602060405180830381600087803b15801561155457600080fd5b505af1158015611568573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061158c919061499c565b50505050505050505050565b6002336000908152600c602052604090205460ff1660038111156115be576115be6152b3565b141580156115f057506003336000908152600c602052604090205460ff1660038111156115ed576115ed6152b3565b14155b15611627576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008080611637848601866148b8565b92509250925060005b83518110156117ae5761171b84828151811061165e5761165e615311565b602002602001015184838151811061167857611678615311565b602002602001015160c0015185848151811061169657611696615311565b6020026020010151608001518685815181106116b4576116b4615311565b6020026020010151606001518786815181106116d2576116d2615311565b6020026020010151600001518787815181106116f0576116f0615311565b602002602001015189888151811061170a5761170a615311565b602002602001015160e00151613317565b83818151811061172d5761172d615311565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a7184838151811061176857611768615311565b60209081029190910181015151604080516bffffffffffffffffffffffff909216825233928201929092520160405180910390a2806117a681615227565b915050611640565b505050505050565b60008281526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff90811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff80821660808501526401000000008204811660a0850181905268010000000000000000830490931660c08501527c010000000000000000000000000000000000000000000000000000000090910460ff16151560e0840152146118c7576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80516118d49083906150bb565b600084815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601254611928918416906150a3565b6012556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b1580156119cc57600080fd5b505af11580156119e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a04919061499c565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff8116611a9c576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff16928101929092526001015460ff16151591810191909152903314611b4d576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff80841660009081526008602090815260409091208054909216909155810151601254611b9c916bffffffffffffffffffffffff1690615163565b60125560208082015160405133815273ffffffffffffffffffffffffffffffffffffffff808616936bffffffffffffffffffffffff90931692908716917f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698910160405180910390a460208101516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526bffffffffffffffffffffffff90921660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b158015611ca957600080fd5b505af1158015611cbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce1919061499c565b50505050565b6108fc8163ffffffff161080611d085750600e5463ffffffff908116908216115b15611d3f576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff90811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff80821660808501526401000000008204811660a0850181905268010000000000000000830490931660c08501527c010000000000000000000000000000000000000000000000000000000090910460ff16151560e084015214611e50576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606081015173ffffffffffffffffffffffffffffffffffffffff163314611ea3576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602090815260409182902060020180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8616908117909155915191825284917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a2505050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260096020526040902054163314611f80576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81811660008181526008602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556009909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b60008181526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff90811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff80821660808501526401000000008204811660a0850181905268010000000000000000830490931660c08501527c010000000000000000000000000000000000000000000000000000000090910460ff16151560e084015214612129576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600a602052604090205473ffffffffffffffffffffffffffffffffffffffff163314612186576040517f6352a85300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060810151600083815260076020908152604080832060010180546bffffffffffffffffffffffff16336c01000000000000000000000000810291909117909155600a90925280832080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905551909173ffffffffffffffffffffffffffffffffffffffff84169186917f5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c91a4505050565b6122426130fc565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b1580156122ca57600080fd5b505afa1580156122de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123029190614ac2565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb336012548461234f9190615163565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401610ce3565b6123ad6130fc565b82811415806123bc5750600283105b156123f3576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b60045481101561247f5760006004828154811061241557612415615311565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168252600890526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055508061247781615227565b9150506123f6565b5060005b838110156126b557600085858381811061249f5761249f615311565b90506020020160208101906124b491906146f9565b73ffffffffffffffffffffffffffffffffffffffff8082166000908152600860205260408120805493945092909116908686868181106124f6576124f6615311565b905060200201602081019061250b91906146f9565b905073ffffffffffffffffffffffffffffffffffffffff8116158061259e575073ffffffffffffffffffffffffffffffffffffffff82161580159061257c57508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561259e575073ffffffffffffffffffffffffffffffffffffffff81811614155b156125d5576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460ff1615612614576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905573ffffffffffffffffffffffffffffffffffffffff8181161461269e5782547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82161783555b5050505080806126ad90615227565b915050612483565b506126c2600485856142be565b507f056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f848484846040516126f89493929190614cba565b60405180910390a150505050565b6060600080600080612716613688565b600087815260076020908152604080832081516101008101835281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff908116848801526001850154918216848701529190048116606083015260029092015463ffffffff808216608084015264010000000082041660a083015268010000000000000000810490921660c08201527c010000000000000000000000000000000000000000000000000000000090910460ff16151560e08201528a8452600b90925280832090519192917f6e04ff0d000000000000000000000000000000000000000000000000000000009161282691602401614e94565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505090506000808360c0015173ffffffffffffffffffffffffffffffffffffffff16600d600001600b9054906101000a900463ffffffff1663ffffffff16846040516128cd9190614c9e565b60006040518083038160008787f1925050503d806000811461290b576040519150601f19603f3d011682016040523d82523d6000602084013e612910565b606091505b50915091508161294e57806040517f96c36235000000000000000000000000000000000000000000000000000000008152600401610b469190614e4a565b8080602001905181019061296291906149c0565b995091508161299d576040517f865676e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006129ac8b8d8c60006136c0565b90506129c185826000015183606001516137aa565b60608101516080820151600d5460a08401518d9392916129fc91720100000000000000000000000000000000000090910461ffff1690615126565b60c090940151929f919e509c50919a5098509650505050505050565b600081815260076020908152604080832081516101008101835281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff90811696840196909652600184015490811694830194909452909204831660608301526002015463ffffffff80821660808401526401000000008204811660a08401819052680100000000000000008304851660c08501527c010000000000000000000000000000000000000000000000000000000090920460ff16151560e08401529354919314801592919091163314908290612b1e5750808015612b1c5750438360a0015163ffffffff16115b155b15612b55576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015612b935750826060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15612bca576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4381612bde57612bdb6032826150a3565b90505b6000858152600760205260409020600201805463ffffffff808416640100000000027fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff90921691909117909155612c3a90600590879061330216565b50600d5460408501516bffffffffffffffffffffffff7401000000000000000000000000000000000000000090920482169160009116821115612cb4576040860151612c86908361517a565b905085600001516bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115612cb4575084515b8551612cc190829061517a565b600088815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154612d15918391166150bb565b601180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9290921691909117905560405167ffffffffffffffff84169088907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a350505050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590612dd3575060145473ffffffffffffffffffffffffffffffffffffffff163314155b15612e0a576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612e15600143615163565b600e5460408051924060208401523060601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690830152640100000000900460e01b7fffffffff000000000000000000000000000000000000000000000000000000001660548201526058016040516020818303038152906040528051906020012060001c9050612ee281878787600088888080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250613317915050565b600e8054640100000000900463ffffffff16906004612f0083615260565b91906101000a81548163ffffffff021916908363ffffffff16021790555050807fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d0128686604051612f7892919063ffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a295945050505050565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260086020526040902054163314612fe9576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116331415613039576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff828116600090815260096020526040902054811690821614610d355773ffffffffffffffffffffffffffffffffffffffff82811660008181526009602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b6130f06130fc565b6130f9816138fb565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610780576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610b46565b806060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146131e6576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a081015163ffffffff908116146130f9576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6132326139f1565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b6132af613a5d565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861327d3390565b600061330e8383613aca565b90505b92915050565b61331f613a5d565b73ffffffffffffffffffffffffffffffffffffffff86163b61336d576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8563ffffffff16108061338e5750600e5463ffffffff908116908616115b156133c5576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806101000160405280846bffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018663ffffffff16815260200163ffffffff801681526020018773ffffffffffffffffffffffffffffffffffffffff1681526020018215158152506007600089815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550606082015181600101600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060808201518160020160006101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160020160046101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160020160086101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060e082015181600201601c6101000a81548160ff021916908315150217905550905050826bffffffffffffffffffffffff1660125461365091906150a3565b6012556000878152600b60209081526040909120835161367292850190614346565b5061367e600588613bbd565b5050505050505050565b3215610780576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6137166040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60008481526007602052604081206002015463ffffffff169080613738613bc9565b91509150600061374a84848489613dc4565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff909b168b5260208b0199909952978901969096526bffffffffffffffffffffffff9096166060880152608087019190915260a086015250505060c082015290565b8260e00151156137e6576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090206001015460ff16613848576040517fcfbacfd800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82516bffffffffffffffffffffffff16811115613891576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff16141561076b576040517f06bc104000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811633141561397b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610b46565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60035460ff16610780576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610b46565b60035460ff1615610780576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610b46565b60008181526001830160205260408120548015613bb3576000613aee600183615163565b8554909150600090613b0290600190615163565b9050818114613b67576000866000018281548110613b2257613b22615311565b9060005260206000200154905080876000018481548110613b4557613b45615311565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613b7857613b786152e2565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050613311565b6000915050613311565b600061330e8383614235565b6000806000600d600001600f9054906101000a900462ffffff1662ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015613c6057600080fd5b505afa158015613c74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c989190614b44565b509450909250849150508015613cbc5750613cb38242615163565b8463ffffffff16105b80613cc8575060008113155b15613cd757600f549550613cdb565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b158015613d4157600080fd5b505afa158015613d55573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613d799190614b44565b509450909250849150508015613d9d5750613d948242615163565b8463ffffffff16105b80613da9575060008113155b15613db8576010549450613dbc565b8094505b505050509091565b6040805161012081018252600d5463ffffffff80821683526401000000008083048216602085015268010000000000000000830462ffffff908116958501959095526b0100000000000000000000008304821660608501526f01000000000000000000000000000000830490941660808401527201000000000000000000000000000000000000820461ffff1660a08401819052740100000000000000000000000000000000000000009092046bffffffffffffffffffffffff1660c0840152600e5480821660e0850152939093049092166101008201526000918290613eab9087615126565b9050838015613eb95750803a105b15613ec157503a5b6000613eed7f0000000000000000000000000000000000000000000000000000000000000000896150a3565b613ef79083615126565b8351909150600090613f139063ffffffff16633b9aca006150a3565b9050600060027f00000000000000000000000000000000000000000000000000000000000000006002811115613f4b57613f4b6152b3565b1415614093576040805160008152602081019091528715613faa576000366040518060800160405280604881526020016153b560489139604051602001613f9493929190614c77565b6040516020818303038152906040529050613fc9565b60405180610140016040528061011081526020016153fd610110913990505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906349948e0e9061403b908490600401614e4a565b60206040518083038186803b15801561405357600080fd5b505afa158015614067573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061408b9190614ac2565b91505061416e565b60017f000000000000000000000000000000000000000000000000000000000000000060028111156140c7576140c76152b3565b141561416e577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561413357600080fd5b505afa158015614147573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061416b9190614ac2565b90505b8661418a57808560a0015161ffff166141879190615126565b90505b6000856020015163ffffffff1664e8d4a510006141a79190615126565b89846141b385886150a3565b6141c190633b9aca00615126565b6141cb9190615126565b6141d591906150eb565b6141df91906150a3565b90506b033b2e3c9fd0803ce8000000811115614227576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9a9950505050505050505050565b600081815260018301602052604081205461427c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155613311565b506000613311565b508054614290906151d3565b6000825580601f106142a0575050565b601f0160209004906000526020600020908101906130f991906143ba565b828054828255906000526020600020908101928215614336579160200282015b828111156143365781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8435161782556020909201916001909101906142de565b506143429291506143ba565b5090565b828054614352906151d3565b90600052602060002090601f0160209004810192826143745760008555614336565b82601f1061438d57805160ff1916838001178555614336565b82800160010185558215614336579182015b8281111561433657825182559160200191906001019061439f565b5b8082111561434257600081556001016143bb565b803573ffffffffffffffffffffffffffffffffffffffff811681146143f357600080fd5b919050565b60008083601f84011261440a57600080fd5b50813567ffffffffffffffff81111561442257600080fd5b6020830191508360208260051b850101111561443d57600080fd5b9250929050565b600082601f83011261445557600080fd5b8135602061446a61446583615039565b614fea565b80838252828201915082860187848660051b890101111561448a57600080fd5b60005b8581101561450a57813567ffffffffffffffff8111156144ac57600080fd5b8801603f81018a136144bd57600080fd5b8581013560406144cf6144658361505d565b8281528c828486010111156144e357600080fd5b828285018a830137600092810189019290925250855250928401929084019060010161448d565b5090979650505050505050565b600082601f83011261452857600080fd5b8135602061453861446583615039565b80838252828201915082860187848660081b890101111561455857600080fd5b6000805b868110156146125761010080848c031215614575578283fd5b61457d614fc0565b614586856146dd565b81526145938886016143cf565b8882015260406145a48187016146dd565b9082015260606145b58682016143cf565b9082015260806145c68682016146af565b9082015260a06145d78682016146af565b9082015260c06145e88682016143cf565b9082015260e0858101356145fb816153a6565b90820152865294860194929092019160010161455c565b509198975050505050505050565b60008083601f84011261463257600080fd5b50813567ffffffffffffffff81111561464a57600080fd5b60208301915083602082850101111561443d57600080fd5b600082601f83011261467357600080fd5b81516146816144658261505d565b81815284602083860101111561469657600080fd5b6146a78260208301602087016151a7565b949350505050565b803563ffffffff811681146143f357600080fd5b805169ffffffffffffffffffff811681146143f357600080fd5b80356bffffffffffffffffffffffff811681146143f357600080fd5b60006020828403121561470b57600080fd5b61330e826143cf565b6000806040838503121561472757600080fd5b614730836143cf565b915061473e602084016143cf565b90509250929050565b6000806040838503121561475a57600080fd5b614763836143cf565b915060208301356004811061477757600080fd5b809150509250929050565b60008060008060006080868803121561479a57600080fd5b6147a3866143cf565b94506147b1602087016146af565b93506147bf604087016143cf565b9250606086013567ffffffffffffffff8111156147db57600080fd5b6147e788828901614620565b969995985093965092949392505050565b6000806000806040858703121561480e57600080fd5b843567ffffffffffffffff8082111561482657600080fd5b614832888389016143f8565b9096509450602087013591508082111561484b57600080fd5b50614858878288016143f8565b95989497509550505050565b60008060006040848603121561487957600080fd5b833567ffffffffffffffff81111561489057600080fd5b61489c868287016143f8565b90945092506148af9050602085016143cf565b90509250925092565b6000806000606084860312156148cd57600080fd5b833567ffffffffffffffff808211156148e557600080fd5b818601915086601f8301126148f957600080fd5b8135602061490961446583615039565b8083825282820191508286018b848660051b890101111561492957600080fd5b600096505b8487101561494c57803583526001969096019591830191830161492e565b509750508701359250508082111561496357600080fd5b61496f87838801614517565b9350604086013591508082111561498557600080fd5b5061499286828701614444565b9150509250925092565b6000602082840312156149ae57600080fd5b81516149b9816153a6565b9392505050565b600080604083850312156149d357600080fd5b82516149de816153a6565b602084015190925067ffffffffffffffff8111156149fb57600080fd5b614a0785828601614662565b9150509250929050565b60008060208385031215614a2457600080fd5b823567ffffffffffffffff811115614a3b57600080fd5b614a4785828601614620565b90969095509350505050565b600060208284031215614a6557600080fd5b815167ffffffffffffffff811115614a7c57600080fd5b6146a784828501614662565b600060208284031215614a9a57600080fd5b8151600381106149b957600080fd5b600060208284031215614abb57600080fd5b5035919050565b600060208284031215614ad457600080fd5b5051919050565b60008060408385031215614aee57600080fd5b8235915061473e602084016143cf565b60008060408385031215614b1157600080fd5b8235915061473e602084016146af565b60008060408385031215614b3457600080fd5b8235915061473e602084016146dd565b600080600080600060a08688031215614b5c57600080fd5b614b65866146c3565b9450602086015193506040860151925060608601519150614b88608087016146c3565b90509295509295909350565b8183526000602080850194508260005b85811015614bdd5773ffffffffffffffffffffffffffffffffffffffff614bca836143cf565b1687529582019590820190600101614ba4565b509495945050505050565b6000815180845260208085019450848260051b860182860160005b8581101561450a578383038952614c1b838351614c2d565b98850198925090840190600101614c03565b60008151808452614c458160208601602086016151a7565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b828482376000838201600081528351614c948183602088016151a7565b0195945050505050565b60008251614cb08184602087016151a7565b9190910192915050565b604081526000614cce604083018688614b94565b8281036020840152614ce1818587614b94565b979650505050505050565b60006060808352858184015260807f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff871115614d2757600080fd5b8660051b808983870137808501905081810160008152602083878403018188015281895180845260a093508385019150828b01945060005b81811015614e265785516bffffffffffffffffffffffff80825116855273ffffffffffffffffffffffffffffffffffffffff868301511686860152604081818401511681870152505088810151614dcd8a86018273ffffffffffffffffffffffffffffffffffffffff169052565b508781015163ffffffff908116858a015286820151168685015260c08082015173ffffffffffffffffffffffffffffffffffffffff169085015260e0908101511515908401529483019461010090920191600101614d5f565b50508781036040890152614e3a818a614be8565b9c9b505050505050505050505050565b60208152600061330e6020830184614c2d565b60a081526000614e7060a0830188614c2d565b90508560208301528460408301528360608301528260808301529695505050505050565b600060208083526000845481600182811c915080831680614eb657607f831692505b858310811415614eed577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b878601838152602001818015614f0a5760018114614f3957614f64565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00861682528782019650614f64565b60008b81526020902060005b86811015614f5e57815484820152908501908901614f45565b83019750505b50949998505050505050505050565b60208101614f808361536f565b91905290565b614f8f8461536f565b838152614f9b8361536f565b826020820152606060408201526000614fb76060830184614c2d565b95945050505050565b604051610100810167ffffffffffffffff81118282101715614fe457614fe4615340565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561503157615031615340565b604052919050565b600067ffffffffffffffff82111561505357615053615340565b5060051b60200190565b600067ffffffffffffffff82111561507757615077615340565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600082198211156150b6576150b6615284565b500190565b60006bffffffffffffffffffffffff8083168185168083038211156150e2576150e2615284565b01949350505050565b600082615121577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561515e5761515e615284565b500290565b60008282101561517557615175615284565b500390565b60006bffffffffffffffffffffffff8381169083168181101561519f5761519f615284565b039392505050565b60005b838110156151c25781810151838201526020016151aa565b83811115611ce15750506000910152565b600181811c908216806151e757607f821691505b60208210811415615221577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561525957615259615284565b5060010190565b600063ffffffff8083168181141561527a5761527a615284565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600381106130f9577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b80151581146130f957600080fdfe3078666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663078666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", -} - -var KeeperRegistryLogicABI = KeeperRegistryLogicMetaData.ABI - -var KeeperRegistryLogicBin = KeeperRegistryLogicMetaData.Bin - -func DeployKeeperRegistryLogic(auth *bind.TransactOpts, backend bind.ContractBackend, paymentModel uint8, registryGasOverhead *big.Int, link common.Address, linkEthFeed common.Address, fastGasFeed common.Address) (common.Address, *types.Transaction, *KeeperRegistryLogic, error) { - parsed, err := KeeperRegistryLogicMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryLogicBin), backend, paymentModel, registryGasOverhead, link, linkEthFeed, fastGasFeed) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistryLogic{address: address, abi: *parsed, KeeperRegistryLogicCaller: KeeperRegistryLogicCaller{contract: contract}, KeeperRegistryLogicTransactor: KeeperRegistryLogicTransactor{contract: contract}, KeeperRegistryLogicFilterer: KeeperRegistryLogicFilterer{contract: contract}}, nil -} - -type KeeperRegistryLogic struct { - address common.Address - abi abi.ABI - KeeperRegistryLogicCaller - KeeperRegistryLogicTransactor - KeeperRegistryLogicFilterer -} - -type KeeperRegistryLogicCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistryLogicTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistryLogicFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistryLogicSession struct { - Contract *KeeperRegistryLogic - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistryLogicCallerSession struct { - Contract *KeeperRegistryLogicCaller - CallOpts bind.CallOpts -} - -type KeeperRegistryLogicTransactorSession struct { - Contract *KeeperRegistryLogicTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistryLogicRaw struct { - Contract *KeeperRegistryLogic -} - -type KeeperRegistryLogicCallerRaw struct { - Contract *KeeperRegistryLogicCaller -} - -type KeeperRegistryLogicTransactorRaw struct { - Contract *KeeperRegistryLogicTransactor -} - -func NewKeeperRegistryLogic(address common.Address, backend bind.ContractBackend) (*KeeperRegistryLogic, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistryLogicABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistryLogic(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistryLogic{address: address, abi: abi, KeeperRegistryLogicCaller: KeeperRegistryLogicCaller{contract: contract}, KeeperRegistryLogicTransactor: KeeperRegistryLogicTransactor{contract: contract}, KeeperRegistryLogicFilterer: KeeperRegistryLogicFilterer{contract: contract}}, nil -} - -func NewKeeperRegistryLogicCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistryLogicCaller, error) { - contract, err := bindKeeperRegistryLogic(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicCaller{contract: contract}, nil -} - -func NewKeeperRegistryLogicTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistryLogicTransactor, error) { - contract, err := bindKeeperRegistryLogic(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicTransactor{contract: contract}, nil -} - -func NewKeeperRegistryLogicFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistryLogicFilterer, error) { - contract, err := bindKeeperRegistryLogic(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicFilterer{contract: contract}, nil -} - -func bindKeeperRegistryLogic(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistryLogicMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistryLogic.Contract.KeeperRegistryLogicCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.KeeperRegistryLogicTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.KeeperRegistryLogicTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistryLogic.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) ARBNITROORACLE(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "ARB_NITRO_ORACLE") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) ARBNITROORACLE() (common.Address, error) { - return _KeeperRegistryLogic.Contract.ARBNITROORACLE(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) ARBNITROORACLE() (common.Address, error) { - return _KeeperRegistryLogic.Contract.ARBNITROORACLE(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) FASTGASFEED(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "FAST_GAS_FEED") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) FASTGASFEED() (common.Address, error) { - return _KeeperRegistryLogic.Contract.FASTGASFEED(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) FASTGASFEED() (common.Address, error) { - return _KeeperRegistryLogic.Contract.FASTGASFEED(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) LINK(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "LINK") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) LINK() (common.Address, error) { - return _KeeperRegistryLogic.Contract.LINK(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) LINK() (common.Address, error) { - return _KeeperRegistryLogic.Contract.LINK(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) LINKETHFEED(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "LINK_ETH_FEED") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) LINKETHFEED() (common.Address, error) { - return _KeeperRegistryLogic.Contract.LINKETHFEED(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) LINKETHFEED() (common.Address, error) { - return _KeeperRegistryLogic.Contract.LINKETHFEED(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) OPTIMISMORACLE(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "OPTIMISM_ORACLE") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) OPTIMISMORACLE() (common.Address, error) { - return _KeeperRegistryLogic.Contract.OPTIMISMORACLE(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) OPTIMISMORACLE() (common.Address, error) { - return _KeeperRegistryLogic.Contract.OPTIMISMORACLE(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) PAYMENTMODEL(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "PAYMENT_MODEL") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) PAYMENTMODEL() (uint8, error) { - return _KeeperRegistryLogic.Contract.PAYMENTMODEL(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) PAYMENTMODEL() (uint8, error) { - return _KeeperRegistryLogic.Contract.PAYMENTMODEL(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) REGISTRYGASOVERHEAD(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "REGISTRY_GAS_OVERHEAD") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) REGISTRYGASOVERHEAD() (*big.Int, error) { - return _KeeperRegistryLogic.Contract.REGISTRYGASOVERHEAD(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) REGISTRYGASOVERHEAD() (*big.Int, error) { - return _KeeperRegistryLogic.Contract.REGISTRYGASOVERHEAD(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) Owner() (common.Address, error) { - return _KeeperRegistryLogic.Contract.Owner(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) Owner() (common.Address, error) { - return _KeeperRegistryLogic.Contract.Owner(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCaller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _KeeperRegistryLogic.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) Paused() (bool, error) { - return _KeeperRegistryLogic.Contract.Paused(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicCallerSession) Paused() (bool, error) { - return _KeeperRegistryLogic.Contract.Paused(&_KeeperRegistryLogic.CallOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "acceptOwnership") -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AcceptOwnership(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AcceptOwnership(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) AcceptPayeeship(opts *bind.TransactOpts, keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "acceptPayeeship", keeper) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) AcceptPayeeship(keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AcceptPayeeship(&_KeeperRegistryLogic.TransactOpts, keeper) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) AcceptPayeeship(keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AcceptPayeeship(&_KeeperRegistryLogic.TransactOpts, keeper) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "acceptUpkeepAdmin", id) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AcceptUpkeepAdmin(&_KeeperRegistryLogic.TransactOpts, id) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AcceptUpkeepAdmin(&_KeeperRegistryLogic.TransactOpts, id) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "addFunds", id, amount) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AddFunds(&_KeeperRegistryLogic.TransactOpts, id, amount) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.AddFunds(&_KeeperRegistryLogic.TransactOpts, id, amount) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "cancelUpkeep", id) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.CancelUpkeep(&_KeeperRegistryLogic.TransactOpts, id) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.CancelUpkeep(&_KeeperRegistryLogic.TransactOpts, id) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) CheckUpkeep(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "checkUpkeep", id, from) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) CheckUpkeep(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.CheckUpkeep(&_KeeperRegistryLogic.TransactOpts, id, from) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) CheckUpkeep(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.CheckUpkeep(&_KeeperRegistryLogic.TransactOpts, id, from) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "migrateUpkeeps", ids, destination) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.MigrateUpkeeps(&_KeeperRegistryLogic.TransactOpts, ids, destination) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.MigrateUpkeeps(&_KeeperRegistryLogic.TransactOpts, ids, destination) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "pause") -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) Pause() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.Pause(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) Pause() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.Pause(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "receiveUpkeeps", encodedUpkeeps) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.ReceiveUpkeeps(&_KeeperRegistryLogic.TransactOpts, encodedUpkeeps) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.ReceiveUpkeeps(&_KeeperRegistryLogic.TransactOpts, encodedUpkeeps) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "recoverFunds") -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) RecoverFunds() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.RecoverFunds(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) RecoverFunds() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.RecoverFunds(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, checkData) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.RegisterUpkeep(&_KeeperRegistryLogic.TransactOpts, target, gasLimit, admin, checkData) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.RegisterUpkeep(&_KeeperRegistryLogic.TransactOpts, target, gasLimit, admin, checkData) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) SetKeepers(opts *bind.TransactOpts, keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "setKeepers", keepers, payees) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) SetKeepers(keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.SetKeepers(&_KeeperRegistryLogic.TransactOpts, keepers, payees) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) SetKeepers(keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.SetKeepers(&_KeeperRegistryLogic.TransactOpts, keepers, payees) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "setPeerRegistryMigrationPermission", peer, permission) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.SetPeerRegistryMigrationPermission(&_KeeperRegistryLogic.TransactOpts, peer, permission) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.SetPeerRegistryMigrationPermission(&_KeeperRegistryLogic.TransactOpts, peer, permission) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "setUpkeepGasLimit", id, gasLimit) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.SetUpkeepGasLimit(&_KeeperRegistryLogic.TransactOpts, id, gasLimit) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.SetUpkeepGasLimit(&_KeeperRegistryLogic.TransactOpts, id, gasLimit) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "transferOwnership", to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.TransferOwnership(&_KeeperRegistryLogic.TransactOpts, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.TransferOwnership(&_KeeperRegistryLogic.TransactOpts, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) TransferPayeeship(opts *bind.TransactOpts, keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "transferPayeeship", keeper, proposed) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) TransferPayeeship(keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.TransferPayeeship(&_KeeperRegistryLogic.TransactOpts, keeper, proposed) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) TransferPayeeship(keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.TransferPayeeship(&_KeeperRegistryLogic.TransactOpts, keeper, proposed) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "transferUpkeepAdmin", id, proposed) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.TransferUpkeepAdmin(&_KeeperRegistryLogic.TransactOpts, id, proposed) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.TransferUpkeepAdmin(&_KeeperRegistryLogic.TransactOpts, id, proposed) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "unpause") -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) Unpause() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.Unpause(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) Unpause() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.Unpause(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "withdrawFunds", id, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.WithdrawFunds(&_KeeperRegistryLogic.TransactOpts, id, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.WithdrawFunds(&_KeeperRegistryLogic.TransactOpts, id, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "withdrawOwnerFunds") -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.WithdrawOwnerFunds(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.WithdrawOwnerFunds(&_KeeperRegistryLogic.TransactOpts) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactor) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.contract.Transact(opts, "withdrawPayment", from, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.WithdrawPayment(&_KeeperRegistryLogic.TransactOpts, from, to) -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicTransactorSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistryLogic.Contract.WithdrawPayment(&_KeeperRegistryLogic.TransactOpts, from, to) -} - -type KeeperRegistryLogicConfigSetIterator struct { - Event *KeeperRegistryLogicConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicConfigSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicConfigSet struct { - Config Config - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterConfigSet(opts *bind.FilterOpts) (*KeeperRegistryLogicConfigSetIterator, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return &KeeperRegistryLogicConfigSetIterator{contract: _KeeperRegistryLogic.contract, event: "ConfigSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicConfigSet) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicConfigSet) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseConfigSet(log types.Log) (*KeeperRegistryLogicConfigSet, error) { - event := new(KeeperRegistryLogicConfigSet) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicFundsAddedIterator struct { - Event *KeeperRegistryLogicFundsAdded - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicFundsAddedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicFundsAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicFundsAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicFundsAddedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicFundsAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*KeeperRegistryLogicFundsAddedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicFundsAddedIterator{contract: _KeeperRegistryLogic.contract, event: "FundsAdded", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicFundsAdded) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "FundsAdded", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseFundsAdded(log types.Log) (*KeeperRegistryLogicFundsAdded, error) { - event := new(KeeperRegistryLogicFundsAdded) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "FundsAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicFundsWithdrawnIterator struct { - Event *KeeperRegistryLogicFundsWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicFundsWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicFundsWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicFundsWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicFundsWithdrawn struct { - Id *big.Int - Amount *big.Int - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicFundsWithdrawnIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "FundsWithdrawn", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicFundsWithdrawnIterator{contract: _KeeperRegistryLogic.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicFundsWithdrawn, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "FundsWithdrawn", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicFundsWithdrawn) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseFundsWithdrawn(log types.Log) (*KeeperRegistryLogicFundsWithdrawn, error) { - event := new(KeeperRegistryLogicFundsWithdrawn) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicKeepersUpdatedIterator struct { - Event *KeeperRegistryLogicKeepersUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicKeepersUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicKeepersUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicKeepersUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicKeepersUpdatedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicKeepersUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicKeepersUpdated struct { - Keepers []common.Address - Payees []common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterKeepersUpdated(opts *bind.FilterOpts) (*KeeperRegistryLogicKeepersUpdatedIterator, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "KeepersUpdated") - if err != nil { - return nil, err - } - return &KeeperRegistryLogicKeepersUpdatedIterator{contract: _KeeperRegistryLogic.contract, event: "KeepersUpdated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchKeepersUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicKeepersUpdated) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "KeepersUpdated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicKeepersUpdated) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "KeepersUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseKeepersUpdated(log types.Log) (*KeeperRegistryLogicKeepersUpdated, error) { - event := new(KeeperRegistryLogicKeepersUpdated) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "KeepersUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicOwnerFundsWithdrawnIterator struct { - Event *KeeperRegistryLogicOwnerFundsWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicOwnerFundsWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicOwnerFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicOwnerFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicOwnerFundsWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicOwnerFundsWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*KeeperRegistryLogicOwnerFundsWithdrawnIterator, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "OwnerFundsWithdrawn") - if err != nil { - return nil, err - } - return &KeeperRegistryLogicOwnerFundsWithdrawnIterator{contract: _KeeperRegistryLogic.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicOwnerFundsWithdrawn) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "OwnerFundsWithdrawn") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicOwnerFundsWithdrawn) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*KeeperRegistryLogicOwnerFundsWithdrawn, error) { - event := new(KeeperRegistryLogicOwnerFundsWithdrawn) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicOwnershipTransferRequestedIterator struct { - Event *KeeperRegistryLogicOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryLogicOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicOwnershipTransferRequestedIterator{contract: _KeeperRegistryLogic.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicOwnershipTransferRequested) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryLogicOwnershipTransferRequested, error) { - event := new(KeeperRegistryLogicOwnershipTransferRequested) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicOwnershipTransferredIterator struct { - Event *KeeperRegistryLogicOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryLogicOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicOwnershipTransferredIterator{contract: _KeeperRegistryLogic.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicOwnershipTransferred) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistryLogicOwnershipTransferred, error) { - event := new(KeeperRegistryLogicOwnershipTransferred) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicPausedIterator struct { - Event *KeeperRegistryLogicPaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicPausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicPausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicPaused struct { - Account common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterPaused(opts *bind.FilterOpts) (*KeeperRegistryLogicPausedIterator, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &KeeperRegistryLogicPausedIterator{contract: _KeeperRegistryLogic.contract, event: "Paused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPaused) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "Paused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicPaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "Paused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParsePaused(log types.Log) (*KeeperRegistryLogicPaused, error) { - event := new(KeeperRegistryLogicPaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicPayeeshipTransferRequestedIterator struct { - Event *KeeperRegistryLogicPayeeshipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicPayeeshipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPayeeshipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPayeeshipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicPayeeshipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicPayeeshipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicPayeeshipTransferRequested struct { - Keeper common.Address - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryLogicPayeeshipTransferRequestedIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "PayeeshipTransferRequested", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicPayeeshipTransferRequestedIterator{contract: _KeeperRegistryLogic.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPayeeshipTransferRequested, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "PayeeshipTransferRequested", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicPayeeshipTransferRequested) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParsePayeeshipTransferRequested(log types.Log) (*KeeperRegistryLogicPayeeshipTransferRequested, error) { - event := new(KeeperRegistryLogicPayeeshipTransferRequested) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicPayeeshipTransferredIterator struct { - Event *KeeperRegistryLogicPayeeshipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicPayeeshipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPayeeshipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPayeeshipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicPayeeshipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicPayeeshipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicPayeeshipTransferred struct { - Keeper common.Address - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryLogicPayeeshipTransferredIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "PayeeshipTransferred", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicPayeeshipTransferredIterator{contract: _KeeperRegistryLogic.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPayeeshipTransferred, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "PayeeshipTransferred", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicPayeeshipTransferred) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParsePayeeshipTransferred(log types.Log) (*KeeperRegistryLogicPayeeshipTransferred, error) { - event := new(KeeperRegistryLogicPayeeshipTransferred) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicPaymentWithdrawnIterator struct { - Event *KeeperRegistryLogicPaymentWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicPaymentWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPaymentWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicPaymentWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicPaymentWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicPaymentWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicPaymentWithdrawn struct { - Keeper common.Address - Amount *big.Int - To common.Address - Payee common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterPaymentWithdrawn(opts *bind.FilterOpts, keeper []common.Address, amount []*big.Int, to []common.Address) (*KeeperRegistryLogicPaymentWithdrawnIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var amountRule []interface{} - for _, amountItem := range amount { - amountRule = append(amountRule, amountItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "PaymentWithdrawn", keeperRule, amountRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicPaymentWithdrawnIterator{contract: _KeeperRegistryLogic.contract, event: "PaymentWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPaymentWithdrawn, keeper []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var amountRule []interface{} - for _, amountItem := range amount { - amountRule = append(amountRule, amountItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "PaymentWithdrawn", keeperRule, amountRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicPaymentWithdrawn) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParsePaymentWithdrawn(log types.Log) (*KeeperRegistryLogicPaymentWithdrawn, error) { - event := new(KeeperRegistryLogicPaymentWithdrawn) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUnpausedIterator struct { - Event *KeeperRegistryLogicUnpaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUnpausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUnpausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUnpaused struct { - Account common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUnpaused(opts *bind.FilterOpts) (*KeeperRegistryLogicUnpausedIterator, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUnpausedIterator{contract: _KeeperRegistryLogic.contract, event: "Unpaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUnpaused) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUnpaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "Unpaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUnpaused(log types.Log) (*KeeperRegistryLogicUnpaused, error) { - event := new(KeeperRegistryLogicUnpaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepAdminTransferRequestedIterator struct { - Event *KeeperRegistryLogicUpkeepAdminTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepAdminTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepAdminTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepAdminTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepAdminTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepAdminTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepAdminTransferRequested struct { - Id *big.Int - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryLogicUpkeepAdminTransferRequestedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepAdminTransferRequestedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepAdminTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepAdminTransferRequested) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepAdminTransferRequested(log types.Log) (*KeeperRegistryLogicUpkeepAdminTransferRequested, error) { - event := new(KeeperRegistryLogicUpkeepAdminTransferRequested) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepAdminTransferredIterator struct { - Event *KeeperRegistryLogicUpkeepAdminTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepAdminTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepAdminTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepAdminTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepAdminTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepAdminTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepAdminTransferred struct { - Id *big.Int - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryLogicUpkeepAdminTransferredIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepAdminTransferredIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepAdminTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepAdminTransferred) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepAdminTransferred(log types.Log) (*KeeperRegistryLogicUpkeepAdminTransferred, error) { - event := new(KeeperRegistryLogicUpkeepAdminTransferred) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepCanceledIterator struct { - Event *KeeperRegistryLogicUpkeepCanceled - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepCanceledIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepCanceledIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepCanceledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepCanceled struct { - Id *big.Int - AtBlockHeight uint64 - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*KeeperRegistryLogicUpkeepCanceledIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var atBlockHeightRule []interface{} - for _, atBlockHeightItem := range atBlockHeight { - atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepCanceledIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepCanceled", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var atBlockHeightRule []interface{} - for _, atBlockHeightItem := range atBlockHeight { - atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepCanceled) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepCanceled(log types.Log) (*KeeperRegistryLogicUpkeepCanceled, error) { - event := new(KeeperRegistryLogicUpkeepCanceled) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepCheckDataUpdatedIterator struct { - Event *KeeperRegistryLogicUpkeepCheckDataUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepCheckDataUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepCheckDataUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepCheckDataUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepCheckDataUpdatedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepCheckDataUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepCheckDataUpdated struct { - Id *big.Int - NewCheckData []byte - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepCheckDataUpdated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepCheckDataUpdatedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepCheckDataUpdated", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepCheckDataUpdatedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepCheckDataUpdated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepCheckDataUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepCheckDataUpdated, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepCheckDataUpdated", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepCheckDataUpdated) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepCheckDataUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepCheckDataUpdated(log types.Log) (*KeeperRegistryLogicUpkeepCheckDataUpdated, error) { - event := new(KeeperRegistryLogicUpkeepCheckDataUpdated) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepCheckDataUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepGasLimitSetIterator struct { - Event *KeeperRegistryLogicUpkeepGasLimitSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepGasLimitSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepGasLimitSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepGasLimitSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepGasLimitSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepGasLimitSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepGasLimitSet struct { - Id *big.Int - GasLimit *big.Int - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepGasLimitSetIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepGasLimitSet", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepGasLimitSetIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepGasLimitSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepGasLimitSet", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepGasLimitSet) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepGasLimitSet(log types.Log) (*KeeperRegistryLogicUpkeepGasLimitSet, error) { - event := new(KeeperRegistryLogicUpkeepGasLimitSet) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepMigratedIterator struct { - Event *KeeperRegistryLogicUpkeepMigrated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepMigratedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepMigrated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepMigrated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepMigratedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepMigratedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepMigrated struct { - Id *big.Int - RemainingBalance *big.Int - Destination common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepMigratedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepMigrated", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepMigratedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepMigrated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepMigrated, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepMigrated", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepMigrated) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepMigrated(log types.Log) (*KeeperRegistryLogicUpkeepMigrated, error) { - event := new(KeeperRegistryLogicUpkeepMigrated) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepPausedIterator struct { - Event *KeeperRegistryLogicUpkeepPaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepPausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepPausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepPaused struct { - Id *big.Int - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepPausedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepPaused", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepPausedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepPaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepPaused, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepPaused", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepPaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepPaused(log types.Log) (*KeeperRegistryLogicUpkeepPaused, error) { - event := new(KeeperRegistryLogicUpkeepPaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepPerformedIterator struct { - Event *KeeperRegistryLogicUpkeepPerformed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepPerformedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepPerformed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepPerformed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepPerformedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepPerformedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepPerformed struct { - Id *big.Int - Success bool - From common.Address - Payment *big.Int - PerformData []byte - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool, from []common.Address) (*KeeperRegistryLogicUpkeepPerformedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var successRule []interface{} - for _, successItem := range success { - successRule = append(successRule, successItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepPerformed", idRule, successRule, fromRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepPerformedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepPerformed", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepPerformed, id []*big.Int, success []bool, from []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var successRule []interface{} - for _, successItem := range success { - successRule = append(successRule, successItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepPerformed", idRule, successRule, fromRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepPerformed) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepPerformed(log types.Log) (*KeeperRegistryLogicUpkeepPerformed, error) { - event := new(KeeperRegistryLogicUpkeepPerformed) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepReceivedIterator struct { - Event *KeeperRegistryLogicUpkeepReceived - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepReceivedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepReceived) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepReceived) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepReceivedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepReceivedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepReceived struct { - Id *big.Int - StartingBalance *big.Int - ImportedFrom common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepReceivedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepReceived", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepReceivedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepReceived", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepReceived, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepReceived", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepReceived) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepReceived(log types.Log) (*KeeperRegistryLogicUpkeepReceived, error) { - event := new(KeeperRegistryLogicUpkeepReceived) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepRegisteredIterator struct { - Event *KeeperRegistryLogicUpkeepRegistered - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepRegisteredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepRegistered) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepRegistered) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepRegisteredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepRegisteredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepRegistered struct { - Id *big.Int - ExecuteGas uint32 - Admin common.Address - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepRegisteredIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepRegistered", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepRegisteredIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepRegistered", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepRegistered, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepRegistered", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepRegistered) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepRegistered(log types.Log) (*KeeperRegistryLogicUpkeepRegistered, error) { - event := new(KeeperRegistryLogicUpkeepRegistered) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryLogicUpkeepUnpausedIterator struct { - Event *KeeperRegistryLogicUpkeepUnpaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryLogicUpkeepUnpausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryLogicUpkeepUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryLogicUpkeepUnpausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryLogicUpkeepUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryLogicUpkeepUnpaused struct { - Id *big.Int - Raw types.Log -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepUnpausedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.FilterLogs(opts, "UpkeepUnpaused", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryLogicUpkeepUnpausedIterator{contract: _KeeperRegistryLogic.contract, event: "UpkeepUnpaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepUnpaused, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistryLogic.contract.WatchLogs(opts, "UpkeepUnpaused", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryLogicUpkeepUnpaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogicFilterer) ParseUpkeepUnpaused(log types.Log) (*KeeperRegistryLogicUpkeepUnpaused, error) { - event := new(KeeperRegistryLogicUpkeepUnpaused) - if err := _KeeperRegistryLogic.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -func (_KeeperRegistryLogic *KeeperRegistryLogic) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistryLogic.abi.Events["ConfigSet"].ID: - return _KeeperRegistryLogic.ParseConfigSet(log) - case _KeeperRegistryLogic.abi.Events["FundsAdded"].ID: - return _KeeperRegistryLogic.ParseFundsAdded(log) - case _KeeperRegistryLogic.abi.Events["FundsWithdrawn"].ID: - return _KeeperRegistryLogic.ParseFundsWithdrawn(log) - case _KeeperRegistryLogic.abi.Events["KeepersUpdated"].ID: - return _KeeperRegistryLogic.ParseKeepersUpdated(log) - case _KeeperRegistryLogic.abi.Events["OwnerFundsWithdrawn"].ID: - return _KeeperRegistryLogic.ParseOwnerFundsWithdrawn(log) - case _KeeperRegistryLogic.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistryLogic.ParseOwnershipTransferRequested(log) - case _KeeperRegistryLogic.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistryLogic.ParseOwnershipTransferred(log) - case _KeeperRegistryLogic.abi.Events["Paused"].ID: - return _KeeperRegistryLogic.ParsePaused(log) - case _KeeperRegistryLogic.abi.Events["PayeeshipTransferRequested"].ID: - return _KeeperRegistryLogic.ParsePayeeshipTransferRequested(log) - case _KeeperRegistryLogic.abi.Events["PayeeshipTransferred"].ID: - return _KeeperRegistryLogic.ParsePayeeshipTransferred(log) - case _KeeperRegistryLogic.abi.Events["PaymentWithdrawn"].ID: - return _KeeperRegistryLogic.ParsePaymentWithdrawn(log) - case _KeeperRegistryLogic.abi.Events["Unpaused"].ID: - return _KeeperRegistryLogic.ParseUnpaused(log) - case _KeeperRegistryLogic.abi.Events["UpkeepAdminTransferRequested"].ID: - return _KeeperRegistryLogic.ParseUpkeepAdminTransferRequested(log) - case _KeeperRegistryLogic.abi.Events["UpkeepAdminTransferred"].ID: - return _KeeperRegistryLogic.ParseUpkeepAdminTransferred(log) - case _KeeperRegistryLogic.abi.Events["UpkeepCanceled"].ID: - return _KeeperRegistryLogic.ParseUpkeepCanceled(log) - case _KeeperRegistryLogic.abi.Events["UpkeepCheckDataUpdated"].ID: - return _KeeperRegistryLogic.ParseUpkeepCheckDataUpdated(log) - case _KeeperRegistryLogic.abi.Events["UpkeepGasLimitSet"].ID: - return _KeeperRegistryLogic.ParseUpkeepGasLimitSet(log) - case _KeeperRegistryLogic.abi.Events["UpkeepMigrated"].ID: - return _KeeperRegistryLogic.ParseUpkeepMigrated(log) - case _KeeperRegistryLogic.abi.Events["UpkeepPaused"].ID: - return _KeeperRegistryLogic.ParseUpkeepPaused(log) - case _KeeperRegistryLogic.abi.Events["UpkeepPerformed"].ID: - return _KeeperRegistryLogic.ParseUpkeepPerformed(log) - case _KeeperRegistryLogic.abi.Events["UpkeepReceived"].ID: - return _KeeperRegistryLogic.ParseUpkeepReceived(log) - case _KeeperRegistryLogic.abi.Events["UpkeepRegistered"].ID: - return _KeeperRegistryLogic.ParseUpkeepRegistered(log) - case _KeeperRegistryLogic.abi.Events["UpkeepUnpaused"].ID: - return _KeeperRegistryLogic.ParseUpkeepUnpaused(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistryLogicConfigSet) Topic() common.Hash { - return common.HexToHash("0xfe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de325") -} - -func (KeeperRegistryLogicFundsAdded) Topic() common.Hash { - return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") -} - -func (KeeperRegistryLogicFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0xf3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318") -} - -func (KeeperRegistryLogicKeepersUpdated) Topic() common.Hash { - return common.HexToHash("0x056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f") -} - -func (KeeperRegistryLogicOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - -func (KeeperRegistryLogicOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistryLogicOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (KeeperRegistryLogicPaused) Topic() common.Hash { - return common.HexToHash("0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258") -} - -func (KeeperRegistryLogicPayeeshipTransferRequested) Topic() common.Hash { - return common.HexToHash("0x84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e38367") -} - -func (KeeperRegistryLogicPayeeshipTransferred) Topic() common.Hash { - return common.HexToHash("0x78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b3") -} - -func (KeeperRegistryLogicPaymentWithdrawn) Topic() common.Hash { - return common.HexToHash("0x9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698") -} - -func (KeeperRegistryLogicUnpaused) Topic() common.Hash { - return common.HexToHash("0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa") -} - -func (KeeperRegistryLogicUpkeepAdminTransferRequested) Topic() common.Hash { - return common.HexToHash("0xb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b35") -} - -func (KeeperRegistryLogicUpkeepAdminTransferred) Topic() common.Hash { - return common.HexToHash("0x5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c") -} - -func (KeeperRegistryLogicUpkeepCanceled) Topic() common.Hash { - return common.HexToHash("0x91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f791181") -} - -func (KeeperRegistryLogicUpkeepCheckDataUpdated) Topic() common.Hash { - return common.HexToHash("0x7b778136e5211932b51a145badd01959415e79e051a933604b3d323f862dcabf") -} - -func (KeeperRegistryLogicUpkeepGasLimitSet) Topic() common.Hash { - return common.HexToHash("0xc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c") -} - -func (KeeperRegistryLogicUpkeepMigrated) Topic() common.Hash { - return common.HexToHash("0xb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff") -} - -func (KeeperRegistryLogicUpkeepPaused) Topic() common.Hash { - return common.HexToHash("0x8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f") -} - -func (KeeperRegistryLogicUpkeepPerformed) Topic() common.Hash { - return common.HexToHash("0xcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6") -} - -func (KeeperRegistryLogicUpkeepReceived) Topic() common.Hash { - return common.HexToHash("0x74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71") -} - -func (KeeperRegistryLogicUpkeepRegistered) Topic() common.Hash { - return common.HexToHash("0xbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012") -} - -func (KeeperRegistryLogicUpkeepUnpaused) Topic() common.Hash { - return common.HexToHash("0x7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a47456") -} - -func (_KeeperRegistryLogic *KeeperRegistryLogic) Address() common.Address { - return _KeeperRegistryLogic.address -} - -type KeeperRegistryLogicInterface interface { - ARBNITROORACLE(opts *bind.CallOpts) (common.Address, error) - - FASTGASFEED(opts *bind.CallOpts) (common.Address, error) - - LINK(opts *bind.CallOpts) (common.Address, error) - - LINKETHFEED(opts *bind.CallOpts) (common.Address, error) - - OPTIMISMORACLE(opts *bind.CallOpts) (common.Address, error) - - PAYMENTMODEL(opts *bind.CallOpts) (uint8, error) - - REGISTRYGASOVERHEAD(opts *bind.CallOpts) (*big.Int, error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - Paused(opts *bind.CallOpts) (bool, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - AcceptPayeeship(opts *bind.TransactOpts, keeper common.Address) (*types.Transaction, error) - - AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) - - CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - CheckUpkeep(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) - - MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) - - Pause(opts *bind.TransactOpts) (*types.Transaction, error) - - ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) - - RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) - - SetKeepers(opts *bind.TransactOpts, keepers []common.Address, payees []common.Address) (*types.Transaction, error) - - SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) - - SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - TransferPayeeship(opts *bind.TransactOpts, keeper common.Address, proposed common.Address) (*types.Transaction, error) - - TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) - - Unpause(opts *bind.TransactOpts) (*types.Transaction, error) - - WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) - - WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - FilterConfigSet(opts *bind.FilterOpts) (*KeeperRegistryLogicConfigSetIterator, error) - - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicConfigSet) (event.Subscription, error) - - ParseConfigSet(log types.Log) (*KeeperRegistryLogicConfigSet, error) - - FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*KeeperRegistryLogicFundsAddedIterator, error) - - WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) - - ParseFundsAdded(log types.Log) (*KeeperRegistryLogicFundsAdded, error) - - FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicFundsWithdrawnIterator, error) - - WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicFundsWithdrawn, id []*big.Int) (event.Subscription, error) - - ParseFundsWithdrawn(log types.Log) (*KeeperRegistryLogicFundsWithdrawn, error) - - FilterKeepersUpdated(opts *bind.FilterOpts) (*KeeperRegistryLogicKeepersUpdatedIterator, error) - - WatchKeepersUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicKeepersUpdated) (event.Subscription, error) - - ParseKeepersUpdated(log types.Log) (*KeeperRegistryLogicKeepersUpdated, error) - - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*KeeperRegistryLogicOwnerFundsWithdrawnIterator, error) - - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicOwnerFundsWithdrawn) (event.Subscription, error) - - ParseOwnerFundsWithdrawn(log types.Log) (*KeeperRegistryLogicOwnerFundsWithdrawn, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryLogicOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryLogicOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryLogicOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistryLogicOwnershipTransferred, error) - - FilterPaused(opts *bind.FilterOpts) (*KeeperRegistryLogicPausedIterator, error) - - WatchPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPaused) (event.Subscription, error) - - ParsePaused(log types.Log) (*KeeperRegistryLogicPaused, error) - - FilterPayeeshipTransferRequested(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryLogicPayeeshipTransferRequestedIterator, error) - - WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPayeeshipTransferRequested, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferRequested(log types.Log) (*KeeperRegistryLogicPayeeshipTransferRequested, error) - - FilterPayeeshipTransferred(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryLogicPayeeshipTransferredIterator, error) - - WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPayeeshipTransferred, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferred(log types.Log) (*KeeperRegistryLogicPayeeshipTransferred, error) - - FilterPaymentWithdrawn(opts *bind.FilterOpts, keeper []common.Address, amount []*big.Int, to []common.Address) (*KeeperRegistryLogicPaymentWithdrawnIterator, error) - - WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicPaymentWithdrawn, keeper []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) - - ParsePaymentWithdrawn(log types.Log) (*KeeperRegistryLogicPaymentWithdrawn, error) - - FilterUnpaused(opts *bind.FilterOpts) (*KeeperRegistryLogicUnpausedIterator, error) - - WatchUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUnpaused) (event.Subscription, error) - - ParseUnpaused(log types.Log) (*KeeperRegistryLogicUnpaused, error) - - FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryLogicUpkeepAdminTransferRequestedIterator, error) - - WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseUpkeepAdminTransferRequested(log types.Log) (*KeeperRegistryLogicUpkeepAdminTransferRequested, error) - - FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryLogicUpkeepAdminTransferredIterator, error) - - WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseUpkeepAdminTransferred(log types.Log) (*KeeperRegistryLogicUpkeepAdminTransferred, error) - - FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*KeeperRegistryLogicUpkeepCanceledIterator, error) - - WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) - - ParseUpkeepCanceled(log types.Log) (*KeeperRegistryLogicUpkeepCanceled, error) - - FilterUpkeepCheckDataUpdated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepCheckDataUpdatedIterator, error) - - WatchUpkeepCheckDataUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepCheckDataUpdated, id []*big.Int) (event.Subscription, error) - - ParseUpkeepCheckDataUpdated(log types.Log) (*KeeperRegistryLogicUpkeepCheckDataUpdated, error) - - FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepGasLimitSetIterator, error) - - WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) - - ParseUpkeepGasLimitSet(log types.Log) (*KeeperRegistryLogicUpkeepGasLimitSet, error) - - FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepMigratedIterator, error) - - WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepMigrated, id []*big.Int) (event.Subscription, error) - - ParseUpkeepMigrated(log types.Log) (*KeeperRegistryLogicUpkeepMigrated, error) - - FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepPausedIterator, error) - - WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepPaused, id []*big.Int) (event.Subscription, error) - - ParseUpkeepPaused(log types.Log) (*KeeperRegistryLogicUpkeepPaused, error) - - FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool, from []common.Address) (*KeeperRegistryLogicUpkeepPerformedIterator, error) - - WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepPerformed, id []*big.Int, success []bool, from []common.Address) (event.Subscription, error) - - ParseUpkeepPerformed(log types.Log) (*KeeperRegistryLogicUpkeepPerformed, error) - - FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepReceivedIterator, error) - - WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepReceived, id []*big.Int) (event.Subscription, error) - - ParseUpkeepReceived(log types.Log) (*KeeperRegistryLogicUpkeepReceived, error) - - FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepRegisteredIterator, error) - - WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepRegistered, id []*big.Int) (event.Subscription, error) - - ParseUpkeepRegistered(log types.Log) (*KeeperRegistryLogicUpkeepRegistered, error) - - FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryLogicUpkeepUnpausedIterator, error) - - WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryLogicUpkeepUnpaused, id []*big.Int) (event.Subscription, error) - - ParseUpkeepUnpaused(log types.Log) (*KeeperRegistryLogicUpkeepUnpaused, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go b/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go deleted file mode 100644 index 027bfc274e2..00000000000 --- a/core/gethwrappers/generated/keeper_registry_wrapper1_2/keeper_registry_wrapper1_2.go +++ /dev/null @@ -1,3489 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package keeper_registry_wrapper1_2 - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type Config struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 - BlockCountPerTurn *big.Int - CheckGasLimit uint32 - StalenessSeconds *big.Int - GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int - MaxPerformGas uint32 - FallbackGasPrice *big.Int - FallbackLinkPrice *big.Int - Transcoder common.Address - Registrar common.Address -} - -type State struct { - Nonce uint32 - OwnerLinkBalance *big.Int - ExpectedLinkBalance *big.Int - NumUpkeeps *big.Int -} - -var KeeperRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"link\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"linkEthFeed\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"fastGasFeed\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeepersMustTakeTurns\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveKeepers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotActive\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"KeepersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"FAST_GAS_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_ETH_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxLinkPayment\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adjustedGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkEth\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getKeeperInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistry1_2.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"}],\"internalType\":\"structState\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"lastKeeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setKeepers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistry1_2.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x60e06040523480156200001157600080fd5b506040516200671438038062006714833981016040819052620000349162000577565b33806000816200008b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615620000be57620000be8162000107565b50506001600255506003805460ff191690556001600160601b0319606085811b821660805284811b821660a05283901b1660c052620000fd81620001b3565b50505050620007fa565b6001600160a01b038116331415620001625760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000082565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620001bd620004a8565b600d5460e082015163ffffffff91821691161015620001ef57604051630e6af04160e21b815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516001600160601b031681526020018260e0015163ffffffff168152602001600c60010160049054906101000a900463ffffffff1663ffffffff16815250600c60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816001600160601b0302191690836001600160601b0316021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600e81905550806101200151600f81905550806101400151601260006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806101600151601360006101000a8154816001600160a01b0302191690836001600160a01b031602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de325816040516200049d9190620006c3565b60405180910390a150565b6000546001600160a01b03163314620005045760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000082565b565b80516001600160a01b03811681146200051e57600080fd5b919050565b805161ffff811681146200051e57600080fd5b805162ffffff811681146200051e57600080fd5b805163ffffffff811681146200051e57600080fd5b80516001600160601b03811681146200051e57600080fd5b6000806000808486036101e08112156200059057600080fd5b6200059b8662000506565b9450620005ab6020870162000506565b9350620005bb6040870162000506565b925061018080605f1983011215620005d257600080fd5b620005dc620007c2565b9150620005ec606088016200054a565b8252620005fc608088016200054a565b60208301526200060f60a0880162000536565b60408301526200062260c088016200054a565b60608301526200063560e0880162000536565b60808301526101006200064a81890162000523565b60a08401526101206200065f818a016200055f565b60c085015261014062000674818b016200054a565b60e0860152610160808b015184870152848b0151838701526200069b6101a08c0162000506565b82870152620006ae6101c08c0162000506565b90860152509699959850939650909450505050565b815163ffffffff16815261018081016020830151620006ea602084018263ffffffff169052565b50604083015162000702604084018262ffffff169052565b5060608301516200071b606084018263ffffffff169052565b50608083015162000733608084018262ffffff169052565b5060a08301516200074a60a084018261ffff169052565b5060c08301516200076660c08401826001600160601b03169052565b5060e08301516200077f60e084018263ffffffff169052565b5061010083810151908301526101208084015190830152610140808401516001600160a01b03908116918401919091526101609384015116929091019190915290565b60405161018081016001600160401b0381118282101715620007f457634e487b7160e01b600052604160045260246000fd5b60405290565b60805160601c60a05160601c60c05160601c615e9b62000879600039600081816104240152614126015260008181610575015261420701526000818161030401528181610e10015281816110d10152818161192201528181611cad01528181611da1015281816121990152818161251701526125aa0152615e9b6000f3fe608060405234801561001057600080fd5b506004361061025c5760003560e01c806393f0c1fc11610145578063b7fdb436116100bd578063da5c67411161008c578063ef47a0ce11610071578063ef47a0ce1461066a578063f2fde38b1461067d578063faa3e9961461069057600080fd5b8063da5c674114610636578063eb5dcd6c1461065757600080fd5b8063b7fdb436146105c5578063c41b813a146105d8578063c7c3a19a146105fc578063c80480221461062357600080fd5b8063a72aa27e11610114578063b121e147116100f9578063b121e14714610597578063b657bc9c146105aa578063b79550be146105bd57600080fd5b8063a72aa27e1461055d578063ad1783611461057057600080fd5b806393f0c1fc146104f4578063948108f714610524578063a4c0ed3614610537578063a710b2211461054a57600080fd5b80635c975abb116101d85780637d9b97e0116101a757806385c1b0ba1161018c57806385c1b0ba146104b05780638da5cb5b146104c35780638e86139b146104e157600080fd5b80637d9b97e0146104a05780638456cb59146104a857600080fd5b80635c975abb1461045b578063744bfe611461047257806379ba5097146104855780637bbaf1ea1461048d57600080fd5b80631b6b6d231161022f5780633f4ba83a116102145780633f4ba83a146104175780634584a4191461041f57806348013d7b1461044657600080fd5b80631b6b6d23146102ff5780631e12b8a51461034b57600080fd5b806306e3b63214610261578063181f5a771461028a5780631865c57d146102d3578063187256e8146102ea575b600080fd5b61027461026f36600461531f565b6106d6565b604051610281919061581d565b60405180910390f35b6102c66040518060400160405280601481526020017f4b6565706572526567697374727920312e322e3000000000000000000000000081525081565b6040516102819190615861565b6102db6107d2565b604051610281939291906159ee565b6102fd6102f8366004614dfc565b610a8a565b005b6103267f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610281565b6103d7610359366004614dae565b73ffffffffffffffffffffffffffffffffffffffff90811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff1692810183905260019091015460ff16151592018290529192909190565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845291151560208401526bffffffffffffffffffffffff1690820152606001610281565b6102fd610afb565b6103267f000000000000000000000000000000000000000000000000000000000000000081565b61044e600081565b60405161028191906159a4565b60035460ff165b6040519015158152602001610281565b6102fd6104803660046152b0565b610b0d565b6102fd610e99565b61046261049b3660046152d3565b610f9b565b6102fd610ff9565b6102fd611167565b6102fd6104be366004614f67565b611177565b60005473ffffffffffffffffffffffffffffffffffffffff16610326565b6102fd6104ef366004615108565b611953565b61050761050236600461527e565b611b53565b6040516bffffffffffffffffffffffff9091168152602001610281565b6102fd610532366004615364565b611b87565b6102fd610545366004614e37565b611d89565b6102fd610558366004614dc9565b611f84565b6102fd61056b366004615341565b61221e565b6103267f000000000000000000000000000000000000000000000000000000000000000081565b6102fd6105a5366004614dae565b6123c5565b6105076105b836600461527e565b6124bd565b6102fd6124de565b6102fd6105d3366004614f07565b612649565b6105eb6105e63660046152b0565b6129aa565b604051610281959493929190615874565b61060f61060a36600461527e565b612c5f565b604051610281989796959493929190615613565b6102fd61063136600461527e565b612dea565b610649610644366004614e91565b612fe0565b604051908152602001610281565b6102fd610665366004614dc9565b6131d7565b6102fd6106783660046151a0565b613336565b6102fd61068b366004614dae565b613682565b6106c961069e366004614dae565b73ffffffffffffffffffffffffffffffffffffffff166000908152600b602052604090205460ff1690565b604051610281919061598a565b606060006106e46005613696565b905080841061071f576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b826107315761072e8482615c82565b92505b60008367ffffffffffffffff81111561074c5761074c615e5f565b604051908082528060200260200182016040528015610775578160200160208202803683370190505b50905060005b848110156107c7576107986107908288615bc2565b6005906136a0565b8282815181106107aa576107aa615e30565b6020908102919091010152806107bf81615d46565b91505061077b565b509150505b92915050565b6040805160808101825260008082526020820181905291810182905260608101919091526040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081018290526101608101919091526040805161012081018252600c5463ffffffff8082168352640100000000808304821660208086019190915262ffffff6801000000000000000085048116868801526b010000000000000000000000850484166060878101919091526f010000000000000000000000000000008604909116608087015261ffff720100000000000000000000000000000000000086041660a08701526bffffffffffffffffffffffff74010000000000000000000000000000000000000000909504851660c0870152600d5480851660e0880152929092049092166101008501819052875260105490921690860152601154928501929092526109546005613696565b606080860191909152815163ffffffff908116855260208084015182168187015260408085015162ffffff90811682890152858501518416948801949094526080808601519094169387019390935260a08085015161ffff169087015260c0808501516bffffffffffffffffffffffff169087015260e08085015190921691860191909152600e54610100860152600f5461012086015260125473ffffffffffffffffffffffffffffffffffffffff90811661014087015260135416610160860152600480548351818402810184019094528084528793879390918391830182828015610a7757602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610a4c575b5050505050905093509350935050909192565b610a926136b3565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600b6020526040902080548291907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001836003811115610af257610af2615dd2565b02179055505050565b610b036136b3565b610b0b613734565b565b8073ffffffffffffffffffffffffffffffffffffffff8116610b5b576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206002015483906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314610bcd576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000848152600760205260409020600101544364010000000090910467ffffffffffffffff161115610c2b576040517fff84e5dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c54600085815260076020526040812080546002909101546bffffffffffffffffffffffff740100000000000000000000000000000000000000009094048416939182169291169083821015610caf57610c868285615c99565b9050826bffffffffffffffffffffffff16816bffffffffffffffffffffffff161115610caf5750815b6000610cbb8285615c99565b60008a815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000169055601054909150610d0e9083906bffffffffffffffffffffffff16615bda565b601080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154610d5691831690615c82565b601155604080516bffffffffffffffffffffffff8316815273ffffffffffffffffffffffffffffffffffffffff8a1660208201528a917ff3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318910160405180910390a26040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301526bffffffffffffffffffffffff831660248301527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044015b602060405180830381600087803b158015610e5557600080fd5b505af1158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d919061509f565b50505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610f1f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6000610fa56137b1565b610ff1610fec338686868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506001925061381e915050565b613918565b949350505050565b6110016136b3565b6010546011546bffffffffffffffffffffffff90911690611023908290615c82565b601155601080547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690556040516bffffffffffffffffffffffff821681527f1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f19060200160405180910390a16040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526bffffffffffffffffffffffff821660248201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a9059cbb906044015b602060405180830381600087803b15801561112b57600080fd5b505af115801561113f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611163919061509f565b5050565b61116f6136b3565b610b0b613d39565b600173ffffffffffffffffffffffffffffffffffffffff82166000908152600b602052604090205460ff1660038111156111b3576111b3615dd2565b141580156111fb5750600373ffffffffffffffffffffffffffffffffffffffff82166000908152600b602052604090205460ff1660038111156111f8576111f8615dd2565b14155b15611232576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60125473ffffffffffffffffffffffffffffffffffffffff16611281576040517fd12d7d8d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b816112b8576040517f2c2fc94100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081018290526000808567ffffffffffffffff81111561130c5761130c615e5f565b60405190808252806020026020018201604052801561133f57816020015b606081526020019060019003908161132a5790505b50905060008667ffffffffffffffff81111561135d5761135d615e5f565b6040519080825280602002602001820160405280156113e257816020015b6040805160e08101825260008082526020808301829052928201819052606082018190526080820181905260a0820181905260c082015282527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90920191018161137b5790505b50905060005b878110156116e25788888281811061140257611402615e30565b60209081029290920135600081815260078452604090819020815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811698840198909852600184015463ffffffff81169584019590955267ffffffffffffffff6401000000008604166060840152938190048716608083015260029092015492831660a0820152910490931660c084018190529098509196505033146114f5576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606085015167ffffffffffffffff9081161461153d576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8482828151811061155057611550615e30565b6020026020010181905250600a6000878152602001908152602001600020805461157990615cf2565b80601f01602080910402602001604051908101604052809291908181526020018280546115a590615cf2565b80156115f25780601f106115c7576101008083540402835291602001916115f2565b820191906000526020600020905b8154815290600101906020018083116115d557829003601f168201915b505050505083828151811061160957611609615e30565b6020908102919091010152845161162e906bffffffffffffffffffffffff1685615bc2565b600087815260076020908152604080832083815560018101849055600201839055600a9091528120919550611663919061491a565b61166e600587613d94565b508451604080516bffffffffffffffffffffffff909216825273ffffffffffffffffffffffffffffffffffffffff8916602083015287917fb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff910160405180910390a2806116da81615d46565b9150506113e8565b50826011546116f19190615c82565b60115560405160009061170e908a908a90859087906020016156cf565b60405160208183030381529060405290508673ffffffffffffffffffffffffffffffffffffffff16638e86139b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c71249ab60008b73ffffffffffffffffffffffffffffffffffffffff166348013d7b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117c157600080fd5b505afa1580156117d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f9919061517f565b866040518463ffffffff1660e01b8152600401611818939291906159b2565b60006040518083038186803b15801561183057600080fd5b505afa158015611844573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261188a919081019061514a565b6040518263ffffffff1660e01b81526004016118a69190615861565b600060405180830381600087803b1580156118c057600080fd5b505af11580156118d4573d6000803e3d6000fd5b50506040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a81166004830152602482018890527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150604401610e3b565b6002336000908152600b602052604090205460ff16600381111561197957611979615dd2565b141580156119ab57506003336000908152600b602052604090205460ff1660038111156119a8576119a8615dd2565b14155b156119e2576040517f0ebeec3c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080806119f284860186614fbb565b92509250925060005b8351811015611b4b57611ab8848281518110611a1957611a19615e30565b6020026020010151848381518110611a3357611a33615e30565b602002602001015160800151858481518110611a5157611a51615e30565b602002602001015160400151868581518110611a6f57611a6f615e30565b602002602001015160c00151878681518110611a8d57611a8d615e30565b602002602001015160000151878781518110611aab57611aab615e30565b6020026020010151613da0565b838181518110611aca57611aca615e30565b60200260200101517f74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71848381518110611b0557611b05615e30565b60209081029190910181015151604080516bffffffffffffffffffffffff909216825233928201929092520160405180910390a280611b4381615d46565b9150506119fb565b505050505050565b6000806000611b606140f3565b915091506000611b718360006142ee565b9050611b7e858284614333565b95945050505050565b6000828152600760205260409020600101548290640100000000900467ffffffffffffffff90811614611be6576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600083815260076020526040902054611c0e9083906bffffffffffffffffffffffff16615bda565b600084815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff928316179055601154611c6291841690615bc2565b6011556040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526bffffffffffffffffffffffff831660448201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401602060405180830381600087803b158015611d0657600080fd5b505af1158015611d1a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d3e919061509f565b506040516bffffffffffffffffffffffff83168152339084907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a3505050565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614611df8576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208114611e32576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e408284018461527e565b600081815260076020526040902060010154909150640100000000900467ffffffffffffffff90811614611ea0576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600081815260076020526040902054611ec89085906bffffffffffffffffffffffff16615bda565b600082815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff92909216919091179055601154611f1f908590615bc2565b6011556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b8073ffffffffffffffffffffffffffffffffffffffff8116611fd2576040517f9c8d2cd200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff16928101929092526001015460ff16151591810191909152903314612083576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff808516600090815260086020908152604090912080549092169091558101516011546120d2916bffffffffffffffffffffffff1690615c82565b60115560208082015160405133815273ffffffffffffffffffffffffffffffffffffffff808716936bffffffffffffffffffffffff90931692908816917f9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698910160405180910390a460208101516040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301526bffffffffffffffffffffffff90921660248201527f00000000000000000000000000000000000000000000000000000000000000009091169063a9059cbb90604401602060405180830381600087803b1580156121df57600080fd5b505af11580156121f3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612217919061509f565b5050505050565b6000828152600760205260409020600101548290640100000000900467ffffffffffffffff9081161461227d576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526007602052604090206002015483906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1633146122ef576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8363ffffffff1610806123105750600d5463ffffffff908116908416115b15612347576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526007602090815260409182902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff8716908117909155915191825285917fc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c910160405180910390a250505050565b73ffffffffffffffffffffffffffffffffffffffff818116600090815260096020526040902054163314612425576040517f6752e7aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff81811660008181526008602090815260408083208054337fffffffffffffffffffffffff000000000000000000000000000000000000000080831682179093556009909452828520805490921690915590519416939092849290917f78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b39190a45050565b6000818152600760205260408120600101546107cc9063ffffffff16611b53565b6124e66136b3565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16906370a082319060240160206040518083038186803b15801561256e57600080fd5b505afa158015612582573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125a69190615297565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33601154846125f39190615c82565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff90921660048301526024820152604401611111565b6126516136b3565b82811415806126605750600283105b15612697576040517fcf54c06a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b600454811015612723576000600482815481106126b9576126b9615e30565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168252600890526040902060010180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055508061271b81615d46565b91505061269a565b5060005b8381101561295957600085858381811061274357612743615e30565b90506020020160208101906127589190614dae565b73ffffffffffffffffffffffffffffffffffffffff80821660009081526008602052604081208054939450929091169086868681811061279a5761279a615e30565b90506020020160208101906127af9190614dae565b905073ffffffffffffffffffffffffffffffffffffffff81161580612842575073ffffffffffffffffffffffffffffffffffffffff82161580159061282057508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015612842575073ffffffffffffffffffffffffffffffffffffffff81811614155b15612879576040517fb387a23800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183015460ff16156128b8576040517f357d0cc400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600183810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016909117905573ffffffffffffffffffffffffffffffffffffffff818116146129425782547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82161783555b50505050808061295190615d46565b915050612727565b5061296660048585614954565b507f056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f8484848460405161299c949392919061569d565b60405180910390a150505050565b60606000806000806129ba614410565b6000878152600760209081526040808320815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811684880152600185015463ffffffff81168588015267ffffffffffffffff64010000000082041660608601528390048116608085015260029094015490811660a08401520490911660c08201528a8452600a90925280832090519192917f6e04ff0d0000000000000000000000000000000000000000000000000000000091612a9a916024016158ab565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050600080836080015173ffffffffffffffffffffffffffffffffffffffff16600c600001600b9054906101000a900463ffffffff1663ffffffff1684604051612b4191906155f7565b60006040518083038160008787f1925050503d8060008114612b7f576040519150601f19603f3d011682016040523d82523d6000602084013e612b84565b606091505b509150915081612bc257806040517f96c36235000000000000000000000000000000000000000000000000000000008152600401610f169190615861565b80806020019051810190612bd691906150ba565b9950915081612c11576040517f865676e300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000612c208b8d8c600061381e565b9050612c35858260000151836060015161446a565b6060810151608082015160a083015160c0909301519b9e919d509b50909998509650505050505050565b6000818152600760209081526040808320815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c01000000000000000000000000928390048116848801908152600186015463ffffffff811686890181905267ffffffffffffffff64010000000083041660608881019182529287900485166080890181905260029099015495861660a089019081529690950490931660c087019081528b8b52600a9099529689208551915198519351945181548b9a8b998a998a998a998a9992989397929692959394939092908690612d4e90615cf2565b80601f0160208091040260200160405190810160405280929190818152602001828054612d7a90615cf2565b8015612dc75780601f10612d9c57610100808354040283529160200191612dc7565b820191906000526020600020905b815481529060010190602001808311612daa57829003601f168201915b505050505095509850985098509850985098509850985050919395975091939597565b60008181526007602052604081206001015467ffffffffffffffff6401000000009091048116919082141590612e3560005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16149050818015612e855750808015612e835750438367ffffffffffffffff16115b155b15612ebc576040517ffbc0357800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80158015612f0157506000848152600760205260409020600201546c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff163314155b15612f38576040517ffbdb8e5600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b4381612f4c57612f49603282615bc2565b90505b600085815260076020526040902060010180547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff1664010000000067ffffffffffffffff841602179055612fa1600586613d94565b5060405167ffffffffffffffff82169086907f91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f79118190600090a35050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff163314801590613021575060135473ffffffffffffffffffffffffffffffffffffffff163314155b15613058576040517fd48b678b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b613063600143615c82565b600d5460408051924060208401523060601b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001690830152640100000000900460e01b7fffffffff000000000000000000000000000000000000000000000000000000001660548201526058016040516020818303038152906040528051906020012060001c905061313081878787600088888080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613da092505050565b600d8054640100000000900463ffffffff1690600461314e83615d7f565b91906101000a81548163ffffffff021916908363ffffffff16021790555050807fbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d01286866040516131c692919063ffffffff92909216825273ffffffffffffffffffffffffffffffffffffffff16602082015260400190565b60405180910390a295945050505050565b73ffffffffffffffffffffffffffffffffffffffff828116600090815260086020526040902054163314613237576040517fcebf515b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8116331415613287576040517f8c8728c700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8281166000908152600960205260409020548116908216146111635773ffffffffffffffffffffffffffffffffffffffff82811660008181526009602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169486169485179055513392917f84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e3836791a45050565b61333e6136b3565b600d5460e082015163ffffffff91821691161015613388576040517f39abc10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516bffffffffffffffffffffffff1681526020018260e0015163ffffffff168152602001600c60010160049054906101000a900463ffffffff1663ffffffff16815250600c60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600e81905550806101200151600f81905550806101400151601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806101600151601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de3258160405161367791906159df565b60405180910390a150565b61368a6136b3565b61369381614584565b50565b60006107cc825490565b60006136ac838361467a565b9392505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610f16565b61373c6146a4565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390a1565b60035460ff1615610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401610f16565b6138746040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60008481526007602052604081206001015463ffffffff1690806138966140f3565b9150915060006138a683876142ee565b905060006138b5858385614333565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff8d168152602081018c90529081018a90526bffffffffffffffffffffffff909116606082015260808101959095525060a084015260c0830152509050949350505050565b6000613922614710565b602082810151600081815260079092526040909120600101544364010000000090910467ffffffffffffffff1611613986576040517fd096219c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602080840151600090815260078252604090819020815160e08101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811696840196909652600184015463ffffffff81169584019590955267ffffffffffffffff640100000000860416606080850191909152948290048616608084015260029093015492831660a083015290910490921660c0830152845190850151613a4a91839161446a565b60005a90506000634585e33b60e01b8660400151604051602401613a6e9190615861565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050613ae08660800151846080015183614782565b94505a613aed9083615c82565b91506000613b04838860a001518960c00151614333565b602080890151600090815260079091526040902054909150613b359082906bffffffffffffffffffffffff16615c99565b6020888101805160009081526007909252604080832080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff95861617905590518252902060020154613b9891839116615bda565b60208881018051600090815260078352604080822060020180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9687161790558b5192518252808220805486166c0100000000000000000000000073ffffffffffffffffffffffffffffffffffffffff958616021790558b5190921681526008909252902054613c5191839174010000000000000000000000000000000000000000900416615bda565b60086000896000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550866000015173ffffffffffffffffffffffffffffffffffffffff1686151588602001517fcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6848b60400151604051613d1d929190615a95565b60405180910390a45050505050613d346001600255565b919050565b613d416137b1565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586137873390565b60006136ac83836147ce565b613da86137b1565b73ffffffffffffffffffffffffffffffffffffffff85163b613df6576040517f09ee12d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108fc8463ffffffff161080613e175750600d5463ffffffff908116908516115b15613e4e576040517f14c237fb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040518060e00160405280836bffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020018563ffffffff16815260200167ffffffffffffffff801681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200160006bffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152506007600088815260200190815260200160002060008201518160000160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550602082015181600001600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160006101000a81548163ffffffff021916908363ffffffff16021790555060608201518160010160046101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550608082015181600101600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160020160006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060c082015181600201600c6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050816bffffffffffffffffffffffff166011546140bc9190615bc2565b6011556000868152600a6020908152604090912082516140de928401906149dc565b506140ea6005876148c1565b50505050505050565b6000806000600c600001600f9054906101000a900462ffffff1662ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561418a57600080fd5b505afa15801561419e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906141c29190615387565b5094509092508491505080156141e657506141dd8242615c82565b8463ffffffff16105b806141f2575060008113155b1561420157600e549550614205565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561426b57600080fd5b505afa15801561427f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906142a39190615387565b5094509092508491505080156142c757506142be8242615c82565b8463ffffffff16105b806142d3575060008113155b156142e257600f5494506142e6565b8094505b505050509091565b600c54600090614318907201000000000000000000000000000000000000900461ffff1684615c45565b90508180156143265750803a105b156107cc57503a92915050565b6000806143436201388086615bc2565b61434d9085615c45565b600c5490915060009061436a9063ffffffff16633b9aca00615bc2565b600c5490915060009061439090640100000000900463ffffffff1664e8d4a51000615c45565b85836143a086633b9aca00615c45565b6143aa9190615c45565b6143b49190615c0a565b6143be9190615bc2565b90506b033b2e3c9fd0803ce8000000811115614406576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9695505050505050565b321580159061443357503273111111111111111111111111111111111111111114155b15610b0b576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090206001015460ff166144cc576040517fcfbacfd800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82516bffffffffffffffffffffffff16811115614515576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff16141561457f576040517f06bc104000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b73ffffffffffffffffffffffffffffffffffffffff8116331415614604576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610f16565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600082600001828154811061469157614691615e30565b9060005260206000200154905092915050565b60035460ff16610b0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610f16565b60028054141561477c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610f16565b60028055565b60005a61138881101561479457600080fd5b6113888103905084604082048203116147ac57600080fd5b50823b6147b857600080fd5b60008083516020850160008789f1949350505050565b600081815260018301602052604081205480156148b75760006147f2600183615c82565b855490915060009061480690600190615c82565b905081811461486b57600086600001828154811061482657614826615e30565b906000526020600020015490508087600001848154811061484957614849615e30565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061487c5761487c615e01565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506107cc565b60009150506107cc565b60008181526001830160205260408120546136ac90849084908490614912575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556107cc565b5060006107cc565b50805461492690615cf2565b6000825580601f10614936575050565b601f0160209004906000526020600020908101906136939190614a50565b8280548282559060005260206000209081019282156149cc579160200282015b828111156149cc5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff843516178255602090920191600190910190614974565b506149d8929150614a50565b5090565b8280546149e890615cf2565b90600052602060002090601f016020900481019282614a0a57600085556149cc565b82601f10614a2357805160ff19168380011785556149cc565b828001600101855582156149cc579182015b828111156149cc578251825591602001919060010190614a35565b5b808211156149d85760008155600101614a51565b803573ffffffffffffffffffffffffffffffffffffffff81168114613d3457600080fd5b60008083601f840112614a9b57600080fd5b50813567ffffffffffffffff811115614ab357600080fd5b6020830191508360208260051b8501011115614ace57600080fd5b9250929050565b600082601f830112614ae657600080fd5b81356020614afb614af683615b58565b615b09565b80838252828201915082860187848660051b8901011115614b1b57600080fd5b60005b85811015614b9b57813567ffffffffffffffff811115614b3d57600080fd5b8801603f81018a13614b4e57600080fd5b858101356040614b60614af683615b7c565b8281528c82848601011115614b7457600080fd5b828285018a8301376000928101890192909252508552509284019290840190600101614b1e565b5090979650505050505050565b600082601f830112614bb957600080fd5b81356020614bc9614af683615b58565b8281528181019085830160e080860288018501891015614be857600080fd5b60005b86811015614c9a5781838b031215614c0257600080fd5b614c0a615abc565b614c1384614d92565b8152614c20878501614a65565b878201526040614c31818601614d64565b9082015260608481013567ffffffffffffffff81168114614c5157600080fd5b908201526080614c62858201614a65565b9082015260a0614c73858201614d92565b9082015260c0614c84858201614a65565b9082015285529385019391810191600101614beb565b509198975050505050505050565b80518015158114613d3457600080fd5b60008083601f840112614cca57600080fd5b50813567ffffffffffffffff811115614ce257600080fd5b602083019150836020828501011115614ace57600080fd5b600082601f830112614d0b57600080fd5b8151614d19614af682615b7c565b818152846020838601011115614d2e57600080fd5b610ff1826020830160208701615cc6565b803561ffff81168114613d3457600080fd5b803562ffffff81168114613d3457600080fd5b803563ffffffff81168114613d3457600080fd5b805169ffffffffffffffffffff81168114613d3457600080fd5b80356bffffffffffffffffffffffff81168114613d3457600080fd5b600060208284031215614dc057600080fd5b6136ac82614a65565b60008060408385031215614ddc57600080fd5b614de583614a65565b9150614df360208401614a65565b90509250929050565b60008060408385031215614e0f57600080fd5b614e1883614a65565b9150602083013560048110614e2c57600080fd5b809150509250929050565b60008060008060608587031215614e4d57600080fd5b614e5685614a65565b935060208501359250604085013567ffffffffffffffff811115614e7957600080fd5b614e8587828801614cb8565b95989497509550505050565b600080600080600060808688031215614ea957600080fd5b614eb286614a65565b9450614ec060208701614d64565b9350614ece60408701614a65565b9250606086013567ffffffffffffffff811115614eea57600080fd5b614ef688828901614cb8565b969995985093965092949392505050565b60008060008060408587031215614f1d57600080fd5b843567ffffffffffffffff80821115614f3557600080fd5b614f4188838901614a89565b90965094506020870135915080821115614f5a57600080fd5b50614e8587828801614a89565b600080600060408486031215614f7c57600080fd5b833567ffffffffffffffff811115614f9357600080fd5b614f9f86828701614a89565b9094509250614fb2905060208501614a65565b90509250925092565b600080600060608486031215614fd057600080fd5b833567ffffffffffffffff80821115614fe857600080fd5b818601915086601f830112614ffc57600080fd5b8135602061500c614af683615b58565b8083825282820191508286018b848660051b890101111561502c57600080fd5b600096505b8487101561504f578035835260019690960195918301918301615031565b509750508701359250508082111561506657600080fd5b61507287838801614ba8565b9350604086013591508082111561508857600080fd5b5061509586828701614ad5565b9150509250925092565b6000602082840312156150b157600080fd5b6136ac82614ca8565b600080604083850312156150cd57600080fd5b6150d683614ca8565b9150602083015167ffffffffffffffff8111156150f257600080fd5b6150fe85828601614cfa565b9150509250929050565b6000806020838503121561511b57600080fd5b823567ffffffffffffffff81111561513257600080fd5b61513e85828601614cb8565b90969095509350505050565b60006020828403121561515c57600080fd5b815167ffffffffffffffff81111561517357600080fd5b610ff184828501614cfa565b60006020828403121561519157600080fd5b8151600381106136ac57600080fd5b600061018082840312156151b357600080fd5b6151bb615ae5565b6151c483614d64565b81526151d260208401614d64565b60208201526151e360408401614d51565b60408201526151f460608401614d64565b606082015261520560808401614d51565b608082015261521660a08401614d3f565b60a082015261522760c08401614d92565b60c082015261523860e08401614d64565b60e082015261010083810135908201526101208084013590820152610140615261818501614a65565b90820152610160615273848201614a65565b908201529392505050565b60006020828403121561529057600080fd5b5035919050565b6000602082840312156152a957600080fd5b5051919050565b600080604083850312156152c357600080fd5b82359150614df360208401614a65565b6000806000604084860312156152e857600080fd5b83359250602084013567ffffffffffffffff81111561530657600080fd5b61531286828701614cb8565b9497909650939450505050565b6000806040838503121561533257600080fd5b50508035926020909101359150565b6000806040838503121561535457600080fd5b82359150614df360208401614d64565b6000806040838503121561537757600080fd5b82359150614df360208401614d92565b600080600080600060a0868803121561539f57600080fd5b6153a886614d78565b94506020860151935060408601519250606086015191506153cb60808701614d78565b90509295509295909350565b8183526000602080850194508260005b858110156154205773ffffffffffffffffffffffffffffffffffffffff61540d83614a65565b16875295820195908201906001016153e7565b509495945050505050565b600081518084526020808501808196508360051b8101915082860160005b85811015615473578284038952615461848351615480565b98850198935090840190600101615449565b5091979650505050505050565b60008151808452615498816020860160208601615cc6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b600381106154da576154da615dd2565b9052565b805163ffffffff16825260208101516154ff602084018263ffffffff169052565b506040810151615516604084018262ffffff169052565b50606081015161552e606084018263ffffffff169052565b506080810151615545608084018262ffffff169052565b5060a081015161555b60a084018261ffff169052565b5060c081015161557b60c08401826bffffffffffffffffffffffff169052565b5060e081015161559360e084018263ffffffff169052565b50610100818101519083015261012080820151908301526101408082015173ffffffffffffffffffffffffffffffffffffffff81168285015250506101608181015173ffffffffffffffffffffffffffffffffffffffff8116848301525b50505050565b60008251615609818460208701615cc6565b9190910192915050565b600061010073ffffffffffffffffffffffffffffffffffffffff808c16845263ffffffff8b1660208501528160408501526156508285018b615480565b6bffffffffffffffffffffffff998a16606086015297811660808501529590951660a08301525067ffffffffffffffff9290921660c083015290931660e090930192909252949350505050565b6040815260006156b16040830186886153d7565b82810360208401526156c48185876153d7565b979650505050505050565b60006060808352858184015260807f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff87111561570a57600080fd5b8660051b808983870137808501905081810160008152602083878403018188015281895180845260a093508385019150828b01945060005b818110156157f957855180516bffffffffffffffffffffffff1684528481015173ffffffffffffffffffffffffffffffffffffffff9081168686015260408083015163ffffffff16908601528982015167ffffffffffffffff168a860152888201511688850152858101516157c6878601826bffffffffffffffffffffffff169052565b5060c09081015173ffffffffffffffffffffffffffffffffffffffff16908401529483019460e090920191600101615742565b5050878103604089015261580d818a61542b565b9c9b505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561585557835183529284019291840191600101615839565b50909695505050505050565b6020815260006136ac6020830184615480565b60a08152600061588760a0830188615480565b90508560208301528460408301528360608301528260808301529695505050505050565b600060208083526000845481600182811c9150808316806158cd57607f831692505b858310811415615904577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b87860183815260200181801561592157600181146159505761597b565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0086168252878201965061597b565b60008b81526020902060005b868110156159755781548482015290850190890161595c565b83019750505b50949998505050505050505050565b602081016004831061599e5761599e615dd2565b91905290565b602081016107cc82846154ca565b6159bc81856154ca565b6159c960208201846154ca565b606060408201526000611b7e6060830184615480565b61018081016107cc82846154de565b600061022080830163ffffffff875116845260206bffffffffffffffffffffffff8189015116818601526040880151604086015260608801516060860152615a3960808601886154de565b6102008501929092528451908190526102408401918086019160005b81811015615a8757835173ffffffffffffffffffffffffffffffffffffffff1685529382019392820192600101615a55565b509298975050505050505050565b6bffffffffffffffffffffffff83168152604060208201526000610ff16040830184615480565b60405160e0810167ffffffffffffffff81118282101715615adf57615adf615e5f565b60405290565b604051610180810167ffffffffffffffff81118282101715615adf57615adf615e5f565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715615b5057615b50615e5f565b604052919050565b600067ffffffffffffffff821115615b7257615b72615e5f565b5060051b60200190565b600067ffffffffffffffff821115615b9657615b96615e5f565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008219821115615bd557615bd5615da3565b500190565b60006bffffffffffffffffffffffff808316818516808303821115615c0157615c01615da3565b01949350505050565b600082615c40577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615615c7d57615c7d615da3565b500290565b600082821015615c9457615c94615da3565b500390565b60006bffffffffffffffffffffffff83811690831681811015615cbe57615cbe615da3565b039392505050565b60005b83811015615ce1578181015183820152602001615cc9565b838111156155f15750506000910152565b600181811c90821680615d0657607f821691505b60208210811415615d40577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415615d7857615d78615da3565b5060010190565b600063ffffffff80831681811415615d9957615d99615da3565b6001019392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea164736f6c6343000806000a", -} - -var KeeperRegistryABI = KeeperRegistryMetaData.ABI - -var KeeperRegistryBin = KeeperRegistryMetaData.Bin - -func DeployKeeperRegistry(auth *bind.TransactOpts, backend bind.ContractBackend, link common.Address, linkEthFeed common.Address, fastGasFeed common.Address, config Config) (common.Address, *types.Transaction, *KeeperRegistry, error) { - parsed, err := KeeperRegistryMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryBin), backend, link, linkEthFeed, fastGasFeed, config) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistry{address: address, abi: *parsed, KeeperRegistryCaller: KeeperRegistryCaller{contract: contract}, KeeperRegistryTransactor: KeeperRegistryTransactor{contract: contract}, KeeperRegistryFilterer: KeeperRegistryFilterer{contract: contract}}, nil -} - -type KeeperRegistry struct { - address common.Address - abi abi.ABI - KeeperRegistryCaller - KeeperRegistryTransactor - KeeperRegistryFilterer -} - -type KeeperRegistryCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistryTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistryFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistrySession struct { - Contract *KeeperRegistry - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistryCallerSession struct { - Contract *KeeperRegistryCaller - CallOpts bind.CallOpts -} - -type KeeperRegistryTransactorSession struct { - Contract *KeeperRegistryTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistryRaw struct { - Contract *KeeperRegistry -} - -type KeeperRegistryCallerRaw struct { - Contract *KeeperRegistryCaller -} - -type KeeperRegistryTransactorRaw struct { - Contract *KeeperRegistryTransactor -} - -func NewKeeperRegistry(address common.Address, backend bind.ContractBackend) (*KeeperRegistry, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistryABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistry(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistry{address: address, abi: abi, KeeperRegistryCaller: KeeperRegistryCaller{contract: contract}, KeeperRegistryTransactor: KeeperRegistryTransactor{contract: contract}, KeeperRegistryFilterer: KeeperRegistryFilterer{contract: contract}}, nil -} - -func NewKeeperRegistryCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistryCaller, error) { - contract, err := bindKeeperRegistry(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryCaller{contract: contract}, nil -} - -func NewKeeperRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistryTransactor, error) { - contract, err := bindKeeperRegistry(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryTransactor{contract: contract}, nil -} - -func NewKeeperRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistryFilterer, error) { - contract, err := bindKeeperRegistry(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistryFilterer{contract: contract}, nil -} - -func bindKeeperRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistryMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistry *KeeperRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistry.Contract.KeeperRegistryCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.Contract.KeeperRegistryTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistry *KeeperRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistry.Contract.KeeperRegistryTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistry.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistry.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryCaller) FASTGASFEED(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "FAST_GAS_FEED") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) FASTGASFEED() (common.Address, error) { - return _KeeperRegistry.Contract.FASTGASFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) FASTGASFEED() (common.Address, error) { - return _KeeperRegistry.Contract.FASTGASFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) LINK(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "LINK") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) LINK() (common.Address, error) { - return _KeeperRegistry.Contract.LINK(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) LINK() (common.Address, error) { - return _KeeperRegistry.Contract.LINK(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) LINKETHFEED(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "LINK_ETH_FEED") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) LINKETHFEED() (common.Address, error) { - return _KeeperRegistry.Contract.LINKETHFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) LINKETHFEED() (common.Address, error) { - return _KeeperRegistry.Contract.LINKETHFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getActiveUpkeepIDs", startIndex, maxCount) - - if err != nil { - return *new([]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _KeeperRegistry.Contract.GetActiveUpkeepIDs(&_KeeperRegistry.CallOpts, startIndex, maxCount) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _KeeperRegistry.Contract.GetActiveUpkeepIDs(&_KeeperRegistry.CallOpts, startIndex, maxCount) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetKeeperInfo(opts *bind.CallOpts, query common.Address) (GetKeeperInfo, - - error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getKeeperInfo", query) - - outstruct := new(GetKeeperInfo) - if err != nil { - return *outstruct, err - } - - outstruct.Payee = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.Active = *abi.ConvertType(out[1], new(bool)).(*bool) - outstruct.Balance = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetKeeperInfo(query common.Address) (GetKeeperInfo, - - error) { - return _KeeperRegistry.Contract.GetKeeperInfo(&_KeeperRegistry.CallOpts, query) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetKeeperInfo(query common.Address) (GetKeeperInfo, - - error) { - return _KeeperRegistry.Contract.GetKeeperInfo(&_KeeperRegistry.CallOpts, query) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetMaxPaymentForGas(opts *bind.CallOpts, gasLimit *big.Int) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getMaxPaymentForGas", gasLimit) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetMaxPaymentForGas(gasLimit *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMaxPaymentForGas(&_KeeperRegistry.CallOpts, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetMaxPaymentForGas(gasLimit *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMaxPaymentForGas(&_KeeperRegistry.CallOpts, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getMinBalanceForUpkeep", id) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMinBalanceForUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMinBalanceForUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getPeerRegistryMigrationPermission", peer) - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _KeeperRegistry.Contract.GetPeerRegistryMigrationPermission(&_KeeperRegistry.CallOpts, peer) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _KeeperRegistry.Contract.GetPeerRegistryMigrationPermission(&_KeeperRegistry.CallOpts, peer) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetState(opts *bind.CallOpts) (GetState, - - error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getState") - - outstruct := new(GetState) - if err != nil { - return *outstruct, err - } - - outstruct.State = *abi.ConvertType(out[0], new(State)).(*State) - outstruct.Config = *abi.ConvertType(out[1], new(Config)).(*Config) - outstruct.Keepers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) - - return *outstruct, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetState() (GetState, - - error) { - return _KeeperRegistry.Contract.GetState(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetState() (GetState, - - error) { - return _KeeperRegistry.Contract.GetState(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (GetUpkeep, - - error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getUpkeep", id) - - outstruct := new(GetUpkeep) - if err != nil { - return *outstruct, err - } - - outstruct.Target = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.ExecuteGas = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.CheckData = *abi.ConvertType(out[2], new([]byte)).(*[]byte) - outstruct.Balance = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.LastKeeper = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) - outstruct.Admin = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) - outstruct.MaxValidBlocknumber = *abi.ConvertType(out[6], new(uint64)).(*uint64) - outstruct.AmountSpent = *abi.ConvertType(out[7], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetUpkeep(id *big.Int) (GetUpkeep, - - error) { - return _KeeperRegistry.Contract.GetUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetUpkeep(id *big.Int) (GetUpkeep, - - error) { - return _KeeperRegistry.Contract.GetUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) Owner() (common.Address, error) { - return _KeeperRegistry.Contract.Owner(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) Owner() (common.Address, error) { - return _KeeperRegistry.Contract.Owner(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) Paused() (bool, error) { - return _KeeperRegistry.Contract.Paused(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) Paused() (bool, error) { - return _KeeperRegistry.Contract.Paused(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) TypeAndVersion() (string, error) { - return _KeeperRegistry.Contract.TypeAndVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) TypeAndVersion() (string, error) { - return _KeeperRegistry.Contract.TypeAndVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "upkeepTranscoderVersion") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) UpkeepTranscoderVersion() (uint8, error) { - return _KeeperRegistry.Contract.UpkeepTranscoderVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) UpkeepTranscoderVersion() (uint8, error) { - return _KeeperRegistry.Contract.UpkeepTranscoderVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "acceptOwnership") -} - -func (_KeeperRegistry *KeeperRegistrySession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptOwnership(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptOwnership(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AcceptPayeeship(opts *bind.TransactOpts, keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "acceptPayeeship", keeper) -} - -func (_KeeperRegistry *KeeperRegistrySession) AcceptPayeeship(keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptPayeeship(&_KeeperRegistry.TransactOpts, keeper) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AcceptPayeeship(keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptPayeeship(&_KeeperRegistry.TransactOpts, keeper) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "addFunds", id, amount) -} - -func (_KeeperRegistry *KeeperRegistrySession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AddFunds(&_KeeperRegistry.TransactOpts, id, amount) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AddFunds(&_KeeperRegistry.TransactOpts, id, amount) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "cancelUpkeep", id) -} - -func (_KeeperRegistry *KeeperRegistrySession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CancelUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CancelUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) CheckUpkeep(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "checkUpkeep", id, from) -} - -func (_KeeperRegistry *KeeperRegistrySession) CheckUpkeep(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CheckUpkeep(&_KeeperRegistry.TransactOpts, id, from) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) CheckUpkeep(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CheckUpkeep(&_KeeperRegistry.TransactOpts, id, from) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "migrateUpkeeps", ids, destination) -} - -func (_KeeperRegistry *KeeperRegistrySession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.MigrateUpkeeps(&_KeeperRegistry.TransactOpts, ids, destination) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.MigrateUpkeeps(&_KeeperRegistry.TransactOpts, ids, destination) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "onTokenTransfer", sender, amount, data) -} - -func (_KeeperRegistry *KeeperRegistrySession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.OnTokenTransfer(&_KeeperRegistry.TransactOpts, sender, amount, data) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.OnTokenTransfer(&_KeeperRegistry.TransactOpts, sender, amount, data) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "pause") -} - -func (_KeeperRegistry *KeeperRegistrySession) Pause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Pause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) Pause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Pause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) PerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "performUpkeep", id, performData) -} - -func (_KeeperRegistry *KeeperRegistrySession) PerformUpkeep(id *big.Int, performData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.PerformUpkeep(&_KeeperRegistry.TransactOpts, id, performData) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) PerformUpkeep(id *big.Int, performData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.PerformUpkeep(&_KeeperRegistry.TransactOpts, id, performData) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "receiveUpkeeps", encodedUpkeeps) -} - -func (_KeeperRegistry *KeeperRegistrySession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.ReceiveUpkeeps(&_KeeperRegistry.TransactOpts, encodedUpkeeps) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.ReceiveUpkeeps(&_KeeperRegistry.TransactOpts, encodedUpkeeps) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "recoverFunds") -} - -func (_KeeperRegistry *KeeperRegistrySession) RecoverFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.RecoverFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) RecoverFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.RecoverFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, checkData) -} - -func (_KeeperRegistry *KeeperRegistrySession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.RegisterUpkeep(&_KeeperRegistry.TransactOpts, target, gasLimit, admin, checkData) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.RegisterUpkeep(&_KeeperRegistry.TransactOpts, target, gasLimit, admin, checkData) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetConfig(opts *bind.TransactOpts, config Config) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setConfig", config) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetConfig(config Config) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetConfig(&_KeeperRegistry.TransactOpts, config) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetConfig(config Config) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetConfig(&_KeeperRegistry.TransactOpts, config) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetKeepers(opts *bind.TransactOpts, keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setKeepers", keepers, payees) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetKeepers(keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetKeepers(&_KeeperRegistry.TransactOpts, keepers, payees) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetKeepers(keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetKeepers(&_KeeperRegistry.TransactOpts, keepers, payees) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setPeerRegistryMigrationPermission", peer, permission) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetPeerRegistryMigrationPermission(&_KeeperRegistry.TransactOpts, peer, permission) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetPeerRegistryMigrationPermission(&_KeeperRegistry.TransactOpts, peer, permission) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setUpkeepGasLimit", id, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetUpkeepGasLimit(&_KeeperRegistry.TransactOpts, id, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetUpkeepGasLimit(&_KeeperRegistry.TransactOpts, id, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "transferOwnership", to) -} - -func (_KeeperRegistry *KeeperRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferOwnership(&_KeeperRegistry.TransactOpts, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferOwnership(&_KeeperRegistry.TransactOpts, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) TransferPayeeship(opts *bind.TransactOpts, keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "transferPayeeship", keeper, proposed) -} - -func (_KeeperRegistry *KeeperRegistrySession) TransferPayeeship(keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferPayeeship(&_KeeperRegistry.TransactOpts, keeper, proposed) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) TransferPayeeship(keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferPayeeship(&_KeeperRegistry.TransactOpts, keeper, proposed) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "unpause") -} - -func (_KeeperRegistry *KeeperRegistrySession) Unpause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Unpause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) Unpause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Unpause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "withdrawFunds", id, to) -} - -func (_KeeperRegistry *KeeperRegistrySession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawFunds(&_KeeperRegistry.TransactOpts, id, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawFunds(&_KeeperRegistry.TransactOpts, id, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "withdrawOwnerFunds") -} - -func (_KeeperRegistry *KeeperRegistrySession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawOwnerFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawOwnerFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "withdrawPayment", from, to) -} - -func (_KeeperRegistry *KeeperRegistrySession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawPayment(&_KeeperRegistry.TransactOpts, from, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawPayment(&_KeeperRegistry.TransactOpts, from, to) -} - -type KeeperRegistryConfigSetIterator struct { - Event *KeeperRegistryConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryConfigSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryConfigSet struct { - Config Config - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterConfigSet(opts *bind.FilterOpts) (*KeeperRegistryConfigSetIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return &KeeperRegistryConfigSetIterator{contract: _KeeperRegistry.contract, event: "ConfigSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryConfigSet) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryConfigSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseConfigSet(log types.Log) (*KeeperRegistryConfigSet, error) { - event := new(KeeperRegistryConfigSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryFundsAddedIterator struct { - Event *KeeperRegistryFundsAdded - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryFundsAddedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryFundsAddedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryFundsAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*KeeperRegistryFundsAddedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) - if err != nil { - return nil, err - } - return &KeeperRegistryFundsAddedIterator{contract: _KeeperRegistry.contract, event: "FundsAdded", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryFundsAdded) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseFundsAdded(log types.Log) (*KeeperRegistryFundsAdded, error) { - event := new(KeeperRegistryFundsAdded) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryFundsWithdrawnIterator struct { - Event *KeeperRegistryFundsWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryFundsWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryFundsWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryFundsWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryFundsWithdrawn struct { - Id *big.Int - Amount *big.Int - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryFundsWithdrawnIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "FundsWithdrawn", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryFundsWithdrawnIterator{contract: _KeeperRegistry.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsWithdrawn, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "FundsWithdrawn", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseFundsWithdrawn(log types.Log) (*KeeperRegistryFundsWithdrawn, error) { - event := new(KeeperRegistryFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryKeepersUpdatedIterator struct { - Event *KeeperRegistryKeepersUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryKeepersUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryKeepersUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryKeepersUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryKeepersUpdatedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryKeepersUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryKeepersUpdated struct { - Keepers []common.Address - Payees []common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterKeepersUpdated(opts *bind.FilterOpts) (*KeeperRegistryKeepersUpdatedIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "KeepersUpdated") - if err != nil { - return nil, err - } - return &KeeperRegistryKeepersUpdatedIterator{contract: _KeeperRegistry.contract, event: "KeepersUpdated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchKeepersUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryKeepersUpdated) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "KeepersUpdated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryKeepersUpdated) - if err := _KeeperRegistry.contract.UnpackLog(event, "KeepersUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseKeepersUpdated(log types.Log) (*KeeperRegistryKeepersUpdated, error) { - event := new(KeeperRegistryKeepersUpdated) - if err := _KeeperRegistry.contract.UnpackLog(event, "KeepersUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryOwnerFundsWithdrawnIterator struct { - Event *KeeperRegistryOwnerFundsWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryOwnerFundsWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnerFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnerFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryOwnerFundsWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryOwnerFundsWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*KeeperRegistryOwnerFundsWithdrawnIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "OwnerFundsWithdrawn") - if err != nil { - return nil, err - } - return &KeeperRegistryOwnerFundsWithdrawnIterator{contract: _KeeperRegistry.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnerFundsWithdrawn) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "OwnerFundsWithdrawn") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryOwnerFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*KeeperRegistryOwnerFundsWithdrawn, error) { - event := new(KeeperRegistryOwnerFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryOwnershipTransferRequestedIterator struct { - Event *KeeperRegistryOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryOwnershipTransferRequestedIterator{contract: _KeeperRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryOwnershipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryOwnershipTransferRequested, error) { - event := new(KeeperRegistryOwnershipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryOwnershipTransferredIterator struct { - Event *KeeperRegistryOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryOwnershipTransferredIterator{contract: _KeeperRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryOwnershipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistryOwnershipTransferred, error) { - event := new(KeeperRegistryOwnershipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPausedIterator struct { - Event *KeeperRegistryPaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPaused struct { - Account common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPaused(opts *bind.FilterOpts) (*KeeperRegistryPausedIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &KeeperRegistryPausedIterator{contract: _KeeperRegistry.contract, event: "Paused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaused) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "Paused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Paused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePaused(log types.Log) (*KeeperRegistryPaused, error) { - event := new(KeeperRegistryPaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPayeeshipTransferRequestedIterator struct { - Event *KeeperRegistryPayeeshipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPayeeshipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPayeeshipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPayeeshipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPayeeshipTransferRequested struct { - Keeper common.Address - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferRequestedIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "PayeeshipTransferRequested", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryPayeeshipTransferRequestedIterator{contract: _KeeperRegistry.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferRequested, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "PayeeshipTransferRequested", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPayeeshipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePayeeshipTransferRequested(log types.Log) (*KeeperRegistryPayeeshipTransferRequested, error) { - event := new(KeeperRegistryPayeeshipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPayeeshipTransferredIterator struct { - Event *KeeperRegistryPayeeshipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPayeeshipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPayeeshipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPayeeshipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPayeeshipTransferred struct { - Keeper common.Address - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferredIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "PayeeshipTransferred", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryPayeeshipTransferredIterator{contract: _KeeperRegistry.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferred, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "PayeeshipTransferred", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPayeeshipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePayeeshipTransferred(log types.Log) (*KeeperRegistryPayeeshipTransferred, error) { - event := new(KeeperRegistryPayeeshipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPaymentWithdrawnIterator struct { - Event *KeeperRegistryPaymentWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPaymentWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaymentWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaymentWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPaymentWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPaymentWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPaymentWithdrawn struct { - Keeper common.Address - Amount *big.Int - To common.Address - Payee common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPaymentWithdrawn(opts *bind.FilterOpts, keeper []common.Address, amount []*big.Int, to []common.Address) (*KeeperRegistryPaymentWithdrawnIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var amountRule []interface{} - for _, amountItem := range amount { - amountRule = append(amountRule, amountItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "PaymentWithdrawn", keeperRule, amountRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryPaymentWithdrawnIterator{contract: _KeeperRegistry.contract, event: "PaymentWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaymentWithdrawn, keeper []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var amountRule []interface{} - for _, amountItem := range amount { - amountRule = append(amountRule, amountItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "PaymentWithdrawn", keeperRule, amountRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPaymentWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePaymentWithdrawn(log types.Log) (*KeeperRegistryPaymentWithdrawn, error) { - event := new(KeeperRegistryPaymentWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUnpausedIterator struct { - Event *KeeperRegistryUnpaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUnpausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUnpausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUnpaused struct { - Account common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUnpaused(opts *bind.FilterOpts) (*KeeperRegistryUnpausedIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &KeeperRegistryUnpausedIterator{contract: _KeeperRegistry.contract, event: "Unpaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUnpaused) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUnpaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Unpaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUnpaused(log types.Log) (*KeeperRegistryUnpaused, error) { - event := new(KeeperRegistryUnpaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepCanceledIterator struct { - Event *KeeperRegistryUpkeepCanceled - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepCanceledIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepCanceledIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepCanceledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepCanceled struct { - Id *big.Int - AtBlockHeight uint64 - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*KeeperRegistryUpkeepCanceledIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var atBlockHeightRule []interface{} - for _, atBlockHeightItem := range atBlockHeight { - atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepCanceledIterator{contract: _KeeperRegistry.contract, event: "UpkeepCanceled", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var atBlockHeightRule []interface{} - for _, atBlockHeightItem := range atBlockHeight { - atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepCanceled) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepCanceled(log types.Log) (*KeeperRegistryUpkeepCanceled, error) { - event := new(KeeperRegistryUpkeepCanceled) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepGasLimitSetIterator struct { - Event *KeeperRegistryUpkeepGasLimitSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepGasLimitSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepGasLimitSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepGasLimitSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepGasLimitSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepGasLimitSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepGasLimitSet struct { - Id *big.Int - GasLimit *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepGasLimitSetIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepGasLimitSet", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepGasLimitSetIterator{contract: _KeeperRegistry.contract, event: "UpkeepGasLimitSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepGasLimitSet", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepGasLimitSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepGasLimitSet(log types.Log) (*KeeperRegistryUpkeepGasLimitSet, error) { - event := new(KeeperRegistryUpkeepGasLimitSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepMigratedIterator struct { - Event *KeeperRegistryUpkeepMigrated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepMigratedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepMigrated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepMigrated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepMigratedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepMigratedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepMigrated struct { - Id *big.Int - RemainingBalance *big.Int - Destination common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepMigratedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepMigrated", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepMigratedIterator{contract: _KeeperRegistry.contract, event: "UpkeepMigrated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepMigrated, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepMigrated", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepMigrated) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepMigrated(log types.Log) (*KeeperRegistryUpkeepMigrated, error) { - event := new(KeeperRegistryUpkeepMigrated) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepPerformedIterator struct { - Event *KeeperRegistryUpkeepPerformed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepPerformedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepPerformed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepPerformed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepPerformedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepPerformedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepPerformed struct { - Id *big.Int - Success bool - From common.Address - Payment *big.Int - PerformData []byte - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool, from []common.Address) (*KeeperRegistryUpkeepPerformedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var successRule []interface{} - for _, successItem := range success { - successRule = append(successRule, successItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepPerformed", idRule, successRule, fromRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepPerformedIterator{contract: _KeeperRegistry.contract, event: "UpkeepPerformed", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepPerformed, id []*big.Int, success []bool, from []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var successRule []interface{} - for _, successItem := range success { - successRule = append(successRule, successItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepPerformed", idRule, successRule, fromRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepPerformed) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepPerformed(log types.Log) (*KeeperRegistryUpkeepPerformed, error) { - event := new(KeeperRegistryUpkeepPerformed) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepReceivedIterator struct { - Event *KeeperRegistryUpkeepReceived - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepReceivedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepReceived) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepReceived) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepReceivedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepReceivedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepReceived struct { - Id *big.Int - StartingBalance *big.Int - ImportedFrom common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepReceivedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepReceived", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepReceivedIterator{contract: _KeeperRegistry.contract, event: "UpkeepReceived", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepReceived, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepReceived", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepReceived) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepReceived(log types.Log) (*KeeperRegistryUpkeepReceived, error) { - event := new(KeeperRegistryUpkeepReceived) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepRegisteredIterator struct { - Event *KeeperRegistryUpkeepRegistered - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepRegisteredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepRegistered) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepRegistered) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepRegisteredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepRegisteredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepRegistered struct { - Id *big.Int - ExecuteGas uint32 - Admin common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepRegisteredIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepRegistered", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepRegisteredIterator{contract: _KeeperRegistry.contract, event: "UpkeepRegistered", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepRegistered, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepRegistered", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepRegistered) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepRegistered(log types.Log) (*KeeperRegistryUpkeepRegistered, error) { - event := new(KeeperRegistryUpkeepRegistered) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetKeeperInfo struct { - Payee common.Address - Active bool - Balance *big.Int -} -type GetState struct { - State State - Config Config - Keepers []common.Address -} -type GetUpkeep struct { - Target common.Address - ExecuteGas uint32 - CheckData []byte - Balance *big.Int - LastKeeper common.Address - Admin common.Address - MaxValidBlocknumber uint64 - AmountSpent *big.Int -} - -func (_KeeperRegistry *KeeperRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistry.abi.Events["ConfigSet"].ID: - return _KeeperRegistry.ParseConfigSet(log) - case _KeeperRegistry.abi.Events["FundsAdded"].ID: - return _KeeperRegistry.ParseFundsAdded(log) - case _KeeperRegistry.abi.Events["FundsWithdrawn"].ID: - return _KeeperRegistry.ParseFundsWithdrawn(log) - case _KeeperRegistry.abi.Events["KeepersUpdated"].ID: - return _KeeperRegistry.ParseKeepersUpdated(log) - case _KeeperRegistry.abi.Events["OwnerFundsWithdrawn"].ID: - return _KeeperRegistry.ParseOwnerFundsWithdrawn(log) - case _KeeperRegistry.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistry.ParseOwnershipTransferRequested(log) - case _KeeperRegistry.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistry.ParseOwnershipTransferred(log) - case _KeeperRegistry.abi.Events["Paused"].ID: - return _KeeperRegistry.ParsePaused(log) - case _KeeperRegistry.abi.Events["PayeeshipTransferRequested"].ID: - return _KeeperRegistry.ParsePayeeshipTransferRequested(log) - case _KeeperRegistry.abi.Events["PayeeshipTransferred"].ID: - return _KeeperRegistry.ParsePayeeshipTransferred(log) - case _KeeperRegistry.abi.Events["PaymentWithdrawn"].ID: - return _KeeperRegistry.ParsePaymentWithdrawn(log) - case _KeeperRegistry.abi.Events["Unpaused"].ID: - return _KeeperRegistry.ParseUnpaused(log) - case _KeeperRegistry.abi.Events["UpkeepCanceled"].ID: - return _KeeperRegistry.ParseUpkeepCanceled(log) - case _KeeperRegistry.abi.Events["UpkeepGasLimitSet"].ID: - return _KeeperRegistry.ParseUpkeepGasLimitSet(log) - case _KeeperRegistry.abi.Events["UpkeepMigrated"].ID: - return _KeeperRegistry.ParseUpkeepMigrated(log) - case _KeeperRegistry.abi.Events["UpkeepPerformed"].ID: - return _KeeperRegistry.ParseUpkeepPerformed(log) - case _KeeperRegistry.abi.Events["UpkeepReceived"].ID: - return _KeeperRegistry.ParseUpkeepReceived(log) - case _KeeperRegistry.abi.Events["UpkeepRegistered"].ID: - return _KeeperRegistry.ParseUpkeepRegistered(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistryConfigSet) Topic() common.Hash { - return common.HexToHash("0xfe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de325") -} - -func (KeeperRegistryFundsAdded) Topic() common.Hash { - return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") -} - -func (KeeperRegistryFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0xf3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318") -} - -func (KeeperRegistryKeepersUpdated) Topic() common.Hash { - return common.HexToHash("0x056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f") -} - -func (KeeperRegistryOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - -func (KeeperRegistryOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistryOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (KeeperRegistryPaused) Topic() common.Hash { - return common.HexToHash("0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258") -} - -func (KeeperRegistryPayeeshipTransferRequested) Topic() common.Hash { - return common.HexToHash("0x84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e38367") -} - -func (KeeperRegistryPayeeshipTransferred) Topic() common.Hash { - return common.HexToHash("0x78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b3") -} - -func (KeeperRegistryPaymentWithdrawn) Topic() common.Hash { - return common.HexToHash("0x9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698") -} - -func (KeeperRegistryUnpaused) Topic() common.Hash { - return common.HexToHash("0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa") -} - -func (KeeperRegistryUpkeepCanceled) Topic() common.Hash { - return common.HexToHash("0x91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f791181") -} - -func (KeeperRegistryUpkeepGasLimitSet) Topic() common.Hash { - return common.HexToHash("0xc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c") -} - -func (KeeperRegistryUpkeepMigrated) Topic() common.Hash { - return common.HexToHash("0xb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff") -} - -func (KeeperRegistryUpkeepPerformed) Topic() common.Hash { - return common.HexToHash("0xcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6") -} - -func (KeeperRegistryUpkeepReceived) Topic() common.Hash { - return common.HexToHash("0x74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71") -} - -func (KeeperRegistryUpkeepRegistered) Topic() common.Hash { - return common.HexToHash("0xbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012") -} - -func (_KeeperRegistry *KeeperRegistry) Address() common.Address { - return _KeeperRegistry.address -} - -type KeeperRegistryInterface interface { - FASTGASFEED(opts *bind.CallOpts) (common.Address, error) - - LINK(opts *bind.CallOpts) (common.Address, error) - - LINKETHFEED(opts *bind.CallOpts) (common.Address, error) - - GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) - - GetKeeperInfo(opts *bind.CallOpts, query common.Address) (GetKeeperInfo, - - error) - - GetMaxPaymentForGas(opts *bind.CallOpts, gasLimit *big.Int) (*big.Int, error) - - GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) - - GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) - - GetState(opts *bind.CallOpts) (GetState, - - error) - - GetUpkeep(opts *bind.CallOpts, id *big.Int) (GetUpkeep, - - error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - Paused(opts *bind.CallOpts) (bool, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - AcceptPayeeship(opts *bind.TransactOpts, keeper common.Address) (*types.Transaction, error) - - AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) - - CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - CheckUpkeep(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) - - MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) - - OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) - - Pause(opts *bind.TransactOpts) (*types.Transaction, error) - - PerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) - - ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) - - RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) - - SetConfig(opts *bind.TransactOpts, config Config) (*types.Transaction, error) - - SetKeepers(opts *bind.TransactOpts, keepers []common.Address, payees []common.Address) (*types.Transaction, error) - - SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) - - SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - TransferPayeeship(opts *bind.TransactOpts, keeper common.Address, proposed common.Address) (*types.Transaction, error) - - Unpause(opts *bind.TransactOpts) (*types.Transaction, error) - - WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) - - WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - FilterConfigSet(opts *bind.FilterOpts) (*KeeperRegistryConfigSetIterator, error) - - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryConfigSet) (event.Subscription, error) - - ParseConfigSet(log types.Log) (*KeeperRegistryConfigSet, error) - - FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*KeeperRegistryFundsAddedIterator, error) - - WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) - - ParseFundsAdded(log types.Log) (*KeeperRegistryFundsAdded, error) - - FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryFundsWithdrawnIterator, error) - - WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsWithdrawn, id []*big.Int) (event.Subscription, error) - - ParseFundsWithdrawn(log types.Log) (*KeeperRegistryFundsWithdrawn, error) - - FilterKeepersUpdated(opts *bind.FilterOpts) (*KeeperRegistryKeepersUpdatedIterator, error) - - WatchKeepersUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryKeepersUpdated) (event.Subscription, error) - - ParseKeepersUpdated(log types.Log) (*KeeperRegistryKeepersUpdated, error) - - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*KeeperRegistryOwnerFundsWithdrawnIterator, error) - - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnerFundsWithdrawn) (event.Subscription, error) - - ParseOwnerFundsWithdrawn(log types.Log) (*KeeperRegistryOwnerFundsWithdrawn, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistryOwnershipTransferred, error) - - FilterPaused(opts *bind.FilterOpts) (*KeeperRegistryPausedIterator, error) - - WatchPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaused) (event.Subscription, error) - - ParsePaused(log types.Log) (*KeeperRegistryPaused, error) - - FilterPayeeshipTransferRequested(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferRequestedIterator, error) - - WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferRequested, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferRequested(log types.Log) (*KeeperRegistryPayeeshipTransferRequested, error) - - FilterPayeeshipTransferred(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferredIterator, error) - - WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferred, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferred(log types.Log) (*KeeperRegistryPayeeshipTransferred, error) - - FilterPaymentWithdrawn(opts *bind.FilterOpts, keeper []common.Address, amount []*big.Int, to []common.Address) (*KeeperRegistryPaymentWithdrawnIterator, error) - - WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaymentWithdrawn, keeper []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) - - ParsePaymentWithdrawn(log types.Log) (*KeeperRegistryPaymentWithdrawn, error) - - FilterUnpaused(opts *bind.FilterOpts) (*KeeperRegistryUnpausedIterator, error) - - WatchUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUnpaused) (event.Subscription, error) - - ParseUnpaused(log types.Log) (*KeeperRegistryUnpaused, error) - - FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*KeeperRegistryUpkeepCanceledIterator, error) - - WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) - - ParseUpkeepCanceled(log types.Log) (*KeeperRegistryUpkeepCanceled, error) - - FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepGasLimitSetIterator, error) - - WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) - - ParseUpkeepGasLimitSet(log types.Log) (*KeeperRegistryUpkeepGasLimitSet, error) - - FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepMigratedIterator, error) - - WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepMigrated, id []*big.Int) (event.Subscription, error) - - ParseUpkeepMigrated(log types.Log) (*KeeperRegistryUpkeepMigrated, error) - - FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool, from []common.Address) (*KeeperRegistryUpkeepPerformedIterator, error) - - WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepPerformed, id []*big.Int, success []bool, from []common.Address) (event.Subscription, error) - - ParseUpkeepPerformed(log types.Log) (*KeeperRegistryUpkeepPerformed, error) - - FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepReceivedIterator, error) - - WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepReceived, id []*big.Int) (event.Subscription, error) - - ParseUpkeepReceived(log types.Log) (*KeeperRegistryUpkeepReceived, error) - - FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepRegisteredIterator, error) - - WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepRegistered, id []*big.Int) (event.Subscription, error) - - ParseUpkeepRegistered(log types.Log) (*KeeperRegistryUpkeepRegistered, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/generated/keeper_registry_wrapper1_3/keeper_registry_wrapper1_3.go b/core/gethwrappers/generated/keeper_registry_wrapper1_3/keeper_registry_wrapper1_3.go deleted file mode 100644 index bea6e458a00..00000000000 --- a/core/gethwrappers/generated/keeper_registry_wrapper1_3/keeper_registry_wrapper1_3.go +++ /dev/null @@ -1,4441 +0,0 @@ -// Code generated - DO NOT EDIT. -// This file is a generated binding and any manual changes will be lost. - -package keeper_registry_wrapper1_3 - -import ( - "errors" - "fmt" - "math/big" - "strings" - - ethereum "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" - "github.com/ethereum/go-ethereum/accounts/abi/bind" - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/event" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated" -) - -var ( - _ = errors.New - _ = big.NewInt - _ = strings.NewReader - _ = ethereum.NotFound - _ = bind.Bind - _ = common.Big1 - _ = types.BloomLookup - _ = event.NewSubscription - _ = abi.ConvertType -) - -type Config struct { - PaymentPremiumPPB uint32 - FlatFeeMicroLink uint32 - BlockCountPerTurn *big.Int - CheckGasLimit uint32 - StalenessSeconds *big.Int - GasCeilingMultiplier uint16 - MinUpkeepSpend *big.Int - MaxPerformGas uint32 - FallbackGasPrice *big.Int - FallbackLinkPrice *big.Int - Transcoder common.Address - Registrar common.Address -} - -type State struct { - Nonce uint32 - OwnerLinkBalance *big.Int - ExpectedLinkBalance *big.Int - NumUpkeeps *big.Int -} - -var KeeperRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"contractKeeperRegistryLogic1_3\",\"name\":\"keeperRegistryLogic\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ArrayHasNoEntries\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotCancel\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateEntry\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"EmptyAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitCanOnlyIncrease\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"GasLimitOutsideRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IndexOutOfRange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientFunds\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidDataLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidRecipient\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeepersMustTakeTurns\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MigrationNotPermitted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotAContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyActiveKeepers\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByLINKToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwnerOrRegistrar\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedAdmin\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByProposedPayee\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyPausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlySimulatedBackend\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyUnpausedUpkeep\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ParameterLengthError\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PaymentGreaterThanAllLINK\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"reason\",\"type\":\"bytes\"}],\"name\":\"TargetCheckReverted\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TranscoderNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepCancelled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotCanceled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UpkeepNotNeeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ValueNotChanged\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"indexed\":false,\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"FundsAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"FundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"KeepersUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"OwnerFundsWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"PayeeshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"}],\"name\":\"PaymentWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"UpkeepAdminTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint64\",\"name\":\"atBlockHeight\",\"type\":\"uint64\"}],\"name\":\"UpkeepCanceled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"UpkeepCheckDataUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"gasLimit\",\"type\":\"uint96\"}],\"name\":\"UpkeepGasLimitSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"remainingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"UpkeepMigrated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint96\",\"name\":\"payment\",\"type\":\"uint96\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"UpkeepPerformed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startingBalance\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"importedFrom\",\"type\":\"address\"}],\"name\":\"UpkeepReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"}],\"name\":\"UpkeepRegistered\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"UpkeepUnpaused\",\"type\":\"event\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"ARB_NITRO_ORACLE\",\"outputs\":[{\"internalType\":\"contractArbGasInfo\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FAST_GAS_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"KEEPER_REGISTRY_LOGIC\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK\",\"outputs\":[{\"internalType\":\"contractLinkTokenInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"LINK_ETH_FEED\",\"outputs\":[{\"internalType\":\"contractAggregatorV3Interface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPTIMISM_ORACLE\",\"outputs\":[{\"internalType\":\"contractOVM_GasPriceOracle\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PAYMENT_MODEL\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase1_3.PaymentModel\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTRY_GAS_OVERHEAD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"}],\"name\":\"acceptPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"acceptUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint96\",\"name\":\"amount\",\"type\":\"uint96\"}],\"name\":\"addFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"cancelUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"}],\"name\":\"checkUpkeep\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"},{\"internalType\":\"uint256\",\"name\":\"maxLinkPayment\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"adjustedGasWei\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"linkEth\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxCount\",\"type\":\"uint256\"}],\"name\":\"getActiveUpkeepIDs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"query\",\"type\":\"address\"}],\"name\":\"getKeeperInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"payee\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gasLimit\",\"type\":\"uint256\"}],\"name\":\"getMaxPaymentForGas\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"maxPayment\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getMinBalanceForUpkeep\",\"outputs\":[{\"internalType\":\"uint96\",\"name\":\"minBalance\",\"type\":\"uint96\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"}],\"name\":\"getPeerRegistryMigrationPermission\",\"outputs\":[{\"internalType\":\"enumKeeperRegistryBase1_3.MigrationPermission\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getState\",\"outputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"nonce\",\"type\":\"uint32\"},{\"internalType\":\"uint96\",\"name\":\"ownerLinkBalance\",\"type\":\"uint96\"},{\"internalType\":\"uint256\",\"name\":\"expectedLinkBalance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"numUpkeeps\",\"type\":\"uint256\"}],\"internalType\":\"structState\",\"name\":\"state\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"},{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"getUpkeep\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"executeGas\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"},{\"internalType\":\"uint96\",\"name\":\"balance\",\"type\":\"uint96\"},{\"internalType\":\"address\",\"name\":\"lastKeeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"maxValidBlocknumber\",\"type\":\"uint64\"},{\"internalType\":\"uint96\",\"name\":\"amountSpent\",\"type\":\"uint96\"},{\"internalType\":\"bool\",\"name\":\"paused\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"address\",\"name\":\"destination\",\"type\":\"address\"}],\"name\":\"migrateUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"onTokenTransfer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"pauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"performData\",\"type\":\"bytes\"}],\"name\":\"performUpkeep\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"encodedUpkeeps\",\"type\":\"bytes\"}],\"name\":\"receiveUpkeeps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"recoverFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"admin\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"checkData\",\"type\":\"bytes\"}],\"name\":\"registerUpkeep\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint32\",\"name\":\"paymentPremiumPPB\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"flatFeeMicroLink\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"blockCountPerTurn\",\"type\":\"uint24\"},{\"internalType\":\"uint32\",\"name\":\"checkGasLimit\",\"type\":\"uint32\"},{\"internalType\":\"uint24\",\"name\":\"stalenessSeconds\",\"type\":\"uint24\"},{\"internalType\":\"uint16\",\"name\":\"gasCeilingMultiplier\",\"type\":\"uint16\"},{\"internalType\":\"uint96\",\"name\":\"minUpkeepSpend\",\"type\":\"uint96\"},{\"internalType\":\"uint32\",\"name\":\"maxPerformGas\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"fallbackGasPrice\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"fallbackLinkPrice\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"transcoder\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"registrar\",\"type\":\"address\"}],\"internalType\":\"structConfig\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"keepers\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"payees\",\"type\":\"address[]\"}],\"name\":\"setKeepers\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"peer\",\"type\":\"address\"},{\"internalType\":\"enumKeeperRegistryBase1_3.MigrationPermission\",\"name\":\"permission\",\"type\":\"uint8\"}],\"name\":\"setPeerRegistryMigrationPermission\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint32\",\"name\":\"gasLimit\",\"type\":\"uint32\"}],\"name\":\"setUpkeepGasLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"keeper\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferPayeeship\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"proposed\",\"type\":\"address\"}],\"name\":\"transferUpkeepAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"unpauseUpkeep\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"newCheckData\",\"type\":\"bytes\"}],\"name\":\"updateCheckData\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"upkeepTranscoderVersion\",\"outputs\":[{\"internalType\":\"enumUpkeepFormat\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawOwnerFunds\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"withdrawPayment\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - Bin: "0x6101806040527f420000000000000000000000000000000000000f00000000000000000000000060e0526c6c000000000000000000000000610100523480156200004857600080fd5b50604051620048cd380380620048cd8339810160408190526200006b91620008a7565b816001600160a01b0316638811cbe86040518163ffffffff1660e01b815260040160206040518083038186803b158015620000a557600080fd5b505afa158015620000ba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e09190620009ce565b826001600160a01b0316635077b2106040518163ffffffff1660e01b815260040160206040518083038186803b1580156200011a57600080fd5b505afa1580156200012f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001559190620009f1565b836001600160a01b0316631b6b6d236040518163ffffffff1660e01b815260040160206040518083038186803b1580156200018f57600080fd5b505afa158015620001a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ca919062000880565b846001600160a01b031663ad1783616040518163ffffffff1660e01b815260040160206040518083038186803b1580156200020457600080fd5b505afa15801562000219573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200023f919062000880565b856001600160a01b0316634584a4196040518163ffffffff1660e01b815260040160206040518083038186803b1580156200027957600080fd5b505afa1580156200028e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002b4919062000880565b33806000816200030b5760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b03848116919091179091558116156200033e576200033e816200041b565b5050600160029081556003805460ff1916905586915081111562000366576200036662000b42565b6101208160028111156200037e576200037e62000b42565b60f81b9052506101408490526001600160a01b0383161580620003a857506001600160a01b038216155b80620003bb57506001600160a01b038116155b15620003da57604051637138356f60e01b815260040160405180910390fd5b6001600160601b0319606093841b811660805291831b821660a052821b811660c0529085901b16610160525062000413905081620004c7565b505062000b71565b6001600160a01b038116331415620004765760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640162000302565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b620004d1620007bc565b600e5460e082015163ffffffff918216911610156200050357604051630e6af04160e21b815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516001600160601b031681526020018260e0015163ffffffff168152602001600d60010160049054906101000a900463ffffffff1663ffffffff16815250600d60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816001600160601b0302191690836001600160601b0316021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600f81905550806101200151601081905550806101400151601360006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806101600151601460006101000a8154816001600160a01b0302191690836001600160a01b031602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de32581604051620007b1919062000a0b565b60405180910390a150565b6000546001600160a01b03163314620008185760405162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640162000302565b565b8051620008278162000b58565b919050565b805161ffff811681146200082757600080fd5b805162ffffff811681146200082757600080fd5b805163ffffffff811681146200082757600080fd5b80516001600160601b03811681146200082757600080fd5b6000602082840312156200089357600080fd5b8151620008a08162000b58565b9392505050565b6000808284036101a0811215620008bd57600080fd5b8351620008ca8162000b58565b9250610180601f198201811315620008e157600080fd5b620008eb62000b0a565b9150620008fb6020860162000853565b82526200090b6040860162000853565b60208301526200091e606086016200083f565b6040830152620009316080860162000853565b60608301526200094460a086016200083f565b60808301526200095760c086016200082c565b60a08301526200096a60e0860162000868565b60c08301526101006200097f81870162000853565b60e084015261012080870151828501526101409150818701518185015250610160620009ad8188016200081a565b82850152620009be8388016200081a565b9084015250929590945092505050565b600060208284031215620009e157600080fd5b815160038110620008a057600080fd5b60006020828403121562000a0457600080fd5b5051919050565b815163ffffffff1681526101808101602083015162000a32602084018263ffffffff169052565b50604083015162000a4a604084018262ffffff169052565b50606083015162000a63606084018263ffffffff169052565b50608083015162000a7b608084018262ffffff169052565b5060a083015162000a9260a084018261ffff169052565b5060c083015162000aae60c08401826001600160601b03169052565b5060e083015162000ac760e084018263ffffffff169052565b5061010083810151908301526101208084015190830152610140808401516001600160a01b03908116918401919091526101609384015116929091019190915290565b60405161018081016001600160401b038111828210171562000b3c57634e487b7160e01b600052604160045260246000fd5b60405290565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038116811462000b6e57600080fd5b50565b60805160601c60a05160601c60c05160601c60e05160601c6101005160601c6101205160f81c610140516101605160601c613ca262000c2b600039600081816103600152610a4c0152600081816105e601526125460152600081816107490152818161259901526127150152600081816106a1015261274d0152600081816106d50152612684015260008181610590015261227a015260008181610891015261235b01526000818161046e015261144e0152613ca26000f3fe6080604052600436106103015760003560e01c80638811cbe81161018f578063b148ab6b116100e1578063c80480221161008a578063ef47a0ce11610064578063ef47a0ce146109b4578063f2fde38b146109d4578063faa3e996146109f457610310565b8063c8048022146108d3578063da5c674114610994578063eb5dcd6c1461084957610310565b8063b7fdb436116100bb578063b7fdb4361461090e578063c41b813a1461092e578063c7c3a19a1461095f57610310565b8063b148ab6b146108d3578063b657bc9c146108ee578063b79550be1461056957610310565b80639fab438611610143578063a72aa27e1161011d578063a72aa27e14610864578063ad1783611461087f578063b121e147146108b357610310565b80639fab438614610809578063a4c0ed3614610829578063a710b2211461084957610310565b80638e86139b116101745780638e86139b1461079657806393f0c1fc146107b1578063948108f7146107ee57610310565b80638811cbe8146107375780638da5cb5b1461076b57610310565b80635077b210116102535780637d9b97e0116101fc578063850cce34116101d6578063850cce34146106c357806385c1b0ba146106f75780638765ecbe1461071757610310565b80637d9b97e0146105695780637f37618e1461068f5780638456cb591461056957610310565b8063744bfe611161022d578063744bfe611461044157806379ba50971461065a5780637bbaf1ea1461066f57610310565b80635077b210146105d45780635165f2f5146106165780635c975abb1461063657610310565b80631a2af011116102b55780633f4ba83a1161028f5780633f4ba83a146105695780634584a4191461057e57806348013d7b146105b257610310565b80631a2af011146104415780631b6b6d231461045c5780631e12b8a51461049057610310565b8063181f5a77116102e6578063181f5a77146103a75780631865c57d146103fd578063187256e81461042157610310565b806306e3b632146103185780630852c7c91461034e57610310565b366103105761030e610a47565b005b61030e610a47565b34801561032457600080fd5b50610338610333366004613383565b610a72565b6040516103459190613655565b60405180910390f35b34801561035a57600080fd5b506103827f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610345565b3480156103b357600080fd5b506103f06040518060400160405280601481526020017f4b6565706572526567697374727920312e332e3000000000000000000000000081525081565b60405161034591906136e6565b34801561040957600080fd5b50610412610b6e565b60405161034593929190613766565b34801561042d57600080fd5b5061030e61043c366004613003565b610e26565b34801561044d57600080fd5b5061030e61043c366004613314565b34801561046857600080fd5b506103827f000000000000000000000000000000000000000000000000000000000000000081565b34801561049c57600080fd5b506105296104ab366004612fb5565b73ffffffffffffffffffffffffffffffffffffffff90811660009081526008602090815260409182902082516060810184528154948516808252740100000000000000000000000000000000000000009095046bffffffffffffffffffffffff1692810183905260019091015460ff16151592018290529192909190565b6040805173ffffffffffffffffffffffffffffffffffffffff909416845291151560208401526bffffffffffffffffffffffff1690820152606001610345565b34801561057557600080fd5b5061030e610e32565b34801561058a57600080fd5b506103827f000000000000000000000000000000000000000000000000000000000000000081565b3480156105be57600080fd5b506105c7600181565b604051610345919061374a565b3480156105e057600080fd5b506106087f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610345565b34801561062257600080fd5b5061030e6106313660046132e2565b610e3a565b34801561064257600080fd5b5060035460ff165b6040519015158152602001610345565b34801561066657600080fd5b5061030e610fc6565b34801561067b57600080fd5b5061064a61068a366004613337565b6110c8565b34801561069b57600080fd5b506103827f000000000000000000000000000000000000000000000000000000000000000081565b3480156106cf57600080fd5b506103827f000000000000000000000000000000000000000000000000000000000000000081565b34801561070357600080fd5b5061030e61071236600461316e565b611126565b34801561072357600080fd5b5061030e6107323660046132e2565b611133565b34801561074357600080fd5b506105c77f000000000000000000000000000000000000000000000000000000000000000081565b34801561077757600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610382565b3480156107a257600080fd5b5061030e61043c3660046131c2565b3480156107bd57600080fd5b506107d16107cc3660046132e2565b6112df565b6040516bffffffffffffffffffffffff9091168152602001610345565b3480156107fa57600080fd5b5061030e61043c3660046133c8565b34801561081557600080fd5b5061030e610824366004613337565b6112fd565b34801561083557600080fd5b5061030e61084436600461303e565b611436565b34801561085557600080fd5b5061030e61043c366004612fd0565b34801561087057600080fd5b5061030e61043c3660046133a5565b34801561088b57600080fd5b506103827f000000000000000000000000000000000000000000000000000000000000000081565b3480156108bf57600080fd5b5061030e6108ce366004612fb5565b61162d565b3480156108df57600080fd5b5061030e6108ce3660046132e2565b3480156108fa57600080fd5b506107d16109093660046132e2565b611638565b34801561091a57600080fd5b5061030e61092936600461310e565b611659565b34801561093a57600080fd5b5061094e610949366004613314565b611667565b6040516103459594939291906136f9565b34801561096b57600080fd5b5061097f61097a3660046132e2565b611689565b604051610345999897969594939291906135c3565b3480156109a057600080fd5b506106086109af366004613098565b611859565b3480156109c057600080fd5b5061030e6109cf366004613204565b61186c565b3480156109e057600080fd5b5061030e6109ef366004612fb5565b611bb8565b348015610a0057600080fd5b50610a3a610a0f366004612fb5565b73ffffffffffffffffffffffffffffffffffffffff166000908152600c602052604090205460ff1690565b6040516103459190613730565b610a707f0000000000000000000000000000000000000000000000000000000000000000611bc9565b565b60606000610a806005611bed565b9050808410610abb576040517f1390f2a100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82610acd57610aca8482613945565b92505b60008367ffffffffffffffff811115610ae857610ae8613afe565b604051908082528060200260200182016040528015610b11578160200160208202803683370190505b50905060005b84811015610b6357610b34610b2c8288613885565b600590611bf7565b828281518110610b4657610b46613acf565b602090810291909101015280610b5b81613a09565b915050610b17565b509150505b92915050565b6040805160808101825260008082526020820181905291810182905260608101919091526040805161018081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e081018290526101008101829052610120810182905261014081018290526101608101919091526040805161012081018252600d5463ffffffff8082168352640100000000808304821660208086019190915262ffffff6801000000000000000085048116868801526b010000000000000000000000850484166060878101919091526f010000000000000000000000000000008604909116608087015261ffff720100000000000000000000000000000000000086041660a08701526bffffffffffffffffffffffff74010000000000000000000000000000000000000000909504851660c0870152600e5480851660e088015292909204909216610100850181905287526011549092169086015260125492850192909252610cf06005611bed565b606080860191909152815163ffffffff908116855260208084015182168187015260408085015162ffffff90811682890152858501518416948801949094526080808601519094169387019390935260a08085015161ffff169087015260c0808501516bffffffffffffffffffffffff169087015260e08085015190921691860191909152600f5461010086015260105461012086015260135473ffffffffffffffffffffffffffffffffffffffff90811661014087015260145416610160860152600480548351818402810184019094528084528793879390918391830182828015610e1357602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610de8575b5050505050905093509350935050909192565b610e2e610a47565b5050565b610a70610a47565b60008181526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff808216608085015264010000000082041660a084015268010000000000000000810490911660c083015260ff7c010000000000000000000000000000000000000000000000000000000090910416151560e0820152610f1981611c0a565b8060e00151610f54576040517f1b88a78400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040902060020180547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff169055610f96600583611cb7565b5060405182907f7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a4745690600090a25050565b60015473ffffffffffffffffffffffffffffffffffffffff16331461104c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064015b60405180910390fd5b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b60006110d2611cc3565b61111e611119338686868080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525060019250611d30915050565b611e1a565b949350505050565b61112e610a47565b505050565b60008181526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff808216608085015264010000000082041660a084015268010000000000000000810490911660c083015260ff7c010000000000000000000000000000000000000000000000000000000090910416151560e082015261121281611c0a565b8060e001511561124e576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040902060020180547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c01000000000000000000000000000000000000000000000000000000001790556112af60058361223b565b5060405182907f8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f90600090a25050565b60008060006112ec612247565b9150915061111e8483836000612442565b60008381526007602090815260409182902082516101008101845281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811695840195909552600184015490811695830195909552909304821660608401526002015463ffffffff808216608085015264010000000082041660a084015268010000000000000000810490911660c083015260ff7c010000000000000000000000000000000000000000000000000000000090910416151560e08201526113dc81611c0a565b6000848152600b602052604090206113f5908484612ddd565b50837f7b778136e5211932b51a145badd01959415e79e051a933604b3d323f862dcabf8484604051611428929190613699565b60405180910390a250505050565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146114a5576040517fc8bad78d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081146114df576040517fdfe9309000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006114ed828401846132e2565b600081815260076020526040902060020154909150640100000000900463ffffffff90811614611549576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600760205260409020546115719085906bffffffffffffffffffffffff1661389d565b600082815260076020526040902080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff929092169190911790556012546115c8908590613885565b6012556040516bffffffffffffffffffffffff8516815273ffffffffffffffffffffffffffffffffffffffff86169082907fafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa7348915062039060200160405180910390a35050505050565b611635610a47565b50565b600081815260076020526040812060020154610b689063ffffffff166112df565b611661610a47565b50505050565b60606000806000806116776128b3565b61167f610a47565b9295509295909350565b600081815260076020908152604080832081516101008101835281546bffffffffffffffffffffffff80821683526c010000000000000000000000009182900473ffffffffffffffffffffffffffffffffffffffff9081168488019081526001860154928316858801908152939092048116606080860191825260029096015463ffffffff80821660808801819052640100000000830490911660a0880190815268010000000000000000830490941660c088018190527c010000000000000000000000000000000000000000000000000000000090920460ff16151560e088019081528c8c52600b909a52978a2086519451925193519551995181548c9b999a8c9a8b9a8b9a8b9a8b9a8b9a93999895979596919593949093909187906117b0906139b5565b80601f01602080910402602001604051908101604052809291908181526020018280546117dc906139b5565b80156118295780601f106117fe57610100808354040283529160200191611829565b820191906000526020600020905b81548152906001019060200180831161180c57829003601f168201915b505050505096508263ffffffff169250995099509950995099509950995099509950509193959799909294969850565b6000611863610a47565b95945050505050565b6118746128eb565b600e5460e082015163ffffffff918216911610156118be576040517f39abc10400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604051806101200160405280826000015163ffffffff168152602001826020015163ffffffff168152602001826040015162ffffff168152602001826060015163ffffffff168152602001826080015162ffffff1681526020018260a0015161ffff1681526020018260c001516bffffffffffffffffffffffff1681526020018260e0015163ffffffff168152602001600d60010160049054906101000a900463ffffffff1663ffffffff16815250600d60008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a81548163ffffffff021916908363ffffffff16021790555060408201518160000160086101000a81548162ffffff021916908362ffffff160217905550606082015181600001600b6101000a81548163ffffffff021916908363ffffffff160217905550608082015181600001600f6101000a81548162ffffff021916908362ffffff16021790555060a08201518160000160126101000a81548161ffff021916908361ffff16021790555060c08201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555060e08201518160010160006101000a81548163ffffffff021916908363ffffffff1602179055506101008201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550905050806101000151600f81905550806101200151601081905550806101400151601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806101600151601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507ffe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de32581604051611bad9190613757565b60405180910390a150565b611bc06128eb565b6116358161296c565b3660008037600080366000845af43d6000803e808015611be8573d6000f35b3d6000fd5b6000610b68825490565b6000611c038383612a62565b9392505050565b806060015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c73576040517fa47c170600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60a081015163ffffffff90811614611635576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611c038383612a8c565b60035460ff1615610a70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152606401611043565b611d866040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001600081526020016000815260200160008152602001600081525090565b60008481526007602052604081206002015463ffffffff169080611da8612247565b915091506000611dba84848489612442565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff909b168b5260208b0199909952978901969096526bffffffffffffffffffffffff9096166060880152608087019190915260a086015250505060c082015290565b6000611e24612adb565b60208083015160009081526007825260409081902081516101008101835281546bffffffffffffffffffffffff808216835273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000092839004811696840196909652600184015490811694830194909452909204831660608301526002015463ffffffff808216608084015264010000000082041660a0830181905268010000000000000000820490931660c083015260ff7c010000000000000000000000000000000000000000000000000000000090910416151560e0820152904310611f38576040517f9c0083a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611f4b8184600001518560600151612b4d565b60005a90506000634585e33b60e01b8560400151604051602401611f6f91906136e6565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611fe185608001518460c0015183612c9e565b93505a611fee9083613945565b91506000612007838760a001518860c001516001612442565b6020808801516000908152600790915260409020549091506120389082906bffffffffffffffffffffffff1661395c565b6020878101805160009081526007909252604080832080547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9586161790559051825290206001015461209b9183911661389d565b60208781018051600090815260078352604080822060010180547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166bffffffffffffffffffffffff9687161790558a5192518252808220805486166c0100000000000000000000000073ffffffffffffffffffffffffffffffffffffffff958616021790558a51909216815260089092529020546121549183917401000000000000000000000000000000000000000090041661389d565b60086000886000015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550856000015173ffffffffffffffffffffffffffffffffffffffff1685151587602001517fcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6848a6040015160405161222092919061380d565b60405180910390a4505050506122366001600255565b919050565b6000611c038383612cea565b6000806000600d600001600f9054906101000a900462ffffff1662ffffff1690506000808263ffffffff161190506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156122de57600080fd5b505afa1580156122f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231691906133eb565b50945090925084915050801561233a57506123318242613945565b8463ffffffff16105b80612346575060008113155b1561235557600f549550612359565b8095505b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b1580156123bf57600080fd5b505afa1580156123d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123f791906133eb565b50945090925084915050801561241b57506124128242613945565b8463ffffffff16105b80612427575060008113155b1561243657601054945061243a565b8094505b505050509091565b6040805161012081018252600d5463ffffffff80821683526401000000008083048216602085015268010000000000000000830462ffffff908116958501959095526b0100000000000000000000008304821660608501526f01000000000000000000000000000000830490941660808401527201000000000000000000000000000000000000820461ffff1660a08401819052740100000000000000000000000000000000000000009092046bffffffffffffffffffffffff1660c0840152600e5480821660e08501529390930490921661010082015260009182906125299087613908565b90508380156125375750803a105b1561253f57503a5b600061256b7f000000000000000000000000000000000000000000000000000000000000000089613885565b6125759083613908565b83519091506000906125919063ffffffff16633b9aca00613885565b9050600060027f000000000000000000000000000000000000000000000000000000000000000060028111156125c9576125c9613a71565b141561271157604080516000815260208101909152871561262857600036604051806080016040528060488152602001613b3e604891396040516020016126129392919061359c565b6040516020818303038152906040529050612647565b6040518061014001604052806101108152602001613b86610110913990505b6040517f49948e0e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906349948e0e906126b99084906004016136e6565b60206040518083038186803b1580156126d157600080fd5b505afa1580156126e5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061270991906132fb565b9150506127ec565b60017f0000000000000000000000000000000000000000000000000000000000000000600281111561274557612745613a71565b14156127ec577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c6f7de0e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156127b157600080fd5b505afa1580156127c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127e991906132fb565b90505b8661280857808560a0015161ffff166128059190613908565b90505b6000856020015163ffffffff1664e8d4a510006128259190613908565b89846128318588613885565b61283f90633b9aca00613908565b6128499190613908565b61285391906138cd565b61285d9190613885565b90506b033b2e3c9fd0803ce80000008111156128a5576040517f2ad7547a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9a9950505050505050505050565b3215610a70576040517fb60ac5db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005473ffffffffffffffffffffffffffffffffffffffff163314610a70576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401611043565b73ffffffffffffffffffffffffffffffffffffffff81163314156129ec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401611043565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6000826000018281548110612a7957612a79613acf565b9060005260206000200154905092915050565b6000818152600183016020526040812054612ad357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610b68565b506000610b68565b600280541415612b47576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401611043565b60028055565b8260e0015115612b89576040517f514b6c2400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090206001015460ff16612beb576040517fcfbacfd800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82516bffffffffffffffffffffffff16811115612c34576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff16836020015173ffffffffffffffffffffffffffffffffffffffff16141561112e576040517f06bc104000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005a611388811015612cb057600080fd5b611388810390508460408204820311612cc857600080fd5b50823b612cd457600080fd5b60008083516020850160008789f1949350505050565b60008181526001830160205260408120548015612dd3576000612d0e600183613945565b8554909150600090612d2290600190613945565b9050818114612d87576000866000018281548110612d4257612d42613acf565b9060005260206000200154905080876000018481548110612d6557612d65613acf565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612d9857612d98613aa0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610b68565b6000915050610b68565b828054612de9906139b5565b90600052602060002090601f016020900481019282612e0b5760008555612e6f565b82601f10612e42578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555612e6f565b82800160010185558215612e6f579182015b82811115612e6f578235825591602001919060010190612e54565b50612e7b929150612e7f565b5090565b5b80821115612e7b5760008155600101612e80565b803573ffffffffffffffffffffffffffffffffffffffff8116811461223657600080fd5b60008083601f840112612eca57600080fd5b50813567ffffffffffffffff811115612ee257600080fd5b6020830191508360208260051b8501011115612efd57600080fd5b9250929050565b60008083601f840112612f1657600080fd5b50813567ffffffffffffffff811115612f2e57600080fd5b602083019150836020828501011115612efd57600080fd5b803561ffff8116811461223657600080fd5b803562ffffff8116811461223657600080fd5b803563ffffffff8116811461223657600080fd5b805169ffffffffffffffffffff8116811461223657600080fd5b80356bffffffffffffffffffffffff8116811461223657600080fd5b600060208284031215612fc757600080fd5b611c0382612e94565b60008060408385031215612fe357600080fd5b612fec83612e94565b9150612ffa60208401612e94565b90509250929050565b6000806040838503121561301657600080fd5b61301f83612e94565b915060208301356004811061303357600080fd5b809150509250929050565b6000806000806060858703121561305457600080fd5b61305d85612e94565b935060208501359250604085013567ffffffffffffffff81111561308057600080fd5b61308c87828801612f04565b95989497509550505050565b6000806000806000608086880312156130b057600080fd5b6130b986612e94565b94506130c760208701612f6b565b93506130d560408701612e94565b9250606086013567ffffffffffffffff8111156130f157600080fd5b6130fd88828901612f04565b969995985093965092949392505050565b6000806000806040858703121561312457600080fd5b843567ffffffffffffffff8082111561313c57600080fd5b61314888838901612eb8565b9096509450602087013591508082111561316157600080fd5b5061308c87828801612eb8565b60008060006040848603121561318357600080fd5b833567ffffffffffffffff81111561319a57600080fd5b6131a686828701612eb8565b90945092506131b9905060208501612e94565b90509250925092565b600080602083850312156131d557600080fd5b823567ffffffffffffffff8111156131ec57600080fd5b6131f885828601612f04565b90969095509350505050565b6000610180828403121561321757600080fd5b61321f613834565b61322883612f6b565b815261323660208401612f6b565b602082015261324760408401612f58565b604082015261325860608401612f6b565b606082015261326960808401612f58565b608082015261327a60a08401612f46565b60a082015261328b60c08401612f99565b60c082015261329c60e08401612f6b565b60e0820152610100838101359082015261012080840135908201526101406132c5818501612e94565b908201526101606132d7848201612e94565b908201529392505050565b6000602082840312156132f457600080fd5b5035919050565b60006020828403121561330d57600080fd5b5051919050565b6000806040838503121561332757600080fd5b82359150612ffa60208401612e94565b60008060006040848603121561334c57600080fd5b83359250602084013567ffffffffffffffff81111561336a57600080fd5b61337686828701612f04565b9497909650939450505050565b6000806040838503121561339657600080fd5b50508035926020909101359150565b600080604083850312156133b857600080fd5b82359150612ffa60208401612f6b565b600080604083850312156133db57600080fd5b82359150612ffa60208401612f99565b600080600080600060a0868803121561340357600080fd5b61340c86612f7f565b945060208601519350604086015192506060860151915061342f60808701612f7f565b90509295509295909350565b60008151808452613453816020860160208601613989565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b805163ffffffff16825260208101516134a6602084018263ffffffff169052565b5060408101516134bd604084018262ffffff169052565b5060608101516134d5606084018263ffffffff169052565b5060808101516134ec608084018262ffffff169052565b5060a081015161350260a084018261ffff169052565b5060c081015161352260c08401826bffffffffffffffffffffffff169052565b5060e081015161353a60e084018263ffffffff169052565b50610100818101519083015261012080820151908301526101408082015173ffffffffffffffffffffffffffffffffffffffff81168285015250506101608181015173ffffffffffffffffffffffffffffffffffffffff811684830152611661565b8284823760008382016000815283516135b9818360208801613989565b0195945050505050565b600061012073ffffffffffffffffffffffffffffffffffffffff808d16845263ffffffff8c1660208501528160408501526136008285018c61343b565b6bffffffffffffffffffffffff9a8b16606086015298811660808501529690961660a08301525067ffffffffffffffff9390931660c0840152941660e082015292151561010090930192909252949350505050565b6020808252825182820181905260009190848201906040850190845b8181101561368d57835183529284019291840191600101613671565b50909695505050505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b602081526000611c03602083018461343b565b60a08152600061370c60a083018861343b565b90508560208301528460408301528360608301528260808301529695505050505050565b602081016004831061374457613744613a71565b91905290565b6020810161374483613b2d565b6101808101610b688284613485565b600061022080830163ffffffff875116845260206bffffffffffffffffffffffff81890151168186015260408801516040860152606088015160608601526137b16080860188613485565b6102008501929092528451908190526102408401918086019160005b818110156137ff57835173ffffffffffffffffffffffffffffffffffffffff16855293820193928201926001016137cd565b509298975050505050505050565b6bffffffffffffffffffffffff8316815260406020820152600061111e604083018461343b565b604051610180810167ffffffffffffffff8111828210171561387f577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405290565b6000821982111561389857613898613a42565b500190565b60006bffffffffffffffffffffffff8083168185168083038211156138c4576138c4613a42565b01949350505050565b600082613903577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561394057613940613a42565b500290565b60008282101561395757613957613a42565b500390565b60006bffffffffffffffffffffffff8381169083168181101561398157613981613a42565b039392505050565b60005b838110156139a457818101518382015260200161398c565b838111156116615750506000910152565b600181811c908216806139c957607f821691505b60208210811415613a03577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a3b57613a3b613a42565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6003811061163557611635613a7156fe3078666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666663078666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666a164736f6c6343000806000a", -} - -var KeeperRegistryABI = KeeperRegistryMetaData.ABI - -var KeeperRegistryBin = KeeperRegistryMetaData.Bin - -func DeployKeeperRegistry(auth *bind.TransactOpts, backend bind.ContractBackend, keeperRegistryLogic common.Address, config Config) (common.Address, *types.Transaction, *KeeperRegistry, error) { - parsed, err := KeeperRegistryMetaData.GetAbi() - if err != nil { - return common.Address{}, nil, nil, err - } - if parsed == nil { - return common.Address{}, nil, nil, errors.New("GetABI returned nil") - } - - address, tx, contract, err := bind.DeployContract(auth, *parsed, common.FromHex(KeeperRegistryBin), backend, keeperRegistryLogic, config) - if err != nil { - return common.Address{}, nil, nil, err - } - return address, tx, &KeeperRegistry{address: address, abi: *parsed, KeeperRegistryCaller: KeeperRegistryCaller{contract: contract}, KeeperRegistryTransactor: KeeperRegistryTransactor{contract: contract}, KeeperRegistryFilterer: KeeperRegistryFilterer{contract: contract}}, nil -} - -type KeeperRegistry struct { - address common.Address - abi abi.ABI - KeeperRegistryCaller - KeeperRegistryTransactor - KeeperRegistryFilterer -} - -type KeeperRegistryCaller struct { - contract *bind.BoundContract -} - -type KeeperRegistryTransactor struct { - contract *bind.BoundContract -} - -type KeeperRegistryFilterer struct { - contract *bind.BoundContract -} - -type KeeperRegistrySession struct { - Contract *KeeperRegistry - CallOpts bind.CallOpts - TransactOpts bind.TransactOpts -} - -type KeeperRegistryCallerSession struct { - Contract *KeeperRegistryCaller - CallOpts bind.CallOpts -} - -type KeeperRegistryTransactorSession struct { - Contract *KeeperRegistryTransactor - TransactOpts bind.TransactOpts -} - -type KeeperRegistryRaw struct { - Contract *KeeperRegistry -} - -type KeeperRegistryCallerRaw struct { - Contract *KeeperRegistryCaller -} - -type KeeperRegistryTransactorRaw struct { - Contract *KeeperRegistryTransactor -} - -func NewKeeperRegistry(address common.Address, backend bind.ContractBackend) (*KeeperRegistry, error) { - abi, err := abi.JSON(strings.NewReader(KeeperRegistryABI)) - if err != nil { - return nil, err - } - contract, err := bindKeeperRegistry(address, backend, backend, backend) - if err != nil { - return nil, err - } - return &KeeperRegistry{address: address, abi: abi, KeeperRegistryCaller: KeeperRegistryCaller{contract: contract}, KeeperRegistryTransactor: KeeperRegistryTransactor{contract: contract}, KeeperRegistryFilterer: KeeperRegistryFilterer{contract: contract}}, nil -} - -func NewKeeperRegistryCaller(address common.Address, caller bind.ContractCaller) (*KeeperRegistryCaller, error) { - contract, err := bindKeeperRegistry(address, caller, nil, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryCaller{contract: contract}, nil -} - -func NewKeeperRegistryTransactor(address common.Address, transactor bind.ContractTransactor) (*KeeperRegistryTransactor, error) { - contract, err := bindKeeperRegistry(address, nil, transactor, nil) - if err != nil { - return nil, err - } - return &KeeperRegistryTransactor{contract: contract}, nil -} - -func NewKeeperRegistryFilterer(address common.Address, filterer bind.ContractFilterer) (*KeeperRegistryFilterer, error) { - contract, err := bindKeeperRegistry(address, nil, nil, filterer) - if err != nil { - return nil, err - } - return &KeeperRegistryFilterer{contract: contract}, nil -} - -func bindKeeperRegistry(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { - parsed, err := KeeperRegistryMetaData.GetAbi() - if err != nil { - return nil, err - } - return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil -} - -func (_KeeperRegistry *KeeperRegistryRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistry.Contract.KeeperRegistryCaller.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.Contract.KeeperRegistryTransactor.contract.Transfer(opts) -} - -func (_KeeperRegistry *KeeperRegistryRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistry.Contract.KeeperRegistryTransactor.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { - return _KeeperRegistry.Contract.contract.Call(opts, result, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.Contract.contract.Transfer(opts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { - return _KeeperRegistry.Contract.contract.Transact(opts, method, params...) -} - -func (_KeeperRegistry *KeeperRegistryCaller) ARBNITROORACLE(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "ARB_NITRO_ORACLE") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) ARBNITROORACLE() (common.Address, error) { - return _KeeperRegistry.Contract.ARBNITROORACLE(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) ARBNITROORACLE() (common.Address, error) { - return _KeeperRegistry.Contract.ARBNITROORACLE(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) FASTGASFEED(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "FAST_GAS_FEED") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) FASTGASFEED() (common.Address, error) { - return _KeeperRegistry.Contract.FASTGASFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) FASTGASFEED() (common.Address, error) { - return _KeeperRegistry.Contract.FASTGASFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) KEEPERREGISTRYLOGIC(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "KEEPER_REGISTRY_LOGIC") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) KEEPERREGISTRYLOGIC() (common.Address, error) { - return _KeeperRegistry.Contract.KEEPERREGISTRYLOGIC(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) KEEPERREGISTRYLOGIC() (common.Address, error) { - return _KeeperRegistry.Contract.KEEPERREGISTRYLOGIC(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) LINK(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "LINK") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) LINK() (common.Address, error) { - return _KeeperRegistry.Contract.LINK(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) LINK() (common.Address, error) { - return _KeeperRegistry.Contract.LINK(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) LINKETHFEED(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "LINK_ETH_FEED") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) LINKETHFEED() (common.Address, error) { - return _KeeperRegistry.Contract.LINKETHFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) LINKETHFEED() (common.Address, error) { - return _KeeperRegistry.Contract.LINKETHFEED(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) OPTIMISMORACLE(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "OPTIMISM_ORACLE") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) OPTIMISMORACLE() (common.Address, error) { - return _KeeperRegistry.Contract.OPTIMISMORACLE(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) OPTIMISMORACLE() (common.Address, error) { - return _KeeperRegistry.Contract.OPTIMISMORACLE(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) PAYMENTMODEL(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "PAYMENT_MODEL") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) PAYMENTMODEL() (uint8, error) { - return _KeeperRegistry.Contract.PAYMENTMODEL(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) PAYMENTMODEL() (uint8, error) { - return _KeeperRegistry.Contract.PAYMENTMODEL(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) REGISTRYGASOVERHEAD(opts *bind.CallOpts) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "REGISTRY_GAS_OVERHEAD") - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) REGISTRYGASOVERHEAD() (*big.Int, error) { - return _KeeperRegistry.Contract.REGISTRYGASOVERHEAD(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) REGISTRYGASOVERHEAD() (*big.Int, error) { - return _KeeperRegistry.Contract.REGISTRYGASOVERHEAD(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getActiveUpkeepIDs", startIndex, maxCount) - - if err != nil { - return *new([]*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _KeeperRegistry.Contract.GetActiveUpkeepIDs(&_KeeperRegistry.CallOpts, startIndex, maxCount) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetActiveUpkeepIDs(startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) { - return _KeeperRegistry.Contract.GetActiveUpkeepIDs(&_KeeperRegistry.CallOpts, startIndex, maxCount) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetKeeperInfo(opts *bind.CallOpts, query common.Address) (GetKeeperInfo, - - error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getKeeperInfo", query) - - outstruct := new(GetKeeperInfo) - if err != nil { - return *outstruct, err - } - - outstruct.Payee = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.Active = *abi.ConvertType(out[1], new(bool)).(*bool) - outstruct.Balance = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - - return *outstruct, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetKeeperInfo(query common.Address) (GetKeeperInfo, - - error) { - return _KeeperRegistry.Contract.GetKeeperInfo(&_KeeperRegistry.CallOpts, query) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetKeeperInfo(query common.Address) (GetKeeperInfo, - - error) { - return _KeeperRegistry.Contract.GetKeeperInfo(&_KeeperRegistry.CallOpts, query) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetMaxPaymentForGas(opts *bind.CallOpts, gasLimit *big.Int) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getMaxPaymentForGas", gasLimit) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetMaxPaymentForGas(gasLimit *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMaxPaymentForGas(&_KeeperRegistry.CallOpts, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetMaxPaymentForGas(gasLimit *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMaxPaymentForGas(&_KeeperRegistry.CallOpts, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getMinBalanceForUpkeep", id) - - if err != nil { - return *new(*big.Int), err - } - - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMinBalanceForUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetMinBalanceForUpkeep(id *big.Int) (*big.Int, error) { - return _KeeperRegistry.Contract.GetMinBalanceForUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getPeerRegistryMigrationPermission", peer) - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _KeeperRegistry.Contract.GetPeerRegistryMigrationPermission(&_KeeperRegistry.CallOpts, peer) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetPeerRegistryMigrationPermission(peer common.Address) (uint8, error) { - return _KeeperRegistry.Contract.GetPeerRegistryMigrationPermission(&_KeeperRegistry.CallOpts, peer) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetState(opts *bind.CallOpts) (GetState, - - error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getState") - - outstruct := new(GetState) - if err != nil { - return *outstruct, err - } - - outstruct.State = *abi.ConvertType(out[0], new(State)).(*State) - outstruct.Config = *abi.ConvertType(out[1], new(Config)).(*Config) - outstruct.Keepers = *abi.ConvertType(out[2], new([]common.Address)).(*[]common.Address) - - return *outstruct, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetState() (GetState, - - error) { - return _KeeperRegistry.Contract.GetState(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetState() (GetState, - - error) { - return _KeeperRegistry.Contract.GetState(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) GetUpkeep(opts *bind.CallOpts, id *big.Int) (GetUpkeep, - - error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "getUpkeep", id) - - outstruct := new(GetUpkeep) - if err != nil { - return *outstruct, err - } - - outstruct.Target = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - outstruct.ExecuteGas = *abi.ConvertType(out[1], new(uint32)).(*uint32) - outstruct.CheckData = *abi.ConvertType(out[2], new([]byte)).(*[]byte) - outstruct.Balance = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) - outstruct.LastKeeper = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) - outstruct.Admin = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) - outstruct.MaxValidBlocknumber = *abi.ConvertType(out[6], new(uint64)).(*uint64) - outstruct.AmountSpent = *abi.ConvertType(out[7], new(*big.Int)).(**big.Int) - outstruct.Paused = *abi.ConvertType(out[8], new(bool)).(*bool) - - return *outstruct, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) GetUpkeep(id *big.Int) (GetUpkeep, - - error) { - return _KeeperRegistry.Contract.GetUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) GetUpkeep(id *big.Int) (GetUpkeep, - - error) { - return _KeeperRegistry.Contract.GetUpkeep(&_KeeperRegistry.CallOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryCaller) Owner(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "owner") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) Owner() (common.Address, error) { - return _KeeperRegistry.Contract.Owner(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) Owner() (common.Address, error) { - return _KeeperRegistry.Contract.Owner(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) Paused(opts *bind.CallOpts) (bool, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "paused") - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) Paused() (bool, error) { - return _KeeperRegistry.Contract.Paused(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) Paused() (bool, error) { - return _KeeperRegistry.Contract.Paused(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) TypeAndVersion(opts *bind.CallOpts) (string, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "typeAndVersion") - - if err != nil { - return *new(string), err - } - - out0 := *abi.ConvertType(out[0], new(string)).(*string) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) TypeAndVersion() (string, error) { - return _KeeperRegistry.Contract.TypeAndVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) TypeAndVersion() (string, error) { - return _KeeperRegistry.Contract.TypeAndVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCaller) UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) { - var out []interface{} - err := _KeeperRegistry.contract.Call(opts, &out, "upkeepTranscoderVersion") - - if err != nil { - return *new(uint8), err - } - - out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) - - return out0, err - -} - -func (_KeeperRegistry *KeeperRegistrySession) UpkeepTranscoderVersion() (uint8, error) { - return _KeeperRegistry.Contract.UpkeepTranscoderVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryCallerSession) UpkeepTranscoderVersion() (uint8, error) { - return _KeeperRegistry.Contract.UpkeepTranscoderVersion(&_KeeperRegistry.CallOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "acceptOwnership") -} - -func (_KeeperRegistry *KeeperRegistrySession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptOwnership(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AcceptOwnership() (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptOwnership(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AcceptPayeeship(opts *bind.TransactOpts, keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "acceptPayeeship", keeper) -} - -func (_KeeperRegistry *KeeperRegistrySession) AcceptPayeeship(keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptPayeeship(&_KeeperRegistry.TransactOpts, keeper) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AcceptPayeeship(keeper common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptPayeeship(&_KeeperRegistry.TransactOpts, keeper) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "acceptUpkeepAdmin", id) -} - -func (_KeeperRegistry *KeeperRegistrySession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptUpkeepAdmin(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AcceptUpkeepAdmin(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AcceptUpkeepAdmin(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "addFunds", id, amount) -} - -func (_KeeperRegistry *KeeperRegistrySession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AddFunds(&_KeeperRegistry.TransactOpts, id, amount) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) AddFunds(id *big.Int, amount *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.AddFunds(&_KeeperRegistry.TransactOpts, id, amount) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "cancelUpkeep", id) -} - -func (_KeeperRegistry *KeeperRegistrySession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CancelUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) CancelUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CancelUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) CheckUpkeep(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "checkUpkeep", id, from) -} - -func (_KeeperRegistry *KeeperRegistrySession) CheckUpkeep(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CheckUpkeep(&_KeeperRegistry.TransactOpts, id, from) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) CheckUpkeep(id *big.Int, from common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.CheckUpkeep(&_KeeperRegistry.TransactOpts, id, from) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "migrateUpkeeps", ids, destination) -} - -func (_KeeperRegistry *KeeperRegistrySession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.MigrateUpkeeps(&_KeeperRegistry.TransactOpts, ids, destination) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) MigrateUpkeeps(ids []*big.Int, destination common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.MigrateUpkeeps(&_KeeperRegistry.TransactOpts, ids, destination) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "onTokenTransfer", sender, amount, data) -} - -func (_KeeperRegistry *KeeperRegistrySession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.OnTokenTransfer(&_KeeperRegistry.TransactOpts, sender, amount, data) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) OnTokenTransfer(sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.OnTokenTransfer(&_KeeperRegistry.TransactOpts, sender, amount, data) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "pause") -} - -func (_KeeperRegistry *KeeperRegistrySession) Pause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Pause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) Pause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Pause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "pauseUpkeep", id) -} - -func (_KeeperRegistry *KeeperRegistrySession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.PauseUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) PauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.PauseUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) PerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "performUpkeep", id, performData) -} - -func (_KeeperRegistry *KeeperRegistrySession) PerformUpkeep(id *big.Int, performData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.PerformUpkeep(&_KeeperRegistry.TransactOpts, id, performData) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) PerformUpkeep(id *big.Int, performData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.PerformUpkeep(&_KeeperRegistry.TransactOpts, id, performData) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "receiveUpkeeps", encodedUpkeeps) -} - -func (_KeeperRegistry *KeeperRegistrySession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.ReceiveUpkeeps(&_KeeperRegistry.TransactOpts, encodedUpkeeps) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) ReceiveUpkeeps(encodedUpkeeps []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.ReceiveUpkeeps(&_KeeperRegistry.TransactOpts, encodedUpkeeps) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "recoverFunds") -} - -func (_KeeperRegistry *KeeperRegistrySession) RecoverFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.RecoverFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) RecoverFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.RecoverFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "registerUpkeep", target, gasLimit, admin, checkData) -} - -func (_KeeperRegistry *KeeperRegistrySession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.RegisterUpkeep(&_KeeperRegistry.TransactOpts, target, gasLimit, admin, checkData) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) RegisterUpkeep(target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.RegisterUpkeep(&_KeeperRegistry.TransactOpts, target, gasLimit, admin, checkData) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetConfig(opts *bind.TransactOpts, config Config) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setConfig", config) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetConfig(config Config) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetConfig(&_KeeperRegistry.TransactOpts, config) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetConfig(config Config) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetConfig(&_KeeperRegistry.TransactOpts, config) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetKeepers(opts *bind.TransactOpts, keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setKeepers", keepers, payees) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetKeepers(keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetKeepers(&_KeeperRegistry.TransactOpts, keepers, payees) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetKeepers(keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetKeepers(&_KeeperRegistry.TransactOpts, keepers, payees) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setPeerRegistryMigrationPermission", peer, permission) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetPeerRegistryMigrationPermission(&_KeeperRegistry.TransactOpts, peer, permission) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetPeerRegistryMigrationPermission(peer common.Address, permission uint8) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetPeerRegistryMigrationPermission(&_KeeperRegistry.TransactOpts, peer, permission) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "setUpkeepGasLimit", id, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistrySession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetUpkeepGasLimit(&_KeeperRegistry.TransactOpts, id, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) SetUpkeepGasLimit(id *big.Int, gasLimit uint32) (*types.Transaction, error) { - return _KeeperRegistry.Contract.SetUpkeepGasLimit(&_KeeperRegistry.TransactOpts, id, gasLimit) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "transferOwnership", to) -} - -func (_KeeperRegistry *KeeperRegistrySession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferOwnership(&_KeeperRegistry.TransactOpts, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) TransferOwnership(to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferOwnership(&_KeeperRegistry.TransactOpts, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) TransferPayeeship(opts *bind.TransactOpts, keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "transferPayeeship", keeper, proposed) -} - -func (_KeeperRegistry *KeeperRegistrySession) TransferPayeeship(keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferPayeeship(&_KeeperRegistry.TransactOpts, keeper, proposed) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) TransferPayeeship(keeper common.Address, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferPayeeship(&_KeeperRegistry.TransactOpts, keeper, proposed) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "transferUpkeepAdmin", id, proposed) -} - -func (_KeeperRegistry *KeeperRegistrySession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferUpkeepAdmin(&_KeeperRegistry.TransactOpts, id, proposed) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) TransferUpkeepAdmin(id *big.Int, proposed common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.TransferUpkeepAdmin(&_KeeperRegistry.TransactOpts, id, proposed) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "unpause") -} - -func (_KeeperRegistry *KeeperRegistrySession) Unpause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Unpause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) Unpause() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Unpause(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "unpauseUpkeep", id) -} - -func (_KeeperRegistry *KeeperRegistrySession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.UnpauseUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) UnpauseUpkeep(id *big.Int) (*types.Transaction, error) { - return _KeeperRegistry.Contract.UnpauseUpkeep(&_KeeperRegistry.TransactOpts, id) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) UpdateCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "updateCheckData", id, newCheckData) -} - -func (_KeeperRegistry *KeeperRegistrySession) UpdateCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.UpdateCheckData(&_KeeperRegistry.TransactOpts, id, newCheckData) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) UpdateCheckData(id *big.Int, newCheckData []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.UpdateCheckData(&_KeeperRegistry.TransactOpts, id, newCheckData) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "withdrawFunds", id, to) -} - -func (_KeeperRegistry *KeeperRegistrySession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawFunds(&_KeeperRegistry.TransactOpts, id, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) WithdrawFunds(id *big.Int, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawFunds(&_KeeperRegistry.TransactOpts, id, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "withdrawOwnerFunds") -} - -func (_KeeperRegistry *KeeperRegistrySession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawOwnerFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) WithdrawOwnerFunds() (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawOwnerFunds(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.contract.Transact(opts, "withdrawPayment", from, to) -} - -func (_KeeperRegistry *KeeperRegistrySession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawPayment(&_KeeperRegistry.TransactOpts, from, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) WithdrawPayment(from common.Address, to common.Address) (*types.Transaction, error) { - return _KeeperRegistry.Contract.WithdrawPayment(&_KeeperRegistry.TransactOpts, from, to) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) { - return _KeeperRegistry.contract.RawTransact(opts, calldata) -} - -func (_KeeperRegistry *KeeperRegistrySession) Fallback(calldata []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.Fallback(&_KeeperRegistry.TransactOpts, calldata) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) { - return _KeeperRegistry.Contract.Fallback(&_KeeperRegistry.TransactOpts, calldata) -} - -func (_KeeperRegistry *KeeperRegistryTransactor) Receive(opts *bind.TransactOpts) (*types.Transaction, error) { - return _KeeperRegistry.contract.RawTransact(opts, nil) -} - -func (_KeeperRegistry *KeeperRegistrySession) Receive() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Receive(&_KeeperRegistry.TransactOpts) -} - -func (_KeeperRegistry *KeeperRegistryTransactorSession) Receive() (*types.Transaction, error) { - return _KeeperRegistry.Contract.Receive(&_KeeperRegistry.TransactOpts) -} - -type KeeperRegistryConfigSetIterator struct { - Event *KeeperRegistryConfigSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryConfigSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryConfigSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryConfigSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryConfigSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryConfigSet struct { - Config Config - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterConfigSet(opts *bind.FilterOpts) (*KeeperRegistryConfigSetIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return &KeeperRegistryConfigSetIterator{contract: _KeeperRegistry.contract, event: "ConfigSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryConfigSet) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "ConfigSet") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryConfigSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseConfigSet(log types.Log) (*KeeperRegistryConfigSet, error) { - event := new(KeeperRegistryConfigSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "ConfigSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryFundsAddedIterator struct { - Event *KeeperRegistryFundsAdded - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryFundsAddedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsAdded) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryFundsAddedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryFundsAddedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryFundsAdded struct { - Id *big.Int - From common.Address - Amount *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*KeeperRegistryFundsAddedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "FundsAdded", idRule, fromRule) - if err != nil { - return nil, err - } - return &KeeperRegistryFundsAddedIterator{contract: _KeeperRegistry.contract, event: "FundsAdded", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "FundsAdded", idRule, fromRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryFundsAdded) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseFundsAdded(log types.Log) (*KeeperRegistryFundsAdded, error) { - event := new(KeeperRegistryFundsAdded) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsAdded", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryFundsWithdrawnIterator struct { - Event *KeeperRegistryFundsWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryFundsWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryFundsWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryFundsWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryFundsWithdrawn struct { - Id *big.Int - Amount *big.Int - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryFundsWithdrawnIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "FundsWithdrawn", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryFundsWithdrawnIterator{contract: _KeeperRegistry.contract, event: "FundsWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsWithdrawn, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "FundsWithdrawn", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseFundsWithdrawn(log types.Log) (*KeeperRegistryFundsWithdrawn, error) { - event := new(KeeperRegistryFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "FundsWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryKeepersUpdatedIterator struct { - Event *KeeperRegistryKeepersUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryKeepersUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryKeepersUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryKeepersUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryKeepersUpdatedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryKeepersUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryKeepersUpdated struct { - Keepers []common.Address - Payees []common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterKeepersUpdated(opts *bind.FilterOpts) (*KeeperRegistryKeepersUpdatedIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "KeepersUpdated") - if err != nil { - return nil, err - } - return &KeeperRegistryKeepersUpdatedIterator{contract: _KeeperRegistry.contract, event: "KeepersUpdated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchKeepersUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryKeepersUpdated) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "KeepersUpdated") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryKeepersUpdated) - if err := _KeeperRegistry.contract.UnpackLog(event, "KeepersUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseKeepersUpdated(log types.Log) (*KeeperRegistryKeepersUpdated, error) { - event := new(KeeperRegistryKeepersUpdated) - if err := _KeeperRegistry.contract.UnpackLog(event, "KeepersUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryOwnerFundsWithdrawnIterator struct { - Event *KeeperRegistryOwnerFundsWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryOwnerFundsWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnerFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnerFundsWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryOwnerFundsWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryOwnerFundsWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryOwnerFundsWithdrawn struct { - Amount *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*KeeperRegistryOwnerFundsWithdrawnIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "OwnerFundsWithdrawn") - if err != nil { - return nil, err - } - return &KeeperRegistryOwnerFundsWithdrawnIterator{contract: _KeeperRegistry.contract, event: "OwnerFundsWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnerFundsWithdrawn) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "OwnerFundsWithdrawn") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryOwnerFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseOwnerFundsWithdrawn(log types.Log) (*KeeperRegistryOwnerFundsWithdrawn, error) { - event := new(KeeperRegistryOwnerFundsWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnerFundsWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryOwnershipTransferRequestedIterator struct { - Event *KeeperRegistryOwnershipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryOwnershipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryOwnershipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryOwnershipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryOwnershipTransferRequested struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferRequestedIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryOwnershipTransferRequestedIterator{contract: _KeeperRegistry.contract, event: "OwnershipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "OwnershipTransferRequested", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryOwnershipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryOwnershipTransferRequested, error) { - event := new(KeeperRegistryOwnershipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryOwnershipTransferredIterator struct { - Event *KeeperRegistryOwnershipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryOwnershipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryOwnershipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryOwnershipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryOwnershipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryOwnershipTransferred struct { - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferredIterator, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryOwnershipTransferredIterator{contract: _KeeperRegistry.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) { - - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "OwnershipTransferred", fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryOwnershipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseOwnershipTransferred(log types.Log) (*KeeperRegistryOwnershipTransferred, error) { - event := new(KeeperRegistryOwnershipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPausedIterator struct { - Event *KeeperRegistryPaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPaused struct { - Account common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPaused(opts *bind.FilterOpts) (*KeeperRegistryPausedIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "Paused") - if err != nil { - return nil, err - } - return &KeeperRegistryPausedIterator{contract: _KeeperRegistry.contract, event: "Paused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaused) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "Paused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Paused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePaused(log types.Log) (*KeeperRegistryPaused, error) { - event := new(KeeperRegistryPaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Paused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPayeeshipTransferRequestedIterator struct { - Event *KeeperRegistryPayeeshipTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPayeeshipTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPayeeshipTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPayeeshipTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPayeeshipTransferRequested struct { - Keeper common.Address - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPayeeshipTransferRequested(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferRequestedIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "PayeeshipTransferRequested", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryPayeeshipTransferRequestedIterator{contract: _KeeperRegistry.contract, event: "PayeeshipTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferRequested, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "PayeeshipTransferRequested", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPayeeshipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePayeeshipTransferRequested(log types.Log) (*KeeperRegistryPayeeshipTransferRequested, error) { - event := new(KeeperRegistryPayeeshipTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPayeeshipTransferredIterator struct { - Event *KeeperRegistryPayeeshipTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPayeeshipTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPayeeshipTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPayeeshipTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPayeeshipTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPayeeshipTransferred struct { - Keeper common.Address - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPayeeshipTransferred(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferredIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "PayeeshipTransferred", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryPayeeshipTransferredIterator{contract: _KeeperRegistry.contract, event: "PayeeshipTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferred, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "PayeeshipTransferred", keeperRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPayeeshipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePayeeshipTransferred(log types.Log) (*KeeperRegistryPayeeshipTransferred, error) { - event := new(KeeperRegistryPayeeshipTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "PayeeshipTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryPaymentWithdrawnIterator struct { - Event *KeeperRegistryPaymentWithdrawn - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryPaymentWithdrawnIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaymentWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryPaymentWithdrawn) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryPaymentWithdrawnIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryPaymentWithdrawnIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryPaymentWithdrawn struct { - Keeper common.Address - Amount *big.Int - To common.Address - Payee common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterPaymentWithdrawn(opts *bind.FilterOpts, keeper []common.Address, amount []*big.Int, to []common.Address) (*KeeperRegistryPaymentWithdrawnIterator, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var amountRule []interface{} - for _, amountItem := range amount { - amountRule = append(amountRule, amountItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "PaymentWithdrawn", keeperRule, amountRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryPaymentWithdrawnIterator{contract: _KeeperRegistry.contract, event: "PaymentWithdrawn", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaymentWithdrawn, keeper []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) { - - var keeperRule []interface{} - for _, keeperItem := range keeper { - keeperRule = append(keeperRule, keeperItem) - } - var amountRule []interface{} - for _, amountItem := range amount { - amountRule = append(amountRule, amountItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "PaymentWithdrawn", keeperRule, amountRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryPaymentWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParsePaymentWithdrawn(log types.Log) (*KeeperRegistryPaymentWithdrawn, error) { - event := new(KeeperRegistryPaymentWithdrawn) - if err := _KeeperRegistry.contract.UnpackLog(event, "PaymentWithdrawn", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUnpausedIterator struct { - Event *KeeperRegistryUnpaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUnpausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUnpausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUnpaused struct { - Account common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUnpaused(opts *bind.FilterOpts) (*KeeperRegistryUnpausedIterator, error) { - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return &KeeperRegistryUnpausedIterator{contract: _KeeperRegistry.contract, event: "Unpaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUnpaused) (event.Subscription, error) { - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "Unpaused") - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUnpaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Unpaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUnpaused(log types.Log) (*KeeperRegistryUnpaused, error) { - event := new(KeeperRegistryUnpaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "Unpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepAdminTransferRequestedIterator struct { - Event *KeeperRegistryUpkeepAdminTransferRequested - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepAdminTransferRequestedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepAdminTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepAdminTransferRequested) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepAdminTransferRequestedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepAdminTransferRequestedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepAdminTransferRequested struct { - Id *big.Int - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryUpkeepAdminTransferRequestedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepAdminTransferRequestedIterator{contract: _KeeperRegistry.contract, event: "UpkeepAdminTransferRequested", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepAdminTransferRequested", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepAdminTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepAdminTransferRequested(log types.Log) (*KeeperRegistryUpkeepAdminTransferRequested, error) { - event := new(KeeperRegistryUpkeepAdminTransferRequested) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepAdminTransferRequested", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepAdminTransferredIterator struct { - Event *KeeperRegistryUpkeepAdminTransferred - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepAdminTransferredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepAdminTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepAdminTransferred) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepAdminTransferredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepAdminTransferredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepAdminTransferred struct { - Id *big.Int - From common.Address - To common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryUpkeepAdminTransferredIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepAdminTransferredIterator{contract: _KeeperRegistry.contract, event: "UpkeepAdminTransferred", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - var toRule []interface{} - for _, toItem := range to { - toRule = append(toRule, toItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepAdminTransferred", idRule, fromRule, toRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepAdminTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepAdminTransferred(log types.Log) (*KeeperRegistryUpkeepAdminTransferred, error) { - event := new(KeeperRegistryUpkeepAdminTransferred) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepAdminTransferred", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepCanceledIterator struct { - Event *KeeperRegistryUpkeepCanceled - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepCanceledIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepCanceled) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepCanceledIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepCanceledIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepCanceled struct { - Id *big.Int - AtBlockHeight uint64 - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*KeeperRegistryUpkeepCanceledIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var atBlockHeightRule []interface{} - for _, atBlockHeightItem := range atBlockHeight { - atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepCanceledIterator{contract: _KeeperRegistry.contract, event: "UpkeepCanceled", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var atBlockHeightRule []interface{} - for _, atBlockHeightItem := range atBlockHeight { - atBlockHeightRule = append(atBlockHeightRule, atBlockHeightItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepCanceled", idRule, atBlockHeightRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepCanceled) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepCanceled(log types.Log) (*KeeperRegistryUpkeepCanceled, error) { - event := new(KeeperRegistryUpkeepCanceled) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepCanceled", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepCheckDataUpdatedIterator struct { - Event *KeeperRegistryUpkeepCheckDataUpdated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepCheckDataUpdatedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepCheckDataUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepCheckDataUpdated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepCheckDataUpdatedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepCheckDataUpdatedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepCheckDataUpdated struct { - Id *big.Int - NewCheckData []byte - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepCheckDataUpdated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepCheckDataUpdatedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepCheckDataUpdated", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepCheckDataUpdatedIterator{contract: _KeeperRegistry.contract, event: "UpkeepCheckDataUpdated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepCheckDataUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepCheckDataUpdated, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepCheckDataUpdated", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepCheckDataUpdated) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepCheckDataUpdated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepCheckDataUpdated(log types.Log) (*KeeperRegistryUpkeepCheckDataUpdated, error) { - event := new(KeeperRegistryUpkeepCheckDataUpdated) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepCheckDataUpdated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepGasLimitSetIterator struct { - Event *KeeperRegistryUpkeepGasLimitSet - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepGasLimitSetIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepGasLimitSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepGasLimitSet) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepGasLimitSetIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepGasLimitSetIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepGasLimitSet struct { - Id *big.Int - GasLimit *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepGasLimitSetIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepGasLimitSet", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepGasLimitSetIterator{contract: _KeeperRegistry.contract, event: "UpkeepGasLimitSet", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepGasLimitSet", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepGasLimitSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepGasLimitSet(log types.Log) (*KeeperRegistryUpkeepGasLimitSet, error) { - event := new(KeeperRegistryUpkeepGasLimitSet) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepGasLimitSet", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepMigratedIterator struct { - Event *KeeperRegistryUpkeepMigrated - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepMigratedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepMigrated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepMigrated) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepMigratedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepMigratedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepMigrated struct { - Id *big.Int - RemainingBalance *big.Int - Destination common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepMigratedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepMigrated", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepMigratedIterator{contract: _KeeperRegistry.contract, event: "UpkeepMigrated", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepMigrated, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepMigrated", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepMigrated) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepMigrated(log types.Log) (*KeeperRegistryUpkeepMigrated, error) { - event := new(KeeperRegistryUpkeepMigrated) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepMigrated", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepPausedIterator struct { - Event *KeeperRegistryUpkeepPaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepPausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepPaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepPausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepPausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepPaused struct { - Id *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepPausedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepPaused", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepPausedIterator{contract: _KeeperRegistry.contract, event: "UpkeepPaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepPaused, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepPaused", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepPaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepPaused(log types.Log) (*KeeperRegistryUpkeepPaused, error) { - event := new(KeeperRegistryUpkeepPaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepPaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepPerformedIterator struct { - Event *KeeperRegistryUpkeepPerformed - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepPerformedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepPerformed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepPerformed) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepPerformedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepPerformedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepPerformed struct { - Id *big.Int - Success bool - From common.Address - Payment *big.Int - PerformData []byte - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool, from []common.Address) (*KeeperRegistryUpkeepPerformedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var successRule []interface{} - for _, successItem := range success { - successRule = append(successRule, successItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepPerformed", idRule, successRule, fromRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepPerformedIterator{contract: _KeeperRegistry.contract, event: "UpkeepPerformed", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepPerformed, id []*big.Int, success []bool, from []common.Address) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - var successRule []interface{} - for _, successItem := range success { - successRule = append(successRule, successItem) - } - var fromRule []interface{} - for _, fromItem := range from { - fromRule = append(fromRule, fromItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepPerformed", idRule, successRule, fromRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepPerformed) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepPerformed(log types.Log) (*KeeperRegistryUpkeepPerformed, error) { - event := new(KeeperRegistryUpkeepPerformed) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepPerformed", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepReceivedIterator struct { - Event *KeeperRegistryUpkeepReceived - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepReceivedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepReceived) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepReceived) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepReceivedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepReceivedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepReceived struct { - Id *big.Int - StartingBalance *big.Int - ImportedFrom common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepReceivedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepReceived", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepReceivedIterator{contract: _KeeperRegistry.contract, event: "UpkeepReceived", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepReceived, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepReceived", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepReceived) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepReceived(log types.Log) (*KeeperRegistryUpkeepReceived, error) { - event := new(KeeperRegistryUpkeepReceived) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepReceived", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepRegisteredIterator struct { - Event *KeeperRegistryUpkeepRegistered - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepRegisteredIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepRegistered) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepRegistered) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepRegisteredIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepRegisteredIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepRegistered struct { - Id *big.Int - ExecuteGas uint32 - Admin common.Address - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepRegisteredIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepRegistered", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepRegisteredIterator{contract: _KeeperRegistry.contract, event: "UpkeepRegistered", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepRegistered, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepRegistered", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepRegistered) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepRegistered(log types.Log) (*KeeperRegistryUpkeepRegistered, error) { - event := new(KeeperRegistryUpkeepRegistered) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepRegistered", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type KeeperRegistryUpkeepUnpausedIterator struct { - Event *KeeperRegistryUpkeepUnpaused - - contract *bind.BoundContract - event string - - logs chan types.Log - sub ethereum.Subscription - done bool - fail error -} - -func (it *KeeperRegistryUpkeepUnpausedIterator) Next() bool { - - if it.fail != nil { - return false - } - - if it.done { - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - - select { - case log := <-it.logs: - it.Event = new(KeeperRegistryUpkeepUnpaused) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -func (it *KeeperRegistryUpkeepUnpausedIterator) Error() error { - return it.fail -} - -func (it *KeeperRegistryUpkeepUnpausedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -type KeeperRegistryUpkeepUnpaused struct { - Id *big.Int - Raw types.Log -} - -func (_KeeperRegistry *KeeperRegistryFilterer) FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepUnpausedIterator, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.FilterLogs(opts, "UpkeepUnpaused", idRule) - if err != nil { - return nil, err - } - return &KeeperRegistryUpkeepUnpausedIterator{contract: _KeeperRegistry.contract, event: "UpkeepUnpaused", logs: logs, sub: sub}, nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepUnpaused, id []*big.Int) (event.Subscription, error) { - - var idRule []interface{} - for _, idItem := range id { - idRule = append(idRule, idItem) - } - - logs, sub, err := _KeeperRegistry.contract.WatchLogs(opts, "UpkeepUnpaused", idRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - - event := new(KeeperRegistryUpkeepUnpaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -func (_KeeperRegistry *KeeperRegistryFilterer) ParseUpkeepUnpaused(log types.Log) (*KeeperRegistryUpkeepUnpaused, error) { - event := new(KeeperRegistryUpkeepUnpaused) - if err := _KeeperRegistry.contract.UnpackLog(event, "UpkeepUnpaused", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -type GetKeeperInfo struct { - Payee common.Address - Active bool - Balance *big.Int -} -type GetState struct { - State State - Config Config - Keepers []common.Address -} -type GetUpkeep struct { - Target common.Address - ExecuteGas uint32 - CheckData []byte - Balance *big.Int - LastKeeper common.Address - Admin common.Address - MaxValidBlocknumber uint64 - AmountSpent *big.Int - Paused bool -} - -func (_KeeperRegistry *KeeperRegistry) ParseLog(log types.Log) (generated.AbigenLog, error) { - switch log.Topics[0] { - case _KeeperRegistry.abi.Events["ConfigSet"].ID: - return _KeeperRegistry.ParseConfigSet(log) - case _KeeperRegistry.abi.Events["FundsAdded"].ID: - return _KeeperRegistry.ParseFundsAdded(log) - case _KeeperRegistry.abi.Events["FundsWithdrawn"].ID: - return _KeeperRegistry.ParseFundsWithdrawn(log) - case _KeeperRegistry.abi.Events["KeepersUpdated"].ID: - return _KeeperRegistry.ParseKeepersUpdated(log) - case _KeeperRegistry.abi.Events["OwnerFundsWithdrawn"].ID: - return _KeeperRegistry.ParseOwnerFundsWithdrawn(log) - case _KeeperRegistry.abi.Events["OwnershipTransferRequested"].ID: - return _KeeperRegistry.ParseOwnershipTransferRequested(log) - case _KeeperRegistry.abi.Events["OwnershipTransferred"].ID: - return _KeeperRegistry.ParseOwnershipTransferred(log) - case _KeeperRegistry.abi.Events["Paused"].ID: - return _KeeperRegistry.ParsePaused(log) - case _KeeperRegistry.abi.Events["PayeeshipTransferRequested"].ID: - return _KeeperRegistry.ParsePayeeshipTransferRequested(log) - case _KeeperRegistry.abi.Events["PayeeshipTransferred"].ID: - return _KeeperRegistry.ParsePayeeshipTransferred(log) - case _KeeperRegistry.abi.Events["PaymentWithdrawn"].ID: - return _KeeperRegistry.ParsePaymentWithdrawn(log) - case _KeeperRegistry.abi.Events["Unpaused"].ID: - return _KeeperRegistry.ParseUnpaused(log) - case _KeeperRegistry.abi.Events["UpkeepAdminTransferRequested"].ID: - return _KeeperRegistry.ParseUpkeepAdminTransferRequested(log) - case _KeeperRegistry.abi.Events["UpkeepAdminTransferred"].ID: - return _KeeperRegistry.ParseUpkeepAdminTransferred(log) - case _KeeperRegistry.abi.Events["UpkeepCanceled"].ID: - return _KeeperRegistry.ParseUpkeepCanceled(log) - case _KeeperRegistry.abi.Events["UpkeepCheckDataUpdated"].ID: - return _KeeperRegistry.ParseUpkeepCheckDataUpdated(log) - case _KeeperRegistry.abi.Events["UpkeepGasLimitSet"].ID: - return _KeeperRegistry.ParseUpkeepGasLimitSet(log) - case _KeeperRegistry.abi.Events["UpkeepMigrated"].ID: - return _KeeperRegistry.ParseUpkeepMigrated(log) - case _KeeperRegistry.abi.Events["UpkeepPaused"].ID: - return _KeeperRegistry.ParseUpkeepPaused(log) - case _KeeperRegistry.abi.Events["UpkeepPerformed"].ID: - return _KeeperRegistry.ParseUpkeepPerformed(log) - case _KeeperRegistry.abi.Events["UpkeepReceived"].ID: - return _KeeperRegistry.ParseUpkeepReceived(log) - case _KeeperRegistry.abi.Events["UpkeepRegistered"].ID: - return _KeeperRegistry.ParseUpkeepRegistered(log) - case _KeeperRegistry.abi.Events["UpkeepUnpaused"].ID: - return _KeeperRegistry.ParseUpkeepUnpaused(log) - - default: - return nil, fmt.Errorf("abigen wrapper received unknown log topic: %v", log.Topics[0]) - } -} - -func (KeeperRegistryConfigSet) Topic() common.Hash { - return common.HexToHash("0xfe125a41957477226ba20f85ef30a4024ea3bb8d066521ddc16df3f2944de325") -} - -func (KeeperRegistryFundsAdded) Topic() common.Hash { - return common.HexToHash("0xafd24114486da8ebfc32f3626dada8863652e187461aa74d4bfa734891506203") -} - -func (KeeperRegistryFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0xf3b5906e5672f3e524854103bcafbbdba80dbdfeca2c35e116127b1060a68318") -} - -func (KeeperRegistryKeepersUpdated) Topic() common.Hash { - return common.HexToHash("0x056264c94f28bb06c99d13f0446eb96c67c215d8d707bce2655a98ddf1c0b71f") -} - -func (KeeperRegistryOwnerFundsWithdrawn) Topic() common.Hash { - return common.HexToHash("0x1d07d0b0be43d3e5fee41a80b579af370affee03fa595bf56d5d4c19328162f1") -} - -func (KeeperRegistryOwnershipTransferRequested) Topic() common.Hash { - return common.HexToHash("0xed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae1278") -} - -func (KeeperRegistryOwnershipTransferred) Topic() common.Hash { - return common.HexToHash("0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0") -} - -func (KeeperRegistryPaused) Topic() common.Hash { - return common.HexToHash("0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258") -} - -func (KeeperRegistryPayeeshipTransferRequested) Topic() common.Hash { - return common.HexToHash("0x84f7c7c80bb8ed2279b4aab5f61cd05e6374073d38f46d7f32de8c30e9e38367") -} - -func (KeeperRegistryPayeeshipTransferred) Topic() common.Hash { - return common.HexToHash("0x78af32efdcad432315431e9b03d27e6cd98fb79c405fdc5af7c1714d9c0f75b3") -} - -func (KeeperRegistryPaymentWithdrawn) Topic() common.Hash { - return common.HexToHash("0x9819093176a1851202c7bcfa46845809b4e47c261866550e94ed3775d2f40698") -} - -func (KeeperRegistryUnpaused) Topic() common.Hash { - return common.HexToHash("0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa") -} - -func (KeeperRegistryUpkeepAdminTransferRequested) Topic() common.Hash { - return common.HexToHash("0xb1cbb2c4b8480034c27e06da5f096b8233a8fd4497028593a41ff6df79726b35") -} - -func (KeeperRegistryUpkeepAdminTransferred) Topic() common.Hash { - return common.HexToHash("0x5cff4db96bef051785e999f44bfcd21c18823e034fb92dd376e3db4ce0feeb2c") -} - -func (KeeperRegistryUpkeepCanceled) Topic() common.Hash { - return common.HexToHash("0x91cb3bb75cfbd718bbfccc56b7f53d92d7048ef4ca39a3b7b7c6d4af1f791181") -} - -func (KeeperRegistryUpkeepCheckDataUpdated) Topic() common.Hash { - return common.HexToHash("0x7b778136e5211932b51a145badd01959415e79e051a933604b3d323f862dcabf") -} - -func (KeeperRegistryUpkeepGasLimitSet) Topic() common.Hash { - return common.HexToHash("0xc24c07e655ce79fba8a589778987d3c015bc6af1632bb20cf9182e02a65d972c") -} - -func (KeeperRegistryUpkeepMigrated) Topic() common.Hash { - return common.HexToHash("0xb38647142fbb1ea4c000fc4569b37a4e9a9f6313317b84ee3e5326c1a6cd06ff") -} - -func (KeeperRegistryUpkeepPaused) Topic() common.Hash { - return common.HexToHash("0x8ab10247ce168c27748e656ecf852b951fcaac790c18106b19aa0ae57a8b741f") -} - -func (KeeperRegistryUpkeepPerformed) Topic() common.Hash { - return common.HexToHash("0xcaacad83e47cc45c280d487ec84184eee2fa3b54ebaa393bda7549f13da228f6") -} - -func (KeeperRegistryUpkeepReceived) Topic() common.Hash { - return common.HexToHash("0x74931a144e43a50694897f241d973aecb5024c0e910f9bb80a163ea3c1cf5a71") -} - -func (KeeperRegistryUpkeepRegistered) Topic() common.Hash { - return common.HexToHash("0xbae366358c023f887e791d7a62f2e4316f1026bd77f6fb49501a917b3bc5d012") -} - -func (KeeperRegistryUpkeepUnpaused) Topic() common.Hash { - return common.HexToHash("0x7bada562044eb163f6b4003c4553e4e62825344c0418eea087bed5ee05a47456") -} - -func (_KeeperRegistry *KeeperRegistry) Address() common.Address { - return _KeeperRegistry.address -} - -type KeeperRegistryInterface interface { - ARBNITROORACLE(opts *bind.CallOpts) (common.Address, error) - - FASTGASFEED(opts *bind.CallOpts) (common.Address, error) - - KEEPERREGISTRYLOGIC(opts *bind.CallOpts) (common.Address, error) - - LINK(opts *bind.CallOpts) (common.Address, error) - - LINKETHFEED(opts *bind.CallOpts) (common.Address, error) - - OPTIMISMORACLE(opts *bind.CallOpts) (common.Address, error) - - PAYMENTMODEL(opts *bind.CallOpts) (uint8, error) - - REGISTRYGASOVERHEAD(opts *bind.CallOpts) (*big.Int, error) - - GetActiveUpkeepIDs(opts *bind.CallOpts, startIndex *big.Int, maxCount *big.Int) ([]*big.Int, error) - - GetKeeperInfo(opts *bind.CallOpts, query common.Address) (GetKeeperInfo, - - error) - - GetMaxPaymentForGas(opts *bind.CallOpts, gasLimit *big.Int) (*big.Int, error) - - GetMinBalanceForUpkeep(opts *bind.CallOpts, id *big.Int) (*big.Int, error) - - GetPeerRegistryMigrationPermission(opts *bind.CallOpts, peer common.Address) (uint8, error) - - GetState(opts *bind.CallOpts) (GetState, - - error) - - GetUpkeep(opts *bind.CallOpts, id *big.Int) (GetUpkeep, - - error) - - Owner(opts *bind.CallOpts) (common.Address, error) - - Paused(opts *bind.CallOpts) (bool, error) - - TypeAndVersion(opts *bind.CallOpts) (string, error) - - UpkeepTranscoderVersion(opts *bind.CallOpts) (uint8, error) - - AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) - - AcceptPayeeship(opts *bind.TransactOpts, keeper common.Address) (*types.Transaction, error) - - AcceptUpkeepAdmin(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - AddFunds(opts *bind.TransactOpts, id *big.Int, amount *big.Int) (*types.Transaction, error) - - CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - CheckUpkeep(opts *bind.TransactOpts, id *big.Int, from common.Address) (*types.Transaction, error) - - MigrateUpkeeps(opts *bind.TransactOpts, ids []*big.Int, destination common.Address) (*types.Transaction, error) - - OnTokenTransfer(opts *bind.TransactOpts, sender common.Address, amount *big.Int, data []byte) (*types.Transaction, error) - - Pause(opts *bind.TransactOpts) (*types.Transaction, error) - - PauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - PerformUpkeep(opts *bind.TransactOpts, id *big.Int, performData []byte) (*types.Transaction, error) - - ReceiveUpkeeps(opts *bind.TransactOpts, encodedUpkeeps []byte) (*types.Transaction, error) - - RecoverFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte) (*types.Transaction, error) - - SetConfig(opts *bind.TransactOpts, config Config) (*types.Transaction, error) - - SetKeepers(opts *bind.TransactOpts, keepers []common.Address, payees []common.Address) (*types.Transaction, error) - - SetPeerRegistryMigrationPermission(opts *bind.TransactOpts, peer common.Address, permission uint8) (*types.Transaction, error) - - SetUpkeepGasLimit(opts *bind.TransactOpts, id *big.Int, gasLimit uint32) (*types.Transaction, error) - - TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) - - TransferPayeeship(opts *bind.TransactOpts, keeper common.Address, proposed common.Address) (*types.Transaction, error) - - TransferUpkeepAdmin(opts *bind.TransactOpts, id *big.Int, proposed common.Address) (*types.Transaction, error) - - Unpause(opts *bind.TransactOpts) (*types.Transaction, error) - - UnpauseUpkeep(opts *bind.TransactOpts, id *big.Int) (*types.Transaction, error) - - UpdateCheckData(opts *bind.TransactOpts, id *big.Int, newCheckData []byte) (*types.Transaction, error) - - WithdrawFunds(opts *bind.TransactOpts, id *big.Int, to common.Address) (*types.Transaction, error) - - WithdrawOwnerFunds(opts *bind.TransactOpts) (*types.Transaction, error) - - WithdrawPayment(opts *bind.TransactOpts, from common.Address, to common.Address) (*types.Transaction, error) - - Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) - - Receive(opts *bind.TransactOpts) (*types.Transaction, error) - - FilterConfigSet(opts *bind.FilterOpts) (*KeeperRegistryConfigSetIterator, error) - - WatchConfigSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryConfigSet) (event.Subscription, error) - - ParseConfigSet(log types.Log) (*KeeperRegistryConfigSet, error) - - FilterFundsAdded(opts *bind.FilterOpts, id []*big.Int, from []common.Address) (*KeeperRegistryFundsAddedIterator, error) - - WatchFundsAdded(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsAdded, id []*big.Int, from []common.Address) (event.Subscription, error) - - ParseFundsAdded(log types.Log) (*KeeperRegistryFundsAdded, error) - - FilterFundsWithdrawn(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryFundsWithdrawnIterator, error) - - WatchFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryFundsWithdrawn, id []*big.Int) (event.Subscription, error) - - ParseFundsWithdrawn(log types.Log) (*KeeperRegistryFundsWithdrawn, error) - - FilterKeepersUpdated(opts *bind.FilterOpts) (*KeeperRegistryKeepersUpdatedIterator, error) - - WatchKeepersUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryKeepersUpdated) (event.Subscription, error) - - ParseKeepersUpdated(log types.Log) (*KeeperRegistryKeepersUpdated, error) - - FilterOwnerFundsWithdrawn(opts *bind.FilterOpts) (*KeeperRegistryOwnerFundsWithdrawnIterator, error) - - WatchOwnerFundsWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnerFundsWithdrawn) (event.Subscription, error) - - ParseOwnerFundsWithdrawn(log types.Log) (*KeeperRegistryOwnerFundsWithdrawn, error) - - FilterOwnershipTransferRequested(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferRequestedIterator, error) - - WatchOwnershipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferRequested, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferRequested(log types.Log) (*KeeperRegistryOwnershipTransferRequested, error) - - FilterOwnershipTransferred(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*KeeperRegistryOwnershipTransferredIterator, error) - - WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryOwnershipTransferred, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseOwnershipTransferred(log types.Log) (*KeeperRegistryOwnershipTransferred, error) - - FilterPaused(opts *bind.FilterOpts) (*KeeperRegistryPausedIterator, error) - - WatchPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaused) (event.Subscription, error) - - ParsePaused(log types.Log) (*KeeperRegistryPaused, error) - - FilterPayeeshipTransferRequested(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferRequestedIterator, error) - - WatchPayeeshipTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferRequested, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferRequested(log types.Log) (*KeeperRegistryPayeeshipTransferRequested, error) - - FilterPayeeshipTransferred(opts *bind.FilterOpts, keeper []common.Address, from []common.Address, to []common.Address) (*KeeperRegistryPayeeshipTransferredIterator, error) - - WatchPayeeshipTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPayeeshipTransferred, keeper []common.Address, from []common.Address, to []common.Address) (event.Subscription, error) - - ParsePayeeshipTransferred(log types.Log) (*KeeperRegistryPayeeshipTransferred, error) - - FilterPaymentWithdrawn(opts *bind.FilterOpts, keeper []common.Address, amount []*big.Int, to []common.Address) (*KeeperRegistryPaymentWithdrawnIterator, error) - - WatchPaymentWithdrawn(opts *bind.WatchOpts, sink chan<- *KeeperRegistryPaymentWithdrawn, keeper []common.Address, amount []*big.Int, to []common.Address) (event.Subscription, error) - - ParsePaymentWithdrawn(log types.Log) (*KeeperRegistryPaymentWithdrawn, error) - - FilterUnpaused(opts *bind.FilterOpts) (*KeeperRegistryUnpausedIterator, error) - - WatchUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUnpaused) (event.Subscription, error) - - ParseUnpaused(log types.Log) (*KeeperRegistryUnpaused, error) - - FilterUpkeepAdminTransferRequested(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryUpkeepAdminTransferRequestedIterator, error) - - WatchUpkeepAdminTransferRequested(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepAdminTransferRequested, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseUpkeepAdminTransferRequested(log types.Log) (*KeeperRegistryUpkeepAdminTransferRequested, error) - - FilterUpkeepAdminTransferred(opts *bind.FilterOpts, id []*big.Int, from []common.Address, to []common.Address) (*KeeperRegistryUpkeepAdminTransferredIterator, error) - - WatchUpkeepAdminTransferred(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepAdminTransferred, id []*big.Int, from []common.Address, to []common.Address) (event.Subscription, error) - - ParseUpkeepAdminTransferred(log types.Log) (*KeeperRegistryUpkeepAdminTransferred, error) - - FilterUpkeepCanceled(opts *bind.FilterOpts, id []*big.Int, atBlockHeight []uint64) (*KeeperRegistryUpkeepCanceledIterator, error) - - WatchUpkeepCanceled(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepCanceled, id []*big.Int, atBlockHeight []uint64) (event.Subscription, error) - - ParseUpkeepCanceled(log types.Log) (*KeeperRegistryUpkeepCanceled, error) - - FilterUpkeepCheckDataUpdated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepCheckDataUpdatedIterator, error) - - WatchUpkeepCheckDataUpdated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepCheckDataUpdated, id []*big.Int) (event.Subscription, error) - - ParseUpkeepCheckDataUpdated(log types.Log) (*KeeperRegistryUpkeepCheckDataUpdated, error) - - FilterUpkeepGasLimitSet(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepGasLimitSetIterator, error) - - WatchUpkeepGasLimitSet(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepGasLimitSet, id []*big.Int) (event.Subscription, error) - - ParseUpkeepGasLimitSet(log types.Log) (*KeeperRegistryUpkeepGasLimitSet, error) - - FilterUpkeepMigrated(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepMigratedIterator, error) - - WatchUpkeepMigrated(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepMigrated, id []*big.Int) (event.Subscription, error) - - ParseUpkeepMigrated(log types.Log) (*KeeperRegistryUpkeepMigrated, error) - - FilterUpkeepPaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepPausedIterator, error) - - WatchUpkeepPaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepPaused, id []*big.Int) (event.Subscription, error) - - ParseUpkeepPaused(log types.Log) (*KeeperRegistryUpkeepPaused, error) - - FilterUpkeepPerformed(opts *bind.FilterOpts, id []*big.Int, success []bool, from []common.Address) (*KeeperRegistryUpkeepPerformedIterator, error) - - WatchUpkeepPerformed(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepPerformed, id []*big.Int, success []bool, from []common.Address) (event.Subscription, error) - - ParseUpkeepPerformed(log types.Log) (*KeeperRegistryUpkeepPerformed, error) - - FilterUpkeepReceived(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepReceivedIterator, error) - - WatchUpkeepReceived(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepReceived, id []*big.Int) (event.Subscription, error) - - ParseUpkeepReceived(log types.Log) (*KeeperRegistryUpkeepReceived, error) - - FilterUpkeepRegistered(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepRegisteredIterator, error) - - WatchUpkeepRegistered(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepRegistered, id []*big.Int) (event.Subscription, error) - - ParseUpkeepRegistered(log types.Log) (*KeeperRegistryUpkeepRegistered, error) - - FilterUpkeepUnpaused(opts *bind.FilterOpts, id []*big.Int) (*KeeperRegistryUpkeepUnpausedIterator, error) - - WatchUpkeepUnpaused(opts *bind.WatchOpts, sink chan<- *KeeperRegistryUpkeepUnpaused, id []*big.Int) (event.Subscription, error) - - ParseUpkeepUnpaused(log types.Log) (*KeeperRegistryUpkeepUnpaused, error) - - ParseLog(log types.Log) (generated.AbigenLog, error) - - Address() common.Address -} diff --git a/core/gethwrappers/go_generate.go b/core/gethwrappers/go_generate.go index 6ce772db7eb..d893181aa07 100644 --- a/core/gethwrappers/go_generate.go +++ b/core/gethwrappers/go_generate.go @@ -14,16 +14,6 @@ package gethwrappers // Automation //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/CronUpkeepFactory/CronUpkeepFactory.abi - CronUpkeepFactory cron_upkeep_factory_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/CronUpkeepFactory/CronUpkeep.abi - CronUpkeep cron_upkeep_wrapper -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistrar1_2/KeeperRegistrar.abi ../../contracts/solc/v0.8.6/KeeperRegistrar1_2/KeeperRegistrar.bin KeeperRegistrar keeper_registrar_wrapper1_2 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistrar1_2Mock/KeeperRegistrar1_2Mock.abi ../../contracts/solc/v0.8.6/KeeperRegistrar1_2Mock/KeeperRegistrar1_2Mock.bin KeeperRegistrarMock keeper_registrar_wrapper1_2_mock -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistry1_2/KeeperRegistry1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_2/KeeperRegistry1_2.bin KeeperRegistry keeper_registry_wrapper1_2 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2/KeeperRegistryCheckUpkeepGasUsageWrapper1_2.bin KeeperRegistryCheckUpkeepGasUsageWrapper gas_wrapper -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.abi ../../contracts/solc/v0.8.6/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock/KeeperRegistryCheckUpkeepGasUsageWrapper1_2Mock.bin KeeperRegistryCheckUpkeepGasUsageWrapperMock gas_wrapper_mock -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistry1_3/KeeperRegistry1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistry1_3/KeeperRegistry1_3.bin KeeperRegistry keeper_registry_wrapper1_3 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3/KeeperRegistryLogic1_3.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic1_3/KeeperRegistryLogic1_3.bin KeeperRegistryLogic keeper_registry_logic1_3 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistrar2_0/KeeperRegistrar2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistrar2_0/KeeperRegistrar2_0.bin KeeperRegistrar keeper_registrar_wrapper2_0 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistry2_0/KeeperRegistry2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistry2_0/KeeperRegistry2_0.bin KeeperRegistry keeper_registry_wrapper2_0 -//go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0/KeeperRegistryLogic2_0.abi ../../contracts/solc/v0.8.6/KeeperRegistryLogic2_0/KeeperRegistryLogic2_0.bin KeeperRegistryLogic keeper_registry_logic2_0 //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.6/UpkeepTranscoder/UpkeepTranscoder.abi ../../contracts/solc/v0.8.6/UpkeepTranscoder/UpkeepTranscoder.bin UpkeepTranscoder upkeep_transcoder //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/VerifiableLoadUpkeep/VerifiableLoadUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadUpkeep/VerifiableLoadUpkeep.bin VerifiableLoadUpkeep verifiable_load_upkeep_wrapper //go:generate go run ./generation/generate/wrap.go ../../contracts/solc/v0.8.16/VerifiableLoadStreamsLookupUpkeep/VerifiableLoadStreamsLookupUpkeep.abi ../../contracts/solc/v0.8.16/VerifiableLoadStreamsLookupUpkeep/VerifiableLoadStreamsLookupUpkeep.bin VerifiableLoadStreamsLookupUpkeep verifiable_load_streams_lookup_upkeep_wrapper diff --git a/core/scripts/chaincli/handler/keeper.go b/core/scripts/chaincli/handler/keeper.go index 29a8f5bc9e2..be3fc4cfac9 100644 --- a/core/scripts/chaincli/handler/keeper.go +++ b/core/scripts/chaincli/handler/keeper.go @@ -25,7 +25,6 @@ import ( registrylogica21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic_a_wrapper_2_1" registrylogicb21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic_b_wrapper_2_1" registry11 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry12 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" registry20 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" registry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_upkeep_counter_wrapper" @@ -123,8 +122,6 @@ func (k *Keeper) DeployRegistry(ctx context.Context, verify bool) { switch k.cfg.RegistryVersion { case keeper.RegistryVersion_1_1: k.deployRegistry11(ctx) - case keeper.RegistryVersion_1_2: - k.deployRegistry12(ctx) case keeper.RegistryVersion_2_0: k.deployRegistry20(ctx, verify) case keeper.RegistryVersion_2_1: @@ -139,8 +136,6 @@ func (k *Keeper) prepareRegistry(ctx context.Context) (int64, common.Address, ke var registryAddr common.Address var deployer keepersDeployer var keeperRegistry11 *registry11.KeeperRegistry - var keeperRegistry12 *registry12.KeeperRegistry - var keeperRegistry20 *registry20.KeeperRegistry var keeperRegistry21 *iregistry21.IKeeperRegistryMaster if k.cfg.RegistryAddress != "" { callOpts := bind.CallOpts{ @@ -158,22 +153,6 @@ func (k *Keeper) prepareRegistry(ctx context.Context) (int64, common.Address, ke } upkeepCount = count.Int64() deployer = &v11KeeperDeployer{keeperRegistry11} - case keeper.RegistryVersion_1_2: - registryAddr, keeperRegistry12 = k.getRegistry12(ctx) - state, err := keeperRegistry12.GetState(&callOpts) - if err != nil { - log.Fatal(registryAddr.Hex(), ": failed to getState - ", err) - } - upkeepCount = state.State.NumUpkeeps.Int64() - deployer = &v12KeeperDeployer{keeperRegistry12} - case keeper.RegistryVersion_2_0: - registryAddr, keeperRegistry20 = k.getRegistry20(ctx) - state, err := keeperRegistry20.GetState(&callOpts) - if err != nil { - log.Fatal(registryAddr.Hex(), ": failed to getState - ", err) - } - upkeepCount = state.State.NumUpkeeps.Int64() - deployer = &v20KeeperDeployer{KeeperRegistryInterface: keeperRegistry20, cfg: k.cfg} case keeper.RegistryVersion_2_1: registryAddr, keeperRegistry21 = k.getRegistry21(ctx) state, err := keeperRegistry21.GetState(&callOpts) @@ -191,12 +170,6 @@ func (k *Keeper) prepareRegistry(ctx context.Context) (int64, common.Address, ke case keeper.RegistryVersion_1_1: registryAddr, keeperRegistry11 = k.deployRegistry11(ctx) deployer = &v11KeeperDeployer{keeperRegistry11} - case keeper.RegistryVersion_1_2: - registryAddr, keeperRegistry12 = k.deployRegistry12(ctx) - deployer = &v12KeeperDeployer{keeperRegistry12} - case keeper.RegistryVersion_2_0: - registryAddr, keeperRegistry20 = k.deployRegistry20(ctx, true) - deployer = &v20KeeperDeployer{KeeperRegistryInterface: keeperRegistry20, cfg: k.cfg} case keeper.RegistryVersion_2_1: registryAddr, keeperRegistry21 = k.deployRegistry21(ctx, false) deployer = &v21KeeperDeployer{IKeeperRegistryMasterInterface: keeperRegistry21, cfg: k.cfg} @@ -363,24 +336,6 @@ func (k *Keeper) deployRegistry20(ctx context.Context, verify bool) (common.Addr return registryAddr, registryInstance } -// deployRegistry12 deploys a version 1.2 keeper registry -func (k *Keeper) deployRegistry12(ctx context.Context) (common.Address, *registry12.KeeperRegistry) { - registryAddr, deployKeeperRegistryTx, registryInstance, err := registry12.DeployKeeperRegistry( - k.buildTxOpts(ctx), - k.client, - common.HexToAddress(k.cfg.LinkTokenAddr), - common.HexToAddress(k.cfg.LinkETHFeedAddr), - common.HexToAddress(k.cfg.FastGasFeedAddr), - *k.getConfigForRegistry12(), - ) - if err != nil { - log.Fatal("DeployAbi failed: ", err) - } - k.waitDeployment(ctx, deployKeeperRegistryTx) - log.Println("KeeperRegistry1.2 deployed:", registryAddr.Hex(), "-", helpers.ExplorerLink(k.cfg.ChainID, deployKeeperRegistryTx.Hash())) - return registryAddr, registryInstance -} - // deployRegistry11 deploys a version 1.1 keeper registry func (k *Keeper) deployRegistry11(ctx context.Context) (common.Address, *registry11.KeeperRegistry) { registryAddr, deployKeeperRegistryTx, registryInstance, err := registry11.DeployKeeperRegistry(k.buildTxOpts(ctx), k.client, @@ -410,10 +365,6 @@ func (k *Keeper) UpdateRegistry(ctx context.Context) { switch k.cfg.RegistryVersion { case keeper.RegistryVersion_1_1: registryAddr, _ = k.getRegistry11(ctx) - case keeper.RegistryVersion_1_2: - registryAddr, _ = k.getRegistry12(ctx) - case keeper.RegistryVersion_2_0: - registryAddr, _ = k.getRegistry20(ctx) case keeper.RegistryVersion_2_1: registryAddr, _ = k.getRegistry21(ctx) default: @@ -456,31 +407,6 @@ func (k *Keeper) getRegistry21(ctx context.Context) (common.Address, *iregistry2 return registryAddr, keeperRegistry21 } -// getRegistry12 attaches to an existing 1.2 registry and possibly updates registry config -func (k *Keeper) getRegistry12(ctx context.Context) (common.Address, *registry12.KeeperRegistry) { - registryAddr := common.HexToAddress(k.cfg.RegistryAddress) - keeperRegistry12, err := registry12.NewKeeperRegistry( - registryAddr, - k.client, - ) - if err != nil { - log.Fatal("Registry failed: ", err) - } - if k.cfg.RegistryConfigUpdate { - transaction, err := keeperRegistry12.SetConfig(k.buildTxOpts(ctx), *k.getConfigForRegistry12()) - if err != nil { - log.Fatal("Registry config update: ", err) - } - - if err := k.waitTx(ctx, transaction); err != nil { - log.Fatalf("KeeperRegistry config update failed on registry address: %s, error is: %s", k.cfg.RegistryAddress, err.Error()) - } - log.Println("KeeperRegistry config update:", k.cfg.RegistryAddress, "-", helpers.ExplorerLink(k.cfg.ChainID, transaction.Hash())) - } - log.Println("KeeperRegistry config not updated: KEEPER_CONFIG_UPDATE=false") - return registryAddr, keeperRegistry12 -} - // getRegistry11 attaches to an existing 1.1 registry and possibly updates registry config func (k *Keeper) getRegistry11(ctx context.Context) (common.Address, *registry11.KeeperRegistry) { registryAddr := common.HexToAddress(k.cfg.RegistryAddress) @@ -656,16 +582,6 @@ func (k *Keeper) deployUpkeeps(ctx context.Context, registryAddr common.Address, switch k.cfg.RegistryVersion { case keeper.RegistryVersion_1_1: panic("not supported 1.1 registry") - case keeper.RegistryVersion_1_2: - upkeepGetter, err = registry12.NewKeeperRegistry( - registryAddr, - k.client, - ) - case keeper.RegistryVersion_2_0: - upkeepGetter, err = registry20.NewKeeperRegistry( - registryAddr, - k.client, - ) case keeper.RegistryVersion_2_1: upkeepGetter, err = iregistry21.NewIKeeperRegistryMaster( registryAddr, @@ -792,21 +708,3 @@ func (k *Keeper) getActiveUpkeepIds(ctx context.Context, registry activeUpkeepGe }, from, to) return activeUpkeepIds } - -// getConfigForRegistry12 returns a config object for registry 1.2 -func (k *Keeper) getConfigForRegistry12() *registry12.Config { - return ®istry12.Config{ - PaymentPremiumPPB: k.cfg.PaymentPremiumPBB, - FlatFeeMicroLink: k.cfg.FlatFeeMicroLink, - BlockCountPerTurn: big.NewInt(k.cfg.BlockCountPerTurn), - CheckGasLimit: k.cfg.CheckGasLimit, - StalenessSeconds: big.NewInt(k.cfg.StalenessSeconds), - GasCeilingMultiplier: k.cfg.GasCeilingMultiplier, - MinUpkeepSpend: big.NewInt(k.cfg.MinUpkeepSpend), - MaxPerformGas: k.cfg.MaxPerformGas, - FallbackGasPrice: big.NewInt(k.cfg.FallbackGasPrice), - FallbackLinkPrice: big.NewInt(k.cfg.FallbackLinkPrice), - Transcoder: common.HexToAddress(k.cfg.Transcoder), - Registrar: common.HexToAddress(k.cfg.Registrar), - } -} diff --git a/core/scripts/chaincli/handler/keeper_deployer.go b/core/scripts/chaincli/handler/keeper_deployer.go index f0689a176de..f030ae13d9a 100644 --- a/core/scripts/chaincli/handler/keeper_deployer.go +++ b/core/scripts/chaincli/handler/keeper_deployer.go @@ -14,8 +14,6 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/umbracle/ethgo/abi" - ocr2config "github.com/smartcontractkit/libocr/offchainreporting2plus/confighelper" "github.com/smartcontractkit/libocr/offchainreporting2plus/ocr3confighelper" ocr2types "github.com/smartcontractkit/libocr/offchainreporting2plus/types" @@ -27,8 +25,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/cmd" iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" registry11 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry12 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - registry20 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" ) // canceller describes the behavior to cancel upkeeps @@ -68,163 +64,6 @@ func (d *v11KeeperDeployer) RegisterUpkeepV2(opts *bind.TransactOpts, target com panic("not implemented") } -type v12KeeperDeployer struct { - registry12.KeeperRegistryInterface -} - -func (d *v12KeeperDeployer) SetKeepers(ctx context.Context, opts *bind.TransactOpts, _ []cmd.HTTPClient, keepers []common.Address, payees []common.Address) (*types.Transaction, error) { - return d.KeeperRegistryInterface.SetKeepers(opts, keepers, payees) -} - -func (d *v12KeeperDeployer) RegisterUpkeep(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, checkData []byte, offchainConfig []byte) (*types.Transaction, error) { - return d.KeeperRegistryInterface.RegisterUpkeep(opts, target, gasLimit, admin, checkData) -} - -func (d *v12KeeperDeployer) RegisterUpkeepV2(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, pipelineData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - panic("not implemented") -} - -type v20KeeperDeployer struct { - registry20.KeeperRegistryInterface - cfg *config.Config -} - -func (d *v20KeeperDeployer) SetKeepers(ctx context.Context, opts *bind.TransactOpts, cls []cmd.HTTPClient, keepers []common.Address, _ []common.Address) (*types.Transaction, error) { - S := make([]int, len(cls)) - oracleIdentities := make([]ocr2config.OracleIdentityExtra, len(cls)) - sharedSecretEncryptionPublicKeys := make([]ocr2types.ConfigEncryptionPublicKey, len(cls)) - var wg sync.WaitGroup - for i, cl := range cls { - wg.Add(1) - go func(i int, cl cmd.HTTPClient) { - defer wg.Done() - - ocr2Config, err := getNodeOCR2Config(ctx, cl) - if err != nil { - panic(err) - } - - p2pKeyID, err := getP2PKeyID(ctx, cl) - if err != nil { - panic(err) - } - - offchainPkBytes, err := hex.DecodeString(strings.TrimPrefix(ocr2Config.OffChainPublicKey, "ocr2off_evm_")) - if err != nil { - panic(fmt.Errorf("failed to decode %s: %v", ocr2Config.OffChainPublicKey, err)) - } - - offchainPkBytesFixed := [ed25519.PublicKeySize]byte{} - n := copy(offchainPkBytesFixed[:], offchainPkBytes) - if n != ed25519.PublicKeySize { - panic(fmt.Errorf("wrong num elements copied")) - } - - configPkBytes, err := hex.DecodeString(strings.TrimPrefix(ocr2Config.ConfigPublicKey, "ocr2cfg_evm_")) - if err != nil { - panic(fmt.Errorf("failed to decode %s: %v", ocr2Config.ConfigPublicKey, err)) - } - - configPkBytesFixed := [ed25519.PublicKeySize]byte{} - n = copy(configPkBytesFixed[:], configPkBytes) - if n != ed25519.PublicKeySize { - panic(fmt.Errorf("wrong num elements copied")) - } - - onchainPkBytes, err := hex.DecodeString(strings.TrimPrefix(ocr2Config.OnchainPublicKey, "ocr2on_evm_")) - if err != nil { - panic(fmt.Errorf("failed to decode %s: %v", ocr2Config.OnchainPublicKey, err)) - } - - sharedSecretEncryptionPublicKeys[i] = configPkBytesFixed - oracleIdentities[i] = ocr2config.OracleIdentityExtra{ - OracleIdentity: ocr2config.OracleIdentity{ - OnchainPublicKey: onchainPkBytes, - OffchainPublicKey: offchainPkBytesFixed, - PeerID: p2pKeyID, - TransmitAccount: ocr2types.Account(keepers[i].String()), - }, - ConfigEncryptionPublicKey: configPkBytesFixed, - } - S[i] = 1 - }(i, cl) - } - wg.Wait() - - offC, err := json.Marshal(offchain20config.OffchainConfig{ - PerformLockoutWindow: 100 * 3 * 1000, // ~100 block lockout (on mumbai) - MinConfirmations: 1, - }) - if err != nil { - panic(err) - } - - signerOnchainPublicKeys, transmitterAccounts, f, _, offchainConfigVersion, offchainConfig, err := ocr2config.ContractSetConfigArgsForTests( - 5*time.Second, // deltaProgress time.Duration, - 10*time.Second, // deltaResend time.Duration, - 2500*time.Millisecond, // deltaRound time.Duration, - 40*time.Millisecond, // deltaGrace time.Duration, - 30*time.Second, // deltaStage time.Duration, - 50, // rMax uint8, - S, // s []int, - oracleIdentities, // oracles []OracleIdentityExtra, - offC, // reportingPluginConfig []byte, - nil, - 20*time.Millisecond, // maxDurationQuery time.Duration, - 1600*time.Millisecond, // maxDurationObservation time.Duration, - 800*time.Millisecond, // maxDurationReport time.Duration, sum of MaxDurationQuery/Observation/Report must be less than DeltaProgress - 20*time.Millisecond, // maxDurationShouldAcceptFinalizedReport time.Duration, - 20*time.Millisecond, // maxDurationShouldTransmitAcceptedReport time.Duration, - 1, // f int, - nil, // onchainConfig []byte, - ) - if err != nil { - return nil, err - } - - var signers []common.Address - for _, signer := range signerOnchainPublicKeys { - if len(signer) != 20 { - return nil, fmt.Errorf("OnChainPublicKey has wrong length for address") - } - signers = append(signers, common.BytesToAddress(signer)) - } - - var transmitters []common.Address - for _, transmitter := range transmitterAccounts { - if !common.IsHexAddress(string(transmitter)) { - return nil, fmt.Errorf("TransmitAccount is not a valid Ethereum address") - } - transmitters = append(transmitters, common.HexToAddress(string(transmitter))) - } - - configType := abi.MustNewType("tuple(uint32 paymentPremiumPPB,uint32 flatFeeMicroLink,uint32 checkGasLimit,uint24 stalenessSeconds,uint16 gasCeilingMultiplier,uint96 minUpkeepSpend,uint32 maxPerformGas,uint32 maxCheckDataSize,uint32 maxPerformDataSize,uint256 fallbackGasPrice,uint256 fallbackLinkPrice,address transcoder,address registrar)") - onchainConfig, err := abi.Encode(map[string]interface{}{ - "paymentPremiumPPB": d.cfg.PaymentPremiumPBB, - "flatFeeMicroLink": d.cfg.FlatFeeMicroLink, - "checkGasLimit": d.cfg.CheckGasLimit, - "stalenessSeconds": d.cfg.StalenessSeconds, - "gasCeilingMultiplier": d.cfg.GasCeilingMultiplier, - "minUpkeepSpend": d.cfg.MinUpkeepSpend, - "maxPerformGas": d.cfg.MaxPerformGas, - "maxCheckDataSize": d.cfg.MaxCheckDataSize, - "maxPerformDataSize": d.cfg.MaxPerformDataSize, - "fallbackGasPrice": big.NewInt(d.cfg.FallbackGasPrice), - "fallbackLinkPrice": big.NewInt(d.cfg.FallbackLinkPrice), - "transcoder": common.HexToAddress(d.cfg.Transcoder), - "registrar": common.HexToAddress(d.cfg.Registrar), - }, configType) - if err != nil { - return nil, err - } - - return d.KeeperRegistryInterface.SetConfig(opts, signers, transmitters, f, onchainConfig, offchainConfigVersion, offchainConfig) -} - -func (d *v20KeeperDeployer) RegisterUpkeepV2(opts *bind.TransactOpts, target common.Address, gasLimit uint32, admin common.Address, triggerType uint8, pipelineData []byte, triggerConfig []byte, offchainConfig []byte) (*types.Transaction, error) { - panic("not implemented") -} - type v21KeeperDeployer struct { iregistry21.IKeeperRegistryMasterInterface cfg *config.Config diff --git a/core/scripts/chaincli/handler/keeper_launch.go b/core/scripts/chaincli/handler/keeper_launch.go index 1db3884ae4e..06b9e38a0e6 100644 --- a/core/scripts/chaincli/handler/keeper_launch.go +++ b/core/scripts/chaincli/handler/keeper_launch.go @@ -17,13 +17,10 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" - "github.com/smartcontractkit/chainlink-common/pkg/utils/hex" "github.com/smartcontractkit/chainlink/v2/core/cmd" iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" - registry12 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - registry20 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" "github.com/smartcontractkit/chainlink/v2/core/logger" "github.com/smartcontractkit/chainlink/v2/core/services/keeper" "github.com/smartcontractkit/chainlink/v2/core/services/keystore/keys/ethkey" @@ -173,32 +170,6 @@ func (k *Keeper) LaunchAndTest(ctx context.Context, withdraw, printLogs, force, if err := k.cancelAndWithdrawUpkeeps(ctx, big.NewInt(upkeepCount), deployer); err != nil { log.Fatal("Failed to cancel upkeeps: ", err) } - case keeper.RegistryVersion_1_2: - registry, err := registry12.NewKeeperRegistry( - registryAddr, - k.client, - ) - if err != nil { - log.Fatal("Registry failed: ", err) - } - - activeUpkeepIds := k.getActiveUpkeepIds(ctx, registry, big.NewInt(0), big.NewInt(0)) - if err := k.cancelAndWithdrawActiveUpkeeps(ctx, activeUpkeepIds, deployer); err != nil { - log.Fatal("Failed to cancel upkeeps: ", err) - } - case keeper.RegistryVersion_2_0: - registry, err := registry20.NewKeeperRegistry( - registryAddr, - k.client, - ) - if err != nil { - log.Fatal("Registry failed: ", err) - } - - activeUpkeepIds := k.getActiveUpkeepIds(ctx, registry, big.NewInt(0), big.NewInt(0)) - if err := k.cancelAndWithdrawActiveUpkeeps(ctx, activeUpkeepIds, deployer); err != nil { - log.Fatal("Failed to cancel upkeeps: ", err) - } case keeper.RegistryVersion_2_1: registry, err := iregistry21.NewIKeeperRegistryMaster( registryAddr, diff --git a/core/scripts/chaincli/handler/keeper_upkeep_history.go b/core/scripts/chaincli/handler/keeper_upkeep_history.go index 487d06dd5ed..fc43797acb6 100644 --- a/core/scripts/chaincli/handler/keeper_upkeep_history.go +++ b/core/scripts/chaincli/handler/keeper_upkeep_history.go @@ -19,7 +19,6 @@ import ( "github.com/ethereum/go-ethereum/rpc" registry11 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry12 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" "github.com/smartcontractkit/chainlink/v2/core/services/keeper" ) @@ -32,7 +31,6 @@ var ( checkUpkeepArguments1 abi.Arguments checkUpkeepArguments2 abi.Arguments registry11ABI = keeper.Registry1_1ABI - registry12ABI = keeper.Registry1_2ABI ) type result struct { @@ -50,7 +48,6 @@ type result struct { func init() { checkUpkeepArguments1 = registry11ABI.Methods["checkUpkeep"].Outputs - checkUpkeepArguments2 = registry12ABI.Methods["checkUpkeep"].Outputs } // UpkeepHistory prints the checkUpkeep status and keeper responsibility for a given upkeep in a set block range @@ -61,14 +58,11 @@ func (k *Keeper) UpkeepHistory(ctx context.Context, upkeepId *big.Int, from, to, } var keeperRegistry11 *registry11.KeeperRegistry - var keeperRegistry12 *registry12.KeeperRegistry // var keeperRegistry20 *registry20.KeeperRegistry switch k.cfg.RegistryVersion { case keeper.RegistryVersion_1_1: _, keeperRegistry11 = k.getRegistry11(ctx) - case keeper.RegistryVersion_1_2: - _, keeperRegistry12 = k.getRegistry12(ctx) default: panic("unsupported registry version") } @@ -108,21 +102,6 @@ func (k *Keeper) UpkeepHistory(ctx context.Context, upkeepId *big.Int, from, to, log.Fatal("failed to fetch the upkeep: ", err2) } lastKeeper = upkeep.LastKeeper - - case keeper.RegistryVersion_1_2: - state, err2 := keeperRegistry12.GetState(callOpts) - if err2 != nil { - log.Fatal("failed to fetch registry state: ", err2) - } - bcpt = state.Config.BlockCountPerTurn.Uint64() - keepers = state.Keepers - - upkeep, err2 := keeperRegistry12.GetUpkeep(callOpts, upkeepId) - if err2 != nil { - log.Fatal("failed to fetch the upkeep: ", err2) - } - lastKeeper = upkeep.LastKeeper - default: panic("unsupported registry version") } @@ -157,11 +136,6 @@ func (k *Keeper) UpkeepHistory(ctx context.Context, upkeepId *big.Int, from, to, if err2 != nil { log.Fatal("failed to pack checkUpkeep: ", err2) } - case keeper.RegistryVersion_1_2: - payload, err2 = registry12ABI.Pack("checkUpkeep", upkeepId, keepers[keeperIndex]) - if err2 != nil { - log.Fatal("failed to pack checkUpkeep: ", err2) - } default: panic("unsupported registry version") } diff --git a/core/scripts/chaincli/handler/keeper_withdraw.go b/core/scripts/chaincli/handler/keeper_withdraw.go index ba38f21a5a6..1e9edcaa815 100644 --- a/core/scripts/chaincli/handler/keeper_withdraw.go +++ b/core/scripts/chaincli/handler/keeper_withdraw.go @@ -3,15 +3,11 @@ package handler import ( "context" "log" - "math/big" - - registry20 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" registry11 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry12 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" "github.com/smartcontractkit/chainlink/v2/core/services/keeper" ) @@ -37,36 +33,6 @@ func (k *Keeper) Withdraw(ctx context.Context, hexAddr string) { if err = k.cancelAndWithdrawUpkeeps(ctx, upkeepCount, keeperRegistry11); err != nil { log.Fatal("Failed to cancel upkeeps: ", err) } - case keeper.RegistryVersion_1_2: - keeperRegistry12, err := registry12.NewKeeperRegistry( - registryAddr, - k.client, - ) - if err != nil { - log.Fatal("Registry failed: ", err) - } - - activeUpkeepIds := k.getActiveUpkeepIds(ctx, keeperRegistry12, big.NewInt(0), big.NewInt(0)) - - log.Println("Canceling upkeeps...") - if err = k.cancelAndWithdrawActiveUpkeeps(ctx, activeUpkeepIds, keeperRegistry12); err != nil { - log.Fatal("Failed to cancel upkeeps: ", err) - } - case keeper.RegistryVersion_2_0: - keeperRegistry20, err := registry20.NewKeeperRegistry( - registryAddr, - k.client, - ) - if err != nil { - log.Fatal("Registry failed: ", err) - } - - activeUpkeepIds := k.getActiveUpkeepIds(ctx, keeperRegistry20, big.NewInt(0), big.NewInt(0)) - - log.Println("Canceling upkeeps...") - if err = k.cancelAndWithdrawActiveUpkeeps(ctx, activeUpkeepIds, keeperRegistry20); err != nil { - log.Fatal("Failed to cancel upkeeps: ", err) - } default: panic("unexpected registry version") } diff --git a/core/services/keeper/common.go b/core/services/keeper/common.go index ce1364bc136..08ae8ba3b74 100644 --- a/core/services/keeper/common.go +++ b/core/services/keeper/common.go @@ -3,13 +3,9 @@ package keeper import ( "github.com/smartcontractkit/chainlink-integrations/evm/types" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" ) var Registry1_1ABI = types.MustGetABI(keeper_registry_wrapper1_1.KeeperRegistryABI) -var Registry1_2ABI = types.MustGetABI(keeper_registry_wrapper1_2.KeeperRegistryABI) -var Registry1_3ABI = types.MustGetABI(keeper_registry_wrapper1_3.KeeperRegistryABI) type RegistryGasChecker interface { CheckGasOverhead() uint32 diff --git a/core/services/keeper/helpers_test.go b/core/services/keeper/helpers_test.go index a10c3a48aff..5a1efc36520 100644 --- a/core/services/keeper/helpers_test.go +++ b/core/services/keeper/helpers_test.go @@ -24,18 +24,6 @@ func (rw *RegistryWrapper) GetUpkeepIdFromRawRegistrationLog(rawLog types.Log) ( return nil, errors.Wrap(err, "failed to get parse UpkeepRegistered log") } return parsedLog.Id, nil - case RegistryVersion_1_2: - parsedLog, err := rw.contract1_2.ParseUpkeepRegistered(rawLog) - if err != nil { - return nil, errors.Wrap(err, "failed to get parse UpkeepRegistered log") - } - return parsedLog.Id, nil - case RegistryVersion_1_3: - parsedLog, err := rw.contract1_3.ParseUpkeepRegistered(rawLog) - if err != nil { - return nil, errors.Wrap(err, "failed to get parse UpkeepRegistered log") - } - return parsedLog.Id, nil default: return nil, newUnsupportedVersionError("GetUpkeepIdFromRawRegistrationLog", rw.Version) } diff --git a/core/services/keeper/integration_test.go b/core/services/keeper/integration_test.go index a5e64be0f8e..d985336ba46 100644 --- a/core/services/keeper/integration_test.go +++ b/core/services/keeper/integration_test.go @@ -25,10 +25,7 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/forwarders" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/authorized_forwarder" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/basic_upkeep_contract" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic1_3" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/mock_v3_aggregator_contract" "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" @@ -76,64 +73,8 @@ func deployKeeperRegistry( big.NewInt(20000000000000000), ) require.NoError(t, err) - case keeper.RegistryVersion_1_2: - var err error - regAddr, _, _, err = keeper_registry_wrapper1_2.DeployKeeperRegistry( - auth, - backend, - linkAddr, - linkFeedAddr, - gasFeedAddr, - keeper_registry_wrapper1_2.Config{ - PaymentPremiumPPB: 250_000_000, - FlatFeeMicroLink: 0, - BlockCountPerTurn: big.NewInt(1), - CheckGasLimit: 20_000_000, - StalenessSeconds: big.NewInt(3600), - GasCeilingMultiplier: 1, - MinUpkeepSpend: big.NewInt(0), - MaxPerformGas: 5_000_000, - FallbackGasPrice: big.NewInt(60000000000), - FallbackLinkPrice: big.NewInt(20000000000000000), - Transcoder: testutils.NewAddress(), - Registrar: testutils.NewAddress(), - }, - ) - require.NoError(t, err) - case keeper.RegistryVersion_1_3: - logicAddr, _, _, err := keeper_registry_logic1_3.DeployKeeperRegistryLogic( - auth, - backend, - 0, - big.NewInt(80000), - linkAddr, - linkFeedAddr, - gasFeedAddr) - require.NoError(t, err) - backend.Commit() - - regAddr, _, _, err = keeper_registry_wrapper1_3.DeployKeeperRegistry( - auth, - backend, - logicAddr, - keeper_registry_wrapper1_3.Config{ - PaymentPremiumPPB: 250_000_000, - FlatFeeMicroLink: 0, - BlockCountPerTurn: big.NewInt(1), - CheckGasLimit: 20_000_000, - StalenessSeconds: big.NewInt(3600), - GasCeilingMultiplier: 1, - MinUpkeepSpend: big.NewInt(0), - MaxPerformGas: 5_000_000, - FallbackGasPrice: big.NewInt(60000000000), - FallbackLinkPrice: big.NewInt(20000000000000000), - Transcoder: testutils.NewAddress(), - Registrar: testutils.NewAddress(), - }, - ) - require.NoError(t, err) default: - panic(errors.Errorf("Deployment of registry verdion %d not defined", version)) + panic(errors.Errorf("Deployment of registry version %d not defined", version)) } backend.Commit() wrapper, err := keeper.NewRegistryWrapper(evmtypes.EIP55AddressFromAddress(regAddr), backend) @@ -363,7 +304,7 @@ func TestKeeperForwarderEthIntegration(t *testing.T) { require.NoError(t, err) commit() - regAddr, registryWrapper := deployKeeperRegistry(t, keeper.RegistryVersion_1_3, steve, backend, linkAddr, linkFeedAddr, gasFeedAddr) + regAddr, registryWrapper := deployKeeperRegistry(t, keeper.RegistryVersion_1_1, steve, backend, linkAddr, linkFeedAddr, gasFeedAddr) commit() fwdrAddress, _, authorizedForwarder, err := authorized_forwarder.DeployAuthorizedForwarder(sergey, backend, linkAddr, sergey.From, steve.From, []byte{}) require.NoError(t, err) diff --git a/core/services/keeper/registry1_2_synchronizer_test.go b/core/services/keeper/registry1_2_synchronizer_test.go deleted file mode 100644 index e30ffaf25be..00000000000 --- a/core/services/keeper/registry1_2_synchronizer_test.go +++ /dev/null @@ -1,592 +0,0 @@ -package keeper_test - -import ( - "fmt" - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/onsi/gomega" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" - "github.com/smartcontractkit/chainlink-integrations/evm/client/clienttest" - evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types" - logmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log/mocks" - registry1_2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keeper" -) - -var registryConfig1_2 = registry1_2.Config{ - PaymentPremiumPPB: 100, - FlatFeeMicroLink: uint32(0), - BlockCountPerTurn: big.NewInt(20), - CheckGasLimit: 2_000_000, - StalenessSeconds: big.NewInt(3600), - GasCeilingMultiplier: uint16(2), - MinUpkeepSpend: big.NewInt(0), - MaxPerformGas: uint32(5000000), - FallbackGasPrice: big.NewInt(1000000), - FallbackLinkPrice: big.NewInt(1000000), - Transcoder: cltest.NewEIP55Address().Address(), - Registrar: cltest.NewEIP55Address().Address(), -} - -var registryState1_2 = registry1_2.State{ - Nonce: uint32(0), - OwnerLinkBalance: big.NewInt(1000000000000000000), - ExpectedLinkBalance: big.NewInt(1000000000000000000), - NumUpkeeps: big.NewInt(0), -} - -var upkeepConfig1_2 = registry1_2.GetUpkeep{ - Target: testutils.NewAddress(), - ExecuteGas: 2_000_000, - CheckData: common.Hex2Bytes("1234"), - Balance: big.NewInt(1000000000000000000), - LastKeeper: testutils.NewAddress(), - Admin: testutils.NewAddress(), - MaxValidBlocknumber: 1_000_000_000, - AmountSpent: big.NewInt(0), -} - -func mockRegistry1_2( - t *testing.T, - ethMock *clienttest.Client, - contractAddress common.Address, - config registry1_2.Config, - activeUpkeepIDs []*big.Int, - keeperList []common.Address, - upkeepConfig registry1_2.GetUpkeep, - timesGetUpkeepMock int, - getStateTime int, - getActiveUpkeepIDsTime int, -) { - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) - - state := registryState1_2 - state.NumUpkeeps = big.NewInt(int64(len(activeUpkeepIDs))) - var getState = registry1_2.GetState{ - State: state, - Config: config, - Keepers: keeperList, - } - ethMock.On("HeadByNumber", mock.Anything, (*big.Int)(nil)). - Return(&evmtypes.Head{Number: 10}, nil) - if getStateTime > 0 { - registryMock.MockResponse("getState", getState).Times(getStateTime) - } - if getActiveUpkeepIDsTime > 0 { - registryMock.MockResponse("getActiveUpkeepIDs", activeUpkeepIDs).Times(getActiveUpkeepIDsTime) - } - if timesGetUpkeepMock > 0 { - registryMock.MockResponse("getUpkeep", upkeepConfig).Times(timesGetUpkeepMock) - } -} - -func Test_LogListenerOpts1_2(t *testing.T) { - db := pgtest.NewSqlxDB(t) - korm := keeper.NewORM(db, logger.TestLogger(t)) - ethClient := clienttest.NewClientWithDefaultChainID(t) - j := cltest.MustInsertKeeperJob(t, db, korm, cltest.NewEIP55Address(), cltest.NewEIP55Address()) - - contractAddress := j.KeeperSpec.ContractAddress.Address() - registryMock := cltest.NewContractMockReceiver(t, ethClient, keeper.Registry1_1ABI, contractAddress) - registryMock.MockResponse("typeAndVersion", "KeeperRegistry 1.2.0").Once() - - registryWrapper, err := keeper.NewRegistryWrapper(j.KeeperSpec.ContractAddress, ethClient) - require.NoError(t, err) - - logListenerOpts, err := registryWrapper.GetLogListenerOpts(1, nil) - require.NoError(t, err) - - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryKeepersUpdated{}.Topic(), "Registry should listen to KeeperRegistryKeepersUpdated log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryConfigSet{}.Topic(), "Registry should listen to KeeperRegistryConfigSet log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryUpkeepCanceled{}.Topic(), "Registry should listen to KeeperRegistryUpkeepCanceled log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryUpkeepRegistered{}.Topic(), "Registry should listen to KeeperRegistryUpkeepRegistered log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryUpkeepPerformed{}.Topic(), "Registry should listen to KeeperRegistryUpkeepPerformed log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryUpkeepGasLimitSet{}.Topic(), "Registry should listen to KeeperRegistryUpkeepGasLimitSet log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryUpkeepMigrated{}.Topic(), "Registry should listen to KeeperRegistryUpkeepMigrated log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_2.KeeperRegistryUpkeepReceived{}.Topic(), "Registry should listen to KeeperRegistryUpkeepReceived log") -} - -func Test_RegistrySynchronizer1_2_Start(t *testing.T) { - db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{}, - []common.Address{fromAddress}, - upkeepConfig1_2, - 0, - 2, - 0) - - err := synchronizer.Start(testutils.Context(t)) - require.NoError(t, err) - defer func() { assert.NoError(t, synchronizer.Close()) }() - - cltest.WaitForCount(t, db, "keeper_registries", 1) - - err = synchronizer.Start(testutils.Context(t)) - require.Error(t, err) -} - -func Test_RegistrySynchronizer1_2_FullSync(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - upkeepConfig := upkeepConfig1_2 - upkeepConfig.LastKeeper = fromAddress - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig, - 3, // sync all 3 - 2, - 1) - synchronizer.ExportedFullSync(ctx) - - cltest.AssertCount(t, db, "keeper_registries", 1) - cltest.AssertCount(t, db, "upkeep_registrations", 3) - - // Last keeper index should be set correctly on upkeep - g.Eventually(func() bool { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastKeeperIndex.Valid - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(true)) - g.Eventually(func() int64 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastKeeperIndex.Int64 - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(int64(0))) - - var registry keeper.Registry - var upkeepRegistration keeper.UpkeepRegistration - require.NoError(t, db.Get(®istry, `SELECT * FROM keeper_registries`)) - require.Equal(t, job.KeeperSpec.ContractAddress, registry.ContractAddress) - require.Equal(t, job.KeeperSpec.FromAddress, registry.FromAddress) - require.Equal(t, int32(20), registry.BlockCountPerTurn) - require.Equal(t, int32(0), registry.KeeperIndex) - require.Equal(t, int32(1), registry.NumKeepers) - - require.NoError(t, db.Get(&upkeepRegistration, `SELECT * FROM upkeep_registrations`)) - require.Equal(t, upkeepConfig1_2.CheckData, upkeepRegistration.CheckData) - require.Equal(t, upkeepConfig1_2.ExecuteGas, upkeepRegistration.ExecuteGas) - - assertUpkeepIDs(t, db, []int64{3, 69, 420}) - - // 2nd sync. Cancel upkeep (id 3) and add a new upkeep (id 2022) - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(69), big.NewInt(420), big.NewInt(2022)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 3, // sync all 3 active upkeeps - 2, - 1) - synchronizer.ExportedFullSync(ctx) - - cltest.AssertCount(t, db, "keeper_registries", 1) - cltest.AssertCount(t, db, "upkeep_registrations", 3) - assertUpkeepIDs(t, db, []int64{69, 420, 2022}) -} - -func Test_RegistrySynchronizer1_2_ConfigSetLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 0, - 2, - 0) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - var registry keeper.Registry - require.NoError(t, db.Get(®istry, `SELECT * FROM keeper_registries`)) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) - newConfig := registryConfig1_2 - newConfig.BlockCountPerTurn = big.NewInt(40) // change from default - registryMock.MockResponse("getState", registry1_2.GetState{ - State: registryState1_2, - Config: newConfig, - Keepers: []common.Address{fromAddress}, - }).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryConfigSet{} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.AssertRecordEventually(t, db, ®istry, fmt.Sprintf(`SELECT * FROM keeper_registries WHERE id = %d`, registry.ID), func() bool { - return registry.BlockCountPerTurn == 40 - }) - cltest.AssertCount(t, db, "keeper_registries", 1) -} - -func Test_RegistrySynchronizer1_2_KeepersUpdatedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 0, - 2, - 0) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - var registry keeper.Registry - require.NoError(t, db.Get(®istry, `SELECT * FROM keeper_registries`)) - - addresses := []common.Address{fromAddress, testutils.NewAddress()} // change from default - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) - registryMock.MockResponse("getState", registry1_2.GetState{ - State: registryState1_2, - Config: registryConfig1_2, - Keepers: addresses, - }).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryKeepersUpdated{} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.AssertRecordEventually(t, db, ®istry, fmt.Sprintf(`SELECT * FROM keeper_registries WHERE id = %d`, registry.ID), func() bool { - return registry.NumKeepers == 2 - }) - cltest.AssertCount(t, db, "keeper_registries", 1) -} - -func Test_RegistrySynchronizer1_2_UpkeepCanceledLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 3, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 3) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryUpkeepCanceled{Id: big.NewInt(3)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_2_UpkeepRegisteredLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) - registryMock.MockResponse("getUpkeep", upkeepConfig1_2).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryUpkeepRegistered{Id: big.NewInt(420)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_2_UpkeepPerformedLog(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - pgtest.MustExec(t, db, `UPDATE upkeep_registrations SET last_run_block_height = 100`) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash, BlockNumber: 200} - log := registry1_2.KeeperRegistryUpkeepPerformed{Id: big.NewInt(3), From: fromAddress} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - g.Eventually(func() int64 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastRunBlockHeight - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(int64(200))) - - g.Eventually(func() int64 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastKeeperIndex.Int64 - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(int64(0))) -} - -func Test_RegistrySynchronizer1_2_UpkeepGasLimitSetLog(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - getExecuteGas := func() uint32 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.ExecuteGas - } - g.Eventually(getExecuteGas, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(uint32(2_000_000))) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) - newConfig := upkeepConfig1_2 - newConfig.ExecuteGas = 4_000_000 // change from default - registryMock.MockResponse("getUpkeep", newConfig).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryUpkeepGasLimitSet{Id: big.NewInt(3), GasLimit: big.NewInt(4_000_000)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - g.Eventually(getExecuteGas, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(uint32(4_000_000))) -} - -func Test_RegistrySynchronizer1_2_UpkeepReceivedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_2ABI, contractAddress) - registryMock.MockResponse("getUpkeep", upkeepConfig1_2).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryUpkeepReceived{Id: big.NewInt(420)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_2_UpkeepMigratedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_2) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_2( - t, - ethMock, - contractAddress, - registryConfig1_2, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_2, - 3, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 3) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_2.KeeperRegistryUpkeepMigrated{Id: big.NewInt(3)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} diff --git a/core/services/keeper/registry1_3_synchronizer_test.go b/core/services/keeper/registry1_3_synchronizer_test.go deleted file mode 100644 index c6ed49798cc..00000000000 --- a/core/services/keeper/registry1_3_synchronizer_test.go +++ /dev/null @@ -1,718 +0,0 @@ -package keeper_test - -import ( - "fmt" - "math/big" - "testing" - - "github.com/ethereum/go-ethereum/common" - "github.com/ethereum/go-ethereum/core/types" - "github.com/onsi/gomega" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/require" - - "github.com/smartcontractkit/chainlink-common/pkg/services/servicetest" - - "github.com/smartcontractkit/chainlink-integrations/evm/client/clienttest" - evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types" - ubig "github.com/smartcontractkit/chainlink-integrations/evm/utils/big" - logmocks "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log/mocks" - registry1_3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" - "github.com/smartcontractkit/chainlink/v2/core/internal/cltest" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils" - "github.com/smartcontractkit/chainlink/v2/core/internal/testutils/pgtest" - "github.com/smartcontractkit/chainlink/v2/core/logger" - "github.com/smartcontractkit/chainlink/v2/core/services/keeper" -) - -var registryConfig1_3 = registry1_3.Config{ - PaymentPremiumPPB: 100, - FlatFeeMicroLink: uint32(0), - BlockCountPerTurn: big.NewInt(20), - CheckGasLimit: 2_000_000, - StalenessSeconds: big.NewInt(3600), - GasCeilingMultiplier: uint16(2), - MinUpkeepSpend: big.NewInt(0), - MaxPerformGas: uint32(5000000), - FallbackGasPrice: big.NewInt(1000000), - FallbackLinkPrice: big.NewInt(1000000), - Transcoder: cltest.NewEIP55Address().Address(), - Registrar: cltest.NewEIP55Address().Address(), -} - -var registryState1_3 = registry1_3.State{ - Nonce: uint32(0), - OwnerLinkBalance: big.NewInt(1000000000000000000), - ExpectedLinkBalance: big.NewInt(1000000000000000000), - NumUpkeeps: big.NewInt(0), -} - -var upkeepConfig1_3 = registry1_3.GetUpkeep{ - Target: testutils.NewAddress(), - ExecuteGas: 2_000_000, - CheckData: common.Hex2Bytes("1234"), - Balance: big.NewInt(1000000000000000000), - LastKeeper: testutils.NewAddress(), - Admin: testutils.NewAddress(), - MaxValidBlocknumber: 1_000_000_000, - AmountSpent: big.NewInt(0), -} - -func mockRegistry1_3( - t *testing.T, - ethMock *clienttest.Client, - contractAddress common.Address, - config registry1_3.Config, - activeUpkeepIDs []*big.Int, - keeperList []common.Address, - upkeepConfig registry1_3.GetUpkeep, - timesGetUpkeepMock int, - getStateTime int, - getActiveUpkeepIDsTime int, -) { - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - - state := registryState1_3 - state.NumUpkeeps = big.NewInt(int64(len(activeUpkeepIDs))) - var getState = registry1_3.GetState{ - State: state, - Config: config, - Keepers: keeperList, - } - ethMock.On("HeadByNumber", mock.Anything, (*big.Int)(nil)). - Return(&evmtypes.Head{Number: 10}, nil) - if getStateTime > 0 { - registryMock.MockResponse("getState", getState).Times(getStateTime) - } - if getActiveUpkeepIDsTime > 0 { - registryMock.MockResponse("getActiveUpkeepIDs", activeUpkeepIDs).Times(getActiveUpkeepIDsTime) - } - if timesGetUpkeepMock > 0 { - registryMock.MockResponse("getUpkeep", upkeepConfig).Times(timesGetUpkeepMock) - } -} - -func Test_LogListenerOpts1_3(t *testing.T) { - db := pgtest.NewSqlxDB(t) - korm := keeper.NewORM(db, logger.TestLogger(t)) - ethClient := clienttest.NewClientWithDefaultChainID(t) - j := cltest.MustInsertKeeperJob(t, db, korm, cltest.NewEIP55Address(), cltest.NewEIP55Address()) - - contractAddress := j.KeeperSpec.ContractAddress.Address() - registryMock := cltest.NewContractMockReceiver(t, ethClient, keeper.Registry1_1ABI, contractAddress) - registryMock.MockResponse("typeAndVersion", "KeeperRegistry 1.3.0").Once() - - registryWrapper, err := keeper.NewRegistryWrapper(j.KeeperSpec.ContractAddress, ethClient) - require.NoError(t, err) - - logListenerOpts, err := registryWrapper.GetLogListenerOpts(1, nil) - require.NoError(t, err) - - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryKeepersUpdated{}.Topic(), "Registry should listen to KeeperRegistryKeepersUpdated log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryConfigSet{}.Topic(), "Registry should listen to KeeperRegistryConfigSet log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepCanceled{}.Topic(), "Registry should listen to KeeperRegistryUpkeepCanceled log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepRegistered{}.Topic(), "Registry should listen to KeeperRegistryUpkeepRegistered log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepPerformed{}.Topic(), "Registry should listen to KeeperRegistryUpkeepPerformed log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepGasLimitSet{}.Topic(), "Registry should listen to KeeperRegistryUpkeepGasLimitSet log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepMigrated{}.Topic(), "Registry should listen to KeeperRegistryUpkeepMigrated log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepReceived{}.Topic(), "Registry should listen to KeeperRegistryUpkeepReceived log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepPaused{}.Topic(), "Registry should listen to KeeperRegistryUpkeepPaused log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepUnpaused{}.Topic(), "Registry should listen to KeeperRegistryUpkeepUnpaused log") - require.Contains(t, logListenerOpts.LogsWithTopics, registry1_3.KeeperRegistryUpkeepCheckDataUpdated{}.Topic(), "Registry should listen to KeeperRegistryUpkeepCheckDataUpdated log") -} - -func Test_RegistrySynchronizer1_3_Start(t *testing.T) { - db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{}, - []common.Address{fromAddress}, - upkeepConfig1_3, - 0, - 2, - 0) - - err := synchronizer.Start(testutils.Context(t)) - require.NoError(t, err) - defer func() { assert.NoError(t, synchronizer.Close()) }() - - cltest.WaitForCount(t, db, "keeper_registries", 1) - - err = synchronizer.Start(testutils.Context(t)) - require.Error(t, err) -} - -func Test_RegistrySynchronizer1_3_FullSync(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - db, synchronizer, ethMock, _, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - upkeepConfig := upkeepConfig1_3 - upkeepConfig.LastKeeper = fromAddress - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig, - 3, // sync all 3 - 2, - 1) - synchronizer.ExportedFullSync(ctx) - - cltest.AssertCount(t, db, "keeper_registries", 1) - cltest.AssertCount(t, db, "upkeep_registrations", 3) - - // Last keeper index should be set correctly on upkeep - g.Eventually(func() bool { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastKeeperIndex.Valid - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(true)) - g.Eventually(func() int64 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastKeeperIndex.Int64 - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(int64(0))) - - var registry keeper.Registry - var upkeepRegistration keeper.UpkeepRegistration - require.NoError(t, db.Get(®istry, `SELECT * FROM keeper_registries`)) - require.Equal(t, job.KeeperSpec.ContractAddress, registry.ContractAddress) - require.Equal(t, job.KeeperSpec.FromAddress, registry.FromAddress) - require.Equal(t, int32(20), registry.BlockCountPerTurn) - require.Equal(t, int32(0), registry.KeeperIndex) - require.Equal(t, int32(1), registry.NumKeepers) - - require.NoError(t, db.Get(&upkeepRegistration, `SELECT * FROM upkeep_registrations`)) - require.Equal(t, upkeepConfig1_3.CheckData, upkeepRegistration.CheckData) - require.Equal(t, upkeepConfig1_3.ExecuteGas, upkeepRegistration.ExecuteGas) - - assertUpkeepIDs(t, db, []int64{3, 69, 420}) - - // 2nd sync. Cancel upkeep (id 3) and add a new upkeep (id 2022) - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(69), big.NewInt(420), big.NewInt(2022)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 3, // sync all 3 upkeeps - 2, - 1) - synchronizer.ExportedFullSync(ctx) - - cltest.AssertCount(t, db, "keeper_registries", 1) - cltest.AssertCount(t, db, "upkeep_registrations", 3) - assertUpkeepIDs(t, db, []int64{69, 420, 2022}) -} - -func Test_RegistrySynchronizer1_3_ConfigSetLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 0, - 2, - 0) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - var registry keeper.Registry - require.NoError(t, db.Get(®istry, `SELECT * FROM keeper_registries`)) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - newConfig := registryConfig1_3 - newConfig.BlockCountPerTurn = big.NewInt(40) // change from default - registryMock.MockResponse("getState", registry1_3.GetState{ - State: registryState1_3, - Config: newConfig, - Keepers: []common.Address{fromAddress}, - }).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryConfigSet{} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.AssertRecordEventually(t, db, ®istry, fmt.Sprintf(`SELECT * FROM keeper_registries WHERE id = %d`, registry.ID), func() bool { - return registry.BlockCountPerTurn == 40 - }) - cltest.AssertCount(t, db, "keeper_registries", 1) -} - -func Test_RegistrySynchronizer1_3_KeepersUpdatedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 0, - 2, - 0) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - var registry keeper.Registry - require.NoError(t, db.Get(®istry, `SELECT * FROM keeper_registries`)) - - addresses := []common.Address{fromAddress, testutils.NewAddress()} // change from default - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - registryMock.MockResponse("getState", registry1_3.GetState{ - State: registryState1_3, - Config: registryConfig1_3, - Keepers: addresses, - }).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryKeepersUpdated{} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.AssertRecordEventually(t, db, ®istry, fmt.Sprintf(`SELECT * FROM keeper_registries WHERE id = %d`, registry.ID), func() bool { - return registry.NumKeepers == 2 - }) - cltest.AssertCount(t, db, "keeper_registries", 1) -} - -func Test_RegistrySynchronizer1_3_UpkeepCanceledLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 3, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 3) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryUpkeepCanceled{Id: big.NewInt(3)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_3_UpkeepRegisteredLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - registryMock.MockResponse("getUpkeep", upkeepConfig1_3).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryUpkeepRegistered{Id: big.NewInt(420)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_3_UpkeepPerformedLog(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - pgtest.MustExec(t, db, `UPDATE upkeep_registrations SET last_run_block_height = 100`) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash, BlockNumber: 200} - log := registry1_3.KeeperRegistryUpkeepPerformed{Id: big.NewInt(3), From: fromAddress} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - g.Eventually(func() int64 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastRunBlockHeight - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(int64(200))) - - g.Eventually(func() int64 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.LastKeeperIndex.Int64 - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(int64(0))) -} - -func Test_RegistrySynchronizer1_3_UpkeepGasLimitSetLog(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - getExecuteGas := func() uint32 { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations`) - require.NoError(t, err) - return upkeep.ExecuteGas - } - g.Eventually(getExecuteGas, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(uint32(2_000_000))) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - newConfig := upkeepConfig1_3 - newConfig.ExecuteGas = 4_000_000 // change from default - registryMock.MockResponse("getUpkeep", newConfig).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryUpkeepGasLimitSet{Id: big.NewInt(3), GasLimit: big.NewInt(4_000_000)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - g.Eventually(getExecuteGas, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(uint32(4_000_000))) -} - -func Test_RegistrySynchronizer1_3_UpkeepReceivedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - registryMock.MockResponse("getUpkeep", upkeepConfig1_3).Once() - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryUpkeepReceived{Id: big.NewInt(420)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_3_UpkeepMigratedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 3, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 3) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryUpkeepMigrated{Id: big.NewInt(3)} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - // race condition: "wait for count" - cltest.WaitForCount(t, db, "upkeep_registrations", 2) -} - -func Test_RegistrySynchronizer1_3_UpkeepPausedLog_UpkeepUnpausedLog(t *testing.T) { - ctx := testutils.Context(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - upkeepId := big.NewInt(3) - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{big.NewInt(3), big.NewInt(69), big.NewInt(420)}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 4, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 3) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - log := registry1_3.KeeperRegistryUpkeepPaused{Id: upkeepId} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&log) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 2) - - head = cltest.MustInsertHead(t, db, 2) - rawLog = types.Log{BlockHash: head.Hash} - unpausedlog := registry1_3.KeeperRegistryUpkeepUnpaused{Id: upkeepId} - logBroadcast = logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&unpausedlog) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - cltest.WaitForCount(t, db, "upkeep_registrations", 3) - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations WHERE upkeep_id = $1`, ubig.New(upkeepId)) - require.NoError(t, err) - - require.Equal(t, upkeepId.String(), upkeep.UpkeepID.String()) - require.Equal(t, upkeepConfig1_3.CheckData, upkeep.CheckData) - require.Equal(t, upkeepConfig1_3.ExecuteGas, upkeep.ExecuteGas) - - var registryId int64 - err = db.Get(®istryId, `SELECT id from keeper_registries WHERE job_id = $1`, job.ID) - require.NoError(t, err) - require.Equal(t, registryId, upkeep.RegistryID) -} - -func Test_RegistrySynchronizer1_3_UpkeepCheckDataUpdatedLog(t *testing.T) { - ctx := testutils.Context(t) - g := gomega.NewWithT(t) - db, synchronizer, ethMock, lb, job := setupRegistrySync(t, keeper.RegistryVersion_1_3) - - contractAddress := job.KeeperSpec.ContractAddress.Address() - fromAddress := job.KeeperSpec.FromAddress.Address() - upkeepId := big.NewInt(3) - - mockRegistry1_3( - t, - ethMock, - contractAddress, - registryConfig1_3, - []*big.Int{upkeepId}, // Upkeep IDs - []common.Address{fromAddress}, - upkeepConfig1_3, - 1, - 2, - 1) - - servicetest.Run(t, synchronizer) - cltest.WaitForCount(t, db, "keeper_registries", 1) - cltest.WaitForCount(t, db, "upkeep_registrations", 1) - - head := cltest.MustInsertHead(t, db, 1) - rawLog := types.Log{BlockHash: head.Hash} - _ = logmocks.NewBroadcast(t) - newCheckData := []byte("Chainlink") - registryMock := cltest.NewContractMockReceiver(t, ethMock, keeper.Registry1_3ABI, contractAddress) - newConfig := upkeepConfig1_3 - newConfig.CheckData = newCheckData // changed from default - registryMock.MockResponse("getUpkeep", newConfig).Once() - - updatedLog := registry1_3.KeeperRegistryUpkeepCheckDataUpdated{Id: upkeepId, NewCheckData: newCheckData} - logBroadcast := logmocks.NewBroadcast(t) - logBroadcast.On("DecodedLog").Return(&updatedLog) - logBroadcast.On("RawLog").Return(rawLog) - logBroadcast.On("String").Maybe().Return("") - lb.On("MarkConsumed", mock.Anything, mock.Anything, mock.Anything).Return(nil) - lb.On("WasAlreadyConsumed", mock.Anything, mock.Anything).Return(false, nil) - - // Do the thing - synchronizer.HandleLog(ctx, logBroadcast) - - g.Eventually(func() []byte { - var upkeep keeper.UpkeepRegistration - err := db.Get(&upkeep, `SELECT * FROM upkeep_registrations WHERE upkeep_id = $1`, ubig.New(upkeepId)) - require.NoError(t, err) - return upkeep.CheckData - }, testutils.WaitTimeout(t), cltest.DBPollingInterval).Should(gomega.Equal(newCheckData)) -} diff --git a/core/services/keeper/registry_interface.go b/core/services/keeper/registry_interface.go index 4886b805423..38db92b2e28 100644 --- a/core/services/keeper/registry_interface.go +++ b/core/services/keeper/registry_interface.go @@ -14,8 +14,6 @@ import ( evmclient "github.com/smartcontractkit/chainlink-integrations/evm/client" evmtypes "github.com/smartcontractkit/chainlink-integrations/evm/types" registry1_1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry1_2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - registry1_3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/shared/generated/type_and_version" ) @@ -55,8 +53,6 @@ type RegistryWrapper struct { Address evmtypes.EIP55Address Version RegistryVersion contract1_1 *registry1_1.KeeperRegistry - contract1_2 *registry1_2.KeeperRegistry - contract1_3 *registry1_3.KeeperRegistry evmClient evmclient.Client } @@ -80,27 +76,10 @@ func NewRegistryWrapper(address evmtypes.EIP55Address, evmClient evmclient.Clien if err != nil { return nil, errors.Wrap(err, "unable to create keeper registry 1_1 contract wrapper") } - contract1_2, err := registry1_2.NewKeeperRegistry( - address.Address(), - evmClient, - ) - if err != nil { - return nil, errors.Wrap(err, "unable to create keeper registry 1_2 contract wrapper") - } - contract1_3, err := registry1_3.NewKeeperRegistry( - address.Address(), - evmClient, - ) - if err != nil { - return nil, errors.Wrap(err, "unable to create keeper registry 1_3 contract wrapper") - } - return &RegistryWrapper{ Address: address, Version: *version, contract1_1: contract1_1, - contract1_2: contract1_2, - contract1_3: contract1_3, evmClient: evmClient, }, nil } @@ -120,12 +99,6 @@ func getRegistryVersion(contract *type_and_version.ITypeAndVersion) (*RegistryVe case strings.HasPrefix(typeAndVersion, "KeeperRegistry 1.1"): version := RegistryVersion_1_1 return &version, nil - case strings.HasPrefix(typeAndVersion, "KeeperRegistry 1.2"): - version := RegistryVersion_1_2 - return &version, nil - case strings.HasPrefix(typeAndVersion, "KeeperRegistry 1.3"): - version := RegistryVersion_1_3 - return &version, nil default: return nil, errors.Errorf("Registry type and version %s not supported", typeAndVersion) } @@ -144,18 +117,6 @@ func (rw *RegistryWrapper) getUpkeepCount(opts *bind.CallOpts) (*big.Int, error) return nil, errors.Wrap(err, "failed to get upkeep count") } return upkeepCount, nil - case RegistryVersion_1_2: - state, err := rw.contract1_2.GetState(opts) - if err != nil { - return nil, errors.Wrapf(err, "failed to get contract state at block number %d", opts.BlockNumber.Int64()) - } - return state.State.NumUpkeeps, nil - case RegistryVersion_1_3: - state, err := rw.contract1_3.GetState(opts) - if err != nil { - return nil, errors.Wrapf(err, "failed to get contract state at block number %d", opts.BlockNumber.Int64()) - } - return state.State.NumUpkeeps, nil default: return nil, newUnsupportedVersionError("getUpkeepCount", rw.Version) } @@ -200,27 +161,6 @@ func (rw *RegistryWrapper) GetActiveUpkeepIDs(ctx context.Context, opts *bind.Ca } } return activeUpkeeps, nil - case RegistryVersion_1_2, RegistryVersion_1_3: - activeUpkeepIDs := make([]*big.Int, 0) - var activeUpkeepIDBatch []*big.Int - for int64(len(activeUpkeepIDs)) < upkeepCount.Int64() { - startIndex := int64(len(activeUpkeepIDs)) - maxCount := upkeepCount.Int64() - int64(len(activeUpkeepIDs)) - if maxCount > ActiveUpkeepIDBatchSize { - maxCount = ActiveUpkeepIDBatchSize - } - if rw.Version == RegistryVersion_1_2 { - activeUpkeepIDBatch, err = rw.contract1_2.GetActiveUpkeepIDs(opts, big.NewInt(startIndex), big.NewInt(maxCount)) - } else { - activeUpkeepIDBatch, err = rw.contract1_3.GetActiveUpkeepIDs(opts, big.NewInt(startIndex), big.NewInt(maxCount)) - } - if err != nil { - return nil, errors.Wrapf(err, "failed to get active upkeep IDs from index %d to %d (both inclusive)", startIndex, startIndex+maxCount-1) - } - activeUpkeepIDs = append(activeUpkeepIDs, activeUpkeepIDBatch...) - } - - return activeUpkeepIDs, nil default: return nil, newUnsupportedVersionError("GetActiveUpkeepIDs", rw.Version) } @@ -244,26 +184,6 @@ func (rw *RegistryWrapper) GetUpkeep(opts *bind.CallOpts, id *big.Int) (*UpkeepC CheckData: upkeep.CheckData, LastKeeper: upkeep.LastKeeper, }, nil - case RegistryVersion_1_2: - upkeep, err := rw.contract1_2.GetUpkeep(opts, id) - if err != nil { - return nil, errors.Wrap(err, "failed to get upkeep config") - } - return &UpkeepConfig{ - ExecuteGas: upkeep.ExecuteGas, - CheckData: upkeep.CheckData, - LastKeeper: upkeep.LastKeeper, - }, nil - case RegistryVersion_1_3: - upkeep, err := rw.contract1_3.GetUpkeep(opts, id) - if err != nil { - return nil, errors.Wrap(err, "failed to get upkeep config") - } - return &UpkeepConfig{ - ExecuteGas: upkeep.ExecuteGas, - CheckData: upkeep.CheckData, - LastKeeper: upkeep.LastKeeper, - }, nil default: return nil, newUnsupportedVersionError("GetUpkeep", rw.Version) } @@ -294,28 +214,6 @@ func (rw *RegistryWrapper) GetConfig(opts *bind.CallOpts) (*RegistryConfig, erro CheckGas: config.CheckGasLimit, KeeperAddresses: keeperAddresses, }, nil - case RegistryVersion_1_2: - state, err := rw.contract1_2.GetState(opts) - if err != nil { - return nil, errors.Errorf("%s [%s]: getState %s", ErrContractCallFailure, err, rw.Version) - } - - return &RegistryConfig{ - BlockCountPerTurn: int32(state.Config.BlockCountPerTurn.Int64()), - CheckGas: state.Config.CheckGasLimit, - KeeperAddresses: state.Keepers, - }, nil - case RegistryVersion_1_3: - state, err := rw.contract1_3.GetState(opts) - if err != nil { - return nil, errors.Errorf("%s [%s]: getState %s", ErrContractCallFailure, err, rw.Version) - } - - return &RegistryConfig{ - BlockCountPerTurn: int32(state.Config.BlockCountPerTurn.Int64()), - CheckGas: state.Config.CheckGasLimit, - KeeperAddresses: state.Keepers, - }, nil default: return nil, newUnsupportedVersionError("GetConfig", rw.Version) } @@ -325,10 +223,6 @@ func (rw *RegistryWrapper) SetKeepers(opts *bind.TransactOpts, keepers []common. switch rw.Version { case RegistryVersion_1_0, RegistryVersion_1_1: return rw.contract1_1.SetKeepers(opts, keepers, payees) - case RegistryVersion_1_2: - return rw.contract1_2.SetKeepers(opts, keepers, payees) - case RegistryVersion_1_3: - return rw.contract1_3.SetKeepers(opts, keepers, payees) default: return nil, newUnsupportedVersionError("SetKeepers", rw.Version) } @@ -338,10 +232,6 @@ func (rw *RegistryWrapper) RegisterUpkeep(opts *bind.TransactOpts, target common switch rw.Version { case RegistryVersion_1_0, RegistryVersion_1_1: return rw.contract1_1.RegisterUpkeep(opts, target, gasLimit, admin, checkData) - case RegistryVersion_1_2: - return rw.contract1_2.RegisterUpkeep(opts, target, gasLimit, admin, checkData) - case RegistryVersion_1_3: - return rw.contract1_3.RegisterUpkeep(opts, target, gasLimit, admin, checkData) default: return nil, newUnsupportedVersionError("RegisterUpkeep", rw.Version) } @@ -351,10 +241,6 @@ func (rw *RegistryWrapper) AddFunds(opts *bind.TransactOpts, id *big.Int, amount switch rw.Version { case RegistryVersion_1_0, RegistryVersion_1_1: return rw.contract1_1.AddFunds(opts, id, amount) - case RegistryVersion_1_2: - return rw.contract1_2.AddFunds(opts, id, amount) - case RegistryVersion_1_3: - return rw.contract1_3.AddFunds(opts, id, amount) default: return nil, newUnsupportedVersionError("AddFunds", rw.Version) } @@ -364,10 +250,6 @@ func (rw *RegistryWrapper) PerformUpkeep(opts *bind.TransactOpts, id *big.Int, p switch rw.Version { case RegistryVersion_1_0, RegistryVersion_1_1: return rw.contract1_1.PerformUpkeep(opts, id, performData) - case RegistryVersion_1_2: - return rw.contract1_2.PerformUpkeep(opts, id, performData) - case RegistryVersion_1_3: - return rw.contract1_3.PerformUpkeep(opts, id, performData) default: return nil, newUnsupportedVersionError("PerformUpkeep", rw.Version) } @@ -377,10 +259,6 @@ func (rw *RegistryWrapper) CancelUpkeep(opts *bind.TransactOpts, id *big.Int) (* switch rw.Version { case RegistryVersion_1_0, RegistryVersion_1_1: return rw.contract1_1.CancelUpkeep(opts, id) - case RegistryVersion_1_2: - return rw.contract1_2.CancelUpkeep(opts, id) - case RegistryVersion_1_3: - return rw.contract1_3.CancelUpkeep(opts, id) default: return nil, newUnsupportedVersionError("CancelUpkeep", rw.Version) } diff --git a/core/services/keeper/registry_interface_logs.go b/core/services/keeper/registry_interface_logs.go index 97d6242fab1..69f3bcb96cb 100644 --- a/core/services/keeper/registry_interface_logs.go +++ b/core/services/keeper/registry_interface_logs.go @@ -8,8 +8,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" registry1_1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry1_2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - registry1_3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" ) func (rw *RegistryWrapper) GetLogListenerOpts(minIncomingConfirmations uint32, upkeepPerformedFilter [][]log.Topic) (*log.ListenerOpts, error) { @@ -27,41 +25,6 @@ func (rw *RegistryWrapper) GetLogListenerOpts(minIncomingConfirmations uint32, u }, MinIncomingConfirmations: minIncomingConfirmations, }, nil - case RegistryVersion_1_2: - return &log.ListenerOpts{ - Contract: rw.contract1_2.Address(), - ParseLog: rw.contract1_2.ParseLog, - LogsWithTopics: map[common.Hash][][]log.Topic{ - registry1_2.KeeperRegistryKeepersUpdated{}.Topic(): nil, - registry1_2.KeeperRegistryConfigSet{}.Topic(): nil, - registry1_2.KeeperRegistryUpkeepCanceled{}.Topic(): nil, - registry1_2.KeeperRegistryUpkeepRegistered{}.Topic(): nil, - registry1_2.KeeperRegistryUpkeepPerformed{}.Topic(): upkeepPerformedFilter, - registry1_2.KeeperRegistryUpkeepGasLimitSet{}.Topic(): nil, - registry1_2.KeeperRegistryUpkeepMigrated{}.Topic(): nil, - registry1_2.KeeperRegistryUpkeepReceived{}.Topic(): nil, - }, - MinIncomingConfirmations: minIncomingConfirmations, - }, nil - case RegistryVersion_1_3: - return &log.ListenerOpts{ - Contract: rw.contract1_3.Address(), - ParseLog: rw.contract1_3.ParseLog, - LogsWithTopics: map[common.Hash][][]log.Topic{ - registry1_3.KeeperRegistryKeepersUpdated{}.Topic(): nil, - registry1_3.KeeperRegistryConfigSet{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepCanceled{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepRegistered{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepPerformed{}.Topic(): upkeepPerformedFilter, - registry1_3.KeeperRegistryUpkeepGasLimitSet{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepMigrated{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepReceived{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepPaused{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepUnpaused{}.Topic(): nil, - registry1_3.KeeperRegistryUpkeepCheckDataUpdated{}.Topic(): nil, - }, - MinIncomingConfirmations: minIncomingConfirmations, - }, nil default: return nil, newUnsupportedVersionError("GetLogListenerOpts", rw.Version) } @@ -75,18 +38,6 @@ func (rw *RegistryWrapper) GetCancelledUpkeepIDFromLog(broadcast log.Broadcast) return nil, errors.Errorf("expected UpkeepCanceled log but got %T", broadcastedLog) } return broadcastedLog.Id, nil - case RegistryVersion_1_2: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_2.KeeperRegistryUpkeepCanceled) - if !ok { - return nil, errors.Errorf("expected UpkeepCanceled log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepCanceled) - if !ok { - return nil, errors.Errorf("expected UpkeepCanceled log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil default: return nil, newUnsupportedVersionError("GetCancelledUpkeepIDFromLog", rw.Version) } @@ -100,18 +51,6 @@ func (rw *RegistryWrapper) GetUpkeepIdFromRegistrationLog(broadcast log.Broadcas return nil, errors.Errorf("expected UpkeepRegistered log but got %T", broadcastedLog) } return broadcastedLog.Id, nil - case RegistryVersion_1_2: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_2.KeeperRegistryUpkeepRegistered) - if !ok { - return nil, errors.Errorf("expected UpkeepRegistered log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepRegistered) - if !ok { - return nil, errors.Errorf("expected UpkeepRegistered log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil default: return nil, newUnsupportedVersionError("GetUpkeepIdFromRegistrationLog", rw.Version) } @@ -133,135 +72,12 @@ func (rw *RegistryWrapper) ParseUpkeepPerformedLog(broadcast log.Broadcast) (*Up UpkeepID: broadcastedLog.Id, FromKeeper: broadcastedLog.From, }, nil - case RegistryVersion_1_2: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_2.KeeperRegistryUpkeepPerformed) - if !ok { - return nil, errors.Errorf("expected UpkeepPerformed log but got %T", broadcastedLog) - } - return &UpkeepPerformedLog{ - UpkeepID: broadcastedLog.Id, - FromKeeper: broadcastedLog.From, - }, nil - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepPerformed) - if !ok { - return nil, errors.Errorf("expected UpkeepPerformed log but got %T", broadcastedLog) - } - return &UpkeepPerformedLog{ - UpkeepID: broadcastedLog.Id, - FromKeeper: broadcastedLog.From, - }, nil default: return nil, newUnsupportedVersionError("ParseUpkeepPerformedLog", rw.Version) } } -func (rw *RegistryWrapper) GetIDFromGasLimitSetLog(broadcast log.Broadcast) (*big.Int, error) { - // Only supported on 1.2 and 1.3 - switch rw.Version { - case RegistryVersion_1_2: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_2.KeeperRegistryUpkeepGasLimitSet) - if !ok { - return nil, errors.Errorf("expected UpkeepGasLimitSetlog but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepGasLimitSet) - if !ok { - return nil, errors.Errorf("expected UpkeepGasLimitSetlog but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - default: - return nil, newUnsupportedVersionError("GetIDFromGasLimitSetLog", rw.Version) - } -} - -func (rw *RegistryWrapper) GetUpkeepIdFromReceivedLog(broadcast log.Broadcast) (*big.Int, error) { - // Only supported on 1.2 and 1.3 - switch rw.Version { - case RegistryVersion_1_2: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_2.KeeperRegistryUpkeepReceived) - if !ok { - return nil, errors.Errorf("expected UpkeepReceived log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepReceived) - if !ok { - return nil, errors.Errorf("expected UpkeepReceived log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - default: - return nil, newUnsupportedVersionError("GetUpkeepIdFromReceivedLog", rw.Version) - } -} - -func (rw *RegistryWrapper) GetUpkeepIdFromMigratedLog(broadcast log.Broadcast) (*big.Int, error) { - // Only supported on 1.2 and 1.3 - switch rw.Version { - case RegistryVersion_1_2: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_2.KeeperRegistryUpkeepMigrated) - if !ok { - return nil, errors.Errorf("expected UpkeepMigrated log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepMigrated) - if !ok { - return nil, errors.Errorf("expected UpkeepMigrated log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - default: - return nil, newUnsupportedVersionError("GetUpkeepIdFromMigratedLog", rw.Version) - } -} - -func (rw *RegistryWrapper) GetUpkeepIdFromUpkeepPausedLog(broadcast log.Broadcast) (*big.Int, error) { - // Only supported on 1.3 - switch rw.Version { - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepPaused) - if !ok { - return nil, errors.Errorf("expected UpkeepPaused log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - default: - return nil, newUnsupportedVersionError("GetUpkeepIdFromUpkeepPausedLog", rw.Version) - } -} - -func (rw *RegistryWrapper) GetUpkeepIdFromUpkeepUnpausedLog(broadcast log.Broadcast) (*big.Int, error) { - // Only supported on 1.3 - switch rw.Version { - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepUnpaused) - if !ok { - return nil, errors.Errorf("expected UpkeepUnpaused log but got %T", broadcastedLog) - } - return broadcastedLog.Id, nil - default: - return nil, newUnsupportedVersionError("GetUpkeepIdFromUpkeepUnpausedLog", rw.Version) - } -} - type UpkeepCheckDataUpdatedLog struct { UpkeepID *big.Int NewCheckData []byte } - -func (rw *RegistryWrapper) ParseUpkeepCheckDataUpdatedLog(broadcast log.Broadcast) (*UpkeepCheckDataUpdatedLog, error) { - // Only supported on 1.3 - switch rw.Version { - case RegistryVersion_1_3: - broadcastedLog, ok := broadcast.DecodedLog().(*registry1_3.KeeperRegistryUpkeepCheckDataUpdated) - if !ok { - return nil, errors.Errorf("expected UpkeepCheckDataUpdated log but got %T", broadcastedLog) - } - return &UpkeepCheckDataUpdatedLog{ - UpkeepID: broadcastedLog.Id, - NewCheckData: broadcastedLog.NewCheckData, - }, nil - default: - return nil, newUnsupportedVersionError("GetUpkeepIdFromUpkeepPausedLog", rw.Version) - } -} diff --git a/core/services/keeper/registry_synchronizer_helper_test.go b/core/services/keeper/registry_synchronizer_helper_test.go index 5f8946562cf..6d3e982459f 100644 --- a/core/services/keeper/registry_synchronizer_helper_test.go +++ b/core/services/keeper/registry_synchronizer_helper_test.go @@ -60,13 +60,7 @@ func setupRegistrySync(t *testing.T, version keeper.RegistryVersion) ( case keeper.RegistryVersion_1_0, keeper.RegistryVersion_1_1: registryMock := cltest.NewContractMockReceiver(t, ethClient, keeper.Registry1_1ABI, contractAddress) registryMock.MockResponse("typeAndVersion", "KeeperRegistry 1.1.1").Once() - case keeper.RegistryVersion_1_2: - registryMock := cltest.NewContractMockReceiver(t, ethClient, keeper.Registry1_2ABI, contractAddress) - registryMock.MockResponse("typeAndVersion", "KeeperRegistry 1.2.0").Once() - case keeper.RegistryVersion_1_3: - registryMock := cltest.NewContractMockReceiver(t, ethClient, keeper.Registry1_3ABI, contractAddress) - registryMock.MockResponse("typeAndVersion", "KeeperRegistry 1.3.0").Once() - case keeper.RegistryVersion_2_0, keeper.RegistryVersion_2_1: + case keeper.RegistryVersion_1_2, keeper.RegistryVersion_1_3, keeper.RegistryVersion_2_0, keeper.RegistryVersion_2_1: t.Fatalf("Unsupported version: %s", version) } diff --git a/core/services/keeper/registry_synchronizer_process_logs.go b/core/services/keeper/registry_synchronizer_process_logs.go index 4df1678e1d1..1b4a67c0ed5 100644 --- a/core/services/keeper/registry_synchronizer_process_logs.go +++ b/core/services/keeper/registry_synchronizer_process_logs.go @@ -11,8 +11,6 @@ import ( "github.com/smartcontractkit/chainlink-integrations/evm/utils/big" "github.com/smartcontractkit/chainlink/v2/core/chains/evm/log" registry1_1 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - registry1_2 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - registry1_3 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" ) func (rs *RegistrySynchronizer) processLogs(ctx context.Context) { @@ -33,49 +31,18 @@ func (rs *RegistrySynchronizer) processLogs(ctx context.Context) { switch eventLog.(type) { case *registry1_1.KeeperRegistryKeepersUpdated, - *registry1_1.KeeperRegistryConfigSet, - *registry1_2.KeeperRegistryKeepersUpdated, - *registry1_2.KeeperRegistryConfigSet, - *registry1_3.KeeperRegistryKeepersUpdated, - *registry1_3.KeeperRegistryConfigSet: + *registry1_1.KeeperRegistryConfigSet: err = rs.handleSyncRegistryLog(ctx, broadcast) - case *registry1_1.KeeperRegistryUpkeepCanceled, - *registry1_2.KeeperRegistryUpkeepCanceled, - *registry1_3.KeeperRegistryUpkeepCanceled: + case *registry1_1.KeeperRegistryUpkeepCanceled: err = rs.handleUpkeepCancelled(ctx, broadcast) - case *registry1_1.KeeperRegistryUpkeepRegistered, - *registry1_2.KeeperRegistryUpkeepRegistered, - *registry1_3.KeeperRegistryUpkeepRegistered: + case *registry1_1.KeeperRegistryUpkeepRegistered: err = rs.handleUpkeepRegistered(ctx, broadcast) - case *registry1_1.KeeperRegistryUpkeepPerformed, - *registry1_2.KeeperRegistryUpkeepPerformed, - *registry1_3.KeeperRegistryUpkeepPerformed: + case *registry1_1.KeeperRegistryUpkeepPerformed: err = rs.handleUpkeepPerformed(ctx, broadcast) - case *registry1_2.KeeperRegistryUpkeepGasLimitSet, - *registry1_3.KeeperRegistryUpkeepGasLimitSet: - err = rs.handleUpkeepGasLimitSet(ctx, broadcast) - - case *registry1_2.KeeperRegistryUpkeepReceived, - *registry1_3.KeeperRegistryUpkeepReceived: - err = rs.handleUpkeepReceived(ctx, broadcast) - - case *registry1_2.KeeperRegistryUpkeepMigrated, - *registry1_3.KeeperRegistryUpkeepMigrated: - err = rs.handleUpkeepMigrated(ctx, broadcast) - - case *registry1_3.KeeperRegistryUpkeepPaused: - err = rs.handleUpkeepPaused(ctx, broadcast) - - case *registry1_3.KeeperRegistryUpkeepUnpaused: - err = rs.handleUpkeepUnpaused(ctx, broadcast) - - case *registry1_3.KeeperRegistryUpkeepCheckDataUpdated: - err = rs.handleUpkeepCheckDataUpdated(ctx, broadcast) - default: rs.logger.Warn("unexpected log type") // Don't `continue` -- we still want to mark this log as consumed @@ -161,118 +128,3 @@ func (rs *RegistrySynchronizer) handleUpkeepPerformed(ctx context.Context, broad ) return nil } - -func (rs *RegistrySynchronizer) handleUpkeepGasLimitSet(ctx context.Context, broadcast log.Broadcast) error { - rs.logger.Debugw("processing UpkeepGasLimitSet log", "jobID", rs.job.ID, "txHash", broadcast.RawLog().TxHash.Hex()) - - registry, err := rs.orm.RegistryForJob(ctx, rs.job.ID) - if err != nil { - return errors.Wrap(err, "unable to find registry for job") - } - - upkeepID, err := rs.registryWrapper.GetIDFromGasLimitSetLog(broadcast) - if err != nil { - return errors.Wrap(err, "Unable to fetch upkeep ID from gas limit set log") - } - - err = rs.syncUpkeep(ctx, &rs.registryWrapper, registry, big.New(upkeepID)) - if err != nil { - return errors.Wrapf(err, "failed to sync upkeep, log: %v", broadcast.String()) - } - return nil -} - -func (rs *RegistrySynchronizer) handleUpkeepReceived(ctx context.Context, broadcast log.Broadcast) error { - rs.logger.Debugw("processing UpkeepReceived log", "txHash", broadcast.RawLog().TxHash.Hex()) - - registry, err := rs.orm.RegistryForJob(ctx, rs.job.ID) - if err != nil { - return errors.Wrap(err, "unable to find registry for job") - } - - upkeepID, err := rs.registryWrapper.GetUpkeepIdFromReceivedLog(broadcast) - if err != nil { - return errors.Wrap(err, "Unable to fetch upkeep ID from received log") - } - - err = rs.syncUpkeep(ctx, &rs.registryWrapper, registry, big.New(upkeepID)) - if err != nil { - return errors.Wrapf(err, "failed to sync upkeep, log: %v", broadcast.String()) - } - return nil -} - -func (rs *RegistrySynchronizer) handleUpkeepMigrated(ctx context.Context, broadcast log.Broadcast) error { - rs.logger.Debugw("processing UpkeepMigrated log", "txHash", broadcast.RawLog().TxHash.Hex()) - - migratedID, err := rs.registryWrapper.GetUpkeepIdFromMigratedLog(broadcast) - if err != nil { - return errors.Wrap(err, "Unable to fetch migrated upkeep ID from log") - } - - affected, err := rs.orm.BatchDeleteUpkeepsForJob(ctx, rs.job.ID, []big.Big{*big.New(migratedID)}) - if err != nil { - return errors.Wrap(err, "unable to batch delete upkeeps") - } - rs.logger.Debugw(fmt.Sprintf("deleted %v upkeep registrations", affected), "txHash", broadcast.RawLog().TxHash.Hex()) - return nil -} - -func (rs *RegistrySynchronizer) handleUpkeepPaused(ctx context.Context, broadcast log.Broadcast) error { - rs.logger.Debugw("processing UpkeepPaused log", "txHash", broadcast.RawLog().TxHash.Hex()) - - pausedUpkeepId, err := rs.registryWrapper.GetUpkeepIdFromUpkeepPausedLog(broadcast) - if err != nil { - return errors.Wrap(err, "Unable to fetch upkeep ID from upkeep paused log") - } - - _, err = rs.orm.BatchDeleteUpkeepsForJob(ctx, rs.job.ID, []big.Big{*big.New(pausedUpkeepId)}) - if err != nil { - return errors.Wrap(err, "unable to batch delete upkeeps") - } - rs.logger.Debugw(fmt.Sprintf("paused upkeep %s", pausedUpkeepId.String()), "txHash", broadcast.RawLog().TxHash.Hex()) - return nil -} - -func (rs *RegistrySynchronizer) handleUpkeepUnpaused(ctx context.Context, broadcast log.Broadcast) error { - rs.logger.Debugw("processing UpkeepUnpaused log", "txHash", broadcast.RawLog().TxHash.Hex()) - - registry, err := rs.orm.RegistryForJob(ctx, rs.job.ID) - if err != nil { - return errors.Wrap(err, "unable to find registry for job") - } - - unpausedUpkeepId, err := rs.registryWrapper.GetUpkeepIdFromUpkeepUnpausedLog(broadcast) - if err != nil { - return errors.Wrap(err, "Unable to fetch upkeep ID from upkeep unpaused log") - } - - err = rs.syncUpkeep(ctx, &rs.registryWrapper, registry, big.New(unpausedUpkeepId)) - if err != nil { - return errors.Wrapf(err, "failed to sync upkeep, log: %s", broadcast.String()) - } - rs.logger.Debugw(fmt.Sprintf("unpaused upkeep %s", unpausedUpkeepId.String()), "txHash", broadcast.RawLog().TxHash.Hex()) - return nil -} - -func (rs *RegistrySynchronizer) handleUpkeepCheckDataUpdated(ctx context.Context, broadcast log.Broadcast) error { - rs.logger.Debugw("processing Upkeep check data updated log", "txHash", broadcast.RawLog().TxHash.Hex()) - - registry, err := rs.orm.RegistryForJob(ctx, rs.job.ID) - if err != nil { - return errors.Wrap(err, "unable to find registry for job") - } - - updateLog, err := rs.registryWrapper.ParseUpkeepCheckDataUpdatedLog(broadcast) - if err != nil { - return errors.Wrap(err, "Unable to parse update log from upkeep check data updated log") - } - - err = rs.syncUpkeep(ctx, &rs.registryWrapper, registry, big.New(updateLog.UpkeepID)) - if err != nil { - return errors.Wrapf(err, "unable to update check data for upkeep %s", updateLog.UpkeepID.String()) - } - - rs.logger.Debugw(fmt.Sprintf("updated check data for upkeep %s", updateLog.UpkeepID.String()), "txHash", broadcast.RawLog().TxHash.Hex()) - return nil -} diff --git a/integration-tests/contracts/ethereum_contracts.go b/integration-tests/contracts/ethereum_contracts.go index 043eb4ce06f..e2ad364ae71 100644 --- a/integration-tests/contracts/ethereum_contracts.go +++ b/integration-tests/contracts/ethereum_contracts.go @@ -48,8 +48,6 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/link_token_interface" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/operator_factory" @@ -167,12 +165,6 @@ func GetRegistryContractABI(version contractsethereum.KeeperRegistryVersion) (*a switch version { case contractsethereum.RegistryVersion_1_0, contractsethereum.RegistryVersion_1_1: contractABI, err = keeper_registry_wrapper1_1.KeeperRegistryMetaData.GetAbi() - case contractsethereum.RegistryVersion_1_2: - contractABI, err = keeper_registry_wrapper1_2.KeeperRegistryMetaData.GetAbi() - case contractsethereum.RegistryVersion_1_3: - contractABI, err = keeper_registry_wrapper1_3.KeeperRegistryMetaData.GetAbi() - case contractsethereum.RegistryVersion_2_0: - contractABI, err = keeper_registry_wrapper2_0.KeeperRegistryMetaData.GetAbi() case contractsethereum.RegistryVersion_2_1: contractABI, err = iregistry21.IKeeperRegistryMasterMetaData.GetAbi() case contractsethereum.RegistryVersion_2_2: diff --git a/integration-tests/contracts/ethereum_contracts_atlas.go b/integration-tests/contracts/ethereum_contracts_atlas.go index 4636a92a194..43f58c6283b 100644 --- a/integration-tests/contracts/ethereum_contracts_atlas.go +++ b/integration-tests/contracts/ethereum_contracts_atlas.go @@ -11,8 +11,6 @@ import ( eth_contracts "github.com/smartcontractkit/chainlink/integration-tests/contracts/ethereum" "github.com/smartcontractkit/chainlink/integration-tests/wrappers" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/functions/generated/functions_v1_events_mock" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/gas_wrapper_mock" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registrar_wrapper1_2_mock" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1_mock" ) @@ -216,100 +214,6 @@ func DeployKeeperRegistry11Mock(client *seth.Client) (KeeperRegistry11Mock, erro }, nil } -// EthereumKeeperRegistrar12Mock represents the basic keeper registrar 1.2 mock contract -type EthereumKeeperRegistrar12Mock struct { - client *seth.Client - registrarMock *keeper_registrar_wrapper1_2_mock.KeeperRegistrarMock - address *common.Address -} - -func (f *EthereumKeeperRegistrar12Mock) Address() string { - return f.address.Hex() -} - -func (f *EthereumKeeperRegistrar12Mock) EmitRegistrationRequested(hash [32]byte, name string, encryptedEmail []byte, upkeepContract common.Address, gasLimit uint32, adminAddress common.Address, checkData []byte, amount *big.Int, source uint8) error { - _, err := f.client.Decode(f.registrarMock.EmitRegistrationRequested(f.client.NewTXOpts(), hash, name, encryptedEmail, upkeepContract, gasLimit, adminAddress, checkData, amount, source)) - return err -} - -func (f *EthereumKeeperRegistrar12Mock) EmitRegistrationApproved(hash [32]byte, displayName string, upkeepId *big.Int) error { - _, err := f.client.Decode(f.registrarMock.EmitRegistrationApproved(f.client.NewTXOpts(), hash, displayName, upkeepId)) - return err -} - -func (f *EthereumKeeperRegistrar12Mock) SetRegistrationConfig(autoApproveConfigType uint8, autoApproveMaxAllowed uint32, approvedCount uint32, keeperRegistry common.Address, minLINKJuels *big.Int) error { - _, err := f.client.Decode(f.registrarMock.SetRegistrationConfig(f.client.NewTXOpts(), autoApproveConfigType, autoApproveMaxAllowed, approvedCount, keeperRegistry, minLINKJuels)) - return err -} - -func DeployKeeperRegistrar12Mock(client *seth.Client) (KeeperRegistrar12Mock, error) { - abi, err := keeper_registrar_wrapper1_2_mock.KeeperRegistrarMockMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistrar12Mock{}, fmt.Errorf("failed to get KeeperRegistrar12Mock ABI: %w", err) - } - client.ContractStore.AddABI("KeeperRegistrar12Mock", *abi) - client.ContractStore.AddBIN("KeeperRegistrar12Mock", common.FromHex(keeper_registrar_wrapper1_2_mock.KeeperRegistrarMockMetaData.Bin)) - - data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistrar12Mock", *abi, common.FromHex(keeper_registrar_wrapper1_2_mock.KeeperRegistrarMockMetaData.Bin)) - - if err != nil { - return &EthereumKeeperRegistrar12Mock{}, fmt.Errorf("KeeperRegistrar12Mock instance deployment have failed: %w", err) - } - - instance, err := keeper_registrar_wrapper1_2_mock.NewKeeperRegistrarMock(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistrar12Mock{}, fmt.Errorf("failed to instantiate KeeperRegistrar12Mock instance: %w", err) - } - - return &EthereumKeeperRegistrar12Mock{ - client: client, - registrarMock: instance, - address: &data.Address, - }, nil -} - -// EthereumKeeperGasWrapperMock represents the basic keeper gas wrapper mock contract -type EthereumKeeperGasWrapperMock struct { - client *seth.Client - gasWrapperMock *gas_wrapper_mock.KeeperRegistryCheckUpkeepGasUsageWrapperMock - address *common.Address -} - -func (f *EthereumKeeperGasWrapperMock) Address() string { - return f.address.Hex() -} - -func (f *EthereumKeeperGasWrapperMock) SetMeasureCheckGasResult(result bool, payload []byte, gas *big.Int) error { - _, err := f.client.Decode(f.gasWrapperMock.SetMeasureCheckGasResult(f.client.NewTXOpts(), result, payload, gas)) - return err -} - -func DeployKeeperGasWrapperMock(client *seth.Client) (KeeperGasWrapperMock, error) { - abi, err := gas_wrapper_mock.KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.GetAbi() - if err != nil { - return &EthereumKeeperGasWrapperMock{}, fmt.Errorf("failed to get KeeperGasWrapperMock ABI: %w", err) - } - client.ContractStore.AddABI("KeeperGasWrapperMock", *abi) - client.ContractStore.AddBIN("KeeperGasWrapperMock", common.FromHex(gas_wrapper_mock.KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.Bin)) - - data, err := client.DeployContract(client.NewTXOpts(), "KeeperGasWrapperMock", *abi, common.FromHex(gas_wrapper_mock.KeeperRegistryCheckUpkeepGasUsageWrapperMockMetaData.Bin)) - - if err != nil { - return &EthereumKeeperGasWrapperMock{}, fmt.Errorf("KeeperGasWrapperMock instance deployment have failed: %w", err) - } - - instance, err := gas_wrapper_mock.NewKeeperRegistryCheckUpkeepGasUsageWrapperMock(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperGasWrapperMock{}, fmt.Errorf("failed to instantiate KeeperGasWrapperMock instance: %w", err) - } - - return &EthereumKeeperGasWrapperMock{ - client: client, - gasWrapperMock: instance, - address: &data.Address, - }, nil -} - // EthereumStakingEventsMock represents the basic events mock contract type EthereumStakingEventsMock struct { client *seth.Client diff --git a/integration-tests/contracts/ethereum_contracts_automation.go b/integration-tests/contracts/ethereum_contracts_automation.go index c1695cb4a1a..fb258054af1 100644 --- a/integration-tests/contracts/ethereum_contracts_automation.go +++ b/integration-tests/contracts/ethereum_contracts_automation.go @@ -49,16 +49,10 @@ import ( "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" iregistry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/i_keeper_registry_master_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_consumer_performance_wrapper" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registrar_wrapper1_2" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registrar_wrapper2_0" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic1_3" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic2_0" registrylogica21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic_a_wrapper_2_1" registrylogicb21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_logic_b_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_1" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_2" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper1_3" - "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper2_0" registry21 "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/keeper_registry_wrapper_2_1" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_triggered_streams_lookup_wrapper" "github.com/smartcontractkit/chainlink/v2/core/gethwrappers/generated/log_upkeep_counter_wrapper" @@ -132,9 +126,6 @@ type EthereumKeeperRegistry struct { client *seth.Client version ethereum.KeeperRegistryVersion registry1_1 *keeper_registry_wrapper1_1.KeeperRegistry - registry1_2 *keeper_registry_wrapper1_2.KeeperRegistry - registry1_3 *keeper_registry_wrapper1_3.KeeperRegistry - registry2_0 *keeper_registry_wrapper2_0.KeeperRegistry registry2_1 *i_keeper_registry_master_wrapper_2_1.IKeeperRegistryMaster registry2_2 *i_automation_registry_master_wrapper_2_2.IAutomationRegistryMaster registry2_3 *i_automation_registry_master_wrapper_2_3.IAutomationRegistryMaster23 @@ -179,10 +170,7 @@ func (v *EthereumKeeperRegistry) RegistryOwnerAddress() common.Address { case ethereum.RegistryVersion_2_1: ownerAddress, _ := v.registry2_1.Owner(callOpts) return ownerAddress - case ethereum.RegistryVersion_2_0: - ownerAddress, _ := v.registry2_0.Owner(callOpts) - return ownerAddress - case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1, ethereum.RegistryVersion_1_2, ethereum.RegistryVersion_1_3: + case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: return v.client.MustGetRootKeyAddress() default: return v.client.MustGetRootKeyAddress() @@ -233,10 +221,6 @@ func (v *EthereumKeeperRegistry) SetConfigTypeSafe(ocrConfig OCRv2Config) error func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrConfig OCRv2Config) error { txOpts := v.client.NewTXOpts() - callOpts := bind.CallOpts{ - From: v.client.MustGetRootKeyAddress(), - Context: nil, - } switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: @@ -252,60 +236,6 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon config.FallbackLinkPrice, )) return err - case ethereum.RegistryVersion_1_2: - state, err := v.registry1_2.GetState(&callOpts) - if err != nil { - return err - } - - _, err = v.client.Decode(v.registry1_2.SetConfig(txOpts, keeper_registry_wrapper1_2.Config{ - PaymentPremiumPPB: config.PaymentPremiumPPB, - FlatFeeMicroLink: config.FlatFeeMicroLINK, - BlockCountPerTurn: config.BlockCountPerTurn, - CheckGasLimit: config.CheckGasLimit, - StalenessSeconds: config.StalenessSeconds, - GasCeilingMultiplier: config.GasCeilingMultiplier, - MinUpkeepSpend: config.MinUpkeepSpend, - MaxPerformGas: config.MaxPerformGas, - FallbackGasPrice: config.FallbackGasPrice, - FallbackLinkPrice: config.FallbackLinkPrice, - // Keep the transcoder and registrar same. They have separate setters - Transcoder: state.Config.Transcoder, - Registrar: state.Config.Registrar, - })) - return err - case ethereum.RegistryVersion_1_3: - state, err := v.registry1_3.GetState(&callOpts) - if err != nil { - return err - } - - _, err = v.client.Decode(v.registry1_3.SetConfig(txOpts, keeper_registry_wrapper1_3.Config{ - PaymentPremiumPPB: config.PaymentPremiumPPB, - FlatFeeMicroLink: config.FlatFeeMicroLINK, - BlockCountPerTurn: config.BlockCountPerTurn, - CheckGasLimit: config.CheckGasLimit, - StalenessSeconds: config.StalenessSeconds, - GasCeilingMultiplier: config.GasCeilingMultiplier, - MinUpkeepSpend: config.MinUpkeepSpend, - MaxPerformGas: config.MaxPerformGas, - FallbackGasPrice: config.FallbackGasPrice, - FallbackLinkPrice: config.FallbackLinkPrice, - // Keep the transcoder and registrar same. They have separate setters - Transcoder: state.Config.Transcoder, - Registrar: state.Config.Registrar, - })) - return err - case ethereum.RegistryVersion_2_0: - _, err := v.client.Decode(v.registry2_0.SetConfig(txOpts, - ocrConfig.Signers, - ocrConfig.Transmitters, - ocrConfig.F, - ocrConfig.OnchainConfig, - ocrConfig.OffchainConfigVersion, - ocrConfig.OffchainConfig, - )) - return err case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return fmt.Errorf("registry version 2.1 2.2 and 2.3 must use setConfigTypeSafe function") default: @@ -315,9 +245,6 @@ func (v *EthereumKeeperRegistry) SetConfig(config KeeperRegistrySettings, ocrCon func (v *EthereumKeeperRegistry) SetUpkeepOffchainConfig(id *big.Int, offchainConfig []byte) error { switch v.version { - case ethereum.RegistryVersion_2_0: - _, err := v.client.Decode(v.registry2_0.SetUpkeepOffchainConfig(v.client.NewTXOpts(), id, offchainConfig)) - return err case ethereum.RegistryVersion_2_1: _, err := v.client.Decode(v.registry2_1.SetUpkeepOffchainConfig(v.client.NewTXOpts(), id, offchainConfig)) return err @@ -340,12 +267,6 @@ func (v *EthereumKeeperRegistry) Pause() error { switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: _, err = v.client.Decode(v.registry1_1.Pause(txOpts)) - case ethereum.RegistryVersion_1_2: - _, err = v.client.Decode(v.registry1_2.Pause(txOpts)) - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.Pause(txOpts)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.Pause(txOpts)) case ethereum.RegistryVersion_2_1: _, err = v.client.Decode(v.registry2_1.Pause(txOpts)) case ethereum.RegistryVersion_2_2: @@ -359,26 +280,6 @@ func (v *EthereumKeeperRegistry) Pause() error { return err } -// Migrate performs a migration of the given upkeep ids to the specific destination passed as parameter. -func (v *EthereumKeeperRegistry) Migrate(upkeepIDs []*big.Int, destinationAddress common.Address) error { - if v.version != ethereum.RegistryVersion_1_2 { - return fmt.Errorf("migration of upkeeps is only available for version 1.2 of the registries") - } - - _, err := v.client.Decode(v.registry1_2.MigrateUpkeeps(v.client.NewTXOpts(), upkeepIDs, destinationAddress)) - return err -} - -// SetMigrationPermissions sets the permissions of another registry to allow migrations between the two. -func (v *EthereumKeeperRegistry) SetMigrationPermissions(peerAddress common.Address, permission uint8) error { - if v.version != ethereum.RegistryVersion_1_2 { - return fmt.Errorf("migration of upkeeps is only available for version 1.2 of the registries") - } - - _, err := v.client.Decode(v.registry1_2.SetPeerRegistryMigrationPermission(v.client.NewTXOpts(), peerAddress, permission)) - return err -} - func (v *EthereumKeeperRegistry) SetRegistrar(registrarAddr string) error { if v.version == ethereum.RegistryVersion_2_0 { // we short circuit and exit, so we don't create a new txs messing up the nonce before exiting @@ -386,33 +287,11 @@ func (v *EthereumKeeperRegistry) SetRegistrar(registrarAddr string) error { } txOpts := v.client.NewTXOpts() - callOpts := bind.CallOpts{ - From: v.client.MustGetRootKeyAddress(), - Context: nil, - } switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: _, err := v.client.Decode(v.registry1_1.SetRegistrar(txOpts, common.HexToAddress(registrarAddr))) return err - case ethereum.RegistryVersion_1_2: - state, err := v.registry1_2.GetState(&callOpts) - if err != nil { - return err - } - newConfig := state.Config - newConfig.Registrar = common.HexToAddress(registrarAddr) - _, err = v.client.Decode(v.registry1_2.SetConfig(txOpts, newConfig)) - return err - case ethereum.RegistryVersion_1_3: - state, err := v.registry1_3.GetState(&callOpts) - if err != nil { - return err - } - newConfig := state.Config - newConfig.Registrar = common.HexToAddress(registrarAddr) - _, err = v.client.Decode(v.registry1_3.SetConfig(txOpts, newConfig)) - return err default: return fmt.Errorf("keeper registry version %d is not supported", v.version) } @@ -426,12 +305,6 @@ func (v *EthereumKeeperRegistry) AddUpkeepFundsFromKey(id *big.Int, amount *big. switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: _, err = v.client.Decode(v.registry1_1.AddFunds(opts, id, amount)) - case ethereum.RegistryVersion_1_2: - _, err = v.client.Decode(v.registry1_2.AddFunds(opts, id, amount)) - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.AddFunds(opts, id, amount)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.AddFunds(opts, id, amount)) case ethereum.RegistryVersion_2_1: _, err = v.client.Decode(v.registry2_1.AddFunds(opts, id, amount)) case ethereum.RegistryVersion_2_2: @@ -470,51 +343,6 @@ func (v *EthereumKeeperRegistry) GetUpkeepInfo(ctx context.Context, id *big.Int) Admin: uk.Admin.Hex(), MaxValidBlocknumber: uk.MaxValidBlocknumber, }, nil - case ethereum.RegistryVersion_1_2: - uk, err := v.registry1_2.GetUpkeep(opts, id) - if err != nil { - return nil, err - } - return &UpkeepInfo{ - Target: uk.Target.Hex(), - ExecuteGas: uk.ExecuteGas, - CheckData: uk.CheckData, - Balance: uk.Balance, - LastKeeper: uk.LastKeeper.Hex(), - Admin: uk.Admin.Hex(), - MaxValidBlocknumber: uk.MaxValidBlocknumber, - }, nil - case ethereum.RegistryVersion_1_3: - uk, err := v.registry1_3.GetUpkeep(opts, id) - if err != nil { - return nil, err - } - return &UpkeepInfo{ - Target: uk.Target.Hex(), - ExecuteGas: uk.ExecuteGas, - CheckData: uk.CheckData, - Balance: uk.Balance, - LastKeeper: uk.LastKeeper.Hex(), - Admin: uk.Admin.Hex(), - MaxValidBlocknumber: uk.MaxValidBlocknumber, - }, nil - case ethereum.RegistryVersion_2_0: - uk, err := v.registry2_0.GetUpkeep(opts, id) - if err != nil { - return nil, err - } - return &UpkeepInfo{ - Target: uk.Target.Hex(), - ExecuteGas: uk.ExecuteGas, - CheckData: uk.CheckData, - Balance: uk.Balance, - Admin: uk.Admin.Hex(), - MaxValidBlocknumber: uk.MaxValidBlocknumber, - LastPerformBlockNumber: uk.LastPerformBlockNumber, - AmountSpent: uk.AmountSpent, - Paused: uk.Paused, - OffchainConfig: uk.OffchainConfig, - }, nil case ethereum.RegistryVersion_2_1: uk, err := v.registry2_1.GetUpkeep(opts, id) if err != nil { @@ -594,11 +422,7 @@ func (v *EthereumKeeperRegistry) GetKeeperInfo(ctx context.Context, keeperAddr s switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: info, err = v.registry1_1.GetKeeperInfo(opts, common.HexToAddress(keeperAddr)) - case ethereum.RegistryVersion_1_2: - info, err = v.registry1_2.GetKeeperInfo(opts, common.HexToAddress(keeperAddr)) - case ethereum.RegistryVersion_1_3: - info, err = v.registry1_3.GetKeeperInfo(opts, common.HexToAddress(keeperAddr)) - case ethereum.RegistryVersion_2_0, ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: + case ethereum.RegistryVersion_1_2, ethereum.RegistryVersion_1_3, ethereum.RegistryVersion_2_0, ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: // this is not used anywhere return nil, fmt.Errorf("not supported") } @@ -629,20 +453,7 @@ func (v *EthereumKeeperRegistry) SetKeepers(keepers []string, payees []string, o switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: _, err = v.client.Decode(v.registry1_1.SetKeepers(opts, keepersAddresses, payeesAddresses)) - case ethereum.RegistryVersion_1_2: - _, err = v.client.Decode(v.registry1_2.SetKeepers(opts, keepersAddresses, payeesAddresses)) - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.SetKeepers(opts, keepersAddresses, payeesAddresses)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.SetConfig(opts, - ocrConfig.Signers, - ocrConfig.Transmitters, - ocrConfig.F, - ocrConfig.OnchainConfig, - ocrConfig.OffchainConfigVersion, - ocrConfig.OffchainConfig, - )) - case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: + case ethereum.RegistryVersion_1_2, ethereum.RegistryVersion_1_3, ethereum.RegistryVersion_2_0, ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return fmt.Errorf("not supported") } @@ -663,32 +474,7 @@ func (v *EthereumKeeperRegistry) RegisterUpkeep(target string, gasLimit uint32, common.HexToAddress(admin), checkData, )) - case ethereum.RegistryVersion_1_2: - _, err = v.client.Decode(v.registry1_2.RegisterUpkeep( - opts, - common.HexToAddress(target), - gasLimit, - common.HexToAddress(admin), - checkData, - )) - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.RegisterUpkeep( - opts, - common.HexToAddress(target), - gasLimit, - common.HexToAddress(admin), - checkData, - )) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.RegisterUpkeep( - opts, - common.HexToAddress(target), - gasLimit, - common.HexToAddress(admin), - checkData, - nil, //offchain config - )) - case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: + case ethereum.RegistryVersion_1_2, ethereum.RegistryVersion_1_3, ethereum.RegistryVersion_2_0, ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return fmt.Errorf("not supported") } @@ -704,12 +490,6 @@ func (v *EthereumKeeperRegistry) CancelUpkeep(id *big.Int) error { switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: tx, err = v.client.Decode(v.registry1_1.CancelUpkeep(opts, id)) - case ethereum.RegistryVersion_1_2: - tx, err = v.client.Decode(v.registry1_2.CancelUpkeep(opts, id)) - case ethereum.RegistryVersion_1_3: - tx, err = v.client.Decode(v.registry1_3.CancelUpkeep(opts, id)) - case ethereum.RegistryVersion_2_0: - tx, err = v.client.Decode(v.registry2_0.CancelUpkeep(opts, id)) case ethereum.RegistryVersion_2_1: tx, err = v.client.Decode(v.registry2_1.CancelUpkeep(opts, id)) case ethereum.RegistryVersion_2_2: @@ -738,12 +518,6 @@ func (v *EthereumKeeperRegistry) SetUpkeepGasLimit(id *big.Int, gas uint32) erro var err error switch v.version { - case ethereum.RegistryVersion_1_2: - _, err = v.client.Decode(v.registry1_2.SetUpkeepGasLimit(opts, id, gas)) - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.SetUpkeepGasLimit(opts, id, gas)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.SetUpkeepGasLimit(opts, id, gas)) case ethereum.RegistryVersion_2_1: _, err = v.client.Decode(v.registry2_1.SetUpkeepGasLimit(opts, id, gas)) case ethereum.RegistryVersion_2_2: @@ -769,24 +543,6 @@ func (v *EthereumKeeperRegistry) GetKeeperList(ctx context.Context) ([]string, e switch v.version { case ethereum.RegistryVersion_1_0, ethereum.RegistryVersion_1_1: list, err = v.registry1_1.GetKeeperList(opts) - case ethereum.RegistryVersion_1_2: - state, err := v.registry1_2.GetState(opts) - if err != nil { - return []string{}, err - } - list = state.Keepers - case ethereum.RegistryVersion_1_3: - state, err := v.registry1_3.GetState(opts) - if err != nil { - return []string{}, err - } - list = state.Keepers - case ethereum.RegistryVersion_2_0: - state, err := v.registry2_0.GetState(opts) - if err != nil { - return []string{}, err - } - list = state.Transmitters case ethereum.RegistryVersion_2_1, ethereum.RegistryVersion_2_2, ethereum.RegistryVersion_2_3: return nil, fmt.Errorf("not supported") } @@ -807,10 +563,6 @@ func (v *EthereumKeeperRegistry) UpdateCheckData(id *big.Int, newCheckData []byt var err error switch v.version { - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.UpdateCheckData(opts, id, newCheckData)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.UpdateCheckData(opts, id, newCheckData)) case ethereum.RegistryVersion_2_1: _, err = v.client.Decode(v.registry2_1.SetUpkeepCheckData(opts, id, newCheckData)) case ethereum.RegistryVersion_2_2: @@ -868,10 +620,6 @@ func (v *EthereumKeeperRegistry) PauseUpkeep(id *big.Int) error { var err error switch v.version { - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.PauseUpkeep(opts, id)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.PauseUpkeep(opts, id)) case ethereum.RegistryVersion_2_1: _, err = v.client.Decode(v.registry2_1.PauseUpkeep(opts, id)) case ethereum.RegistryVersion_2_2: @@ -891,10 +639,6 @@ func (v *EthereumKeeperRegistry) UnpauseUpkeep(id *big.Int) error { var err error switch v.version { - case ethereum.RegistryVersion_1_3: - _, err = v.client.Decode(v.registry1_3.UnpauseUpkeep(opts, id)) - case ethereum.RegistryVersion_2_0: - _, err = v.client.Decode(v.registry2_0.UnpauseUpkeep(opts, id)) case ethereum.RegistryVersion_2_1: _, err = v.client.Decode(v.registry2_1.UnpauseUpkeep(opts, id)) case ethereum.RegistryVersion_2_2: @@ -921,36 +665,6 @@ func (v *EthereumKeeperRegistry) ParseUpkeepPerformedLog(log *types.Log) (*Upkee Success: parsedLog.Success, From: parsedLog.From, }, nil - case ethereum.RegistryVersion_1_2: - parsedLog, err := v.registry1_2.ParseUpkeepPerformed(*log) - if err != nil { - return nil, err - } - return &UpkeepPerformedLog{ - Id: parsedLog.Id, - Success: parsedLog.Success, - From: parsedLog.From, - }, nil - case ethereum.RegistryVersion_1_3: - parsedLog, err := v.registry1_3.ParseUpkeepPerformed(*log) - if err != nil { - return nil, err - } - return &UpkeepPerformedLog{ - Id: parsedLog.Id, - Success: parsedLog.Success, - From: parsedLog.From, - }, nil - case ethereum.RegistryVersion_2_0: - parsedLog, err := v.registry2_0.ParseUpkeepPerformed(*log) - if err != nil { - return nil, err - } - return &UpkeepPerformedLog{ - Id: parsedLog.Id, - Success: parsedLog.Success, - From: utils.ZeroAddress, - }, nil case ethereum.RegistryVersion_2_1: parsedLog, err := v.registry2_1.ParseUpkeepPerformed(*log) if err != nil { @@ -989,14 +703,6 @@ func (v *EthereumKeeperRegistry) ParseUpkeepPerformedLog(log *types.Log) (*Upkee func (v *EthereumKeeperRegistry) ParseStaleUpkeepReportLog(log *types.Log) (*StaleUpkeepReportLog, error) { //nolint:exhaustive switch v.version { - case ethereum.RegistryVersion_2_0: - parsedLog, err := v.registry2_0.ParseStaleUpkeepReport(*log) - if err != nil { - return nil, err - } - return &StaleUpkeepReportLog{ - Id: parsedLog.Id, - }, nil case ethereum.RegistryVersion_2_1: parsedLog, err := v.registry2_1.ParseStaleUpkeepReport(*log) if err != nil { @@ -1034,24 +740,6 @@ func (v *EthereumKeeperRegistry) ParseUpkeepIdFromRegisteredLog(log *types.Log) return nil, err } return parsedLog.Id, nil - case ethereum.RegistryVersion_1_2: - parsedLog, err := v.registry1_2.ParseUpkeepRegistered(*log) - if err != nil { - return nil, err - } - return parsedLog.Id, nil - case ethereum.RegistryVersion_1_3: - parsedLog, err := v.registry1_3.ParseUpkeepRegistered(*log) - if err != nil { - return nil, err - } - return parsedLog.Id, nil - case ethereum.RegistryVersion_2_0: - parsedLog, err := v.registry2_0.ParseUpkeepRegistered(*log) - if err != nil { - return nil, err - } - return parsedLog.Id, nil case ethereum.RegistryVersion_2_1: parsedLog, err := v.registry2_1.ParseUpkeepRegistered(*log) if err != nil { @@ -1093,16 +781,9 @@ func DeployKeeperRegistry( default: mode = uint8(0) } - registryGasOverhead := big.NewInt(80000) switch opts.RegistryVersion { case eth_contracts.RegistryVersion_1_0, eth_contracts.RegistryVersion_1_1: return deployRegistry10_11(client, opts) - case eth_contracts.RegistryVersion_1_2: - return deployRegistry12(client, opts) - case eth_contracts.RegistryVersion_1_3: - return deployRegistry13(client, opts, mode, registryGasOverhead) - case eth_contracts.RegistryVersion_2_0: - return deployRegistry20(client, opts, mode) case eth_contracts.RegistryVersion_2_1: return deployRegistry21(client, opts, mode) case eth_contracts.RegistryVersion_2_2: @@ -1145,145 +826,6 @@ func deployRegistry10_11(client *seth.Client, opts *KeeperRegistryOpts) (KeeperR client: client, version: eth_contracts.RegistryVersion_1_1, registry1_1: instance, - registry1_2: nil, - registry1_3: nil, - address: &data.Address, - }, err -} - -func deployRegistry12(client *seth.Client, opts *KeeperRegistryOpts) (KeeperRegistry, error) { - abi, err := keeper_registry_wrapper1_2.KeeperRegistryMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistry1_2 ABI: %w", err) - } - data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistry1_2", *abi, common.FromHex(keeper_registry_wrapper1_2.KeeperRegistryMetaData.Bin), - common.HexToAddress(opts.LinkAddr), - common.HexToAddress(opts.ETHFeedAddr), - common.HexToAddress(opts.GasFeedAddr), - keeper_registry_wrapper1_2.Config{ - PaymentPremiumPPB: opts.Settings.PaymentPremiumPPB, - FlatFeeMicroLink: opts.Settings.FlatFeeMicroLINK, - BlockCountPerTurn: opts.Settings.BlockCountPerTurn, - CheckGasLimit: opts.Settings.CheckGasLimit, - StalenessSeconds: opts.Settings.StalenessSeconds, - GasCeilingMultiplier: opts.Settings.GasCeilingMultiplier, - MinUpkeepSpend: opts.Settings.MinUpkeepSpend, - MaxPerformGas: opts.Settings.MaxPerformGas, - FallbackGasPrice: opts.Settings.FallbackGasPrice, - FallbackLinkPrice: opts.Settings.FallbackLinkPrice, - Transcoder: common.HexToAddress(opts.TranscoderAddr), - Registrar: common.HexToAddress(opts.RegistrarAddr), - }, - ) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("KeeperRegistry1_2 instance deployment have failed: %w", err) - } - - instance, err := keeper_registry_wrapper1_2.NewKeeperRegistry(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate KeeperRegistry1_2 instance: %w", err) - } - return &EthereumKeeperRegistry{ - client: client, - version: eth_contracts.RegistryVersion_1_2, - registry1_1: nil, - registry1_2: instance, - registry1_3: nil, - address: &data.Address, - }, err -} - -func deployRegistry13(client *seth.Client, opts *KeeperRegistryOpts, mode uint8, registryGasOverhead *big.Int) (KeeperRegistry, error) { - logicAbi, err := keeper_registry_logic1_3.KeeperRegistryLogicMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistryLogic1_3 ABI: %w", err) - } - logicData, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistryLogic1_3", *logicAbi, common.FromHex(keeper_registry_logic1_3.KeeperRegistryLogicMetaData.Bin), - mode, // Default payment model - registryGasOverhead, // Registry gas overhead - common.HexToAddress(opts.LinkAddr), - common.HexToAddress(opts.ETHFeedAddr), - common.HexToAddress(opts.GasFeedAddr), - ) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("KeeperRegistryLogic1_3 instance deployment have failed: %w", err) - } - - abi, err := keeper_registry_wrapper1_3.KeeperRegistryMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistry1_3 ABI: %w", err) - } - data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistry1_3", *abi, common.FromHex(keeper_registry_wrapper1_3.KeeperRegistryMetaData.Bin), - logicData.Address, - keeper_registry_wrapper1_3.Config{ - PaymentPremiumPPB: opts.Settings.PaymentPremiumPPB, - FlatFeeMicroLink: opts.Settings.FlatFeeMicroLINK, - BlockCountPerTurn: opts.Settings.BlockCountPerTurn, - CheckGasLimit: opts.Settings.CheckGasLimit, - StalenessSeconds: opts.Settings.StalenessSeconds, - GasCeilingMultiplier: opts.Settings.GasCeilingMultiplier, - MinUpkeepSpend: opts.Settings.MinUpkeepSpend, - MaxPerformGas: opts.Settings.MaxPerformGas, - FallbackGasPrice: opts.Settings.FallbackGasPrice, - FallbackLinkPrice: opts.Settings.FallbackLinkPrice, - Transcoder: common.HexToAddress(opts.TranscoderAddr), - Registrar: common.HexToAddress(opts.RegistrarAddr), - }, - ) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("KeeperRegistry1_3 instance deployment have failed: %w", err) - } - - instance, err := keeper_registry_wrapper1_3.NewKeeperRegistry(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate KeeperRegistry1_3 instance: %w", err) - } - - return &EthereumKeeperRegistry{ - client: client, - version: eth_contracts.RegistryVersion_1_3, - registry1_1: nil, - registry1_2: nil, - registry1_3: instance, - address: &data.Address, - }, err -} - -func deployRegistry20(client *seth.Client, opts *KeeperRegistryOpts, mode uint8) (KeeperRegistry, error) { - logicAbi, err := keeper_registry_logic2_0.KeeperRegistryLogicMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistryLogic2_0 ABI: %w", err) - } - logicData, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistryLogic2_0", *logicAbi, common.FromHex(keeper_registry_logic2_0.KeeperRegistryLogicMetaData.Bin), - mode, // Default payment model - common.HexToAddress(opts.LinkAddr), - common.HexToAddress(opts.ETHFeedAddr), - common.HexToAddress(opts.GasFeedAddr), - ) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("KeeperRegistryLogic2_0 instance deployment have failed: %w", err) - } - - abi, err := keeper_registry_wrapper2_0.KeeperRegistryMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistry1_3 ABI: %w", err) - } - data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistry2_0", *abi, common.FromHex(keeper_registry_wrapper2_0.KeeperRegistryMetaData.Bin), - logicData.Address, - ) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("KeeperRegistry2_0 instance deployment have failed: %w", err) - } - - instance, err := keeper_registry_wrapper2_0.NewKeeperRegistry(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate KeeperRegistry2_0 instance: %w", err) - } - - return &EthereumKeeperRegistry{ - client: client, - version: eth_contracts.RegistryVersion_2_0, - registry2_0: instance, address: &data.Address, }, err } @@ -1533,12 +1075,6 @@ func LoadKeeperRegistry(l zerolog.Logger, client *seth.Client, address common.Ad switch registryVersion { case eth_contracts.RegistryVersion_1_1: keeper, err = loadRegistry1_1(client, address) - case eth_contracts.RegistryVersion_1_2: - keeper, err = loadRegistry1_2(client, address) - case eth_contracts.RegistryVersion_1_3: - keeper, err = loadRegistry1_3(client, address) - case eth_contracts.RegistryVersion_2_0: - keeper, err = loadRegistry2_0(client, address) case eth_contracts.RegistryVersion_2_1: keeper, err = loadRegistry2_1(client, address) case eth_contracts.RegistryVersion_2_2: // why the contract name is not the same as the actual contract name? @@ -1577,69 +1113,6 @@ func loadRegistry1_1(client *seth.Client, address common.Address) (*EthereumKeep }, nil } -func loadRegistry1_2(client *seth.Client, address common.Address) (*EthereumKeeperRegistry, error) { - abi, err := keeper_registry_wrapper1_2.KeeperRegistryMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistry1_2 ABI: %w", err) - } - - client.ContractStore.AddABI("KeeperRegistry1_2", *abi) - client.ContractStore.AddBIN("KeeperRegistry1_2", common.FromHex(keeper_registry_wrapper1_2.KeeperRegistryMetaData.Bin)) - - instance, err := keeper_registry_wrapper1_2.NewKeeperRegistry(address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate KeeperRegistry1_2 instance: %w", err) - } - - return &EthereumKeeperRegistry{ - address: &address, - client: client, - registry1_2: instance, - }, nil -} - -func loadRegistry1_3(client *seth.Client, address common.Address) (*EthereumKeeperRegistry, error) { - abi, err := keeper_registry_wrapper1_3.KeeperRegistryMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistry1_3 ABI: %w", err) - } - - client.ContractStore.AddABI("KeeperRegistry1_3", *abi) - client.ContractStore.AddBIN("KeeperRegistry1_3", common.FromHex(keeper_registry_wrapper1_3.KeeperRegistryMetaData.Bin)) - - instance, err := keeper_registry_wrapper1_3.NewKeeperRegistry(address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate KeeperRegistry1_3 instance: %w", err) - } - - return &EthereumKeeperRegistry{ - address: &address, - client: client, - registry1_3: instance, - }, nil -} - -func loadRegistry2_0(client *seth.Client, address common.Address) (*EthereumKeeperRegistry, error) { - abi, err := keeper_registry_wrapper2_0.KeeperRegistryMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to get KeeperRegistry2_0 ABI: %w", err) - } - - client.ContractStore.AddABI("KeeperRegistry2_0", *abi) - client.ContractStore.AddBIN("KeeperRegistry2_0", common.FromHex(keeper_registry_wrapper2_0.KeeperRegistryMetaData.Bin)) - - instance, err := keeper_registry_wrapper2_0.NewKeeperRegistry(address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistry{}, fmt.Errorf("failed to instantiate KeeperRegistry2_0 instance: %w", err) - } - - return &EthereumKeeperRegistry{ - address: &address, - client: client, - registry2_0: instance, - }, nil -} - func loadRegistry2_1(client *seth.Client, address common.Address) (*EthereumKeeperRegistry, error) { abi, err := ac.IAutomationV21PlusCommonMetaData.GetAbi() if err != nil { @@ -1794,7 +1267,6 @@ func deployBaseModule(client *seth.Client) (common.Address, error) { // registering new upkeeps. type EthereumKeeperRegistrar struct { client *seth.Client - registrar *keeper_registrar_wrapper1_2.KeeperRegistrar registrar20 *keeper_registrar_wrapper2_0.KeeperRegistrar registrar21 *registrar21.AutomationRegistrar registrar23 *registrar23.AutomationRegistrar @@ -2050,7 +1522,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byt return encodedRegistrationParamsStruct, err } - registryABI, err := abi.JSON(strings.NewReader(keeper_registrar_wrapper1_2.KeeperRegistrarMetaData.ABI)) + registryABI, err := abi.JSON(strings.NewReader(keeper_registry_wrapper1_1.KeeperRegistryABI)) if err != nil { return nil, err } @@ -2073,33 +1545,7 @@ func (v *EthereumKeeperRegistrar) EncodeRegisterRequest(name string, email []byt } func DeployKeeperRegistrar(client *seth.Client, registryVersion eth_contracts.KeeperRegistryVersion, linkAddr string, registrarSettings KeeperRegistrarSettings) (KeeperRegistrar, error) { - if registryVersion == eth_contracts.RegistryVersion_2_0 { - abi, err := keeper_registrar_wrapper2_0.KeeperRegistrarMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistrar{}, fmt.Errorf("failed to get KeeperRegistrar2_0 ABI: %w", err) - } - data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistrar2_0", *abi, common.FromHex(keeper_registrar_wrapper2_0.KeeperRegistrarMetaData.Bin), - common.HexToAddress(linkAddr), - registrarSettings.AutoApproveConfigType, - registrarSettings.AutoApproveMaxAllowed, - common.HexToAddress(registrarSettings.RegistryAddr), - registrarSettings.MinLinkJuels, - ) - if err != nil { - return &EthereumKeeperRegistrar{}, fmt.Errorf("KeeperRegistrar2_0 instance deployment have failed: %w", err) - } - - instance, err := keeper_registrar_wrapper2_0.NewKeeperRegistrar(data.Address, wrappers.MustNewWrappedContractBackend(nil, client)) - if err != nil { - return &EthereumKeeperRegistrar{}, fmt.Errorf("failed to instantiate KeeperRegistrar2_0 instance: %w", err) - } - - return &EthereumKeeperRegistrar{ - client: client, - registrar20: instance, - address: &data.Address, - }, nil - } else if registryVersion == eth_contracts.RegistryVersion_2_1 || registryVersion == eth_contracts.RegistryVersion_2_2 { // both 2.1 and 2.2 registry use registrar 2.1 + if registryVersion == eth_contracts.RegistryVersion_2_1 || registryVersion == eth_contracts.RegistryVersion_2_2 { // both 2.1 and 2.2 registry use registrar 2.1 abi, err := registrar21.AutomationRegistrarMetaData.GetAbi() if err != nil { return &EthereumKeeperRegistrar{}, fmt.Errorf("failed to get KeeperRegistrar2_1 ABI: %w", err) @@ -2179,12 +1625,7 @@ func DeployKeeperRegistrar(client *seth.Client, registryVersion eth_contracts.Ke } // non OCR registrar - abi, err := keeper_registrar_wrapper1_2.KeeperRegistrarMetaData.GetAbi() - if err != nil { - return &EthereumKeeperRegistrar{}, fmt.Errorf("failed to get KeeperRegistrar1_2 ABI: %w", err) - } - - data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistrar1_2", *abi, common.FromHex(keeper_registrar_wrapper1_2.KeeperRegistrarMetaData.Bin), + data, err := client.DeployContract(client.NewTXOpts(), "KeeperRegistrar1_2", keeper_registry_wrapper1_1.KeeperRegistryABI, common.FromHex(keeper_registry_wrapper1_1.KeeperRegistryBIN), common.HexToAddress(linkAddr), registrarSettings.AutoApproveConfigType, registrarSettings.AutoApproveMaxAllowed, diff --git a/integration-tests/contracts/ethereum_keeper_contracts.go b/integration-tests/contracts/ethereum_keeper_contracts.go index b10351af40c..e452e5c8ddc 100644 --- a/integration-tests/contracts/ethereum_keeper_contracts.go +++ b/integration-tests/contracts/ethereum_keeper_contracts.go @@ -54,8 +54,6 @@ type KeeperRegistry interface { ParseStaleUpkeepReportLog(log *types.Log) (*StaleUpkeepReportLog, error) ParseUpkeepIdFromRegisteredLog(log *types.Log) (*big.Int, error) Pause() error - Migrate(upkeepIDs []*big.Int, destinationAddress common.Address) error - SetMigrationPermissions(peerAddress common.Address, permission uint8) error PauseUpkeep(id *big.Int) error UnpauseUpkeep(id *big.Int) error UpdateCheckData(id *big.Int, newCheckData []byte) error diff --git a/integration-tests/smoke/keeper_test.go b/integration-tests/smoke/keeper_test.go index e6157ad0b46..cfb53da7e2a 100644 --- a/integration-tests/smoke/keeper_test.go +++ b/integration-tests/smoke/keeper_test.go @@ -10,7 +10,6 @@ import ( "github.com/smartcontractkit/chainlink/integration-tests/utils" - "github.com/ethereum/go-ethereum/common" "github.com/onsi/gomega" "github.com/rs/zerolog" "github.com/stretchr/testify/require" @@ -851,99 +850,6 @@ func TestKeeperPauseRegistry(t *testing.T) { } } -func TestKeeperMigrateRegistry(t *testing.T) { - t.Parallel() - l := logging.GetTestLogger(t) - config, err := tc.GetConfig([]string{"Smoke"}, tc.Keeper) - require.NoError(t, err, "Error getting config") - chainClient, chainlinkNodes, linkToken, _ := setupKeeperTest(l, t, &config) - - sb, err := chainClient.Client.BlockNumber(context.Background()) - require.NoError(t, err, "Failed to get start block") - - registry, _, consumers, upkeepIDs := actions.DeployKeeperContracts( - t, - ethereum.RegistryVersion_1_2, - keeperDefaultRegistryConfig, - keeperDefaultUpkeepsToDeploy, - keeperDefaultUpkeepGasLimit, - linkToken, - chainClient, - big.NewInt(keeperDefaultLinkFunds), - ) - - _, err = actions.CreateKeeperJobsLocal(l, chainlinkNodes, registry, contracts.OCRv2Config{}, fmt.Sprint(chainClient.ChainID)) - require.NoError(t, err, "Error creating keeper jobs") - - t.Cleanup(func() { - actions.GetStalenessReportCleanupFn(t, l, chainClient, sb, registry, ethereum.RegistryVersion_1_2)() - }) - - // Deploy the second registry, second registrar, and the same number of upkeeps as the first one - secondRegistry, _, _, _ := actions.DeployKeeperContracts( - t, - ethereum.RegistryVersion_1_2, - keeperDefaultRegistryConfig, - keeperDefaultUpkeepsToDeploy, - keeperDefaultUpkeepGasLimit, - linkToken, - chainClient, - big.NewInt(keeperDefaultLinkFunds), - ) - - // Set the jobs for the second registry - _, err = actions.CreateKeeperJobsLocal(l, chainlinkNodes, secondRegistry, contracts.OCRv2Config{}, fmt.Sprint(chainClient.ChainID)) - require.NoError(t, err, "Error creating keeper jobs") - - err = registry.SetMigrationPermissions(common.HexToAddress(secondRegistry.Address()), 3) - require.NoError(t, err, "Error setting bidirectional permissions for first registry") - err = secondRegistry.SetMigrationPermissions(common.HexToAddress(registry.Address()), 3) - require.NoError(t, err, "Error setting bidirectional permissions for second registry") - - gom := gomega.NewGomegaWithT(t) - - // Check that the first upkeep from the first registry is performing (before being migrated) - l.Info().Msg("Waiting for 1m for upkeeps to be performed before migration") - gom.Eventually(func(g gomega.Gomega) { - for i := 0; i < len(upkeepIDs); i++ { - counterBeforeMigration, err := consumers[i].Counter(testcontext.Get(t)) - g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Calling consumer's counter shouldn't fail") - g.Expect(counterBeforeMigration.Int64()).Should(gomega.BeNumerically(">", int64(0)), - "Expected consumer counter to be greater than 0, but got %s", counterBeforeMigration) - } - }, "1m", "1s").Should(gomega.Succeed()) - - // Migrate the upkeeps from the first to the second registry - for i := 0; i < len(upkeepIDs); i++ { - err = registry.Migrate([]*big.Int{upkeepIDs[i]}, common.HexToAddress(secondRegistry.Address())) - require.NoError(t, err, "Error migrating first upkeep") - } - - // Pause the first registry, in that way we make sure that the upkeep is being performed by the second one - err = registry.Pause() - require.NoError(t, err, "Error pausing registry") - - counterAfterMigrationPerUpkeep := make(map[*big.Int]*big.Int) - - for i := 0; i < len(upkeepIDs); i++ { - counterAfterMigration, err := consumers[i].Counter(testcontext.Get(t)) - require.NoError(t, err, "Error calling consumer's counter") - counterAfterMigrationPerUpkeep[upkeepIDs[i]] = counterAfterMigration - } - - // Check that once we migrated the upkeep, the counter has increased - l.Info().Msg("Waiting for 1m for upkeeps to be performed after migration") - gom.Eventually(func(g gomega.Gomega) { - for i := 0; i < len(upkeepIDs); i++ { - currentCounter, err := consumers[i].Counter(testcontext.Get(t)) - counterAfterMigration := counterAfterMigrationPerUpkeep[upkeepIDs[i]] - g.Expect(err).ShouldNot(gomega.HaveOccurred(), "Calling consumer's counter shouldn't fail") - g.Expect(currentCounter.Int64()).Should(gomega.BeNumerically(">", counterAfterMigration.Int64()), - "Expected counter to have increased, but stayed constant at %s", counterAfterMigration) - } - }, "1m", "1s").Should(gomega.Succeed()) -} - func TestKeeperNodeDown(t *testing.T) { t.Parallel() registryVersions := []ethereum.KeeperRegistryVersion{