From b3b8baf7325a68cfbe51a30f6ae73e44dba27280 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:02:25 -0700 Subject: [PATCH 1/5] main changes --- contracts/contracts/core/BidderRegistry.sol | 22 +++++------ .../contracts/core/BidderRegistryStorage.sol | 2 +- contracts/contracts/core/ProviderRegistry.sol | 26 ++++++------- .../core/ProviderRegistryStorage.sol | 2 +- .../contracts/interfaces/IBidderRegistry.sol | 4 +- .../interfaces/IProviderRegistry.sol | 4 +- contracts/contracts/utils/FeePayout.sol | 39 +++++++++++++++++++ contracts/test/core/BidderRegistryTest.sol | 8 ++-- contracts/test/core/ProviderRegistryTest.sol | 10 ++--- 9 files changed, 77 insertions(+), 40 deletions(-) diff --git a/contracts/contracts/core/BidderRegistry.sol b/contracts/contracts/core/BidderRegistry.sol index 3a3ce1ba0..3f3df1723 100644 --- a/contracts/contracts/core/BidderRegistry.sol +++ b/contracts/contracts/core/BidderRegistry.sol @@ -56,16 +56,16 @@ contract BidderRegistry is * @param _feePercent The fee percentage for protocol * @param _owner Owner of the contract, explicitly needed since contract is deployed w/ create2 factory. * @param _blockTracker The address of the block tracker contract. - * @param _feePayoutPeriodBlocks The number of blocks for the fee payout period + * @param _feePayoutPeriod The number of seconds or ms on the mev-commit chain for the fee payout period */ function initialize( address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, - uint256 _feePayoutPeriodBlocks + uint256 _feePayoutPeriod ) external initializer { - FeePayout.init(protocolFeeTracker, _protocolFeeRecipient, _feePayoutPeriodBlocks); + FeePayout.initTimestampTracker(protocolFeeTracker, _protocolFeeRecipient, _feePayoutPeriod); feePercent = _feePercent; blockTrackerContract = IBlockTracker(_blockTracker); __ReentrancyGuard_init(); @@ -179,8 +179,8 @@ contract BidderRegistry is uint256 amtMinusFeeAndDecay = decayedAmt - feeAmt; protocolFeeTracker.accumulatedAmount += feeAmt; - if (FeePayout.isPayoutDue(protocolFeeTracker)) { - FeePayout.transferToRecipient(protocolFeeTracker); + if (FeePayout.isPayoutDueByTimestamp(protocolFeeTracker)) { + FeePayout.transferToRecipientByTimestamp(protocolFeeTracker); } providerAmount[provider] += amtMinusFeeAndDecay; @@ -316,13 +316,13 @@ contract BidderRegistry is } /** - * @notice Sets the new fee payout period in blocks + * @notice Sets the new fee payout period in seconds or ms on the mev-commit chain * @dev onlyOwner restriction - * @param newFeePayoutPeriodBlocks The new fee payout period in blocks + * @param newFeePayoutPeriod The new fee payout period in seconds or ms on the mev-commit chain */ - function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) external onlyOwner { - protocolFeeTracker.payoutPeriodBlocks = newFeePayoutPeriodBlocks; - emit FeePayoutPeriodBlocksUpdated(newFeePayoutPeriodBlocks); + function setNewFeePayoutPeriod(uint256 newFeePayoutPeriod) external onlyOwner { + protocolFeeTracker.payoutTimePeriod = newFeePayoutPeriod; + emit FeePayoutPeriodUpdated(newFeePayoutPeriod); } /** @@ -376,7 +376,7 @@ contract BidderRegistry is * to cover the edge case that oracle doesn't slash/reward, and funds still need to be withdrawn. */ function manuallyWithdrawProtocolFee() external onlyOwner { - FeePayout.transferToRecipient(protocolFeeTracker); + FeePayout.transferToRecipientByTimestamp(protocolFeeTracker); } /// @dev Allows owner to pause the contract. diff --git a/contracts/contracts/core/BidderRegistryStorage.sol b/contracts/contracts/core/BidderRegistryStorage.sol index ad65a0478..5f2003a1f 100644 --- a/contracts/contracts/core/BidderRegistryStorage.sol +++ b/contracts/contracts/core/BidderRegistryStorage.sol @@ -22,7 +22,7 @@ abstract contract BidderRegistryStorage { IBlockTracker public blockTrackerContract; /// Struct enabling automatic protocol fee payouts - FeePayout.Tracker public protocolFeeTracker; + FeePayout.TimestampTracker public protocolFeeTracker; // Mapping from bidder addresses and window numbers to their locked funds mapping(address => mapping(uint256 => uint256)) public lockedFunds; diff --git a/contracts/contracts/core/ProviderRegistry.sol b/contracts/contracts/core/ProviderRegistry.sol index 6609d2ab0..a3b7ff0f3 100644 --- a/contracts/contracts/core/ProviderRegistry.sol +++ b/contracts/contracts/core/ProviderRegistry.sol @@ -60,7 +60,7 @@ contract ProviderRegistry is * @param _feePercent The fee percentage for penalty * @param _owner Owner of the contract, explicitly needed since contract is deployed w/ create2 factory. * @param _withdrawalDelay The withdrawal delay in milliseconds. - * @param _penaltyFeePayoutPeriodBlocks The min number of blocks between penalty fee payouts + * @param _penaltyFeePayoutPeriod The min number of seconds (or ms on the mev-commit chain) between penalty fee payouts */ function initialize( uint256 _minStake, @@ -68,12 +68,12 @@ contract ProviderRegistry is uint256 _feePercent, address _owner, uint256 _withdrawalDelay, - uint256 _penaltyFeePayoutPeriodBlocks + uint256 _penaltyFeePayoutPeriod ) external initializer { - FeePayout.init( + FeePayout.initTimestampTracker( penaltyFeeTracker, _penaltyFeeRecipient, - _penaltyFeePayoutPeriodBlocks + _penaltyFeePayoutPeriod ); minStake = _minStake; feePercent = _feePercent; @@ -151,8 +151,8 @@ contract ProviderRegistry is providerStakes[provider] = providerStake - totalSlash; penaltyFeeTracker.accumulatedAmount += penaltyFee; - if (FeePayout.isPayoutDue(penaltyFeeTracker)) { - FeePayout.transferToRecipient(penaltyFeeTracker); + if (FeePayout.isPayoutDueByTimestamp(penaltyFeeTracker)) { + FeePayout.transferToRecipientByTimestamp(penaltyFeeTracker); } if (!payable(bidder).send(bidderPortion)) { @@ -211,13 +211,13 @@ contract ProviderRegistry is emit PenaltyFeeRecipientUpdated(newFeeRecipient); } - /// @dev Sets the fee payout period in blocks - /// @param _feePayoutPeriodBlocks The new fee payout period in blocks - function setFeePayoutPeriodBlocks( - uint256 _feePayoutPeriodBlocks + /// @dev Sets the fee payout period in seconds (or ms on the mev-commit chain) + /// @param _feePayoutPeriod The new fee payout period in seconds (or ms on the mev-commit chain) + function setFeePayoutPeriod( + uint256 _feePayoutPeriod ) external onlyOwner { - penaltyFeeTracker.payoutPeriodBlocks = _feePayoutPeriodBlocks; - emit FeePayoutPeriodBlocksUpdated(_feePayoutPeriodBlocks); + penaltyFeeTracker.payoutTimePeriod = _feePayoutPeriod; + emit FeePayoutPeriodUpdated(_feePayoutPeriod); } function overrideAddBLSKey( @@ -334,7 +334,7 @@ contract ProviderRegistry is * to cover the edge case that oracle doesn't slash/reward, and funds still need to be withdrawn. */ function manuallyWithdrawPenaltyFee() external onlyOwner { - FeePayout.transferToRecipient(penaltyFeeTracker); + FeePayout.transferToRecipientByTimestamp(penaltyFeeTracker); } /// @dev Allows the owner to pause the contract. diff --git a/contracts/contracts/core/ProviderRegistryStorage.sol b/contracts/contracts/core/ProviderRegistryStorage.sol index 926b8c362..36201e4c1 100644 --- a/contracts/contracts/core/ProviderRegistryStorage.sol +++ b/contracts/contracts/core/ProviderRegistryStorage.sol @@ -23,7 +23,7 @@ abstract contract ProviderRegistryStorage { uint256 public withdrawalDelay; /// Struct enabling automatic penalty fee payouts - FeePayout.Tracker public penaltyFeeTracker; + FeePayout.TimestampTracker public penaltyFeeTracker; /// @dev Mapping from provider address to whether they are registered or not mapping(address => bool) public providerRegistered; diff --git a/contracts/contracts/interfaces/IBidderRegistry.sol b/contracts/contracts/interfaces/IBidderRegistry.sol index 2eb3f3a67..f8a8e1abb 100644 --- a/contracts/contracts/interfaces/IBidderRegistry.sol +++ b/contracts/contracts/interfaces/IBidderRegistry.sol @@ -64,8 +64,8 @@ interface IBidderRegistry { /// @dev Event emitted when the block tracker is updated event BlockTrackerUpdated(address indexed newBlockTracker); - /// @dev Event emitted when the fee payout period in blocks is updated - event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); + /// @dev Event emitted when the fee payout period is updated + event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod); /// @dev Event emitted when the protocol fee recipient is updated event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient); diff --git a/contracts/contracts/interfaces/IProviderRegistry.sol b/contracts/contracts/interfaces/IProviderRegistry.sol index f9e7d7d10..3b9574426 100644 --- a/contracts/contracts/interfaces/IProviderRegistry.sol +++ b/contracts/contracts/interfaces/IProviderRegistry.sol @@ -24,8 +24,8 @@ interface IProviderRegistry { /// @dev Event emitted when the penalty fee recipient is updated event PenaltyFeeRecipientUpdated(address indexed newPenaltyFeeRecipient); - /// @dev Event emitted when the fee payout period in blocks is updated - event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); + /// @dev Event emitted when the fee payout period is updated + event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod); /// @dev Event emitted when the min stake is updated event MinStakeUpdated(uint256 indexed newMinStake); diff --git a/contracts/contracts/utils/FeePayout.sol b/contracts/contracts/utils/FeePayout.sol index 7af7f1d2f..a5ed5a54a 100644 --- a/contracts/contracts/utils/FeePayout.sol +++ b/contracts/contracts/utils/FeePayout.sol @@ -48,4 +48,43 @@ library FeePayout { function isPayoutDue(Tracker storage tracker) internal view returns (bool) { return block.number > tracker.lastPayoutBlock + tracker.payoutPeriodBlocks; } + + struct TimestampTracker { + /// @dev Address that accumulates fees + address recipient; + /// @dev Accumulated fees since last payout + uint256 accumulatedAmount; + /// @dev Timestamp when the last fee payout was made + uint256 lastPayoutTimestamp; + /// @dev Min number of seconds (or ms on mev-commit chain) between payouts + uint256 payoutTimePeriod; + } + + /// @dev Initialize a new timestamp fee tracker in storage + function initTimestampTracker(TimestampTracker storage self, address _recipient, uint256 _payoutTimePeriod) internal { + require(_recipient != address(0), FeeRecipientIsZero()); + require(_payoutTimePeriod != 0, PayoutPeriodMustBePositive()); + self.recipient = _recipient; + self.accumulatedAmount = 0; + self.lastPayoutTimestamp = block.timestamp; + self.payoutTimePeriod = _payoutTimePeriod; + } + + /// @dev Transfers the accumulated fees to the recipient and resets the tracker + /// @param tracker The FeePayout.TimestampTracker struct + function transferToRecipientByTimestamp(TimestampTracker storage tracker) internal { + uint256 amountToPay = tracker.accumulatedAmount; + tracker.accumulatedAmount = 0; + tracker.lastPayoutTimestamp = block.timestamp; + (bool success, ) = payable(tracker.recipient).call{value: amountToPay}(""); + require(success, TransferToRecipientFailed()); + emit FeeTransfer(amountToPay, tracker.recipient); + } + + /// @dev Checks if a fee payout is due by timestamp + /// @param tracker The FeePayout.TimestampTracker struct + /// @return true if a payout is due, false otherwise + function isPayoutDueByTimestamp(TimestampTracker storage tracker) internal view returns (bool) { + return block.timestamp > tracker.lastPayoutTimestamp + tracker.payoutTimePeriod; + } } diff --git a/contracts/test/core/BidderRegistryTest.sol b/contracts/test/core/BidderRegistryTest.sol index a68ff7e62..3a9ecfccf 100644 --- a/contracts/test/core/BidderRegistryTest.sol +++ b/contracts/test/core/BidderRegistryTest.sol @@ -25,7 +25,7 @@ contract BidderRegistryTest is Test { event FeeTransfer(uint256 amount, address indexed recipient); event ProtocolFeeRecipientUpdated(address indexed newProtocolFeeRecipient); - event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks); + event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod); function setUp() public { testNumber = 42; @@ -140,15 +140,15 @@ contract BidderRegistryTest is Test { function test_SetNewFeePayoutPeriodBlocks() public { vm.prank(address(this)); vm.expectEmit(true, true, true, true); - emit FeePayoutPeriodBlocksUpdated(890); - bidderRegistry.setNewFeePayoutPeriodBlocks(890); + emit FeePayoutPeriodUpdated(890); + bidderRegistry.setNewFeePayoutPeriod(890); (, , , uint256 payoutPeriodBlocks) = bidderRegistry.protocolFeeTracker(); assertEq(payoutPeriodBlocks, 890); } function testFail_SetNewFeePayoutPeriodBlocks() public { vm.expectRevert(bytes("")); - bidderRegistry.setNewFeePayoutPeriodBlocks(83424); + bidderRegistry.setNewFeePayoutPeriod(83424); } function test_SetNewFeePercent() public { diff --git a/contracts/test/core/ProviderRegistryTest.sol b/contracts/test/core/ProviderRegistryTest.sol index 8e3b55eea..7b693f975 100644 --- a/contracts/test/core/ProviderRegistryTest.sol +++ b/contracts/test/core/ProviderRegistryTest.sol @@ -32,9 +32,7 @@ contract ProviderRegistryTest is Test { event WithdrawalCompleted(address indexed provider, uint256 amount); event FeeTransfer(uint256 amount, address indexed recipient); event PenaltyFeeRecipientUpdated(address indexed newPenaltyFeeRecipient); - event FeePayoutPeriodBlocksUpdated( - uint256 indexed newFeePayoutPeriodBlocks - ); + event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod); event InsufficientFundsToSlash( address indexed provider, uint256 providerStake, @@ -242,8 +240,8 @@ contract ProviderRegistryTest is Test { function test_SetNewFeePayoutPeriodBlocks() public { vm.prank(address(this)); vm.expectEmit(true, true, true, true); - emit FeePayoutPeriodBlocksUpdated(890); - providerRegistry.setFeePayoutPeriodBlocks(890); + emit FeePayoutPeriodUpdated(890); + providerRegistry.setFeePayoutPeriod(890); (, , , uint256 payoutPeriodBlocks) = providerRegistry .penaltyFeeTracker(); assertEq(payoutPeriodBlocks, 890); @@ -251,7 +249,7 @@ contract ProviderRegistryTest is Test { function testFail_SetNewFeePayoutPeriodBlocks() public { vm.expectRevert(bytes("")); - providerRegistry.setFeePayoutPeriodBlocks(83424); + providerRegistry.setFeePayoutPeriod(83424); } function test_SetNewFeePercent() public { From 468912a74d0d97e76b7b35dd12f6c831eb1a91b8 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:04:22 -0700 Subject: [PATCH 2/5] fix tests --- contracts/test/core/BidderRegistryTest.sol | 19 +++++++------- contracts/test/core/ProviderRegistryTest.sol | 26 ++++++++++---------- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/contracts/test/core/BidderRegistryTest.sol b/contracts/test/core/BidderRegistryTest.sol index 3a9ecfccf..5fff62a1c 100644 --- a/contracts/test/core/BidderRegistryTest.sol +++ b/contracts/test/core/BidderRegistryTest.sol @@ -16,7 +16,7 @@ contract BidderRegistryTest is Test { uint256 public minStake; address public bidder; address public feeRecipient; - uint256 public feePayoutPeriodBlocks; + uint256 public feePayoutPeriodMs; BlockTracker public blockTracker; ProviderRegistry public providerRegistry; @@ -32,7 +32,7 @@ contract BidderRegistryTest is Test { feePercent = 10 * 1e16; minStake = 1e18 wei; feeRecipient = vm.addr(9); - feePayoutPeriodBlocks = 100; + feePayoutPeriodMs = 10000; address blockTrackerProxy = Upgrades.deployUUPSProxy( "BlockTracker.sol", abi.encodeCall(BlockTracker.initialize, (address(this), address(this))) @@ -41,7 +41,7 @@ contract BidderRegistryTest is Test { address bidderRegistryProxy = Upgrades.deployUUPSProxy( "BidderRegistry.sol", - abi.encodeCall(BidderRegistry.initialize, (feeRecipient, feePercent, address(this), address(blockTracker), feePayoutPeriodBlocks)) + abi.encodeCall(BidderRegistry.initialize, (feeRecipient, feePercent, address(this), address(blockTracker), feePayoutPeriodMs)) ); bidderRegistry = BidderRegistry(payable(bidderRegistryProxy)); @@ -63,10 +63,10 @@ contract BidderRegistryTest is Test { } function test_VerifyInitialContractState() public view { - (address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) = bidderRegistry.protocolFeeTracker(); + (address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutPeriodMs) = bidderRegistry.protocolFeeTracker(); assertEq(recipient, feeRecipient); - assertEq(payoutPeriodBlocks, feePayoutPeriodBlocks); - assertEq(lastPayoutBlock, block.number); + assertEq(payoutPeriodMs, feePayoutPeriodMs); + assertEq(lastPayoutTimestamp, block.timestamp); assertEq(accumulatedAmount, 0); assertEq(bidderRegistry.feePercent(), feePercent); assertEq(bidderRegistry.preconfManager(), address(0)); @@ -425,10 +425,11 @@ contract BidderRegistryTest is Test { } function test_ProtocolFeePayout() public { - (, , uint256 lastPayoutBlock,) = bidderRegistry.protocolFeeTracker(); - assertEq(lastPayoutBlock, 1); + (, , uint256 lastPayoutTimestamp,) = bidderRegistry.protocolFeeTracker(); + uint256 defaultStartTimestamp = 1; + assertEq(lastPayoutTimestamp, 1); assertEq(bidderRegistry.getAccumulatedProtocolFee(), 0); - vm.roll(250); // roll past protocol fee payout period + vm.warp(defaultStartTimestamp + 10000 + 1); // roll past protocol fee payout period bidderRegistry.setPreconfManager(address(this)); uint256 currentWindow = blockTracker.getCurrentWindow(); diff --git a/contracts/test/core/ProviderRegistryTest.sol b/contracts/test/core/ProviderRegistryTest.sol index 7b693f975..cb9608fcf 100644 --- a/contracts/test/core/ProviderRegistryTest.sol +++ b/contracts/test/core/ProviderRegistryTest.sol @@ -26,7 +26,7 @@ contract ProviderRegistryTest is Test { bytes public dummyBLSSignature = hex"bbbbbbbbb1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2"; bytes[] public validBLSPubkeys = [validBLSPubkey]; - uint256 public penaltyFeePayoutPeriodBlocks; + uint256 public penaltyFeePayoutPeriodMs; event ProviderRegistered(address indexed provider, uint256 stakedAmount); event WithdrawalRequested(address indexed provider, uint256 timestamp); event WithdrawalCompleted(address indexed provider, uint256 amount); @@ -53,7 +53,7 @@ contract ProviderRegistryTest is Test { minStake = 1e18 wei; feeRecipient = vm.addr(9); withdrawalDelay = 24 hours; // 24 hours - penaltyFeePayoutPeriodBlocks = 100; + penaltyFeePayoutPeriodMs = 10000; address providerRegistryProxy = Upgrades.deployUUPSProxy( "ProviderRegistry.sol", abi.encodeCall( @@ -64,7 +64,7 @@ contract ProviderRegistryTest is Test { feePercent, address(this), withdrawalDelay, - penaltyFeePayoutPeriodBlocks + penaltyFeePayoutPeriodMs ) ) ); @@ -88,7 +88,7 @@ contract ProviderRegistryTest is Test { feePercent, address(this), address(blockTracker), - penaltyFeePayoutPeriodBlocks + penaltyFeePayoutPeriodMs ) ) ); @@ -125,12 +125,12 @@ contract ProviderRegistryTest is Test { ( address recipient, uint256 accumulatedAmount, - uint256 lastPayoutBlock, - uint256 payoutPeriodBlocks + uint256 lastPayoutTimestamp, + uint256 payoutPeriodMs ) = bidderRegistry.protocolFeeTracker(); assertEq(recipient, feeRecipient); - assertEq(payoutPeriodBlocks, penaltyFeePayoutPeriodBlocks); - assertEq(lastPayoutBlock, block.number); + assertEq(payoutPeriodMs, penaltyFeePayoutPeriodMs); + assertEq(lastPayoutTimestamp, block.timestamp); assertEq(accumulatedAmount, 0); } @@ -237,17 +237,17 @@ contract ProviderRegistryTest is Test { providerRegistry.setNewPenaltyFeeRecipient(newRecipient); } - function test_SetNewFeePayoutPeriodBlocks() public { + function test_SetNewFeePayoutPeriod() public { vm.prank(address(this)); vm.expectEmit(true, true, true, true); emit FeePayoutPeriodUpdated(890); providerRegistry.setFeePayoutPeriod(890); - (, , , uint256 payoutPeriodBlocks) = providerRegistry + (, , , uint256 payoutPeriodMs) = providerRegistry .penaltyFeeTracker(); - assertEq(payoutPeriodBlocks, 890); + assertEq(payoutPeriodMs, 890); } - function testFail_SetNewFeePayoutPeriodBlocks() public { + function testFail_SetNewFeePayoutPeriod() public { vm.expectRevert(bytes("")); providerRegistry.setFeePayoutPeriod(83424); } @@ -450,7 +450,7 @@ contract ProviderRegistryTest is Test { vm.prank(newProvider); providerRegistry.registerAndStake{value: 2 ether}(); - vm.roll(350); // roll past protocol fee payout period + vm.warp(block.timestamp + 10000 + 1); // roll past protocol fee payout period vm.expectEmit(true, true, true, true); emit FeeTransfer(1e17 wei, vm.addr(6)); From 22385206c8ab737335caefc60e8d76c17308de81 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:22:37 -0700 Subject: [PATCH 3/5] update abi + bindings --- contracts-abi/abi/BidderRegistry.abi | 14 +- contracts-abi/abi/ProviderRegistry.abi | 14 +- .../clients/BidderRegistry/BidderRegistry.go | 154 +++++++++--------- .../ProviderRegistry/ProviderRegistry.go | 154 +++++++++--------- 4 files changed, 168 insertions(+), 168 deletions(-) diff --git a/contracts-abi/abi/BidderRegistry.abi b/contracts-abi/abi/BidderRegistry.abi index f350c1d7c..88c5a2388 100644 --- a/contracts-abi/abi/BidderRegistry.abi +++ b/contracts-abi/abi/BidderRegistry.abi @@ -220,7 +220,7 @@ "internalType": "address" }, { - "name": "_feePayoutPeriodBlocks", + "name": "_feePayoutPeriod", "type": "uint256", "internalType": "uint256" } @@ -392,12 +392,12 @@ "internalType": "uint256" }, { - "name": "lastPayoutBlock", + "name": "lastPayoutTimestamp", "type": "uint256", "internalType": "uint256" }, { - "name": "payoutPeriodBlocks", + "name": "payoutTimePeriod", "type": "uint256", "internalType": "uint256" } @@ -486,10 +486,10 @@ }, { "type": "function", - "name": "setNewFeePayoutPeriodBlocks", + "name": "setNewFeePayoutPeriod", "inputs": [ { - "name": "newFeePayoutPeriodBlocks", + "name": "newFeePayoutPeriod", "type": "uint256", "internalType": "uint256" } @@ -725,10 +725,10 @@ }, { "type": "event", - "name": "FeePayoutPeriodBlocksUpdated", + "name": "FeePayoutPeriodUpdated", "inputs": [ { - "name": "newFeePayoutPeriodBlocks", + "name": "newFeePayoutPeriod", "type": "uint256", "indexed": true, "internalType": "uint256" diff --git a/contracts-abi/abi/ProviderRegistry.abi b/contracts-abi/abi/ProviderRegistry.abi index 854f427c1..6792e9958 100644 --- a/contracts-abi/abi/ProviderRegistry.abi +++ b/contracts-abi/abi/ProviderRegistry.abi @@ -277,7 +277,7 @@ "internalType": "uint256" }, { - "name": "_penaltyFeePayoutPeriodBlocks", + "name": "_penaltyFeePayoutPeriod", "type": "uint256", "internalType": "uint256" } @@ -385,12 +385,12 @@ "internalType": "uint256" }, { - "name": "lastPayoutBlock", + "name": "lastPayoutTimestamp", "type": "uint256", "internalType": "uint256" }, { - "name": "payoutPeriodBlocks", + "name": "payoutTimePeriod", "type": "uint256", "internalType": "uint256" } @@ -490,10 +490,10 @@ }, { "type": "function", - "name": "setFeePayoutPeriodBlocks", + "name": "setFeePayoutPeriod", "inputs": [ { - "name": "_feePayoutPeriodBlocks", + "name": "_feePayoutPeriod", "type": "uint256", "internalType": "uint256" } @@ -766,10 +766,10 @@ }, { "type": "event", - "name": "FeePayoutPeriodBlocksUpdated", + "name": "FeePayoutPeriodUpdated", "inputs": [ { - "name": "newFeePayoutPeriodBlocks", + "name": "newFeePayoutPeriod", "type": "uint256", "indexed": true, "internalType": "uint256" diff --git a/contracts-abi/clients/BidderRegistry/BidderRegistry.go b/contracts-abi/clients/BidderRegistry/BidderRegistry.go index 066b499d0..f36ddea8c 100644 --- a/contracts-abi/clients/BidderRegistry/BidderRegistry.go +++ b/contracts-abi/clients/BidderRegistry/BidderRegistry.go @@ -31,7 +31,7 @@ var ( // BidderregistryMetaData contains all meta data concerning the Bidderregistry contract. var BidderregistryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ONE_HUNDRED_PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidPayment\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockTrackerContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBlockTracker\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositForWindow\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositForWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedProtocolFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposit\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_protocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blockTracker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lockedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyWithdrawProtocolFee\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"maxBidPerBlock\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"openBid\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preconfManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"protocolFeeTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"retrieveFunds\",\"inputs\":[{\"name\":\"windowToSettle\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setBlockTrackerContract\",\"inputs\":[{\"name\":\"newBlockTrackerContract\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePayoutPeriodBlocks\",\"inputs\":[{\"name\":\"newFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewProtocolFeeRecipient\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfManager\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unlockFunds\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"usedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawBidderAmountFromWindow\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawFromWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BidderRegistered\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"depositedAmount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"windowNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BidderWithdrawal\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockTrackerUpdated\",\"inputs\":[{\"name\":\"newBlockTracker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePayoutPeriodBlocksUpdated\",\"inputs\":[{\"name\":\"newFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePercentUpdated\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRetrieved\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRewarded\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PreconfManagerUpdated\",\"inputs\":[{\"name\":\"newPreconfManager\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProtocolFeeRecipientUpdated\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferToBidderFailed\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"BidNotPreConfirmed\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actualState\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"},{\"name\":\"expectedState\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"}]},{\"type\":\"error\",\"name\":\"BidderWithdrawalTransferFailed\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"DepositAmountIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyBidderCanWithdraw\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProviderAmountIsZero\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotPreconfManager\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preconfManager\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TransferToProviderFailed\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"WindowNotSettled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawAfterWindowSettled\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"currentWindow\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ONE_HUNDRED_PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidPayment\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"state\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockTrackerContract\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"contractIBlockTracker\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"depositForWindow\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"depositForWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedProtocolFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getDeposit\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_protocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_blockTracker\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePayoutPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"lockedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyWithdrawProtocolFee\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"maxBidPerBlock\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"openBid\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"bidAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blockNumber\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preconfManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"protocolFeeTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutTimePeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"retrieveFunds\",\"inputs\":[{\"name\":\"windowToSettle\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setBlockTrackerContract\",\"inputs\":[{\"name\":\"newBlockTrackerContract\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePayoutPeriod\",\"inputs\":[{\"name\":\"newFeePayoutPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewProtocolFeeRecipient\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfManager\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unlockFunds\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"usedFunds\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint64\",\"internalType\":\"uint64\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawBidderAmountFromWindow\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawFromWindows\",\"inputs\":[{\"name\":\"windows\",\"type\":\"uint256[]\",\"internalType\":\"uint256[]\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawProviderAmount\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"addresspayable\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"event\",\"name\":\"BidderRegistered\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"depositedAmount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"windowNumber\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BidderWithdrawal\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BlockTrackerUpdated\",\"inputs\":[{\"name\":\"newBlockTracker\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePayoutPeriodUpdated\",\"inputs\":[{\"name\":\"newFeePayoutPeriod\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePercentUpdated\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRetrieved\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsRewarded\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"indexed\":true,\"internalType\":\"bytes32\"},{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"window\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PreconfManagerUpdated\",\"inputs\":[{\"name\":\"newPreconfManager\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProtocolFeeRecipientUpdated\",\"inputs\":[{\"name\":\"newProtocolFeeRecipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferToBidderFailed\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"BidNotPreConfirmed\",\"inputs\":[{\"name\":\"commitmentDigest\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"actualState\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"},{\"name\":\"expectedState\",\"type\":\"uint8\",\"internalType\":\"enumIBidderRegistry.State\"}]},{\"type\":\"error\",\"name\":\"BidderWithdrawalTransferFailed\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"DepositAmountIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"OnlyBidderCanWithdraw\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProviderAmountIsZero\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SenderIsNotPreconfManager\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preconfManager\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"TransferToProviderFailed\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"WindowNotSettled\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"WithdrawAfterWindowSettled\",\"inputs\":[{\"name\":\"window\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"currentWindow\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]}]", } // BidderregistryABI is the input ABI used to generate the binding from. @@ -666,21 +666,21 @@ func (_Bidderregistry *BidderregistryCallerSession) PreconfManager() (common.Add // ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. // -// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutTimePeriod) func (_Bidderregistry *BidderregistryCaller) ProtocolFeeTracker(opts *bind.CallOpts) (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }, error) { var out []interface{} err := _Bidderregistry.contract.Call(opts, &out, "protocolFeeTracker") outstruct := new(struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }) if err != nil { return *outstruct, err @@ -688,8 +688,8 @@ func (_Bidderregistry *BidderregistryCaller) ProtocolFeeTracker(opts *bind.CallO outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) outstruct.AccumulatedAmount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.LastPayoutBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.PayoutPeriodBlocks = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.LastPayoutTimestamp = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.PayoutTimePeriod = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) return *outstruct, err @@ -697,24 +697,24 @@ func (_Bidderregistry *BidderregistryCaller) ProtocolFeeTracker(opts *bind.CallO // ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. // -// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutTimePeriod) func (_Bidderregistry *BidderregistrySession) ProtocolFeeTracker() (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }, error) { return _Bidderregistry.Contract.ProtocolFeeTracker(&_Bidderregistry.CallOpts) } // ProtocolFeeTracker is a free data retrieval call binding the contract method 0x291af92c. // -// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +// Solidity: function protocolFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutTimePeriod) func (_Bidderregistry *BidderregistryCallerSession) ProtocolFeeTracker() (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }, error) { return _Bidderregistry.Contract.ProtocolFeeTracker(&_Bidderregistry.CallOpts) } @@ -877,23 +877,23 @@ func (_Bidderregistry *BidderregistryTransactorSession) DepositForWindows(window // Initialize is a paid mutator transaction binding the contract method 0x2a1d0547. // -// Solidity: function initialize(address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, uint256 _feePayoutPeriodBlocks) returns() -func (_Bidderregistry *BidderregistryTransactor) Initialize(opts *bind.TransactOpts, _protocolFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _blockTracker common.Address, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Bidderregistry.contract.Transact(opts, "initialize", _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _feePayoutPeriodBlocks) +// Solidity: function initialize(address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, uint256 _feePayoutPeriod) returns() +func (_Bidderregistry *BidderregistryTransactor) Initialize(opts *bind.TransactOpts, _protocolFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _blockTracker common.Address, _feePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Bidderregistry.contract.Transact(opts, "initialize", _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _feePayoutPeriod) } // Initialize is a paid mutator transaction binding the contract method 0x2a1d0547. // -// Solidity: function initialize(address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, uint256 _feePayoutPeriodBlocks) returns() -func (_Bidderregistry *BidderregistrySession) Initialize(_protocolFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _blockTracker common.Address, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _feePayoutPeriodBlocks) +// Solidity: function initialize(address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, uint256 _feePayoutPeriod) returns() +func (_Bidderregistry *BidderregistrySession) Initialize(_protocolFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _blockTracker common.Address, _feePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _feePayoutPeriod) } // Initialize is a paid mutator transaction binding the contract method 0x2a1d0547. // -// Solidity: function initialize(address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, uint256 _feePayoutPeriodBlocks) returns() -func (_Bidderregistry *BidderregistryTransactorSession) Initialize(_protocolFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _blockTracker common.Address, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _feePayoutPeriodBlocks) +// Solidity: function initialize(address _protocolFeeRecipient, uint256 _feePercent, address _owner, address _blockTracker, uint256 _feePayoutPeriod) returns() +func (_Bidderregistry *BidderregistryTransactorSession) Initialize(_protocolFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _blockTracker common.Address, _feePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.Initialize(&_Bidderregistry.TransactOpts, _protocolFeeRecipient, _feePercent, _owner, _blockTracker, _feePayoutPeriod) } // ManuallyWithdrawProtocolFee is a paid mutator transaction binding the contract method 0xdbf63530. @@ -1022,25 +1022,25 @@ func (_Bidderregistry *BidderregistryTransactorSession) SetBlockTrackerContract( return _Bidderregistry.Contract.SetBlockTrackerContract(&_Bidderregistry.TransactOpts, newBlockTrackerContract) } -// SetNewFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xe29136c0. +// SetNewFeePayoutPeriod is a paid mutator transaction binding the contract method 0x599a9d31. // -// Solidity: function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) returns() -func (_Bidderregistry *BidderregistryTransactor) SetNewFeePayoutPeriodBlocks(opts *bind.TransactOpts, newFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Bidderregistry.contract.Transact(opts, "setNewFeePayoutPeriodBlocks", newFeePayoutPeriodBlocks) +// Solidity: function setNewFeePayoutPeriod(uint256 newFeePayoutPeriod) returns() +func (_Bidderregistry *BidderregistryTransactor) SetNewFeePayoutPeriod(opts *bind.TransactOpts, newFeePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Bidderregistry.contract.Transact(opts, "setNewFeePayoutPeriod", newFeePayoutPeriod) } -// SetNewFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xe29136c0. +// SetNewFeePayoutPeriod is a paid mutator transaction binding the contract method 0x599a9d31. // -// Solidity: function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) returns() -func (_Bidderregistry *BidderregistrySession) SetNewFeePayoutPeriodBlocks(newFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Bidderregistry.Contract.SetNewFeePayoutPeriodBlocks(&_Bidderregistry.TransactOpts, newFeePayoutPeriodBlocks) +// Solidity: function setNewFeePayoutPeriod(uint256 newFeePayoutPeriod) returns() +func (_Bidderregistry *BidderregistrySession) SetNewFeePayoutPeriod(newFeePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.SetNewFeePayoutPeriod(&_Bidderregistry.TransactOpts, newFeePayoutPeriod) } -// SetNewFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0xe29136c0. +// SetNewFeePayoutPeriod is a paid mutator transaction binding the contract method 0x599a9d31. // -// Solidity: function setNewFeePayoutPeriodBlocks(uint256 newFeePayoutPeriodBlocks) returns() -func (_Bidderregistry *BidderregistryTransactorSession) SetNewFeePayoutPeriodBlocks(newFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Bidderregistry.Contract.SetNewFeePayoutPeriodBlocks(&_Bidderregistry.TransactOpts, newFeePayoutPeriodBlocks) +// Solidity: function setNewFeePayoutPeriod(uint256 newFeePayoutPeriod) returns() +func (_Bidderregistry *BidderregistryTransactorSession) SetNewFeePayoutPeriod(newFeePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Bidderregistry.Contract.SetNewFeePayoutPeriod(&_Bidderregistry.TransactOpts, newFeePayoutPeriod) } // SetNewFeePercent is a paid mutator transaction binding the contract method 0x3221f6db. @@ -1763,9 +1763,9 @@ func (_Bidderregistry *BidderregistryFilterer) ParseBlockTrackerUpdated(log type return event, nil } -// BidderregistryFeePayoutPeriodBlocksUpdatedIterator is returned from FilterFeePayoutPeriodBlocksUpdated and is used to iterate over the raw logs and unpacked data for FeePayoutPeriodBlocksUpdated events raised by the Bidderregistry contract. -type BidderregistryFeePayoutPeriodBlocksUpdatedIterator struct { - Event *BidderregistryFeePayoutPeriodBlocksUpdated // Event containing the contract specifics and raw log +// BidderregistryFeePayoutPeriodUpdatedIterator is returned from FilterFeePayoutPeriodUpdated and is used to iterate over the raw logs and unpacked data for FeePayoutPeriodUpdated events raised by the Bidderregistry contract. +type BidderregistryFeePayoutPeriodUpdatedIterator struct { + Event *BidderregistryFeePayoutPeriodUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1779,7 +1779,7 @@ type BidderregistryFeePayoutPeriodBlocksUpdatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { +func (it *BidderregistryFeePayoutPeriodUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1788,7 +1788,7 @@ func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(BidderregistryFeePayoutPeriodBlocksUpdated) + it.Event = new(BidderregistryFeePayoutPeriodUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1803,7 +1803,7 @@ func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(BidderregistryFeePayoutPeriodBlocksUpdated) + it.Event = new(BidderregistryFeePayoutPeriodUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1819,51 +1819,51 @@ func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Error() error { +func (it *BidderregistryFeePayoutPeriodUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *BidderregistryFeePayoutPeriodBlocksUpdatedIterator) Close() error { +func (it *BidderregistryFeePayoutPeriodUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// BidderregistryFeePayoutPeriodBlocksUpdated represents a FeePayoutPeriodBlocksUpdated event raised by the Bidderregistry contract. -type BidderregistryFeePayoutPeriodBlocksUpdated struct { - NewFeePayoutPeriodBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos +// BidderregistryFeePayoutPeriodUpdated represents a FeePayoutPeriodUpdated event raised by the Bidderregistry contract. +type BidderregistryFeePayoutPeriodUpdated struct { + NewFeePayoutPeriod *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFeePayoutPeriodBlocksUpdated is a free log retrieval operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// FilterFeePayoutPeriodUpdated is a free log retrieval operation binding the contract event 0xefd7aa598240290a91e058be60cb457231c4874ea3d308c1df4c14156d58f9cb. // -// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) -func (_Bidderregistry *BidderregistryFilterer) FilterFeePayoutPeriodBlocksUpdated(opts *bind.FilterOpts, newFeePayoutPeriodBlocks []*big.Int) (*BidderregistryFeePayoutPeriodBlocksUpdatedIterator, error) { +// Solidity: event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod) +func (_Bidderregistry *BidderregistryFilterer) FilterFeePayoutPeriodUpdated(opts *bind.FilterOpts, newFeePayoutPeriod []*big.Int) (*BidderregistryFeePayoutPeriodUpdatedIterator, error) { - var newFeePayoutPeriodBlocksRule []interface{} - for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { - newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) + var newFeePayoutPeriodRule []interface{} + for _, newFeePayoutPeriodItem := range newFeePayoutPeriod { + newFeePayoutPeriodRule = append(newFeePayoutPeriodRule, newFeePayoutPeriodItem) } - logs, sub, err := _Bidderregistry.contract.FilterLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) + logs, sub, err := _Bidderregistry.contract.FilterLogs(opts, "FeePayoutPeriodUpdated", newFeePayoutPeriodRule) if err != nil { return nil, err } - return &BidderregistryFeePayoutPeriodBlocksUpdatedIterator{contract: _Bidderregistry.contract, event: "FeePayoutPeriodBlocksUpdated", logs: logs, sub: sub}, nil + return &BidderregistryFeePayoutPeriodUpdatedIterator{contract: _Bidderregistry.contract, event: "FeePayoutPeriodUpdated", logs: logs, sub: sub}, nil } -// WatchFeePayoutPeriodBlocksUpdated is a free log subscription operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// WatchFeePayoutPeriodUpdated is a free log subscription operation binding the contract event 0xefd7aa598240290a91e058be60cb457231c4874ea3d308c1df4c14156d58f9cb. // -// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) -func (_Bidderregistry *BidderregistryFilterer) WatchFeePayoutPeriodBlocksUpdated(opts *bind.WatchOpts, sink chan<- *BidderregistryFeePayoutPeriodBlocksUpdated, newFeePayoutPeriodBlocks []*big.Int) (event.Subscription, error) { +// Solidity: event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod) +func (_Bidderregistry *BidderregistryFilterer) WatchFeePayoutPeriodUpdated(opts *bind.WatchOpts, sink chan<- *BidderregistryFeePayoutPeriodUpdated, newFeePayoutPeriod []*big.Int) (event.Subscription, error) { - var newFeePayoutPeriodBlocksRule []interface{} - for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { - newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) + var newFeePayoutPeriodRule []interface{} + for _, newFeePayoutPeriodItem := range newFeePayoutPeriod { + newFeePayoutPeriodRule = append(newFeePayoutPeriodRule, newFeePayoutPeriodItem) } - logs, sub, err := _Bidderregistry.contract.WatchLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) + logs, sub, err := _Bidderregistry.contract.WatchLogs(opts, "FeePayoutPeriodUpdated", newFeePayoutPeriodRule) if err != nil { return nil, err } @@ -1873,8 +1873,8 @@ func (_Bidderregistry *BidderregistryFilterer) WatchFeePayoutPeriodBlocksUpdated select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(BidderregistryFeePayoutPeriodBlocksUpdated) - if err := _Bidderregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { + event := new(BidderregistryFeePayoutPeriodUpdated) + if err := _Bidderregistry.contract.UnpackLog(event, "FeePayoutPeriodUpdated", log); err != nil { return err } event.Raw = log @@ -1895,12 +1895,12 @@ func (_Bidderregistry *BidderregistryFilterer) WatchFeePayoutPeriodBlocksUpdated }), nil } -// ParseFeePayoutPeriodBlocksUpdated is a log parse operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// ParseFeePayoutPeriodUpdated is a log parse operation binding the contract event 0xefd7aa598240290a91e058be60cb457231c4874ea3d308c1df4c14156d58f9cb. // -// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) -func (_Bidderregistry *BidderregistryFilterer) ParseFeePayoutPeriodBlocksUpdated(log types.Log) (*BidderregistryFeePayoutPeriodBlocksUpdated, error) { - event := new(BidderregistryFeePayoutPeriodBlocksUpdated) - if err := _Bidderregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { +// Solidity: event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod) +func (_Bidderregistry *BidderregistryFilterer) ParseFeePayoutPeriodUpdated(log types.Log) (*BidderregistryFeePayoutPeriodUpdated, error) { + event := new(BidderregistryFeePayoutPeriodUpdated) + if err := _Bidderregistry.contract.UnpackLog(event, "FeePayoutPeriodUpdated", log); err != nil { return nil, err } event.Raw = log diff --git a/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go b/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go index 649fb636c..baadf2f7d 100644 --- a/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go +++ b/contracts-abi/clients/ProviderRegistry/ProviderRegistry.go @@ -31,7 +31,7 @@ var ( // ProviderregistryMetaData contains all meta data concerning the Providerregistry contract. var ProviderregistryMetaData = &bind.MetaData{ - ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ONE_HUNDRED_PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addVerifiedBLSKey\",\"inputs\":[{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidderSlashedAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockBuilderBLSKeyToAddress\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegateRegisterAndStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"eoaToBlsPubkeys\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedPenaltyFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBLSKeys\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEoaFromBLSKey\",\"inputs\":[{\"name\":\"blsKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_penaltyFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_penaltyFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isProviderValid\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyWithdrawPenaltyFee\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"overrideAddBLSKey\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"penaltyFeeTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutBlock\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preconfManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerStakes\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerAndStake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeePayoutPeriodBlocks\",\"inputs\":[{\"name\":\"_feePayoutPeriodBlocks\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewPenaltyFeeRecipient\",\"inputs\":[{\"name\":\"newFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfManager\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalDelay\",\"inputs\":[{\"name\":\"_withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"amt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"slashAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifySignature\",\"inputs\":[{\"name\":\"pubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"message\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawSlashedAmount\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawalDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalRequests\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BLSKeyAdded\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BidderWithdrawSlashedAmount\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePayoutPeriodBlocksUpdated\",\"inputs\":[{\"name\":\"newFeePayoutPeriodBlocks\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePercentUpdated\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsDeposited\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsSlashed\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"InsufficientFundsToSlash\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"providerStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"residualAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"penaltyFee\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"slashAmt\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeUpdated\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PenaltyFeeRecipientUpdated\",\"inputs\":[{\"name\":\"newPenaltyFeeRecipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PreconfManagerUpdated\",\"inputs\":[{\"name\":\"newPreconfManager\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProviderRegistered\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferToBidderFailed\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalDelayUpdated\",\"inputs\":[{\"name\":\"newWithdrawalDelay\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneBLSKeyRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BLSSignatureInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BidderAmountIsZero\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"BidderWithdrawalTransferFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"DelayNotPassed\",\"inputs\":[{\"name\":\"withdrawalRequestTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"currentBlockTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientStake\",\"inputs\":[{\"name\":\"stake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidBLSPublicKeyLength\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expectedLength\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoStakeToWithdraw\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NoUnstakeRequest\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotPreconfContract\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preconfManager\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingWithdrawalRequest\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PreconfManagerNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProviderAlreadyRegistered\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ProviderCommitmentsPending\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"numPending\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ProviderNotRegistered\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PublicKeyLengthInvalid\",\"inputs\":[{\"name\":\"exp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"got\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureLengthInvalid\",\"inputs\":[{\"name\":\"exp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"got\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"StakeTransferFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakeRequestExists\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]}]", + ABI: "[{\"type\":\"constructor\",\"inputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"fallback\",\"stateMutability\":\"payable\"},{\"type\":\"receive\",\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"ONE_HUNDRED_PERCENT\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"PRECISION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"UPGRADE_INTERFACE_VERSION\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\",\"internalType\":\"string\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"acceptOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"addVerifiedBLSKey\",\"inputs\":[{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"bidderSlashedAmount\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"blockBuilderBLSKeyToAddress\",\"inputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"delegateRegisterAndStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"delegateStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"eoaToBlsPubkeys\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"feePercent\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getAccumulatedPenaltyFee\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getBLSKeys\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bytes[]\",\"internalType\":\"bytes[]\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getEoaFromBLSKey\",\"inputs\":[{\"name\":\"blsKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"getProviderStake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"initialize\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_penaltyFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_feePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_owner\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"_withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"_penaltyFeePayoutPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"isProviderValid\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"manuallyWithdrawPenaltyFee\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"minStake\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"overrideAddBLSKey\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"owner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"paused\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"penaltyFeeTracker\",\"inputs\":[],\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"accumulatedAmount\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"lastPayoutTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"payoutTimePeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"pendingOwner\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"preconfManager\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerRegistered\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"providerStakes\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"proxiableUUID\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"registerAndStake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"renounceOwnership\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setFeePayoutPeriod\",\"inputs\":[{\"name\":\"_feePayoutPeriod\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setMinStake\",\"inputs\":[{\"name\":\"_minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewFeePercent\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setNewPenaltyFeeRecipient\",\"inputs\":[{\"name\":\"newFeeRecipient\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setPreconfManager\",\"inputs\":[{\"name\":\"contractAddress\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"setWithdrawalDelay\",\"inputs\":[{\"name\":\"_withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"slash\",\"inputs\":[{\"name\":\"amt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"slashAmt\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"provider\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"bidder\",\"type\":\"address\",\"internalType\":\"addresspayable\"},{\"name\":\"residualBidPercentAfterDecay\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"stake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"transferOwnership\",\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unpause\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"unstake\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"upgradeToAndCall\",\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[],\"stateMutability\":\"payable\"},{\"type\":\"function\",\"name\":\"verifySignature\",\"inputs\":[{\"name\":\"pubKey\",\"type\":\"bytes\",\"internalType\":\"bytes\"},{\"name\":\"message\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"},{\"name\":\"signature\",\"type\":\"bytes\",\"internalType\":\"bytes\"}],\"outputs\":[{\"name\":\"\",\"type\":\"bool\",\"internalType\":\"bool\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdraw\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawSlashedAmount\",\"inputs\":[],\"outputs\":[],\"stateMutability\":\"nonpayable\"},{\"type\":\"function\",\"name\":\"withdrawalDelay\",\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"function\",\"name\":\"withdrawalRequests\",\"inputs\":[{\"name\":\"\",\"type\":\"address\",\"internalType\":\"address\"}],\"outputs\":[{\"name\":\"\",\"type\":\"uint256\",\"internalType\":\"uint256\"}],\"stateMutability\":\"view\"},{\"type\":\"event\",\"name\":\"BLSKeyAdded\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"blsPublicKey\",\"type\":\"bytes\",\"indexed\":false,\"internalType\":\"bytes\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"BidderWithdrawSlashedAmount\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePayoutPeriodUpdated\",\"inputs\":[{\"name\":\"newFeePayoutPeriod\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeePercentUpdated\",\"inputs\":[{\"name\":\"newFeePercent\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FeeTransfer\",\"inputs\":[{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"recipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsDeposited\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"FundsSlashed\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Initialized\",\"inputs\":[{\"name\":\"version\",\"type\":\"uint64\",\"indexed\":false,\"internalType\":\"uint64\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"InsufficientFundsToSlash\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"providerStake\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"residualAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"penaltyFee\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"},{\"name\":\"slashAmt\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"MinStakeUpdated\",\"inputs\":[{\"name\":\"newMinStake\",\"type\":\"uint256\",\"indexed\":true,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferStarted\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"OwnershipTransferred\",\"inputs\":[{\"name\":\"previousOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"newOwner\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Paused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PenaltyFeeRecipientUpdated\",\"inputs\":[{\"name\":\"newPenaltyFeeRecipient\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"PreconfManagerUpdated\",\"inputs\":[{\"name\":\"newPreconfManager\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"ProviderRegistered\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"stakedAmount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"TransferToBidderFailed\",\"inputs\":[{\"name\":\"bidder\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unpaused\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"indexed\":false,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Unstake\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"timestamp\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Upgraded\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"Withdraw\",\"inputs\":[{\"name\":\"provider\",\"type\":\"address\",\"indexed\":true,\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"event\",\"name\":\"WithdrawalDelayUpdated\",\"inputs\":[{\"name\":\"newWithdrawalDelay\",\"type\":\"uint256\",\"indexed\":false,\"internalType\":\"uint256\"}],\"anonymous\":false},{\"type\":\"error\",\"name\":\"AddressEmptyCode\",\"inputs\":[{\"name\":\"target\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"AtLeastOneBLSKeyRequired\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BLSSignatureInvalid\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"BidderAmountIsZero\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"BidderWithdrawalTransferFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"DelayNotPassed\",\"inputs\":[{\"name\":\"withdrawalRequestTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"withdrawalDelay\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"currentBlockTimestamp\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ERC1967InvalidImplementation\",\"inputs\":[{\"name\":\"implementation\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ERC1967NonPayable\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"EnforcedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ExpectedPause\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FailedInnerCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"FeeRecipientIsZero\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InsufficientStake\",\"inputs\":[{\"name\":\"stake\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"minStake\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidBLSPublicKeyLength\",\"inputs\":[{\"name\":\"length\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"expectedLength\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"InvalidFallback\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidInitialization\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"InvalidReceive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NoStakeToWithdraw\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NoUnstakeRequest\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"NotInitializing\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"NotPreconfContract\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"preconfManager\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableInvalidOwner\",\"inputs\":[{\"name\":\"owner\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"OwnableUnauthorizedAccount\",\"inputs\":[{\"name\":\"account\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PayoutPeriodMustBePositive\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"PendingWithdrawalRequest\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PreconfManagerNotSet\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"ProviderAlreadyRegistered\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"ProviderCommitmentsPending\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"numPending\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ProviderNotRegistered\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]},{\"type\":\"error\",\"name\":\"PublicKeyLengthInvalid\",\"inputs\":[{\"name\":\"exp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"got\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"ReentrancyGuardReentrantCall\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"SignatureLengthInvalid\",\"inputs\":[{\"name\":\"exp\",\"type\":\"uint256\",\"internalType\":\"uint256\"},{\"name\":\"got\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"StakeTransferFailed\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"},{\"name\":\"amount\",\"type\":\"uint256\",\"internalType\":\"uint256\"}]},{\"type\":\"error\",\"name\":\"TransferToRecipientFailed\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnauthorizedCallContext\",\"inputs\":[]},{\"type\":\"error\",\"name\":\"UUPSUnsupportedProxiableUUID\",\"inputs\":[{\"name\":\"slot\",\"type\":\"bytes32\",\"internalType\":\"bytes32\"}]},{\"type\":\"error\",\"name\":\"UnstakeRequestExists\",\"inputs\":[{\"name\":\"sender\",\"type\":\"address\",\"internalType\":\"address\"}]}]", } // ProviderregistryABI is the input ABI used to generate the binding from. @@ -645,21 +645,21 @@ func (_Providerregistry *ProviderregistryCallerSession) Paused() (bool, error) { // PenaltyFeeTracker is a free data retrieval call binding the contract method 0xf1aab9ee. // -// Solidity: function penaltyFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +// Solidity: function penaltyFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutTimePeriod) func (_Providerregistry *ProviderregistryCaller) PenaltyFeeTracker(opts *bind.CallOpts) (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }, error) { var out []interface{} err := _Providerregistry.contract.Call(opts, &out, "penaltyFeeTracker") outstruct := new(struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }) if err != nil { return *outstruct, err @@ -667,8 +667,8 @@ func (_Providerregistry *ProviderregistryCaller) PenaltyFeeTracker(opts *bind.Ca outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) outstruct.AccumulatedAmount = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - outstruct.LastPayoutBlock = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) - outstruct.PayoutPeriodBlocks = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.LastPayoutTimestamp = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.PayoutTimePeriod = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) return *outstruct, err @@ -676,24 +676,24 @@ func (_Providerregistry *ProviderregistryCaller) PenaltyFeeTracker(opts *bind.Ca // PenaltyFeeTracker is a free data retrieval call binding the contract method 0xf1aab9ee. // -// Solidity: function penaltyFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +// Solidity: function penaltyFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutTimePeriod) func (_Providerregistry *ProviderregistrySession) PenaltyFeeTracker() (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }, error) { return _Providerregistry.Contract.PenaltyFeeTracker(&_Providerregistry.CallOpts) } // PenaltyFeeTracker is a free data retrieval call binding the contract method 0xf1aab9ee. // -// Solidity: function penaltyFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutBlock, uint256 payoutPeriodBlocks) +// Solidity: function penaltyFeeTracker() view returns(address recipient, uint256 accumulatedAmount, uint256 lastPayoutTimestamp, uint256 payoutTimePeriod) func (_Providerregistry *ProviderregistryCallerSession) PenaltyFeeTracker() (struct { - Recipient common.Address - AccumulatedAmount *big.Int - LastPayoutBlock *big.Int - PayoutPeriodBlocks *big.Int + Recipient common.Address + AccumulatedAmount *big.Int + LastPayoutTimestamp *big.Int + PayoutTimePeriod *big.Int }, error) { return _Providerregistry.Contract.PenaltyFeeTracker(&_Providerregistry.CallOpts) } @@ -1032,23 +1032,23 @@ func (_Providerregistry *ProviderregistryTransactorSession) DelegateStake(provid // Initialize is a paid mutator transaction binding the contract method 0xecfa5f52. // -// Solidity: function initialize(uint256 _minStake, address _penaltyFeeRecipient, uint256 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _penaltyFeePayoutPeriodBlocks) returns() -func (_Providerregistry *ProviderregistryTransactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int, _penaltyFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _withdrawalDelay *big.Int, _penaltyFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "initialize", _minStake, _penaltyFeeRecipient, _feePercent, _owner, _withdrawalDelay, _penaltyFeePayoutPeriodBlocks) +// Solidity: function initialize(uint256 _minStake, address _penaltyFeeRecipient, uint256 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _penaltyFeePayoutPeriod) returns() +func (_Providerregistry *ProviderregistryTransactor) Initialize(opts *bind.TransactOpts, _minStake *big.Int, _penaltyFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _withdrawalDelay *big.Int, _penaltyFeePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "initialize", _minStake, _penaltyFeeRecipient, _feePercent, _owner, _withdrawalDelay, _penaltyFeePayoutPeriod) } // Initialize is a paid mutator transaction binding the contract method 0xecfa5f52. // -// Solidity: function initialize(uint256 _minStake, address _penaltyFeeRecipient, uint256 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _penaltyFeePayoutPeriodBlocks) returns() -func (_Providerregistry *ProviderregistrySession) Initialize(_minStake *big.Int, _penaltyFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _withdrawalDelay *big.Int, _penaltyFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _penaltyFeeRecipient, _feePercent, _owner, _withdrawalDelay, _penaltyFeePayoutPeriodBlocks) +// Solidity: function initialize(uint256 _minStake, address _penaltyFeeRecipient, uint256 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _penaltyFeePayoutPeriod) returns() +func (_Providerregistry *ProviderregistrySession) Initialize(_minStake *big.Int, _penaltyFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _withdrawalDelay *big.Int, _penaltyFeePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _penaltyFeeRecipient, _feePercent, _owner, _withdrawalDelay, _penaltyFeePayoutPeriod) } // Initialize is a paid mutator transaction binding the contract method 0xecfa5f52. // -// Solidity: function initialize(uint256 _minStake, address _penaltyFeeRecipient, uint256 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _penaltyFeePayoutPeriodBlocks) returns() -func (_Providerregistry *ProviderregistryTransactorSession) Initialize(_minStake *big.Int, _penaltyFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _withdrawalDelay *big.Int, _penaltyFeePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _penaltyFeeRecipient, _feePercent, _owner, _withdrawalDelay, _penaltyFeePayoutPeriodBlocks) +// Solidity: function initialize(uint256 _minStake, address _penaltyFeeRecipient, uint256 _feePercent, address _owner, uint256 _withdrawalDelay, uint256 _penaltyFeePayoutPeriod) returns() +func (_Providerregistry *ProviderregistryTransactorSession) Initialize(_minStake *big.Int, _penaltyFeeRecipient common.Address, _feePercent *big.Int, _owner common.Address, _withdrawalDelay *big.Int, _penaltyFeePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.Initialize(&_Providerregistry.TransactOpts, _minStake, _penaltyFeeRecipient, _feePercent, _owner, _withdrawalDelay, _penaltyFeePayoutPeriod) } // ManuallyWithdrawPenaltyFee is a paid mutator transaction binding the contract method 0x7df61dc1. @@ -1156,25 +1156,25 @@ func (_Providerregistry *ProviderregistryTransactorSession) RenounceOwnership() return _Providerregistry.Contract.RenounceOwnership(&_Providerregistry.TransactOpts) } -// SetFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0x7cbf9f6e. +// SetFeePayoutPeriod is a paid mutator transaction binding the contract method 0xcc5ad073. // -// Solidity: function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) returns() -func (_Providerregistry *ProviderregistryTransactor) SetFeePayoutPeriodBlocks(opts *bind.TransactOpts, _feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Providerregistry.contract.Transact(opts, "setFeePayoutPeriodBlocks", _feePayoutPeriodBlocks) +// Solidity: function setFeePayoutPeriod(uint256 _feePayoutPeriod) returns() +func (_Providerregistry *ProviderregistryTransactor) SetFeePayoutPeriod(opts *bind.TransactOpts, _feePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Providerregistry.contract.Transact(opts, "setFeePayoutPeriod", _feePayoutPeriod) } -// SetFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0x7cbf9f6e. +// SetFeePayoutPeriod is a paid mutator transaction binding the contract method 0xcc5ad073. // -// Solidity: function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) returns() -func (_Providerregistry *ProviderregistrySession) SetFeePayoutPeriodBlocks(_feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Providerregistry.Contract.SetFeePayoutPeriodBlocks(&_Providerregistry.TransactOpts, _feePayoutPeriodBlocks) +// Solidity: function setFeePayoutPeriod(uint256 _feePayoutPeriod) returns() +func (_Providerregistry *ProviderregistrySession) SetFeePayoutPeriod(_feePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.SetFeePayoutPeriod(&_Providerregistry.TransactOpts, _feePayoutPeriod) } -// SetFeePayoutPeriodBlocks is a paid mutator transaction binding the contract method 0x7cbf9f6e. +// SetFeePayoutPeriod is a paid mutator transaction binding the contract method 0xcc5ad073. // -// Solidity: function setFeePayoutPeriodBlocks(uint256 _feePayoutPeriodBlocks) returns() -func (_Providerregistry *ProviderregistryTransactorSession) SetFeePayoutPeriodBlocks(_feePayoutPeriodBlocks *big.Int) (*types.Transaction, error) { - return _Providerregistry.Contract.SetFeePayoutPeriodBlocks(&_Providerregistry.TransactOpts, _feePayoutPeriodBlocks) +// Solidity: function setFeePayoutPeriod(uint256 _feePayoutPeriod) returns() +func (_Providerregistry *ProviderregistryTransactorSession) SetFeePayoutPeriod(_feePayoutPeriod *big.Int) (*types.Transaction, error) { + return _Providerregistry.Contract.SetFeePayoutPeriod(&_Providerregistry.TransactOpts, _feePayoutPeriod) } // SetMinStake is a paid mutator transaction binding the contract method 0x8c80fd90. @@ -1772,9 +1772,9 @@ func (_Providerregistry *ProviderregistryFilterer) ParseBidderWithdrawSlashedAmo return event, nil } -// ProviderregistryFeePayoutPeriodBlocksUpdatedIterator is returned from FilterFeePayoutPeriodBlocksUpdated and is used to iterate over the raw logs and unpacked data for FeePayoutPeriodBlocksUpdated events raised by the Providerregistry contract. -type ProviderregistryFeePayoutPeriodBlocksUpdatedIterator struct { - Event *ProviderregistryFeePayoutPeriodBlocksUpdated // Event containing the contract specifics and raw log +// ProviderregistryFeePayoutPeriodUpdatedIterator is returned from FilterFeePayoutPeriodUpdated and is used to iterate over the raw logs and unpacked data for FeePayoutPeriodUpdated events raised by the Providerregistry contract. +type ProviderregistryFeePayoutPeriodUpdatedIterator struct { + Event *ProviderregistryFeePayoutPeriodUpdated // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1788,7 +1788,7 @@ type ProviderregistryFeePayoutPeriodBlocksUpdatedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { +func (it *ProviderregistryFeePayoutPeriodUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1797,7 +1797,7 @@ func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(ProviderregistryFeePayoutPeriodBlocksUpdated) + it.Event = new(ProviderregistryFeePayoutPeriodUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1812,7 +1812,7 @@ func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(ProviderregistryFeePayoutPeriodBlocksUpdated) + it.Event = new(ProviderregistryFeePayoutPeriodUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1828,51 +1828,51 @@ func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Error() error { +func (it *ProviderregistryFeePayoutPeriodUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *ProviderregistryFeePayoutPeriodBlocksUpdatedIterator) Close() error { +func (it *ProviderregistryFeePayoutPeriodUpdatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// ProviderregistryFeePayoutPeriodBlocksUpdated represents a FeePayoutPeriodBlocksUpdated event raised by the Providerregistry contract. -type ProviderregistryFeePayoutPeriodBlocksUpdated struct { - NewFeePayoutPeriodBlocks *big.Int - Raw types.Log // Blockchain specific contextual infos +// ProviderregistryFeePayoutPeriodUpdated represents a FeePayoutPeriodUpdated event raised by the Providerregistry contract. +type ProviderregistryFeePayoutPeriodUpdated struct { + NewFeePayoutPeriod *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterFeePayoutPeriodBlocksUpdated is a free log retrieval operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// FilterFeePayoutPeriodUpdated is a free log retrieval operation binding the contract event 0xefd7aa598240290a91e058be60cb457231c4874ea3d308c1df4c14156d58f9cb. // -// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) -func (_Providerregistry *ProviderregistryFilterer) FilterFeePayoutPeriodBlocksUpdated(opts *bind.FilterOpts, newFeePayoutPeriodBlocks []*big.Int) (*ProviderregistryFeePayoutPeriodBlocksUpdatedIterator, error) { +// Solidity: event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod) +func (_Providerregistry *ProviderregistryFilterer) FilterFeePayoutPeriodUpdated(opts *bind.FilterOpts, newFeePayoutPeriod []*big.Int) (*ProviderregistryFeePayoutPeriodUpdatedIterator, error) { - var newFeePayoutPeriodBlocksRule []interface{} - for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { - newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) + var newFeePayoutPeriodRule []interface{} + for _, newFeePayoutPeriodItem := range newFeePayoutPeriod { + newFeePayoutPeriodRule = append(newFeePayoutPeriodRule, newFeePayoutPeriodItem) } - logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) + logs, sub, err := _Providerregistry.contract.FilterLogs(opts, "FeePayoutPeriodUpdated", newFeePayoutPeriodRule) if err != nil { return nil, err } - return &ProviderregistryFeePayoutPeriodBlocksUpdatedIterator{contract: _Providerregistry.contract, event: "FeePayoutPeriodBlocksUpdated", logs: logs, sub: sub}, nil + return &ProviderregistryFeePayoutPeriodUpdatedIterator{contract: _Providerregistry.contract, event: "FeePayoutPeriodUpdated", logs: logs, sub: sub}, nil } -// WatchFeePayoutPeriodBlocksUpdated is a free log subscription operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// WatchFeePayoutPeriodUpdated is a free log subscription operation binding the contract event 0xefd7aa598240290a91e058be60cb457231c4874ea3d308c1df4c14156d58f9cb. // -// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) -func (_Providerregistry *ProviderregistryFilterer) WatchFeePayoutPeriodBlocksUpdated(opts *bind.WatchOpts, sink chan<- *ProviderregistryFeePayoutPeriodBlocksUpdated, newFeePayoutPeriodBlocks []*big.Int) (event.Subscription, error) { +// Solidity: event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod) +func (_Providerregistry *ProviderregistryFilterer) WatchFeePayoutPeriodUpdated(opts *bind.WatchOpts, sink chan<- *ProviderregistryFeePayoutPeriodUpdated, newFeePayoutPeriod []*big.Int) (event.Subscription, error) { - var newFeePayoutPeriodBlocksRule []interface{} - for _, newFeePayoutPeriodBlocksItem := range newFeePayoutPeriodBlocks { - newFeePayoutPeriodBlocksRule = append(newFeePayoutPeriodBlocksRule, newFeePayoutPeriodBlocksItem) + var newFeePayoutPeriodRule []interface{} + for _, newFeePayoutPeriodItem := range newFeePayoutPeriod { + newFeePayoutPeriodRule = append(newFeePayoutPeriodRule, newFeePayoutPeriodItem) } - logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FeePayoutPeriodBlocksUpdated", newFeePayoutPeriodBlocksRule) + logs, sub, err := _Providerregistry.contract.WatchLogs(opts, "FeePayoutPeriodUpdated", newFeePayoutPeriodRule) if err != nil { return nil, err } @@ -1882,8 +1882,8 @@ func (_Providerregistry *ProviderregistryFilterer) WatchFeePayoutPeriodBlocksUpd select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(ProviderregistryFeePayoutPeriodBlocksUpdated) - if err := _Providerregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { + event := new(ProviderregistryFeePayoutPeriodUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "FeePayoutPeriodUpdated", log); err != nil { return err } event.Raw = log @@ -1904,12 +1904,12 @@ func (_Providerregistry *ProviderregistryFilterer) WatchFeePayoutPeriodBlocksUpd }), nil } -// ParseFeePayoutPeriodBlocksUpdated is a log parse operation binding the contract event 0x1b8b3f7fd7594ce5b7155b4c56b19bd6a1eac8c1ec5d941635acf104c8db3571. +// ParseFeePayoutPeriodUpdated is a log parse operation binding the contract event 0xefd7aa598240290a91e058be60cb457231c4874ea3d308c1df4c14156d58f9cb. // -// Solidity: event FeePayoutPeriodBlocksUpdated(uint256 indexed newFeePayoutPeriodBlocks) -func (_Providerregistry *ProviderregistryFilterer) ParseFeePayoutPeriodBlocksUpdated(log types.Log) (*ProviderregistryFeePayoutPeriodBlocksUpdated, error) { - event := new(ProviderregistryFeePayoutPeriodBlocksUpdated) - if err := _Providerregistry.contract.UnpackLog(event, "FeePayoutPeriodBlocksUpdated", log); err != nil { +// Solidity: event FeePayoutPeriodUpdated(uint256 indexed newFeePayoutPeriod) +func (_Providerregistry *ProviderregistryFilterer) ParseFeePayoutPeriodUpdated(log types.Log) (*ProviderregistryFeePayoutPeriodUpdated, error) { + event := new(ProviderregistryFeePayoutPeriodUpdated) + if err := _Providerregistry.contract.UnpackLog(event, "FeePayoutPeriodUpdated", log); err != nil { return nil, err } event.Raw = log From c8ecbdfd0fb03ce49b93e5718d273014fcd9274f Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 24 Jun 2025 13:39:26 -0700 Subject: [PATCH 4/5] appease linter --- contracts/contracts/utils/FeePayout.sol | 36 ++++++++++++------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/contracts/contracts/utils/FeePayout.sol b/contracts/contracts/utils/FeePayout.sol index a5ed5a54a..16407fe2e 100644 --- a/contracts/contracts/utils/FeePayout.sol +++ b/contracts/contracts/utils/FeePayout.sol @@ -14,6 +14,17 @@ library FeePayout { uint256 payoutPeriodBlocks; } + struct TimestampTracker { + /// @dev Address that accumulates fees + address recipient; + /// @dev Accumulated fees since last payout + uint256 accumulatedAmount; + /// @dev Timestamp when the last fee payout was made + uint256 lastPayoutTimestamp; + /// @dev Min number of seconds (or ms on mev-commit chain) between payouts + uint256 payoutTimePeriod; + } + /// @dev Event emitted when fees are transferred to the recipient. event FeeTransfer(uint256 amount, address indexed recipient); @@ -42,24 +53,6 @@ library FeePayout { emit FeeTransfer(amountToPay, tracker.recipient); } - /// @dev Checks if a fee payout is due - /// @param tracker The FeePayout.Tracker struct - /// @return true if a payout is due, false otherwise - function isPayoutDue(Tracker storage tracker) internal view returns (bool) { - return block.number > tracker.lastPayoutBlock + tracker.payoutPeriodBlocks; - } - - struct TimestampTracker { - /// @dev Address that accumulates fees - address recipient; - /// @dev Accumulated fees since last payout - uint256 accumulatedAmount; - /// @dev Timestamp when the last fee payout was made - uint256 lastPayoutTimestamp; - /// @dev Min number of seconds (or ms on mev-commit chain) between payouts - uint256 payoutTimePeriod; - } - /// @dev Initialize a new timestamp fee tracker in storage function initTimestampTracker(TimestampTracker storage self, address _recipient, uint256 _payoutTimePeriod) internal { require(_recipient != address(0), FeeRecipientIsZero()); @@ -81,6 +74,13 @@ library FeePayout { emit FeeTransfer(amountToPay, tracker.recipient); } + /// @dev Checks if a fee payout is due + /// @param tracker The FeePayout.Tracker struct + /// @return true if a payout is due, false otherwise + function isPayoutDue(Tracker storage tracker) internal view returns (bool) { + return block.number > tracker.lastPayoutBlock + tracker.payoutPeriodBlocks; + } + /// @dev Checks if a fee payout is due by timestamp /// @param tracker The FeePayout.TimestampTracker struct /// @return true if a payout is due, false otherwise From 47e582f04ae3f02533af1cdac8c8a47f2f405077 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Thu, 26 Jun 2025 22:15:56 -0700 Subject: [PATCH 5/5] Update DeployCore.s.sol --- contracts/scripts/core/DeployCore.s.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/scripts/core/DeployCore.s.sol b/contracts/scripts/core/DeployCore.s.sol index 4b8ccd93b..d467a0c4d 100644 --- a/contracts/scripts/core/DeployCore.s.sol +++ b/contracts/scripts/core/DeployCore.s.sol @@ -33,7 +33,7 @@ contract DeployCore is Script { uint256 providerPenaltyPercent = 5 * PERCENT_MULTIPLIER; // 5% uint64 commitmentDispatchWindow = 500; uint256 withdrawalDelay = 24 hours * 1000; // 24 hours in milliseconds - uint256 protocolFeePayoutPeriodBlocks = 5 hours ; // 1 hour with 200ms blocks + uint256 protocolFeePayoutPeriod = 1 hours * 1000; // 1 hour with ms timestamps address oracleKeystoreAddress = vm.envAddress("ORACLE_KEYSTORE_ADDRESS"); require(oracleKeystoreAddress != address(0), "missing Oracle keystore address"); @@ -53,7 +53,7 @@ contract DeployCore is Script { feePercent, // _feePercent param msg.sender, // _owner param address(blockTracker), // _blockTracker param - protocolFeePayoutPeriodBlocks)) // _protocolFeePayoutPeriodBlocks param + protocolFeePayoutPeriod)) // _protocolFeePayoutPeriod param ); BidderRegistry bidderRegistry = BidderRegistry(payable(bidderRegistryProxy)); console.log("BidderRegistry:", address(bidderRegistry)); @@ -66,7 +66,7 @@ contract DeployCore is Script { providerPenaltyPercent, // _feePercent param msg.sender, // _owner param withdrawalDelay, // _withdrawalDelay param - protocolFeePayoutPeriodBlocks)) // _protocolFeePayoutPeriodBlocks param + protocolFeePayoutPeriod)) // _protocolFeePayoutPeriod param ); ProviderRegistry providerRegistry = ProviderRegistry(payable(providerRegistryProxy)); console.log("ProviderRegistry:", address(providerRegistry));