From 1b667192148c010f34743206799cfb9b5eff637d Mon Sep 17 00:00:00 2001 From: brown Date: Thu, 21 Nov 2024 11:38:50 -0500 Subject: [PATCH 01/19] feat(berajs): update berachef abi and references Ref BFE-252 --- apps/hub/src/app/governance/types.ts | 1 + apps/hub/src/hooks/useCreateProposal.ts | 8 +- packages/berajs/src/abi/pol/beraChef.ts | 11533 +++++++++++++++- .../hooks/modules/bgt/useIsFriendOfTheChef.ts | 2 +- .../useRewardVaultBalanceFromStakingToken.ts | 2 +- 5 files changed, 11066 insertions(+), 480 deletions(-) diff --git a/apps/hub/src/app/governance/types.ts b/apps/hub/src/app/governance/types.ts index 1e9593ec0..75e7e8f4c 100755 --- a/apps/hub/src/app/governance/types.ts +++ b/apps/hub/src/app/governance/types.ts @@ -92,6 +92,7 @@ export type SafeProposalAction = { type: ProposalTypeEnum.UPDATE_REWARDS_GAUGE; vault: Address; isFriend: boolean; + metadata?: string | undefined; } | { type: ProposalTypeEnum.ERC20_TRANSFER; diff --git a/apps/hub/src/hooks/useCreateProposal.ts b/apps/hub/src/hooks/useCreateProposal.ts index 5a9996243..a7a23d8dd 100755 --- a/apps/hub/src/hooks/useCreateProposal.ts +++ b/apps/hub/src/hooks/useCreateProposal.ts @@ -273,8 +273,12 @@ export const useCreateProposal = ({ if (!errors.vault) { actions[idx] = encodeFunctionData({ abi: BERA_CHEF_ABI, - functionName: "updateFriendsOfTheChef", - args: [action.vault!, !!action.isFriend!], + functionName: "setVaultWhitelistedStatus", + args: [ + action.vault!, + !!action.isFriend!, + action.metadata ?? "", + ], // TODO: A third param was added for metadata. It is optional but we should include it in our action }); } } else if (action.type === ProposalTypeEnum.ERC20_TRANSFER) { diff --git a/packages/berajs/src/abi/pol/beraChef.ts b/packages/berajs/src/abi/pol/beraChef.ts index 2b56d1154..3d56605fa 100644 --- a/packages/berajs/src/abi/pol/beraChef.ts +++ b/packages/berajs/src/abi/pol/beraChef.ts @@ -1,256 +1,260 @@ export const BERA_CHEF_ABI = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view", - }, - { - type: "function", - name: "activateQueuedCuttingBoard", - inputs: [ - { name: "valPubkey", type: "bytes", internalType: "bytes" }, - { name: "blockNumber", type: "uint256", internalType: "uint256" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "beaconDepositContract", - inputs: [], - outputs: [ - { name: "", type: "address", internalType: "contract IBeaconDeposit" }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "cuttingBoardBlockDelay", - inputs: [], - outputs: [{ name: "", type: "uint64", internalType: "uint64" }], - stateMutability: "view", - }, - { - type: "function", - name: "defaultCuttingBoard", - inputs: [], - outputs: [{ name: "startBlock", type: "uint64", internalType: "uint64" }], - stateMutability: "view", - }, - { - type: "function", - name: "distributor", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, - { - type: "function", - name: "getActiveCuttingBoard", - inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBeraChef.CuttingBoard", - components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, + abi: [ + { type: "constructor", inputs: [], stateMutability: "nonpayable" }, + { + type: "function", + name: "MAX_REWARD_ALLOCATION_BLOCK_DELAY", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", + }, + { + type: "function", + name: "UPGRADE_INTERFACE_VERSION", + inputs: [], + outputs: [{ name: "", type: "string", internalType: "string" }], + stateMutability: "view", + }, + { + type: "function", + name: "activateReadyQueuedRewardAllocation", + inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "beaconDepositContract", + inputs: [], + outputs: [ { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + name: "", + type: "address", + internalType: "contract IBeaconDeposit", + }, + ], + stateMutability: "view", + }, + { + type: "function", + name: "distributor", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "factory", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "getActiveRewardAllocation", + inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "receiver", type: "address", internalType: "address" }, + { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + name: "weights", + type: "tuple[]", + internalType: "struct IBeraChef.Weight[]", + components: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], }, ], }, ], + stateMutability: "view", }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getDefaultCuttingBoard", - inputs: [], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBeraChef.CuttingBoard", - components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, + { + type: "function", + name: "getDefaultRewardAllocation", + inputs: [], + outputs: [ { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + name: "", + type: "tuple", + internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "receiver", type: "address", internalType: "address" }, + { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + name: "weights", + type: "tuple[]", + internalType: "struct IBeraChef.Weight[]", + components: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], }, ], }, ], + stateMutability: "view", }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "getQueuedCuttingBoard", - inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], - outputs: [ - { - name: "", - type: "tuple", - internalType: "struct IBeraChef.CuttingBoard", - components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, + { + type: "function", + name: "getQueuedRewardAllocation", + inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + outputs: [ { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + name: "", + type: "tuple", + internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "receiver", type: "address", internalType: "address" }, + { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + name: "weights", + type: "tuple[]", + internalType: "struct IBeraChef.Weight[]", + components: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], }, ], }, ], + stateMutability: "view", }, - ], - stateMutability: "view", - }, - { - type: "function", - name: "initialize", - inputs: [ - { name: "_distributor", type: "address", internalType: "address" }, - { name: "_governance", type: "address", internalType: "address" }, { - name: "_beaconDepositContract", - type: "address", - internalType: "address", + type: "function", + name: "getSetActiveRewardAllocation", + inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + outputs: [ + { + name: "", + type: "tuple", + internalType: "struct IBeraChef.RewardAllocation", + components: [ + { name: "startBlock", type: "uint64", internalType: "uint64" }, + { + name: "weights", + type: "tuple[]", + internalType: "struct IBeraChef.Weight[]", + components: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], + }, + ], + }, + ], + stateMutability: "view", }, { - name: "_maxNumWeightsPerCuttingBoard", - type: "uint8", - internalType: "uint8", - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "isFriendOfTheChef", - inputs: [{ name: "receiver", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isQueuedCuttingBoardReady", - inputs: [ - { name: "valPubkey", type: "bytes", internalType: "bytes" }, - { name: "blockNumber", type: "uint256", internalType: "uint256" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isReady", - inputs: [], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "maxNumWeightsPerCuttingBoard", - inputs: [], - outputs: [{ name: "", type: "uint8", internalType: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, - { - type: "function", - name: "proxiableUUID", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "queueNewCuttingBoard", - inputs: [ - { name: "valPubkey", type: "bytes", internalType: "bytes" }, - { name: "startBlock", type: "uint64", internalType: "uint64" }, - { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", - components: [ - { name: "receiver", type: "address", internalType: "address" }, + type: "function", + name: "initialize", + inputs: [ + { name: "_distributor", type: "address", internalType: "address" }, + { name: "_factory", type: "address", internalType: "address" }, + { name: "_governance", type: "address", internalType: "address" }, + { + name: "_beaconDepositContract", + type: "address", + internalType: "address", + }, { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + name: "_maxNumWeightsPerRewardAllocation", + type: "uint8", + internalType: "uint8", }, ], + outputs: [], + stateMutability: "nonpayable", }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setCuttingBoardBlockDelay", - inputs: [ { - name: "_cuttingBoardBlockDelay", - type: "uint64", - internalType: "uint64", + type: "function", + name: "isQueuedRewardAllocationReady", + inputs: [ + { name: "valPubkey", type: "bytes", internalType: "bytes" }, + { name: "blockNumber", type: "uint256", internalType: "uint256" }, + ], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setDefaultCuttingBoard", - inputs: [ - { - name: "cb", - type: "tuple", - internalType: "struct IBeraChef.CuttingBoard", - components: [ + { + type: "function", + name: "isReady", + inputs: [], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "isWhitelistedVault", + inputs: [ + { name: "receiver", type: "address", internalType: "address" }, + ], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "maxNumWeightsPerRewardAllocation", + inputs: [], + outputs: [{ name: "", type: "uint8", internalType: "uint8" }], + stateMutability: "view", + }, + { + type: "function", + name: "owner", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "proxiableUUID", + inputs: [], + outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + stateMutability: "view", + }, + { + type: "function", + name: "queueNewRewardAllocation", + inputs: [ + { name: "valPubkey", type: "bytes", internalType: "bytes" }, { name: "startBlock", type: "uint64", internalType: "uint64" }, { name: "weights", @@ -266,203 +270,224 @@ export const BERA_CHEF_ABI = [ ], }, ], + outputs: [], + stateMutability: "nonpayable", }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setMaxNumWeightsPerCuttingBoard", - inputs: [ { - name: "_maxNumWeightsPerCuttingBoard", - type: "uint8", - internalType: "uint8", + type: "function", + name: "renounceOwnership", + inputs: [], + outputs: [], + stateMutability: "nonpayable", }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateFriendsOfTheChef", - inputs: [ - { name: "receiver", type: "address", internalType: "address" }, - { name: "isFriend", type: "bool", internalType: "bool" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "upgradeToAndCall", - inputs: [ - { name: "newImplementation", type: "address", internalType: "address" }, - { name: "data", type: "bytes", internalType: "bytes" }, - ], - outputs: [], - stateMutability: "payable", - }, - { - type: "event", - name: "ActivateCuttingBoard", - inputs: [ { - name: "valPubkey", - type: "bytes", - indexed: true, - internalType: "bytes", + type: "function", + name: "rewardAllocationBlockDelay", + inputs: [], + outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "view", }, { - name: "startBlock", - type: "uint64", - indexed: false, - internalType: "uint64", + type: "function", + name: "setDefaultRewardAllocation", + inputs: [ + { + name: "ra", + type: "tuple", + internalType: "struct IBeraChef.RewardAllocation", + components: [ + { name: "startBlock", type: "uint64", internalType: "uint64" }, + { + name: "weights", + type: "tuple[]", + internalType: "struct IBeraChef.Weight[]", + components: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], + }, + ], + }, + ], + outputs: [], + stateMutability: "nonpayable", }, { - name: "weights", - type: "tuple[]", - indexed: false, - internalType: "struct IBeraChef.Weight[]", - components: [ - { name: "receiver", type: "address", internalType: "address" }, + type: "function", + name: "setMaxNumWeightsPerRewardAllocation", + inputs: [ { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + name: "_maxNumWeightsPerRewardAllocation", + type: "uint8", + internalType: "uint8", }, ], + outputs: [], + stateMutability: "nonpayable", }, - ], - anonymous: false, - }, - { - type: "event", - name: "CuttingBoardBlockDelaySet", - inputs: [ { - name: "cuttingBoardBlockDelay", - type: "uint64", - indexed: false, - internalType: "uint64", + type: "function", + name: "setRewardAllocationBlockDelay", + inputs: [ + { + name: "_rewardAllocationBlockDelay", + type: "uint64", + internalType: "uint64", + }, + ], + outputs: [], + stateMutability: "nonpayable", }, - ], - anonymous: false, - }, - { - type: "event", - name: "FriendsOfTheChefUpdated", - inputs: [ { - name: "receiver", - type: "address", - indexed: true, - internalType: "address", + type: "function", + name: "setVaultWhitelistedStatus", + inputs: [ + { name: "receiver", type: "address", internalType: "address" }, + { name: "isWhitelisted", type: "bool", internalType: "bool" }, + { name: "metadata", type: "string", internalType: "string" }, + ], + outputs: [], + stateMutability: "nonpayable", }, - { name: "isFriend", type: "bool", indexed: true, internalType: "bool" }, - ], - anonymous: false, - }, - { - type: "event", - name: "Initialized", - inputs: [ { - name: "version", - type: "uint64", - indexed: false, - internalType: "uint64", + type: "function", + name: "transferOwnership", + inputs: [ + { name: "newOwner", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", }, - ], - anonymous: false, - }, - { - type: "event", - name: "MaxNumWeightsPerCuttingBoardSet", - inputs: [ { - name: "maxNumWeightsPerCuttingBoard", - type: "uint8", - indexed: false, - internalType: "uint8", + type: "function", + name: "updateWhitelistedVaultMetadata", + inputs: [ + { name: "vault", type: "address", internalType: "address" }, + { name: "metadata", type: "string", internalType: "string" }, + ], + outputs: [], + stateMutability: "nonpayable", }, - ], - anonymous: false, - }, - { - type: "event", - name: "OwnershipTransferred", - inputs: [ { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", + type: "function", + name: "upgradeToAndCall", + inputs: [ + { + name: "newImplementation", + type: "address", + internalType: "address", + }, + { name: "data", type: "bytes", internalType: "bytes" }, + ], + outputs: [], + stateMutability: "payable", }, { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", + type: "event", + name: "ActivateRewardAllocation", + inputs: [ + { + name: "valPubkey", + type: "bytes", + indexed: true, + internalType: "bytes", + }, + { + name: "startBlock", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + { + name: "weights", + type: "tuple[]", + indexed: false, + internalType: "struct IBeraChef.Weight[]", + components: [ + { name: "receiver", type: "address", internalType: "address" }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], + }, + ], + anonymous: false, }, - ], - anonymous: false, - }, - { - type: "event", - name: "QueueCuttingBoard", - inputs: [ { - name: "valPubkey", - type: "bytes", - indexed: true, - internalType: "bytes", + type: "event", + name: "Initialized", + inputs: [ + { + name: "version", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, }, { - name: "startBlock", - type: "uint64", - indexed: false, - internalType: "uint64", + type: "event", + name: "MaxNumWeightsPerRewardAllocationSet", + inputs: [ + { + name: "maxNumWeightsPerRewardAllocation", + type: "uint8", + indexed: false, + internalType: "uint8", + }, + ], + anonymous: false, }, { - name: "weights", - type: "tuple[]", - indexed: false, - internalType: "struct IBeraChef.Weight[]", - components: [ - { name: "receiver", type: "address", internalType: "address" }, + type: "event", + name: "OwnershipTransferred", + inputs: [ + { + name: "previousOwner", + type: "address", + indexed: true, + internalType: "address", + }, { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + name: "newOwner", + type: "address", + indexed: true, + internalType: "address", }, ], + anonymous: false, }, - ], - anonymous: false, - }, - { - type: "event", - name: "SetDefaultCuttingBoard", - inputs: [ - { - name: "cuttingBoard", - type: "tuple", - indexed: false, - internalType: "struct IBeraChef.CuttingBoard", - components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, + { + type: "event", + name: "QueueRewardAllocation", + inputs: [ + { + name: "valPubkey", + type: "bytes", + indexed: true, + internalType: "bytes", + }, + { + name: "startBlock", + type: "uint64", + indexed: false, + internalType: "uint64", + }, { name: "weights", type: "tuple[]", + indexed: false, internalType: "struct IBeraChef.Weight[]", components: [ { name: "receiver", type: "address", internalType: "address" }, @@ -474,106 +499,10662 @@ export const BERA_CHEF_ABI = [ ], }, ], + anonymous: false, }, - ], - anonymous: false, - }, - { - type: "event", - name: "Upgraded", - inputs: [ { - name: "implementation", - type: "address", - indexed: true, - internalType: "address", + type: "event", + name: "RewardAllocationBlockDelaySet", + inputs: [ + { + name: "rewardAllocationBlockDelay", + type: "uint64", + indexed: false, + internalType: "uint64", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "SetDefaultRewardAllocation", + inputs: [ + { + name: "rewardAllocation", + type: "tuple", + indexed: false, + internalType: "struct IBeraChef.RewardAllocation", + components: [ + { name: "startBlock", type: "uint64", internalType: "uint64" }, + { + name: "weights", + type: "tuple[]", + internalType: "struct IBeraChef.Weight[]", + components: [ + { + name: "receiver", + type: "address", + internalType: "address", + }, + { + name: "percentageNumerator", + type: "uint96", + internalType: "uint96", + }, + ], + }, + ], + }, + ], + anonymous: false, + }, + { + type: "event", + name: "Upgraded", + inputs: [ + { + name: "implementation", + type: "address", + indexed: true, + internalType: "address", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "VaultWhitelistedStatusUpdated", + inputs: [ + { + name: "receiver", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "isWhitelisted", + type: "bool", + indexed: true, + internalType: "bool", + }, + { + name: "metadata", + type: "string", + indexed: false, + internalType: "string", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "WhitelistedVaultMetadataUpdated", + inputs: [ + { + name: "receiver", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "metadata", + type: "string", + indexed: false, + internalType: "string", + }, + ], + anonymous: false, + }, + { + type: "error", + name: "AddressEmptyCode", + inputs: [{ name: "target", type: "address", internalType: "address" }], + }, + { type: "error", name: "AlreadyInitialized", inputs: [] }, + { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, + { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, + { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, + { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, + { type: "error", name: "CommissionNotQueued", inputs: [] }, + { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, + { type: "error", name: "DepositValueTooHigh", inputs: [] }, + { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, + { + type: "error", + name: "ERC1967InvalidImplementation", + inputs: [ + { name: "implementation", type: "address", internalType: "address" }, + ], + }, + { type: "error", name: "ERC1967NonPayable", inputs: [] }, + { type: "error", name: "FailedCall", inputs: [] }, + { type: "error", name: "IncentiveRateTooHigh", inputs: [] }, + { type: "error", name: "IndexOutOfRange", inputs: [] }, + { type: "error", name: "InsolventReward", inputs: [] }, + { type: "error", name: "InsufficientDelegateStake", inputs: [] }, + { type: "error", name: "InsufficientDeposit", inputs: [] }, + { type: "error", name: "InsufficientSelfStake", inputs: [] }, + { type: "error", name: "InsufficientStake", inputs: [] }, + { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, + { + type: "error", + name: "InvalidActivateCommissionChangeDelay", + inputs: [], + }, + { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, + { type: "error", name: "InvalidCommission", inputs: [] }, + { type: "error", name: "InvalidCredentialsLength", inputs: [] }, + { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, + { type: "error", name: "InvalidInitialization", inputs: [] }, + { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, + { type: "error", name: "InvalidProof", inputs: [] }, + { type: "error", name: "InvalidPubKeyLength", inputs: [] }, + { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, + { type: "error", name: "InvalidRewardConvexity", inputs: [] }, + { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, + { type: "error", name: "InvalidSignatureLength", inputs: [] }, + { type: "error", name: "InvalidStartBlock", inputs: [] }, + { type: "error", name: "InvalidateDefaultRewardAllocation", inputs: [] }, + { type: "error", name: "InvariantCheckFailed", inputs: [] }, + { + type: "error", + name: "MaxNumWeightsPerRewardAllocationIsZero", + inputs: [], + }, + { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, + { type: "error", name: "NotAContract", inputs: [] }, + { type: "error", name: "NotApprovedSender", inputs: [] }, + { type: "error", name: "NotBGT", inputs: [] }, + { type: "error", name: "NotBlockRewardController", inputs: [] }, + { type: "error", name: "NotDelegate", inputs: [] }, + { type: "error", name: "NotDistributor", inputs: [] }, + { type: "error", name: "NotEnoughBalance", inputs: [] }, + { type: "error", name: "NotEnoughBoostedBalance", inputs: [] }, + { type: "error", name: "NotEnoughTime", inputs: [] }, + { type: "error", name: "NotFactoryVault", inputs: [] }, + { type: "error", name: "NotFeeCollector", inputs: [] }, + { type: "error", name: "NotGovernance", inputs: [] }, + { type: "error", name: "NotIncentiveManager", inputs: [] }, + { type: "error", name: "NotInitializing", inputs: [] }, + { type: "error", name: "NotNewOperator", inputs: [] }, + { type: "error", name: "NotOperator", inputs: [] }, + { type: "error", name: "NotRootFollower", inputs: [] }, + { type: "error", name: "NotWhitelistedVault", inputs: [] }, + { type: "error", name: "OperatorAlreadySet", inputs: [] }, + { + 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: "PayoutAmountIsZero", inputs: [] }, + { type: "error", name: "RewardAllocationAlreadyQueued", inputs: [] }, + { type: "error", name: "RewardAllocationBlockDelayTooLarge", inputs: [] }, + { type: "error", name: "RewardCycleNotEnded", inputs: [] }, + { type: "error", name: "RewardsDurationIsZero", inputs: [] }, + { type: "error", name: "StakeAmountIsZero", inputs: [] }, + { type: "error", name: "TimestampAlreadyProcessed", inputs: [] }, + { + type: "error", + name: "TokenAlreadyWhitelistedOrLimitReached", + inputs: [], + }, + { type: "error", name: "TokenNotWhitelisted", inputs: [] }, + { type: "error", name: "TooManyWeights", inputs: [] }, + { type: "error", name: "TotalSupplyOverflow", inputs: [] }, + { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, + { + type: "error", + name: "UUPSUnsupportedProxiableUUID", + inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }], }, + { type: "error", name: "VaultAlreadyExists", inputs: [] }, + { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, + { type: "error", name: "ZeroAddress", inputs: [] }, + { type: "error", name: "ZeroOperatorOnFirstDeposit", inputs: [] }, + { type: "error", name: "ZeroPercentageWeight", inputs: [] }, ], - anonymous: false, - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [{ name: "target", type: "address", internalType: "address" }], - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, - { type: "error", name: "BlockDoesNotExist", inputs: [] }, - { type: "error", name: "BlockNotInBuffer", inputs: [] }, - { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, - { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, - { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, - { - type: "error", - name: "ERC1967InvalidImplementation", - inputs: [ - { name: "implementation", type: "address", internalType: "address" }, - ], - }, - { type: "error", name: "ERC1967NonPayable", inputs: [] }, - { type: "error", name: "FailedInnerCall", inputs: [] }, - { type: "error", name: "InsolventReward", inputs: [] }, - { type: "error", name: "InsufficientDelegateStake", inputs: [] }, - { type: "error", name: "InsufficientSelfStake", inputs: [] }, - { type: "error", name: "InsufficientStake", inputs: [] }, - { type: "error", name: "InvalidCommission", inputs: [] }, - { type: "error", name: "InvalidCuttingBoardWeights", inputs: [] }, - { type: "error", name: "InvalidInitialization", inputs: [] }, - { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, - { type: "error", name: "InvalidMinter", inputs: [] }, - { type: "error", name: "InvalidStartBlock", inputs: [] }, - { type: "error", name: "InvariantCheckFailed", inputs: [] }, - { type: "error", name: "MaxNumWeightsPerCuttingBoardIsZero", inputs: [] }, - { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, - { type: "error", name: "NotActionableBlock", inputs: [] }, - { type: "error", name: "NotApprovedSender", inputs: [] }, - { type: "error", name: "NotBGT", inputs: [] }, - { type: "error", name: "NotBlockRewardController", inputs: [] }, - { type: "error", name: "NotDelegate", inputs: [] }, - { type: "error", name: "NotDistributor", inputs: [] }, - { type: "error", name: "NotEnoughBalance", inputs: [] }, - { type: "error", name: "NotEnoughTime", inputs: [] }, - { type: "error", name: "NotFeeCollector", inputs: [] }, - { type: "error", name: "NotFriendOfTheChef", inputs: [] }, - { type: "error", name: "NotGovernance", inputs: [] }, - { type: "error", name: "NotInitializing", inputs: [] }, - { type: "error", name: "NotOperator", inputs: [] }, - { type: "error", name: "NotProver", inputs: [] }, - { type: "error", name: "NotRootFollower", inputs: [] }, - { - 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: "PayoutAmountIsZero", inputs: [] }, - { type: "error", name: "PayoutTokenIsZero", inputs: [] }, - { type: "error", name: "QueuedCuttingBoardNotFound", inputs: [] }, - { type: "error", name: "QueuedCuttingBoardNotReady", inputs: [] }, - { type: "error", name: "RewardCycleNotEnded", inputs: [] }, - { type: "error", name: "RewardCycleStarted", inputs: [] }, - { type: "error", name: "RewardsDurationIsZero", inputs: [] }, - { type: "error", name: "StakeAmountIsZero", inputs: [] }, - { type: "error", name: "TokenAlreadyWhitelistedOrLimitReached", inputs: [] }, - { type: "error", name: "TokenNotWhitelisted", inputs: [] }, - { type: "error", name: "TooManyWeights", inputs: [] }, - { type: "error", name: "TotalSupplyOverflow", inputs: [] }, - { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }], - }, - { - type: "error", - name: "Unauthorized", - inputs: [{ name: "", type: "address", internalType: "address" }], + bytecode: { + object: + "0x60a060405230608052348015610013575f80fd5b5061001c610021565b6100d3565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000900460ff16156100715760405163f92ee8a960e01b815260040160405180910390fd5b80546001600160401b03908116146100d05780546001600160401b0319166001600160401b0390811782556040519081527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50565b608051612c686100f95f395f81816117ac015281816117d501526119f10152612c685ff3fe6080604052600436106101a3575f3560e01c80638da5cb5b116100e7578063c45a015511610087578063e5eb90aa11610062578063e5eb90aa1461056e578063eafe0f4c1461058d578063f2fde38b146105b9578063fb9f6fde146105d8575f80fd5b8063c45a015514610504578063c89f266514610530578063da6f75631461054f575f80fd5b8063a2ce2773116100c2578063a2ce27731461040b578063ad3cb1cc14610439578063bfe109281461048e578063c35569cd146104b9575f80fd5b80638da5cb5b1461036c5780639ca2626c146103d6578063a094a031146103f5575f80fd5b806352d1902d1161015257806369ed17081161012d57806369ed1708146102eb5780636ed0bf9a1461030a578063715018a614610329578063722f8e0a1461033d575f80fd5b806352d1902d1461027257806353a35d1d1461029457806366204c78146102cc575f80fd5b80634ce34525116101825780634ce34525146102115780634ecbf5c0146102405780634f1ef2861461025f575f80fd5b80628c2676146101a757806317dbf270146101c8578063230288ce146101f2575b5f80fd5b3480156101b2575f80fd5b506101c66101c13660046121f0565b6105f7565b005b3480156101d3575f80fd5b506101dc61088b565b6040516101e99190612259565b60405180910390f35b3480156101fd575f80fd5b506101dc61020c366004612333565b61095c565b34801561021c575f80fd5b50610227621410b881565b60405167ffffffffffffffff90911681526020016101e9565b34801561024b575f80fd5b506101dc61025a366004612333565b610a4c565b6101c661026d366004612434565b610a72565b34801561027d575f80fd5b50610286610a91565b6040519081526020016101e9565b34801561029f575f80fd5b506002546102279074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b3480156102d7575f80fd5b506101c66102e6366004612494565b610abf565b3480156102f6575f80fd5b506101c66103053660046124cb565b610bb9565b348015610315575f80fd5b506101c6610324366004612333565b610c68565b348015610334575f80fd5b506101c6610e0f565b348015610348575f80fd5b5061035c61035736600461250e565b610e22565b60405190151581526020016101e9565b348015610377575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e9565b3480156103e1575f80fd5b506101c66103f036600461256b565b610e76565b348015610400575f80fd5b50600754151561035c565b348015610416575f80fd5b5061035c610425366004612586565b60056020525f908152604090205460ff1681565b348015610444575f80fd5b506104816040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516101e991906125a1565b348015610499575f80fd5b505f546103b19073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104c4575f80fd5b506002546104f2907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b60405160ff90911681526020016101e9565b34801561050f575f80fd5b506001546103b19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561053b575f80fd5b506101c661054a3660046125f4565b610f3d565b34801561055a575f80fd5b506101dc610569366004612333565b610fa3565b348015610579575f80fd5b506101c661058836600461262b565b61117b565b348015610598575f80fd5b506002546103b19073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105c4575f80fd5b506101c66105d3366004612586565b611429565b3480156105e3575f80fd5b506101c66105f23660046126db565b611491565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156106415750825b90505f8267ffffffffffffffff16600114801561065d5750303b155b90508115801561066b575080155b156106a2576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156107035784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b61070c8861177b565b5f805473ffffffffffffffffffffffffffffffffffffffff808d167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316178355600180548d831690841617905560028054918b169190921617905560ff8716900361079c5761079c7fa4cc22ed0000000000000000000000000000000000000000000000000000000061178c565b60405160ff871681527f1f427f3160f84ab8033ba8e3550b2a3f178241305e86660a221c0dc52f3bc9ae9060200160405180910390a1600280547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000060ff891602179055831561087f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b604080518082019091525f8152606060208201526040805180820182526006805467ffffffffffffffff1682526007805484516020828102820181019096528181529394929383860193909291905f9084015b8282101561094f575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16818301528252600190920191016108de565b5050505081525050905090565b604080518082019091525f8152606060208201526003838360405161098292919061273d565b9081526040805191829003602090810183208383018352805467ffffffffffffffff1684526001810180548451818502810185019095528085529193858401939092905f9084015b82821015610a3b575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16818301528252600190920191016109ca565b505050508152505090505b92915050565b604080518082019091525f8152606060208201526004838360405161098292919061273d565b610a7a611794565b610a8382611898565b610a8d82826118a0565b5050565b5f610a9a6119d9565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610ac7611a48565b8060ff165f03610afa57610afa7fa4cc22ed0000000000000000000000000000000000000000000000000000000061178c565b60075460ff82161015610b3057610b307f3e38573f0000000000000000000000000000000000000000000000000000000061178c565b600280547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000060ff8416908102919091179091556040519081527f1f427f3160f84ab8033ba8e3550b2a3f178241305e86660a221c0dc52f3bc9ae906020015b60405180910390a150565b610bc1611a48565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526005602052604090205460ff16610c1657610c167f364078500000000000000000000000000000000000000000000000000000000061178c565b8173ffffffffffffffffffffffffffffffffffffffff167fb10c3a0623fdc435deba8729692b1a7c6c1886b7466c8cffa3ccdb42042ffbc582604051610c5c91906125a1565b60405180910390a25050565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610caf57610caf7f385296d50000000000000000000000000000000000000000000000000000000061178c565b610cba828243610e22565b15610a8d575f60048383604051610cd292919061273d565b908152604051908190036020018120805490925067ffffffffffffffff16908290600390610d03908790879061273d565b908152604051908190036020019020815481547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff90911617815560018083018054610d5b92840191906120d6565b5050604051610d6e91508590859061273d565b60405180910390207f09fed3850dff4fef07a5284847da937f94021882ecab1c143fcacd69e5451bd88284600101604051610daa92919061274c565b60405180910390a260048484604051610dc492919061273d565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001681555f610e07600183018261218f565b505050505050565b610e17611a48565b610e205f611ad6565b565b5f8060048585604051610e3692919061273d565b9081526040519081900360200190205467ffffffffffffffff1690508015801590610e6b5750828167ffffffffffffffff1611155b9150505b9392505050565b610e7e611a48565b621410b867ffffffffffffffff82161115610ebc57610ebc7f462a2bb20000000000000000000000000000000000000000000000000000000061178c565b600280547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fd30a76f5419042e46e49eaf91b6a0f0feaaa673b6db586a63d3e8e79d4bf208190602001610bae565b610f45611a48565b610f5a610f5560208301836127c5565b611b6b565b7f63a1be039047941d4150a7feb1920b5fadcbf022e1a21334fba542a52eabdaf781604051610f8991906128ba565b60405180910390a1806006610f9e8282612a02565b505050565b604080518082019091525f8152606060208201525f60038484604051610fca92919061273d565b9081526040805191829003602090810183208383018352805467ffffffffffffffff1684526001810180548451818502810185019095528085529193858401939092905f9084015b82821015611083575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101611012565b50505091525050805190915067ffffffffffffffff16158015906110af57506110af8160200151611d03565b156110bb579050610a46565b6040805180820182526006805467ffffffffffffffff1682526007805484516020828102820181019096528181529394929383860193909291905f9084015b8282101561116b575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16818301528252600190920191016110fa565b5050509152509095945050505050565b6002546040517f9eaffa960000000000000000000000000000000000000000000000000000000081528691869173ffffffffffffffffffffffffffffffffffffffff90911690639eaffa96906111d79085908590600401612b25565b602060405180830381865afa1580156111f2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112169190612b71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611271576112717f7c214f040000000000000000000000000000000000000000000000000000000061178c565b6002546112a09074010000000000000000000000000000000000000000900467ffffffffffffffff1643612b8c565b8567ffffffffffffffff16116112d9576112d97fec2caa0d0000000000000000000000000000000000000000000000000000000061178c565b5f600488886040516112ec92919061273d565b908152604051908190036020019020805490915067ffffffffffffffff1615611338576113387f3be31f8c0000000000000000000000000000000000000000000000000000000061178c565b6113428585611b6b565b80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8716178155600181015f5b858110156113ca578187878381811061139557611395612b9f565b83546001810185555f9485526020909420604090910292909201929190910190506113c0828261297d565b505060010161137a565b5088886040516113db92919061273d565b60405180910390207f22fe555512d9a04d20e3735ac5fe7a73227c2c6398f1453a5d60ce7aaf5de2ae88888860405161141693929190612bcc565b60405180910390a2505050505050505050565b611431611a48565b73ffffffffffffffffffffffffffffffffffffffff8116611485576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b61148e81611ad6565b50565b611499611a48565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016831515179055816115bf5761158d6006600101805480602002602001604051908101604052809291908181526020015f905b82821015611584575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101611513565b50505050611d03565b6115ba576115ba7f13134d240000000000000000000000000000000000000000000000000000000061178c565b611725565b5f8373ffffffffffffffffffffffffffffffffffffffff166351ed6a306040518163ffffffff1660e01b8152600401602060405180830381865afa158015611609573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061162d9190612b71565b6001546040517f0eb9af3800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80841660048301529293505f9290911690630eb9af3890602401602060405180830381865afa1580156116a0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116c49190612b71565b90508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611722576117227f08519afa0000000000000000000000000000000000000000000000000000000061178c565b50505b8115158373ffffffffffffffffffffffffffffffffffffffff167fad865159180d43e1aedae6624a0e9e20d86e07afb82a96f8f9a8b2f3294e16c08360405161176e91906125a1565b60405180910390a3505050565b611783611daf565b61148e81611e16565b805f5260045ffd5b3073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148061186157507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166118487f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610e20576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148e611a48565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611925575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261192291810190612bef565b60015b611973576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240161147c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146119cf576040517faa1d49a40000000000000000000000000000000000000000000000000000000081526004810182905260240161147c565b610f9e8383611e1e565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e20576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33611a877f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610e20576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161147c565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6002547c0100000000000000000000000000000000000000000000000000000000900460ff16811115611bc157611bc17ff6fae7210000000000000000000000000000000000000000000000000000000061178c565b5f805b82811015611cc25736848483818110611bdf57611bdf612b9f565b9050604002019050806020016020810190611bfa9190612c06565b6bffffffffffffffffffffffff165f03611c3757611c377f978dc0400000000000000000000000000000000000000000000000000000000061178c565b60055f611c476020840184612586565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f205460ff16611c9d57611c9d7f364078500000000000000000000000000000000000000000000000000000000061178c565b611cad6040820160208301612c06565b611cb79084612c21565b925050600101611bc4565b506bffffffffffffffffffffffff811661271014610f9e57610f9e7f13134d240000000000000000000000000000000000000000000000000000000061178c565b80516002545f91907c0100000000000000000000000000000000000000000000000000000000900460ff16811115611d3d57505f92915050565b5f5b81811015611da55760055f858381518110611d5c57611d5c612b9f565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f205460ff16611d9d57505f9392505050565b600101611d3f565b5060019392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610e20576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611431611daf565b611e2782611e80565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115611e7857610f9e8282611f4e565b610a8d611fcd565b8073ffffffffffffffffffffffffffffffffffffffff163b5f03611ee8576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161147c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff1684604051611f779190612c45565b5f60405180830381855af49150503d805f8114611faf576040519150601f19603f3d011682016040523d82523d5f602084013e611fb4565b606091505b5091509150611fc4858383612005565b95945050505050565b3415610e20576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261201a5761201582612094565b610e6f565b815115801561203e575073ffffffffffffffffffffffffffffffffffffffff84163b155b1561208d576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161147c565b5080610e6f565b8051156120a45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828054828255905f5260205f2090810192821561217f575f5260205f209182015b8281111561217f57825482547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116908117835583546bffffffffffffffffffffffff74010000000000000000000000000000000000000000918290041602178255600192830192909101906120f7565b5061218b9291506121a6565b5090565b5080545f8255905f5260205f209081019061148e91905b5b8082111561218b575f81556001016121a7565b73ffffffffffffffffffffffffffffffffffffffff8116811461148e575f80fd5b803560ff811681146121eb575f80fd5b919050565b5f805f805f60a08688031215612204575f80fd5b853561220f816121ba565b9450602086013561221f816121ba565b9350604086013561222f816121ba565b9250606086013561223f816121ba565b915061224d608087016121db565b90509295509295909350565b6020808252825167ffffffffffffffff1682820152828101516040808401528051606084018190525f929190910190829060808501905b808310156122e457835173ffffffffffffffffffffffffffffffffffffffff81511683526bffffffffffffffffffffffff602082015116602084015250604082019150602084019350600183019250612290565b5095945050505050565b5f8083601f8401126122fe575f80fd5b50813567ffffffffffffffff811115612315575f80fd5b60208301915083602082850101111561232c575f80fd5b9250929050565b5f8060208385031215612344575f80fd5b823567ffffffffffffffff81111561235a575f80fd5b612366858286016122ee565b90969095509350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8067ffffffffffffffff8411156123b9576123b9612372565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff8211171561240657612406612372565b60405283815290508082840185101561241d575f80fd5b838360208301375f60208583010152509392505050565b5f8060408385031215612445575f80fd5b8235612450816121ba565b9150602083013567ffffffffffffffff81111561246b575f80fd5b8301601f8101851361247b575f80fd5b61248a8582356020840161239f565b9150509250929050565b5f602082840312156124a4575f80fd5b610e6f826121db565b5f82601f8301126124bc575f80fd5b610e6f8383356020850161239f565b5f80604083850312156124dc575f80fd5b82356124e7816121ba565b9150602083013567ffffffffffffffff811115612502575f80fd5b61248a858286016124ad565b5f805f60408486031215612520575f80fd5b833567ffffffffffffffff811115612536575f80fd5b612542868287016122ee565b909790965060209590950135949350505050565b67ffffffffffffffff8116811461148e575f80fd5b5f6020828403121561257b575f80fd5b8135610e6f81612556565b5f60208284031215612596575f80fd5b8135610e6f816121ba565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f60208284031215612604575f80fd5b813567ffffffffffffffff81111561261a575f80fd5b820160408185031215610e6f575f80fd5b5f805f805f6060868803121561263f575f80fd5b853567ffffffffffffffff811115612655575f80fd5b612661888289016122ee565b909650945050602086013561267581612556565b9250604086013567ffffffffffffffff811115612690575f80fd5b8601601f810188136126a0575f80fd5b803567ffffffffffffffff8111156126b6575f80fd5b8860208260061b84010111156126ca575f80fd5b959894975092955050506020019190565b5f805f606084860312156126ed575f80fd5b83356126f8816121ba565b92506020840135801515811461270c575f80fd5b9150604084013567ffffffffffffffff811115612727575f80fd5b612733868287016124ad565b9150509250925092565b818382375f9101908152919050565b5f6040820167ffffffffffffffff8516835260406020840152808454808352606085019150855f5260205f2092505f5b818110156127b957835473ffffffffffffffffffffffffffffffffffffffff8116845260a01c60208401526001938401936040909301920161277c565b50909695505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126127f8575f80fd5b83018035915067ffffffffffffffff821115612812575f80fd5b6020019150600681901b360382131561232c575f80fd5b6bffffffffffffffffffffffff8116811461148e575f80fd5b8183526020830192505f815f5b848110156128b0575f8235612863816121ba565b73ffffffffffffffffffffffffffffffffffffffff168752602083013561288981612829565b6bffffffffffffffffffffffff16602088015250604095860195919091019060010161284f565b5093949350505050565b602081525f82356128ca81612556565b67ffffffffffffffff811660208401525060208301357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261290f575f80fd5b830160208101903567ffffffffffffffff81111561292b575f80fd5b8060061b360382131561293c575f80fd5b604080850152611fc4606085018284612842565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8135612988816121ba565b73ffffffffffffffffffffffffffffffffffffffff81169050807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825560208301356129d781612829565b60a01b7fffffffffffffffffffffffff00000000000000000000000000000000000000001617905550565b8135612a0d81612556565b67ffffffffffffffff81167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008354161782555060208201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1833603018112612a74575f80fd5b8201803567ffffffffffffffff811115612a8c575f80fd5b6020820191508060061b3603821315612aa3575f80fd5b6001830168010000000000000000821115612ac057612ac0612372565b805482825580831015612af5575f828152602090208381019082015b80821015612af2575f8255600182019150612adc565b50505b505f90815260208120905b82811015610e0757612b12848361297d565b6040939093019260019182019101612b00565b60208152816020820152818360408301375f818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b5f60208284031215612b81575f80fd5b8151610e6f816121ba565b80820180821115610a4657610a46612950565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b67ffffffffffffffff84168152604060208201525f611fc4604083018486612842565b5f60208284031215612bff575f80fd5b5051919050565b5f60208284031215612c16575f80fd5b8135610e6f81612829565b6bffffffffffffffffffffffff8181168382160190811115610a4657610a46612950565b5f82518060208501845e5f92019182525091905056fea164736f6c634300081a000a", + sourceMap: + "1003:13362:242:-:0;;;1171:4:69;1128:48;;2811:53:242;;;;;;;;;-1:-1:-1;2835:22:242;:20;:22::i;:::-;1003:13362;;7711:422:68;8870:21;7900:15;;;;;;;7896:76;;;7938:23;;-1:-1:-1;;;7938:23:68;;;;;;;;;;;7896:76;7985:14;;-1:-1:-1;;;;;7985:14:68;;;:34;7981:146;;8035:33;;-1:-1:-1;;;;;;8035:33:68;-1:-1:-1;;;;;8035:33:68;;;;;8087:29;;158:50:300;;;8087:29:68;;146:2:300;131:18;8087:29:68;;;;;;;7981:146;7760:373;7711:422::o;14:200:300:-;1003:13362:242;;;;;;;;;;;;;;;;;;;;;;", + linkReferences: {}, + }, + deployedBytecode: { + object: + "0x6080604052600436106101a3575f3560e01c80638da5cb5b116100e7578063c45a015511610087578063e5eb90aa11610062578063e5eb90aa1461056e578063eafe0f4c1461058d578063f2fde38b146105b9578063fb9f6fde146105d8575f80fd5b8063c45a015514610504578063c89f266514610530578063da6f75631461054f575f80fd5b8063a2ce2773116100c2578063a2ce27731461040b578063ad3cb1cc14610439578063bfe109281461048e578063c35569cd146104b9575f80fd5b80638da5cb5b1461036c5780639ca2626c146103d6578063a094a031146103f5575f80fd5b806352d1902d1161015257806369ed17081161012d57806369ed1708146102eb5780636ed0bf9a1461030a578063715018a614610329578063722f8e0a1461033d575f80fd5b806352d1902d1461027257806353a35d1d1461029457806366204c78146102cc575f80fd5b80634ce34525116101825780634ce34525146102115780634ecbf5c0146102405780634f1ef2861461025f575f80fd5b80628c2676146101a757806317dbf270146101c8578063230288ce146101f2575b5f80fd5b3480156101b2575f80fd5b506101c66101c13660046121f0565b6105f7565b005b3480156101d3575f80fd5b506101dc61088b565b6040516101e99190612259565b60405180910390f35b3480156101fd575f80fd5b506101dc61020c366004612333565b61095c565b34801561021c575f80fd5b50610227621410b881565b60405167ffffffffffffffff90911681526020016101e9565b34801561024b575f80fd5b506101dc61025a366004612333565b610a4c565b6101c661026d366004612434565b610a72565b34801561027d575f80fd5b50610286610a91565b6040519081526020016101e9565b34801561029f575f80fd5b506002546102279074010000000000000000000000000000000000000000900467ffffffffffffffff1681565b3480156102d7575f80fd5b506101c66102e6366004612494565b610abf565b3480156102f6575f80fd5b506101c66103053660046124cb565b610bb9565b348015610315575f80fd5b506101c6610324366004612333565b610c68565b348015610334575f80fd5b506101c6610e0f565b348015610348575f80fd5b5061035c61035736600461250e565b610e22565b60405190151581526020016101e9565b348015610377575f80fd5b507f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101e9565b3480156103e1575f80fd5b506101c66103f036600461256b565b610e76565b348015610400575f80fd5b50600754151561035c565b348015610416575f80fd5b5061035c610425366004612586565b60056020525f908152604090205460ff1681565b348015610444575f80fd5b506104816040518060400160405280600581526020017f352e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516101e991906125a1565b348015610499575f80fd5b505f546103b19073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104c4575f80fd5b506002546104f2907c0100000000000000000000000000000000000000000000000000000000900460ff1681565b60405160ff90911681526020016101e9565b34801561050f575f80fd5b506001546103b19073ffffffffffffffffffffffffffffffffffffffff1681565b34801561053b575f80fd5b506101c661054a3660046125f4565b610f3d565b34801561055a575f80fd5b506101dc610569366004612333565b610fa3565b348015610579575f80fd5b506101c661058836600461262b565b61117b565b348015610598575f80fd5b506002546103b19073ffffffffffffffffffffffffffffffffffffffff1681565b3480156105c4575f80fd5b506101c66105d3366004612586565b611429565b3480156105e3575f80fd5b506101c66105f23660046126db565b611491565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156106415750825b90505f8267ffffffffffffffff16600114801561065d5750303b155b90508115801561066b575080155b156106a2576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156107035784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b61070c8861177b565b5f805473ffffffffffffffffffffffffffffffffffffffff808d167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316178355600180548d831690841617905560028054918b169190921617905560ff8716900361079c5761079c7fa4cc22ed0000000000000000000000000000000000000000000000000000000061178c565b60405160ff871681527f1f427f3160f84ab8033ba8e3550b2a3f178241305e86660a221c0dc52f3bc9ae9060200160405180910390a1600280547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000060ff891602179055831561087f5784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b50505050505050505050565b604080518082019091525f8152606060208201526040805180820182526006805467ffffffffffffffff1682526007805484516020828102820181019096528181529394929383860193909291905f9084015b8282101561094f575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16818301528252600190920191016108de565b5050505081525050905090565b604080518082019091525f8152606060208201526003838360405161098292919061273d565b9081526040805191829003602090810183208383018352805467ffffffffffffffff1684526001810180548451818502810185019095528085529193858401939092905f9084015b82821015610a3b575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16818301528252600190920191016109ca565b505050508152505090505b92915050565b604080518082019091525f8152606060208201526004838360405161098292919061273d565b610a7a611794565b610a8382611898565b610a8d82826118a0565b5050565b5f610a9a6119d9565b507f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc90565b610ac7611a48565b8060ff165f03610afa57610afa7fa4cc22ed0000000000000000000000000000000000000000000000000000000061178c565b60075460ff82161015610b3057610b307f3e38573f0000000000000000000000000000000000000000000000000000000061178c565b600280547fffffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffff167c010000000000000000000000000000000000000000000000000000000060ff8416908102919091179091556040519081527f1f427f3160f84ab8033ba8e3550b2a3f178241305e86660a221c0dc52f3bc9ae906020015b60405180910390a150565b610bc1611a48565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526005602052604090205460ff16610c1657610c167f364078500000000000000000000000000000000000000000000000000000000061178c565b8173ffffffffffffffffffffffffffffffffffffffff167fb10c3a0623fdc435deba8729692b1a7c6c1886b7466c8cffa3ccdb42042ffbc582604051610c5c91906125a1565b60405180910390a25050565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610caf57610caf7f385296d50000000000000000000000000000000000000000000000000000000061178c565b610cba828243610e22565b15610a8d575f60048383604051610cd292919061273d565b908152604051908190036020018120805490925067ffffffffffffffff16908290600390610d03908790879061273d565b908152604051908190036020019020815481547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff90911617815560018083018054610d5b92840191906120d6565b5050604051610d6e91508590859061273d565b60405180910390207f09fed3850dff4fef07a5284847da937f94021882ecab1c143fcacd69e5451bd88284600101604051610daa92919061274c565b60405180910390a260048484604051610dc492919061273d565b90815260405190819003602001902080547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001681555f610e07600183018261218f565b505050505050565b610e17611a48565b610e205f611ad6565b565b5f8060048585604051610e3692919061273d565b9081526040519081900360200190205467ffffffffffffffff1690508015801590610e6b5750828167ffffffffffffffff1611155b9150505b9392505050565b610e7e611a48565b621410b867ffffffffffffffff82161115610ebc57610ebc7f462a2bb20000000000000000000000000000000000000000000000000000000061178c565b600280547fffffffff0000000000000000ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000067ffffffffffffffff8416908102919091179091556040519081527fd30a76f5419042e46e49eaf91b6a0f0feaaa673b6db586a63d3e8e79d4bf208190602001610bae565b610f45611a48565b610f5a610f5560208301836127c5565b611b6b565b7f63a1be039047941d4150a7feb1920b5fadcbf022e1a21334fba542a52eabdaf781604051610f8991906128ba565b60405180910390a1806006610f9e8282612a02565b505050565b604080518082019091525f8152606060208201525f60038484604051610fca92919061273d565b9081526040805191829003602090810183208383018352805467ffffffffffffffff1684526001810180548451818502810185019095528085529193858401939092905f9084015b82821015611083575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101611012565b50505091525050805190915067ffffffffffffffff16158015906110af57506110af8160200151611d03565b156110bb579050610a46565b6040805180820182526006805467ffffffffffffffff1682526007805484516020828102820181019096528181529394929383860193909291905f9084015b8282101561116b575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff16818301528252600190920191016110fa565b5050509152509095945050505050565b6002546040517f9eaffa960000000000000000000000000000000000000000000000000000000081528691869173ffffffffffffffffffffffffffffffffffffffff90911690639eaffa96906111d79085908590600401612b25565b602060405180830381865afa1580156111f2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112169190612b71565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611271576112717f7c214f040000000000000000000000000000000000000000000000000000000061178c565b6002546112a09074010000000000000000000000000000000000000000900467ffffffffffffffff1643612b8c565b8567ffffffffffffffff16116112d9576112d97fec2caa0d0000000000000000000000000000000000000000000000000000000061178c565b5f600488886040516112ec92919061273d565b908152604051908190036020019020805490915067ffffffffffffffff1615611338576113387f3be31f8c0000000000000000000000000000000000000000000000000000000061178c565b6113428585611b6b565b80547fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000001667ffffffffffffffff8716178155600181015f5b858110156113ca578187878381811061139557611395612b9f565b83546001810185555f9485526020909420604090910292909201929190910190506113c0828261297d565b505060010161137a565b5088886040516113db92919061273d565b60405180910390207f22fe555512d9a04d20e3735ac5fe7a73227c2c6398f1453a5d60ce7aaf5de2ae88888860405161141693929190612bcc565b60405180910390a2505050505050505050565b611431611a48565b73ffffffffffffffffffffffffffffffffffffffff8116611485576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b61148e81611ad6565b50565b611499611a48565b73ffffffffffffffffffffffffffffffffffffffff83165f90815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016831515179055816115bf5761158d6006600101805480602002602001604051908101604052809291908181526020015f905b82821015611584575f848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff811682527401000000000000000000000000000000000000000090046bffffffffffffffffffffffff1681830152825260019092019101611513565b50505050611d03565b6115ba576115ba7f13134d240000000000000000000000000000000000000000000000000000000061178c565b611725565b5f8373ffffffffffffffffffffffffffffffffffffffff166351ed6a306040518163ffffffff1660e01b8152600401602060405180830381865afa158015611609573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061162d9190612b71565b6001546040517f0eb9af3800000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80841660048301529293505f9290911690630eb9af3890602401602060405180830381865afa1580156116a0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116c49190612b71565b90508073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614611722576117227f08519afa0000000000000000000000000000000000000000000000000000000061178c565b50505b8115158373ffffffffffffffffffffffffffffffffffffffff167fad865159180d43e1aedae6624a0e9e20d86e07afb82a96f8f9a8b2f3294e16c08360405161176e91906125a1565b60405180910390a3505050565b611783611daf565b61148e81611e16565b805f5260045ffd5b3073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016148061186157507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166118487f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610e20576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61148e611a48565b8173ffffffffffffffffffffffffffffffffffffffff166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611925575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261192291810190612bef565b60015b611973576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8316600482015260240161147c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc81146119cf576040517faa1d49a40000000000000000000000000000000000000000000000000000000081526004810182905260240161147c565b610f9e8383611e1e565b3073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e20576040517fe07c8dba00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33611a877f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c1993005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614610e20576040517f118cdaa700000000000000000000000000000000000000000000000000000000815233600482015260240161147c565b7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c19930080547fffffffffffffffffffffffff0000000000000000000000000000000000000000811673ffffffffffffffffffffffffffffffffffffffff848116918217845560405192169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a3505050565b6002547c0100000000000000000000000000000000000000000000000000000000900460ff16811115611bc157611bc17ff6fae7210000000000000000000000000000000000000000000000000000000061178c565b5f805b82811015611cc25736848483818110611bdf57611bdf612b9f565b9050604002019050806020016020810190611bfa9190612c06565b6bffffffffffffffffffffffff165f03611c3757611c377f978dc0400000000000000000000000000000000000000000000000000000000061178c565b60055f611c476020840184612586565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040015f205460ff16611c9d57611c9d7f364078500000000000000000000000000000000000000000000000000000000061178c565b611cad6040820160208301612c06565b611cb79084612c21565b925050600101611bc4565b506bffffffffffffffffffffffff811661271014610f9e57610f9e7f13134d240000000000000000000000000000000000000000000000000000000061178c565b80516002545f91907c0100000000000000000000000000000000000000000000000000000000900460ff16811115611d3d57505f92915050565b5f5b81811015611da55760055f858381518110611d5c57611d5c612b9f565b6020908102919091018101515173ffffffffffffffffffffffffffffffffffffffff1682528101919091526040015f205460ff16611d9d57505f9392505050565b600101611d3f565b5060019392505050565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005468010000000000000000900460ff16610e20576040517fd7e6bcf800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611431611daf565b611e2782611e80565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a2805115611e7857610f9e8282611f4e565b610a8d611fcd565b8073ffffffffffffffffffffffffffffffffffffffff163b5f03611ee8576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8216600482015260240161147c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff1684604051611f779190612c45565b5f60405180830381855af49150503d805f8114611faf576040519150601f19603f3d011682016040523d82523d5f602084013e611fb4565b606091505b5091509150611fc4858383612005565b95945050505050565b3415610e20576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261201a5761201582612094565b610e6f565b815115801561203e575073ffffffffffffffffffffffffffffffffffffffff84163b155b1561208d576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8516600482015260240161147c565b5080610e6f565b8051156120a45780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828054828255905f5260205f2090810192821561217f575f5260205f209182015b8281111561217f57825482547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116908117835583546bffffffffffffffffffffffff74010000000000000000000000000000000000000000918290041602178255600192830192909101906120f7565b5061218b9291506121a6565b5090565b5080545f8255905f5260205f209081019061148e91905b5b8082111561218b575f81556001016121a7565b73ffffffffffffffffffffffffffffffffffffffff8116811461148e575f80fd5b803560ff811681146121eb575f80fd5b919050565b5f805f805f60a08688031215612204575f80fd5b853561220f816121ba565b9450602086013561221f816121ba565b9350604086013561222f816121ba565b9250606086013561223f816121ba565b915061224d608087016121db565b90509295509295909350565b6020808252825167ffffffffffffffff1682820152828101516040808401528051606084018190525f929190910190829060808501905b808310156122e457835173ffffffffffffffffffffffffffffffffffffffff81511683526bffffffffffffffffffffffff602082015116602084015250604082019150602084019350600183019250612290565b5095945050505050565b5f8083601f8401126122fe575f80fd5b50813567ffffffffffffffff811115612315575f80fd5b60208301915083602082850101111561232c575f80fd5b9250929050565b5f8060208385031215612344575f80fd5b823567ffffffffffffffff81111561235a575f80fd5b612366858286016122ee565b90969095509350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f8067ffffffffffffffff8411156123b9576123b9612372565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff8211171561240657612406612372565b60405283815290508082840185101561241d575f80fd5b838360208301375f60208583010152509392505050565b5f8060408385031215612445575f80fd5b8235612450816121ba565b9150602083013567ffffffffffffffff81111561246b575f80fd5b8301601f8101851361247b575f80fd5b61248a8582356020840161239f565b9150509250929050565b5f602082840312156124a4575f80fd5b610e6f826121db565b5f82601f8301126124bc575f80fd5b610e6f8383356020850161239f565b5f80604083850312156124dc575f80fd5b82356124e7816121ba565b9150602083013567ffffffffffffffff811115612502575f80fd5b61248a858286016124ad565b5f805f60408486031215612520575f80fd5b833567ffffffffffffffff811115612536575f80fd5b612542868287016122ee565b909790965060209590950135949350505050565b67ffffffffffffffff8116811461148e575f80fd5b5f6020828403121561257b575f80fd5b8135610e6f81612556565b5f60208284031215612596575f80fd5b8135610e6f816121ba565b602081525f82518060208401528060208501604085015e5f6040828501015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011684010191505092915050565b5f60208284031215612604575f80fd5b813567ffffffffffffffff81111561261a575f80fd5b820160408185031215610e6f575f80fd5b5f805f805f6060868803121561263f575f80fd5b853567ffffffffffffffff811115612655575f80fd5b612661888289016122ee565b909650945050602086013561267581612556565b9250604086013567ffffffffffffffff811115612690575f80fd5b8601601f810188136126a0575f80fd5b803567ffffffffffffffff8111156126b6575f80fd5b8860208260061b84010111156126ca575f80fd5b959894975092955050506020019190565b5f805f606084860312156126ed575f80fd5b83356126f8816121ba565b92506020840135801515811461270c575f80fd5b9150604084013567ffffffffffffffff811115612727575f80fd5b612733868287016124ad565b9150509250925092565b818382375f9101908152919050565b5f6040820167ffffffffffffffff8516835260406020840152808454808352606085019150855f5260205f2092505f5b818110156127b957835473ffffffffffffffffffffffffffffffffffffffff8116845260a01c60208401526001938401936040909301920161277c565b50909695505050505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126127f8575f80fd5b83018035915067ffffffffffffffff821115612812575f80fd5b6020019150600681901b360382131561232c575f80fd5b6bffffffffffffffffffffffff8116811461148e575f80fd5b8183526020830192505f815f5b848110156128b0575f8235612863816121ba565b73ffffffffffffffffffffffffffffffffffffffff168752602083013561288981612829565b6bffffffffffffffffffffffff16602088015250604095860195919091019060010161284f565b5093949350505050565b602081525f82356128ca81612556565b67ffffffffffffffff811660208401525060208301357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261290f575f80fd5b830160208101903567ffffffffffffffff81111561292b575f80fd5b8060061b360382131561293c575f80fd5b604080850152611fc4606085018284612842565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8135612988816121ba565b73ffffffffffffffffffffffffffffffffffffffff81169050807fffffffffffffffffffffffff000000000000000000000000000000000000000083541617825560208301356129d781612829565b60a01b7fffffffffffffffffffffffff00000000000000000000000000000000000000001617905550565b8135612a0d81612556565b67ffffffffffffffff81167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008354161782555060208201357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1833603018112612a74575f80fd5b8201803567ffffffffffffffff811115612a8c575f80fd5b6020820191508060061b3603821315612aa3575f80fd5b6001830168010000000000000000821115612ac057612ac0612372565b805482825580831015612af5575f828152602090208381019082015b80821015612af2575f8255600182019150612adc565b50505b505f90815260208120905b82811015610e0757612b12848361297d565b6040939093019260019182019101612b00565b60208152816020820152818360408301375f818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b5f60208284031215612b81575f80fd5b8151610e6f816121ba565b80820180821115610a4657610a46612950565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b67ffffffffffffffff84168152604060208201525f611fc4604083018486612842565b5f60208284031215612bff575f80fd5b5051919050565b5f60208284031215612c16575f80fd5b8135610e6f81612829565b6bffffffffffffffffffffffff8181168382160190811115610a4657610a46612950565b5f82518060208501845e5f92019182525091905056fea164736f6c634300081a000a", + sourceMap: + "1003:13362:242:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2870:890;;;;;;;;;;-1:-1:-1;2870:890:242;;;;;:::i;:::-;;:::i;:::-;;11190:133;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;10984:170;;;;;;;;;;-1:-1:-1;10984:170:242;;;;;:::i;:::-;;:::i;1277:68::-;;;;;;;;;;;;1336:9;1277:68;;;;;3010:18:300;2998:31;;;2980:50;;2968:2;2953:18;1277:68:242;2836:200:300;10781:167:242;;;;;;;;;;-1:-1:-1;10781:167:242;;;;;:::i;:::-;;:::i;4161:214:69:-;;;;;;:::i;:::-;;:::i;3708:134::-;;;;;;;;;;;;;:::i;:::-;;;4803:25:300;;;4791:2;4776:18;3708:134:69;4657:177:300;1956:40:242;;;;;;;;;;-1:-1:-1;1956:40:242;;;;;;;;;;;4808:684;;;;;;;;;;-1:-1:-1;4808:684:242;;;;;:::i;:::-;;:::i;6990:275::-;;;;;;;;;;-1:-1:-1;6990:275:242;;;;;:::i;:::-;;:::i;9041:522::-;;;;;;;;;;-1:-1:-1;9041:522:242;;;;;:::i;:::-;;:::i;3155:101:58:-;;;;;;;;;;;;;:::i;11359:256:242:-;;;;;;;;;;-1:-1:-1;11359:256:242;;;;;:::i;:::-;;:::i;:::-;;;6361:14:300;;6354:22;6336:41;;6324:2;6309:18;11359:256:242;6196:187:300;2441:144:58;;;;;;;;;;-1:-1:-1;1313:22:58;2570:8;;;2441:144;;;6564:42:300;6552:55;;;6534:74;;6522:2;6507:18;2441:144:58;6388:226:300;5528:399:242;;;;;;;;;;-1:-1:-1;5528:399:242;;;;;:::i;:::-;;:::i;11651:175::-;;;;;;;;;;-1:-1:-1;11777:31:242;:38;:42;;11651:175;;2530:59;;;;;;;;;;-1:-1:-1;2530:59:242;;;;;:::i;:::-;;;;;;;;;;;;;;;;1819:58:69;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;1692:26:242:-;;;;;;;;;;-1:-1:-1;1692:26:242;;;;;;;;2069:45;;;;;;;;;;-1:-1:-1;2069:45:242;;;;;;;;;;;;;;7909:4:300;7897:17;;;7879:36;;7867:2;7852:18;2069:45:242;7737:184:300;1790:22:242;;;;;;;;;;-1:-1:-1;1790:22:242;;;;;;;;7301:260;;;;;;;;;;-1:-1:-1;7301:260:242;;;;;:::i;:::-;;:::i;10051:694::-;;;;;;;;;;-1:-1:-1;10051:694:242;;;;;:::i;:::-;;:::i;7880:1125::-;;;;;;;;;;-1:-1:-1;7880:1125:242;;;;;:::i;:::-;;:::i;1819:43::-;;;;;;;;;;-1:-1:-1;1819:43:242;;;;;;;;3405:215:58;;;;;;;;;;-1:-1:-1;3405:215:58;;;;;:::i;:::-;;:::i;5963:991:242:-;;;;;;;;;;-1:-1:-1;5963:991:242;;;;;:::i;:::-;;:::i;2870:890::-;8870:21:68;4302:15;;;;;;;4301:16;;4348:14;;4158:30;4726:16;;:34;;;;;4746:14;4726:34;4706:54;;4770:17;4790:11;:16;;4805:1;4790:16;:50;;;;-1:-1:-1;4818:4:68;4810:25;:30;4790:50;4770:70;;4856:12;4855:13;:30;;;;;4873:12;4872:13;4855:30;4851:91;;;4908:23;;;;;;;;;;;;;;4851:91;4951:18;;;;4968:1;4951:18;;;4979:67;;;;5013:22;;;;;;;;4979:67;3121:27:242::1;3136:11;3121:14;:27::i;:::-;3214:11;:26:::0;;::::1;::::0;;::::1;::::0;;;::::1;;::::0;;;3306:18;;;;::::1;::::0;;::::1;;::::0;;3390:21:::1;:62:::0;;;;::::1;::::0;;;::::1;;::::0;;3466:38:::1;::::0;::::1;::::0;;3462:129:::1;;3520:60;:47:::0;:58:::1;:60::i;:::-;3605:70;::::0;7909:4:300;7897:17;;7879:36;;3605:70:242::1;::::0;7867:2:300;7852:18;3605:70:242::1;;;;;;;3685:32;:68:::0;;;::::1;::::0;::::1;::::0;::::1;;;::::0;;5066:101:68;;;;5100:23;;;;;;5142:14;;-1:-1:-1;2980:50:300;;5142:14:68;;2968:2:300;2953:18;5142:14:68;;;;;;;5066:101;4092:1081;;;;;2870:890:242;;;;;:::o;11190:133::-;-1:-1:-1;;;;;;;;;;;;;;;;;11286:30:242;;;;;;;;11293:23;11286:30;;;;;;;;;;;;;;;;;;;;;;;;;;;11293:23;;11286:30;;;;;;;;-1:-1:-1;;11286:30:242;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11190:133;:::o;10984:170::-;-1:-1:-1;;;;;;;;;;;;;;;;;11113:23:242;11137:9;;11113:34;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;11106:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11113:34;;11106:41;;;;;;;-1:-1:-1;;11106:41:242;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10984:170;;;;;:::o;10781:167::-;-1:-1:-1;;;;;;;;;;;;;;;;;10907:23:242;10931:9;;10907:34;;;;;;;:::i;4161:214:69:-;2655:13;:11;:13::i;:::-;4276:36:::1;4294:17;4276;:36::i;:::-;4322:46;4344:17;4363:4;4322:21;:46::i;:::-;4161:214:::0;;:::o;3708:134::-;3777:7;2926:20;:18;:20::i;:::-;-1:-1:-1;811:66:97::1;3708:134:69::0;:::o;4808:684:242:-;2334:13:58;:11;:13::i;:::-;4927:33:242::1;:38;;4964:1;4927:38:::0;4923:129:::1;;4981:60;:47:::0;:58:::1;:60::i;:::-;5202:31:::0;:38;5166:74:::1;::::0;::::1;;5162:160;;;5256:55;:42:::0;:53:::1;:55::i;:::-;5332:32;:68:::0;;;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;5415:70:::1;::::0;7879:36:300;;;5415:70:242::1;::::0;7867:2:300;7852:18;5415:70:242::1;;;;;;;;4808:684:::0;:::o;6990:275::-;2334:13:58;:11;:13::i;:::-;7103:25:242::1;::::0;::::1;;::::0;;;:18:::1;:25;::::0;;;;;::::1;;7098:98;;7144:41;:28:::0;:39:::1;:41::i;:::-;7242:5;7210:48;;;7249:8;7210:48;;;;;;:::i;:::-;;;;;;;;6990:275:::0;;:::o;9041:522::-;4195:11;;;;4181:10;:25;4177:92;;4222:36;:23;:34;:36::i;:::-;9152:54:::1;9182:9;;9193:12;9152:29;:54::i;:::-;9147:68:::0;9208:7:::1;9147:68;9224:28;9255:23;9279:9;;9255:34;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;9319:14;;9255:34;;-1:-1:-1;9319:14:242::1;;::::0;9255:34;;9343:23:::1;::::0;:34:::1;::::0;9367:9;;;;9343:34:::1;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;:40;;;;;::::1;;::::0;;::::1;;::::0;;;;;::::1;::::0;;::::1;::::0;;::::1;::::0;;::::1;:::i;:::-;-1:-1:-1::0;;9398:60:242::1;::::0;::::1;::::0;-1:-1:-1;9423:9:242;;;;9398:60:::1;:::i;:::-;;;;;;;;;9434:10;9446:3;:11;;9398:60;;;;;;;:::i;:::-;;;;;;;;9522:23;9546:9;;9522:34;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;9515:41;;;::::1;::::0;;9522:34:::1;9515:41;::::0;;::::1;9522:34:::0;9515:41:::1;:::i;:::-;;;9137:426;;9041:522:::0;;:::o;3155:101:58:-;2334:13;:11;:13::i;:::-;3219:30:::1;3246:1;3219:18;:30::i;:::-;3155:101::o:0;11359:256:242:-;11466:4;11482:17;11502:23;11526:9;;11502:34;;;;;;;:::i;:::-;;;;;;;;;;;;;;:45;;;;-1:-1:-1;11564:15:242;;;;;:44;;;11597:11;11583:10;:25;;;;11564:44;11557:51;;;11359:256;;;;;;:::o;5528:399::-;2334:13:58;:11;:13::i;:::-;1336:9:242::1;5636:63;::::0;::::1;;5632:150;;;5715:56;:43:::0;:54:::1;:56::i;:::-;5791:26;:56:::0;;;::::1;::::0;::::1;::::0;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;5862:58:::1;::::0;2980:50:300;;;5862:58:242::1;::::0;2968:2:300;2953:18;5862:58:242::1;2836:200:300::0;7301:260:242;2334:13:58;:11;:13::i;:::-;7442:28:242::1;7459:10;;::::0;::::1;:2:::0;:10:::1;:::i;:::-;7442:16;:28::i;:::-;7486:30;7513:2;7486:30;;;;;;:::i;:::-;;;;;;;;7552:2:::0;7526:23:::1;:28;7552:2:::0;7526:23;:28:::1;:::i;:::-;-1:-1:-1::0;;;7301:260:242:o;10051:694::-;-1:-1:-1;;;;;;;;;;;;;;;;;10170:27:242;10200:23;10224:9;;10200:34;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;10170:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10200:34;;10170:64;;;;;;;-1:-1:-1;;10170:64:242;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10170:64:242;;-1:-1:-1;;10298:14:242;;10170:64;;-1:-1:-1;10298:18:242;;;;;;:53;;;10320:31;10339:3;:11;;;10320:18;:31::i;:::-;10294:94;;;10374:3;-1:-1:-1;10367:10:242;;10294:94;10708:30;;;;;;;;10715:23;10708:30;;;;;;;;;;;;;;;;;;;;;;;;;;;10715:23;;10708:30;;;;;;;;-1:-1:-1;;10708:30:242;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;10708:30:242;;-1:-1:-1;10708:30:242;;10051:694;-1:-1:-1;;;;;10051:694:242:o;7880:1125::-;4368:21;;:44;;;;;8054:9;;;;4368:21;;;;;:33;;:44;;8054:9;;;;4368:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;4354:58;;:10;:58;;;4350:122;;4428:33;:20;:31;:33::i;:::-;8186:26:::1;::::0;8171:41:::1;::::0;8186:26;;::::1;;;8171:12;:41;:::i;:::-;8157:10;:55;;;8153:125;;8228:39;:26:::0;:37:::1;:39::i;:::-;8288:28;8319:23;8343:9;;8319:34;;;;;;;:::i;:::-;::::0;;;::::1;::::0;;;;;::::1;::::0;;;8456:14;;8319:34;;-1:-1:-1;8456:14:242::1;;:18:::0;8452:100:::1;;8490:51;:38:::0;:49:::1;:51::i;:::-;8608:25;8625:7;;8608:16;:25::i;:::-;8687:27:::0;;;::::1;;::::0;::::1;;::::0;;-1:-1:-1;8758:11:242;::::1;-1:-1:-1::0;8779:152:242::1;8795:18:::0;;::::1;8779:152;;;8830:14;8850:7;;8858:1;8850:10;;;;;;;:::i;:::-;8830:31:::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;8830:31:242;;;::::1;::::0;;;8850:10:::1;::::0;;::::1;::::0;;;::::1;::::0;8830:31;;;::::1;::::0;-1:-1:-1;8830:31:242::1;8850:10:::0;8830:31;::::1;:::i;:::-;-1:-1:-1::0;;8903:3:242::1;;8779:152;;;;8967:9;;8945:53;;;;;;;:::i;:::-;;;;;;;;;8978:10;8990:7;;8945:53;;;;;;;;:::i;:::-;;;;;;;;8069:936;;7880:1125:::0;;;;;;;:::o;3405:215:58:-;2334:13;:11;:13::i;:::-;3489:22:::1;::::0;::::1;3485:91;;3534:31;::::0;::::1;::::0;;3562:1:::1;3534:31;::::0;::::1;6534:74:300::0;6507:18;;3534:31:58::1;;;;;;;;3485:91;3585:28;3604:8;3585:18;:28::i;:::-;3405:215:::0;:::o;5963:991:242:-;2334:13:58;:11;:13::i;:::-;6139:28:242::1;::::0;::::1;;::::0;;;:18:::1;:28;::::0;;;;:44;;;::::1;::::0;::::1;;;::::0;;;6193:676:::1;;6344:51;6363:23;:31;;6344:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;;;::::1;::::0;;;;::::1;::::0;;;;::::1;::::0;;;;;::::1;::::0;::::1;::::0;::::1;::::0;;;;::::1;;;::::0;;::::1;::::0;;;;;;::::1;::::0;::::1;;;;;;;;:18;:51::i;:::-;6339:143;;6415:52;:39:::0;:50:::1;:52::i;:::-;6193:676;;;6595:18;6636:8;6624:32;;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6716:7;::::0;6696:49:::1;::::0;;;;6716:7:::1;6552:55:300::0;;;6696:49:242::1;::::0;::::1;6534:74:300::0;6595:64:242;;-1:-1:-1;6673:20:242::1;::::0;6716:7;;::::1;::::0;6696:37:::1;::::0;6507:18:300;;6696:49:242::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;6673:72;;6775:12;6763:24;;:8;:24;;;6759:100;;6807:37;:24:::0;:35:::1;:37::i;:::-;6498:371;;6193:676;6923:13;6883:64;;6913:8;6883:64;;;6938:8;6883:64;;;;;;:::i;:::-;;;;;;;;5963:991:::0;;;:::o;1847:127:58:-;6931:20:68;:18;:20::i;:::-;1929:38:58::1;1954:12;1929:24;:38::i;555:163:223:-:0;665:8;662:1;655:19;697:4;694:1;687:15;4603:312:69;4683:4;4675:23;4692:6;4675:23;;;:120;;;4789:6;4753:42;;:32;811:66:97;1519:53;;;;1441:138;4753:32:69;:42;;;;4675:120;4658:251;;;4869:29;;;;;;;;;;;;;;3766:85:242;2334:13:58;:11;:13::i;6057:538:69:-;6174:17;6156:50;;;:52;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6156:52:69;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;6152:437;;6518:60;;;;;6564:42:300;6552:55;;6518:60:69;;;6534:74:300;6507:18;;6518:60:69;6388:226:300;6152:437:69;811:66:97;6250:40:69;;6246:120;;6317:34;;;;;;;;4803:25:300;;;4776:18;;6317:34:69;4657:177:300;6246:120:69;6379:54;6409:17;6428:4;6379:29;:54::i;5032:213::-;5106:4;5098:23;5115:6;5098:23;;5094:145;;5199:29;;;;;;;;;;;;;;2658:162:58;966:10:75;2717:7:58;1313:22;2570:8;;;;2441:144;2717:7;:23;;;2713:101;;2763:40;;;;;966:10:75;2763:40:58;;;6534:74:300;6507:18;;2763:40:58;6388:226:300;3774:248:58;1313:22;3923:8;;3941:19;;;3923:8;3941:19;;;;;;;;3975:40;;3923:8;;;;;3975:40;;3847:24;;3975:40;3837:185;;3774:248;:::o;12252:976:242:-;12350:32;;;;;;;12333:49;;12329:116;;;12398:36;:23;:34;:36::i;:::-;12504:18;12537:9;12532:564;12548:18;;;12532:564;;;12583:22;12608:7;;12616:1;12608:10;;;;;;;:::i;:::-;;;;;;12583:35;;12637:6;:26;;;;;;;;;;:::i;:::-;:31;;12667:1;12637:31;12633:112;;12688:42;:29;:40;:42::i;:::-;12861:18;:35;12880:15;;;;:6;:15;:::i;:::-;12861:35;;;;;;;;;;;;;-1:-1:-1;12861:35:242;;;;12856:116;;12916:41;:28;:39;:41::i;:::-;13000:26;;;;;;;;:::i;:::-;12985:41;;;;:::i;:::-;;-1:-1:-1;;13068:3:242;;12532:564;;;-1:-1:-1;13109:34:242;;;1211:3;13109:34;13105:117;;13159:52;:39;:50;:52::i;13565:798::-;13674:14;;13894:32;;13641:4;;13674:14;13894:32;;;;;13885:41;;13881:84;;;-1:-1:-1;13949:5:242;;13565:798;-1:-1:-1;;13565:798:242:o;13881:84::-;13980:9;13975:295;13995:6;13991:1;:10;13975:295;;;14115:18;:39;14134:7;14142:1;14134:10;;;;;;;;:::i;:::-;;;;;;;;;;;;:19;14115:39;;;;;;;;;;;;14134:19;14115:39;;;;14110:91;;-1:-1:-1;14181:5:242;;13565:798;-1:-1:-1;;;13565:798:242:o;14110:91::-;14242:3;;13975:295;;;-1:-1:-1;14352:4:242;;13565:798;-1:-1:-1;;;13565:798:242:o;7084:141:68:-;8870:21;8560:40;;;;;;7146:73;;7191:17;;;;;;;;;;;;;;1980:235:58;6931:20:68;:18;:20::i;2264:344:97:-;2355:37;2374:17;2355:18;:37::i;:::-;2407:36;;;;;;;;;;;2458:11;;:15;2454:148;;2489:53;2518:17;2537:4;2489:28;:53::i;2454:148::-;2573:18;:16;:18::i;1671:281::-;1748:17;:29;;;1781:1;1748:34;1744:119;;1805:47;;;;;6564:42:300;6552:55;;1805:47:97;;;6534:74:300;6507:18;;1805:47:97;6388:226:300;1744:119:97;811:66;1872:73;;;;;;;;;;;;;;;1671:281::o;3900:253:110:-;3983:12;4008;4022:23;4049:6;:19;;4069:4;4049:25;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4007:67;;;;4091:55;4118:6;4126:7;4135:10;4091:26;:55::i;:::-;4084:62;3900:253;-1:-1:-1;;;;;3900:253:110:o;6113:122:97:-;6163:9;:13;6159:70;;6199:19;;;;;;;;;;;;;;4421:582:110;4565:12;4594:7;4589:408;;4617:19;4625:10;4617:7;:19::i;:::-;4589:408;;;4841:17;;:22;:49;;;;-1:-1:-1;4867:18:110;;;;:23;4841:49;4837:119;;;4917:24;;;;;6564:42:300;6552:55;;4917:24:110;;;6534:74:300;6507:18;;4917:24:110;6388:226:300;4837:119:110;-1:-1:-1;4976:10:110;4969:17;;5543:487;5674:17;;:21;5670:354;;5871:10;5865:17;5927:15;5914:10;5910:2;5906:19;5899:44;5670:354;5994:19;;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;14:154:300;100:42;93:5;89:54;82:5;79:65;69:93;;158:1;155;148:12;173:156;239:20;;299:4;288:16;;278:27;;268:55;;319:1;316;309:12;268:55;173:156;;;:::o;334:742::-;427:6;435;443;451;459;512:3;500:9;491:7;487:23;483:33;480:53;;;529:1;526;519:12;480:53;568:9;555:23;587:31;612:5;587:31;:::i;:::-;637:5;-1:-1:-1;694:2:300;679:18;;666:32;707:33;666:32;707:33;:::i;:::-;759:7;-1:-1:-1;818:2:300;803:18;;790:32;831:33;790:32;831:33;:::i;:::-;883:7;-1:-1:-1;942:2:300;927:18;;914:32;955:33;914:32;955:33;:::i;:::-;1007:7;-1:-1:-1;1033:37:300;1065:3;1050:19;;1033:37;:::i;:::-;1023:47;;334:742;;;;;;;;:::o;1081:984::-;1282:2;1264:21;;;1366:13;;1381:18;1362:38;1342:18;;;1335:66;1436:15;;;1430:22;1490:4;1468:20;;;1461:34;1544:19;;1323:2;1308:18;;1572:22;;;1245:4;;1652:21;;;;;1245:4;;1625:3;1610:19;;;1701:338;1715:6;1712:1;1709:13;1701:338;;;1780:6;1774:13;1827:42;1822:2;1816:9;1812:58;1807:3;1800:71;1929:26;1923:2;1919;1915:11;1909:18;1905:51;1900:2;1895:3;1891:12;1884:73;;1986:4;1981:3;1977:14;1970:21;;2026:2;2018:6;2014:15;2004:25;;1737:1;1734;1730:9;1725:14;;1701:338;;;-1:-1:-1;2056:3:300;1081:984;-1:-1:-1;;;;;1081:984:300:o;2070:347::-;2121:8;2131:6;2185:3;2178:4;2170:6;2166:17;2162:27;2152:55;;2203:1;2200;2193:12;2152:55;-1:-1:-1;2226:20:300;;2269:18;2258:30;;2255:50;;;2301:1;2298;2291:12;2255:50;2338:4;2330:6;2326:17;2314:29;;2390:3;2383:4;2374:6;2366;2362:19;2358:30;2355:39;2352:59;;;2407:1;2404;2397:12;2352:59;2070:347;;;;;:::o;2422:409::-;2492:6;2500;2553:2;2541:9;2532:7;2528:23;2524:32;2521:52;;;2569:1;2566;2559:12;2521:52;2609:9;2596:23;2642:18;2634:6;2631:30;2628:50;;;2674:1;2671;2664:12;2628:50;2713:58;2763:7;2754:6;2743:9;2739:22;2713:58;:::i;:::-;2790:8;;2687:84;;-1:-1:-1;2422:409:300;-1:-1:-1;;;;2422:409:300:o;3041:184::-;3093:77;3090:1;3083:88;3190:4;3187:1;3180:15;3214:4;3211:1;3204:15;3230:833;3294:5;3326:1;3350:18;3342:6;3339:30;3336:56;;;3372:18;;:::i;:::-;-1:-1:-1;3586:2:300;3580:9;3436:66;3431:2;3419:15;;3415:88;;3644:2;3632:15;3628:88;3616:101;;3768:22;;;3747:18;3732:34;;3729:62;3726:88;;;3794:18;;:::i;:::-;3830:2;3823:22;3878;;;3863:6;-1:-1:-1;3863:6:300;3915:16;;;3912:25;-1:-1:-1;3909:45:300;;;3950:1;3947;3940:12;3909:45;4000:6;3995:3;3988:4;3980:6;3976:17;3963:44;4055:1;4048:4;4039:6;4031;4027:19;4023:30;4016:41;;3230:833;;;;;:::o;4068:584::-;4145:6;4153;4206:2;4194:9;4185:7;4181:23;4177:32;4174:52;;;4222:1;4219;4212:12;4174:52;4261:9;4248:23;4280:31;4305:5;4280:31;:::i;:::-;4330:5;-1:-1:-1;4386:2:300;4371:18;;4358:32;4413:18;4402:30;;4399:50;;;4445:1;4442;4435:12;4399:50;4468:22;;4521:4;4513:13;;4509:27;-1:-1:-1;4499:55:300;;4550:1;4547;4540:12;4499:55;4573:73;4638:7;4633:2;4620:16;4615:2;4611;4607:11;4573:73;:::i;:::-;4563:83;;;4068:584;;;;;:::o;4839:182::-;4896:6;4949:2;4937:9;4928:7;4924:23;4920:32;4917:52;;;4965:1;4962;4955:12;4917:52;4988:27;5005:9;4988:27;:::i;5026:221::-;5069:5;5122:3;5115:4;5107:6;5103:17;5099:27;5089:55;;5140:1;5137;5130:12;5089:55;5162:79;5237:3;5228:6;5215:20;5208:4;5200:6;5196:17;5162:79;:::i;5252:457::-;5330:6;5338;5391:2;5379:9;5370:7;5366:23;5362:32;5359:52;;;5407:1;5404;5397:12;5359:52;5446:9;5433:23;5465:31;5490:5;5465:31;:::i;:::-;5515:5;-1:-1:-1;5571:2:300;5556:18;;5543:32;5598:18;5587:30;;5584:50;;;5630:1;5627;5620:12;5584:50;5653;5695:7;5686:6;5675:9;5671:22;5653:50;:::i;5714:477::-;5793:6;5801;5809;5862:2;5850:9;5841:7;5837:23;5833:32;5830:52;;;5878:1;5875;5868:12;5830:52;5918:9;5905:23;5951:18;5943:6;5940:30;5937:50;;;5983:1;5980;5973:12;5937:50;6022:58;6072:7;6063:6;6052:9;6048:22;6022:58;:::i;:::-;6099:8;;5996:84;;-1:-1:-1;6181:2:300;6166:18;;;;6153:32;;5714:477;-1:-1:-1;;;;5714:477:300:o;6619:129::-;6704:18;6697:5;6693:30;6686:5;6683:41;6673:69;;6738:1;6735;6728:12;6753:245;6811:6;6864:2;6852:9;6843:7;6839:23;6835:32;6832:52;;;6880:1;6877;6870:12;6832:52;6919:9;6906:23;6938:30;6962:5;6938:30;:::i;7003:247::-;7062:6;7115:2;7103:9;7094:7;7090:23;7086:32;7083:52;;;7131:1;7128;7121:12;7083:52;7170:9;7157:23;7189:31;7214:5;7189:31;:::i;7255:477::-;7404:2;7393:9;7386:21;7367:4;7436:6;7430:13;7479:6;7474:2;7463:9;7459:18;7452:34;7538:6;7533:2;7525:6;7521:15;7516:2;7505:9;7501:18;7495:50;7594:1;7589:2;7580:6;7569:9;7565:22;7561:31;7554:42;7723:2;7653:66;7648:2;7640:6;7636:15;7632:88;7621:9;7617:104;7613:113;7605:121;;;7255:477;;;;:::o;7926:397::-;8023:6;8076:2;8064:9;8055:7;8051:23;8047:32;8044:52;;;8092:1;8089;8082:12;8044:52;8132:9;8119:23;8165:18;8157:6;8154:30;8151:50;;;8197:1;8194;8187:12;8151:50;8220:22;;8276:2;8258:16;;;8254:25;8251:45;;;8292:1;8289;8282:12;8328:1074;8470:6;8478;8486;8494;8502;8555:2;8543:9;8534:7;8530:23;8526:32;8523:52;;;8571:1;8568;8561:12;8523:52;8611:9;8598:23;8644:18;8636:6;8633:30;8630:50;;;8676:1;8673;8666:12;8630:50;8715:58;8765:7;8756:6;8745:9;8741:22;8715:58;:::i;:::-;8792:8;;-1:-1:-1;8689:84:300;-1:-1:-1;;8877:2:300;8862:18;;8849:32;8890:30;8849:32;8890:30;:::i;:::-;8939:5;-1:-1:-1;8997:2:300;8982:18;;8969:32;9026:18;9013:32;;9010:52;;;9058:1;9055;9048:12;9010:52;9081:24;;9136:4;9128:13;;9124:27;-1:-1:-1;9114:55:300;;9165:1;9162;9155:12;9114:55;9205:2;9192:16;9231:18;9223:6;9220:30;9217:50;;;9263:1;9260;9253:12;9217:50;9316:7;9311:2;9301:6;9298:1;9294:14;9290:2;9286:23;9282:32;9279:45;9276:65;;;9337:1;9334;9327:12;9276:65;8328:1074;;;;-1:-1:-1;8328:1074:300;;-1:-1:-1;;;9368:2:300;9360:11;;9390:6;8328:1074::o;9663:626::-;9747:6;9755;9763;9816:2;9804:9;9795:7;9791:23;9787:32;9784:52;;;9832:1;9829;9822:12;9784:52;9871:9;9858:23;9890:31;9915:5;9890:31;:::i;:::-;9940:5;-1:-1:-1;9997:2:300;9982:18;;9969:32;10039:15;;10032:23;10020:36;;10010:64;;10070:1;10067;10060:12;10010:64;10093:7;-1:-1:-1;10151:2:300;10136:18;;10123:32;10178:18;10167:30;;10164:50;;;10210:1;10207;10200:12;10164:50;10233;10275:7;10266:6;10255:9;10251:22;10233:50;:::i;:::-;10223:60;;;9663:626;;;;;:::o;10508:271::-;10691:6;10683;10678:3;10665:33;10647:3;10717:16;;10742:13;;;10717:16;10508:271;-1:-1:-1;10508:271:300:o;10927:919::-;11141:4;11189:2;11178:9;11174:18;11231;11223:6;11219:31;11208:9;11201:50;11287:2;11282;11271:9;11267:18;11260:30;11310:6;11345;11339:13;11376:6;11368;11361:22;11414:2;11403:9;11399:18;11392:25;;11436:6;11433:1;11426:17;11479:2;11476:1;11466:16;11452:30;;11500:1;11510:310;11524:6;11521:1;11518:13;11510:310;;;11590:13;;11643:42;11628:58;;11616:71;;11725:3;11721:19;11716:2;11707:12;;11700:41;11808:1;11796:14;;;;11770:2;11761:12;;;;11539:9;11510:310;;;-1:-1:-1;11837:3:300;;10927:919;-1:-1:-1;;;;;;10927:919:300:o;11851:632::-;11972:4;11978:6;12038:11;12025:25;12128:66;12117:8;12101:14;12097:29;12093:102;12073:18;12069:127;12059:155;;12210:1;12207;12200:12;12059:155;12237:33;;12289:20;;;-1:-1:-1;12332:18:300;12321:30;;12318:50;;;12364:1;12361;12354:12;12318:50;12397:4;12385:17;;-1:-1:-1;12448:1:300;12444:14;;;12428;12424:35;12414:46;;12411:66;;;12473:1;12470;12463:12;12488:137;12573:26;12566:5;12562:38;12555:5;12552:49;12542:77;;12615:1;12612;12605:12;12630:793;12745:6;12740:3;12733:19;12777:4;12772:3;12768:14;12761:21;;12715:3;12805:5;12828:1;12838:560;12852:6;12849:1;12846:13;12838:560;;;12919:1;12961:6;12948:20;12981:33;13006:7;12981:33;:::i;:::-;13052:42;13039:56;13027:69;;13149:4;13137:17;;13124:31;13168:32;13124:31;13168:32;:::i;:::-;13249:26;13236:40;13229:4;13220:14;;13213:64;-1:-1:-1;13313:4:300;13304:14;;;;13371:17;;;;;12874:1;12867:9;12838:560;;;-1:-1:-1;13414:3:300;;12630:793;-1:-1:-1;;;;12630:793:300:o;13428:1011::-;13631:2;13620:9;13613:21;13594:4;13669:6;13656:20;13685:30;13709:5;13685:30;:::i;:::-;13762:18;13755:5;13751:30;13746:2;13735:9;13731:18;13724:58;;13842:2;13834:6;13830:15;13817:29;13922:66;13913:6;13897:14;13893:27;13889:100;13869:18;13865:125;13855:153;;14004:1;14001;13994:12;13855:153;14032:31;;14144:2;14131:16;;;14086:21;14170:18;14159:30;;14156:50;;;14202:1;14199;14192:12;14156:50;14258:6;14255:1;14251:14;14235;14231:35;14222:7;14218:49;14215:69;;;14280:1;14277;14270:12;14215:69;14322:4;14315;14304:9;14300:20;14293:34;14344:89;14429:2;14418:9;14414:18;14406:6;14397:7;14344:89;:::i;14444:184::-;14496:77;14493:1;14486:88;14593:4;14590:1;14583:15;14617:4;14614:1;14607:15;14633:590;14765:5;14752:19;14780:33;14805:7;14780:33;:::i;:::-;14845:42;14836:7;14832:56;14822:66;;14999:2;14930:66;14923:4;14917:11;14913:84;14910:92;14904:4;14897:106;15051:2;15044:5;15040:14;15027:28;15064:32;15088:7;15064:32;:::i;:::-;15133:3;15129:17;15148:66;15125:90;15118:98;15105:112;;-1:-1:-1;14633:590:300:o;15858:1727::-;16045:5;16032:19;16060:32;16084:7;16060:32;:::i;:::-;16216:18;16207:7;16203:32;16134:66;16127:4;16121:11;16117:84;16114:122;16108:4;16101:136;;16296:2;16289:5;16285:14;16272:28;16375:66;16367:5;16351:14;16347:26;16343:99;16323:18;16319:124;16309:152;;16457:1;16454;16447:12;16309:152;16482:30;;16535:18;;16576;16565:30;;16562:50;;;16608:1;16605;16598:12;16562:50;16645:2;16639:4;16635:13;16621:27;;16699:6;16696:1;16692:14;16676;16672:35;16664:6;16660:48;16657:68;;;16721:1;16718;16711:12;16657:68;16758:1;16752:4;16748:12;16783:20;16775:6;16772:32;16769:58;;;16807:18;;:::i;:::-;16856:6;16850:13;16887:6;16879;16872:22;16917:6;16909;16906:18;16903:291;;;16954:1;16947:17;;;17002:4;16989:18;;17073:17;;;;17030;;17103:81;17121:2;17114:5;17111:13;17103:81;;;17180:1;17173:5;17166:16;17147:1;17140:5;17136:13;17127:22;;17103:81;;;17107:3;;16903:291;-1:-1:-1;10874:1:300;10867:14;;;10911:4;10898:18;;;17333:246;17347:6;17344:1;17341:13;17333:246;;;17396:88;17477:6;17464:11;17396:88;:::i;:::-;17519:2;17507:15;;;;;17567:1;17550:19;;;;17362:9;17333:246;;17590:447;17747:2;17736:9;17729:21;17786:6;17781:2;17770:9;17766:18;17759:34;17843:6;17835;17830:2;17819:9;17815:18;17802:48;17899:1;17870:22;;;17894:2;17866:31;;;17859:42;;;;17953:2;17941:15;;;17958:66;17937:88;17922:104;17918:113;;17590:447;-1:-1:-1;17590:447:300:o;18042:251::-;18112:6;18165:2;18153:9;18144:7;18140:23;18136:32;18133:52;;;18181:1;18178;18171:12;18133:52;18213:9;18207:16;18232:31;18257:5;18232:31;:::i;18298:125::-;18363:9;;;18384:10;;;18381:36;;;18397:18;;:::i;18428:184::-;18480:77;18477:1;18470:88;18577:4;18574:1;18567:15;18601:4;18598:1;18591:15;18617:451;18898:18;18890:6;18886:31;18875:9;18868:50;18954:2;18949;18938:9;18934:18;18927:30;18849:4;18974:88;19058:2;19047:9;19043:18;19035:6;19027;18974:88;:::i;19345:184::-;19415:6;19468:2;19456:9;19447:7;19443:23;19439:32;19436:52;;;19484:1;19481;19474:12;19436:52;-1:-1:-1;19507:16:300;;19345:184;-1:-1:-1;19345:184:300:o;19534:245::-;19592:6;19645:2;19633:9;19624:7;19620:23;19616:32;19613:52;;;19661:1;19658;19651:12;19613:52;19700:9;19687:23;19719:30;19743:5;19719:30;:::i;19784:215::-;19895:26;19852:34;;;19888;;;19848:75;;19935:35;;19932:61;;;19973:18;;:::i;20004:301::-;20133:3;20171:6;20165:13;20217:6;20210:4;20202:6;20198:17;20193:3;20187:37;20279:1;20243:16;;20268:13;;;-1:-1:-1;20243:16:300;20004:301;-1:-1:-1;20004:301:300:o", + linkReferences: {}, + immutableReferences: { + "74019": [ + { start: 6060, length: 32 }, + { start: 6101, length: 32 }, + { start: 6641, length: 32 }, + ], + }, + }, + methodIdentifiers: { + "MAX_REWARD_ALLOCATION_BLOCK_DELAY()": "4ce34525", + "UPGRADE_INTERFACE_VERSION()": "ad3cb1cc", + "activateReadyQueuedRewardAllocation(bytes)": "6ed0bf9a", + "beaconDepositContract()": "eafe0f4c", + "distributor()": "bfe10928", + "factory()": "c45a0155", + "getActiveRewardAllocation(bytes)": "da6f7563", + "getDefaultRewardAllocation()": "17dbf270", + "getQueuedRewardAllocation(bytes)": "4ecbf5c0", + "getSetActiveRewardAllocation(bytes)": "230288ce", + "initialize(address,address,address,address,uint8)": "008c2676", + "isQueuedRewardAllocationReady(bytes,uint256)": "722f8e0a", + "isReady()": "a094a031", + "isWhitelistedVault(address)": "a2ce2773", + "maxNumWeightsPerRewardAllocation()": "c35569cd", + "owner()": "8da5cb5b", + "proxiableUUID()": "52d1902d", + "queueNewRewardAllocation(bytes,uint64,(address,uint96)[])": "e5eb90aa", + "renounceOwnership()": "715018a6", + "rewardAllocationBlockDelay()": "53a35d1d", + "setDefaultRewardAllocation((uint64,(address,uint96)[]))": "c89f2665", + "setMaxNumWeightsPerRewardAllocation(uint8)": "66204c78", + "setRewardAllocationBlockDelay(uint64)": "9ca2626c", + "setVaultWhitelistedStatus(address,bool,string)": "fb9f6fde", + "transferOwnership(address)": "f2fde38b", + "updateWhitelistedVaultMetadata(address,string)": "69ed1708", + "upgradeToAndCall(address,bytes)": "4f1ef286", + }, + rawMetadata: + '{"compiler":{"version":"0.8.26+commit.8a97fa7a"},"language":"Solidity","output":{"abi":[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"AlreadyInitialized","type":"error"},{"inputs":[],"name":"AmountLessThanMinIncentiveRate","type":"error"},{"inputs":[],"name":"CannotRecoverIncentiveToken","type":"error"},{"inputs":[],"name":"CannotRecoverRewardToken","type":"error"},{"inputs":[],"name":"CannotRecoverStakingToken","type":"error"},{"inputs":[],"name":"CommissionNotQueued","type":"error"},{"inputs":[],"name":"DepositNotMultipleOfGwei","type":"error"},{"inputs":[],"name":"DepositValueTooHigh","type":"error"},{"inputs":[],"name":"DonateAmountLessThanPayoutAmount","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"IncentiveRateTooHigh","type":"error"},{"inputs":[],"name":"IndexOutOfRange","type":"error"},{"inputs":[],"name":"InsolventReward","type":"error"},{"inputs":[],"name":"InsufficientDelegateStake","type":"error"},{"inputs":[],"name":"InsufficientDeposit","type":"error"},{"inputs":[],"name":"InsufficientSelfStake","type":"error"},{"inputs":[],"name":"InsufficientStake","type":"error"},{"inputs":[],"name":"InvalidActivateBoostDelay","type":"error"},{"inputs":[],"name":"InvalidActivateCommissionChangeDelay","type":"error"},{"inputs":[],"name":"InvalidBoostMultiplier","type":"error"},{"inputs":[],"name":"InvalidCommission","type":"error"},{"inputs":[],"name":"InvalidCredentialsLength","type":"error"},{"inputs":[],"name":"InvalidDropBoostDelay","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"InvalidMaxIncentiveTokensCount","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidPubKeyLength","type":"error"},{"inputs":[],"name":"InvalidRewardAllocationWeights","type":"error"},{"inputs":[],"name":"InvalidRewardConvexity","type":"error"},{"inputs":[],"name":"InvalidRewardVaultAddress","type":"error"},{"inputs":[],"name":"InvalidSignatureLength","type":"error"},{"inputs":[],"name":"InvalidStartBlock","type":"error"},{"inputs":[],"name":"InvalidateDefaultRewardAllocation","type":"error"},{"inputs":[],"name":"InvariantCheckFailed","type":"error"},{"inputs":[],"name":"MaxNumWeightsPerRewardAllocationIsZero","type":"error"},{"inputs":[],"name":"MinIncentiveRateIsZero","type":"error"},{"inputs":[],"name":"NotAContract","type":"error"},{"inputs":[],"name":"NotApprovedSender","type":"error"},{"inputs":[],"name":"NotBGT","type":"error"},{"inputs":[],"name":"NotBlockRewardController","type":"error"},{"inputs":[],"name":"NotDelegate","type":"error"},{"inputs":[],"name":"NotDistributor","type":"error"},{"inputs":[],"name":"NotEnoughBalance","type":"error"},{"inputs":[],"name":"NotEnoughBoostedBalance","type":"error"},{"inputs":[],"name":"NotEnoughTime","type":"error"},{"inputs":[],"name":"NotFactoryVault","type":"error"},{"inputs":[],"name":"NotFeeCollector","type":"error"},{"inputs":[],"name":"NotGovernance","type":"error"},{"inputs":[],"name":"NotIncentiveManager","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[],"name":"NotNewOperator","type":"error"},{"inputs":[],"name":"NotOperator","type":"error"},{"inputs":[],"name":"NotRootFollower","type":"error"},{"inputs":[],"name":"NotWhitelistedVault","type":"error"},{"inputs":[],"name":"OperatorAlreadySet","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PayoutAmountIsZero","type":"error"},{"inputs":[],"name":"RewardAllocationAlreadyQueued","type":"error"},{"inputs":[],"name":"RewardAllocationBlockDelayTooLarge","type":"error"},{"inputs":[],"name":"RewardCycleNotEnded","type":"error"},{"inputs":[],"name":"RewardsDurationIsZero","type":"error"},{"inputs":[],"name":"StakeAmountIsZero","type":"error"},{"inputs":[],"name":"TimestampAlreadyProcessed","type":"error"},{"inputs":[],"name":"TokenAlreadyWhitelistedOrLimitReached","type":"error"},{"inputs":[],"name":"TokenNotWhitelisted","type":"error"},{"inputs":[],"name":"TooManyWeights","type":"error"},{"inputs":[],"name":"TotalSupplyOverflow","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"inputs":[],"name":"VaultAlreadyExists","type":"error"},{"inputs":[],"name":"WithdrawAmountIsZero","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"inputs":[],"name":"ZeroOperatorOnFirstDeposit","type":"error"},{"inputs":[],"name":"ZeroPercentageWeight","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes","name":"valPubkey","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"indexed":false,"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"name":"ActivateRewardAllocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"maxNumWeightsPerRewardAllocation","type":"uint8"}],"name":"MaxNumWeightsPerRewardAllocationSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes","name":"valPubkey","type":"bytes"},{"indexed":false,"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"indexed":false,"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"name":"QueueRewardAllocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"rewardAllocationBlockDelay","type":"uint64"}],"name":"RewardAllocationBlockDelaySet","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"indexed":false,"internalType":"struct IBeraChef.RewardAllocation","name":"rewardAllocation","type":"tuple"}],"name":"SetDefaultRewardAllocation","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"bool","name":"isWhitelisted","type":"bool"},{"indexed":false,"internalType":"string","name":"metadata","type":"string"}],"name":"VaultWhitelistedStatusUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"string","name":"metadata","type":"string"}],"name":"WhitelistedVaultMetadataUpdated","type":"event"},{"inputs":[],"name":"MAX_REWARD_ALLOCATION_BLOCK_DELAY","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"valPubkey","type":"bytes"}],"name":"activateReadyQueuedRewardAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"beaconDepositContract","outputs":[{"internalType":"contract IBeaconDeposit","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"valPubkey","type":"bytes"}],"name":"getActiveRewardAllocation","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"internalType":"struct IBeraChef.RewardAllocation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDefaultRewardAllocation","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"internalType":"struct IBeraChef.RewardAllocation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"valPubkey","type":"bytes"}],"name":"getQueuedRewardAllocation","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"internalType":"struct IBeraChef.RewardAllocation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"valPubkey","type":"bytes"}],"name":"getSetActiveRewardAllocation","outputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"internalType":"struct IBeraChef.RewardAllocation","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_distributor","type":"address"},{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_beaconDepositContract","type":"address"},{"internalType":"uint8","name":"_maxNumWeightsPerRewardAllocation","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"valPubkey","type":"bytes"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"isQueuedRewardAllocationReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isReady","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"isWhitelistedVault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxNumWeightsPerRewardAllocation","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"valPubkey","type":"bytes"},{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"name":"queueNewRewardAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardAllocationBlockDelay","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"startBlock","type":"uint64"},{"components":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"percentageNumerator","type":"uint96"}],"internalType":"struct IBeraChef.Weight[]","name":"weights","type":"tuple[]"}],"internalType":"struct IBeraChef.RewardAllocation","name":"ra","type":"tuple"}],"name":"setDefaultRewardAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxNumWeightsPerRewardAllocation","type":"uint8"}],"name":"setMaxNumWeightsPerRewardAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"_rewardAllocationBlockDelay","type":"uint64"}],"name":"setRewardAllocationBlockDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"bool","name":"isWhitelisted","type":"bool"},{"internalType":"string","name":"metadata","type":"string"}],"name":"setVaultWhitelistedStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"string","name":"metadata","type":"string"}],"name":"updateWhitelistedVaultMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}],"devdoc":{"author":"Berachain Team","details":"It should be owned by the governance module.","errors":{"AddressEmptyCode(address)":[{"details":"There\'s no code at `target` (it is not a contract)."}],"DepositNotMultipleOfGwei()":[{"details":"Error thrown when the deposit amount is not a multiple of Gwei."}],"DepositValueTooHigh()":[{"details":"Error thrown when the deposit amount is too high, since it is a uint64."}],"ERC1967InvalidImplementation(address)":[{"details":"The `implementation` of the proxy is invalid."}],"ERC1967NonPayable()":[{"details":"An upgrade function sees `msg.value > 0` that may be lost."}],"FailedCall()":[{"details":"A call to an address target failed. The target may have reverted."}],"InsufficientDeposit()":[{"details":"Error thrown when the deposit amount is too small, to prevent dust deposits."}],"InvalidCredentialsLength()":[{"details":"Error thrown when the withdrawal credentials length is not 32 bytes."}],"InvalidInitialization()":[{"details":"The contract is already initialized."}],"InvalidPubKeyLength()":[{"details":"Error thrown when the public key length is not 48 bytes."}],"InvalidSignatureLength()":[{"details":"Error thrown when the signature length is not 96 bytes."}],"NotInitializing()":[{"details":"The contract is not initializing."}],"NotNewOperator()":[{"details":"Error thrown when the caller is not the current operator."}],"OperatorAlreadySet()":[{"details":"Error thrown when the operator is already set and caller passed non-zero operator."}],"OwnableInvalidOwner(address)":[{"details":"The owner is not a valid owner account. (eg. `address(0)`)"}],"OwnableUnauthorizedAccount(address)":[{"details":"The caller account is not authorized to perform an operation."}],"UUPSUnauthorizedCallContext()":[{"details":"The call is from an unauthorized context."}],"UUPSUnsupportedProxiableUUID(bytes32)":[{"details":"The storage `slot` is unsupported as a UUID."}],"ZeroOperatorOnFirstDeposit()":[{"details":"Error thrown when the input operator is zero address on the first deposit."}]},"events":{"ActivateRewardAllocation(bytes,uint64,(address,uint96)[])":{"params":{"startBlock":"The block that the reward allocation goes into effect.","valPubkey":"The validator\'s pubkey.","weights":"The weights of the reward allocation."}},"Initialized(uint64)":{"details":"Triggered when the contract has been initialized or reinitialized."},"MaxNumWeightsPerRewardAllocationSet(uint8)":{"params":{"maxNumWeightsPerRewardAllocation":"The maximum number of weights per reward allocation."}},"QueueRewardAllocation(bytes,uint64,(address,uint96)[])":{"params":{"startBlock":"The block that the reward allocation goes into effect.","valPubkey":"The validator\'s pubkey.","weights":"The weights of the reward allocation."}},"RewardAllocationBlockDelaySet(uint64)":{"params":{"rewardAllocationBlockDelay":"The delay in blocks before a new reward allocation can go into effect."}},"SetDefaultRewardAllocation((uint64,(address,uint96)[]))":{"params":{"rewardAllocation":"The default reward allocation."}},"Upgraded(address)":{"details":"Emitted when the implementation is upgraded."},"VaultWhitelistedStatusUpdated(address,bool,string)":{"params":{"isWhitelisted":"The whitelist status; true if the receiver is being whitelisted, false otherwise.","metadata":"The metadata of the vault.","receiver":"The address to remove or add as whitelisted vault."}},"WhitelistedVaultMetadataUpdated(address,string)":{"params":{"metadata":"The metadata of the vault.","receiver":"The address of the whitelisted vault."}}},"kind":"dev","methods":{"activateReadyQueuedRewardAllocation(bytes)":{"details":"Should be called by the distribution contract.","params":{"valPubkey":"The validator\'s pubkey."}},"constructor":{"custom:oz-upgrades-unsafe-allow":"constructor"},"getActiveRewardAllocation(bytes)":{"details":"Returns the active reward allocation if validator has a reward allocation and the weights are still valid, otherwise the default reward allocation.","params":{"valPubkey":"The validator\'s pubkey."},"returns":{"_0":"rewardAllocation The active reward allocation."}},"getDefaultRewardAllocation()":{"returns":{"_0":"rewardAllocation The default reward allocation."}},"getQueuedRewardAllocation(bytes)":{"params":{"valPubkey":"The validator\'s pubkey."},"returns":{"_0":"rewardAllocation The queued reward allocation."}},"getSetActiveRewardAllocation(bytes)":{"details":"This will return active reward allocation set by validators even if its not valid.","params":{"valPubkey":"The validator\'s pubkey."},"returns":{"_0":"rewardAllocation The reward allocation."}},"isQueuedRewardAllocationReady(bytes,uint256)":{"params":{"blockNumber":"The block number to be queried.","valPubkey":"The validator\'s pubkey."},"returns":{"_0":"isReady True if the queued reward allocation is ready to be activated, false otherwise."}},"isReady()":{"details":"This function should be used by all contracts that depend on a system call.This will return false if the governance module has not set a default reward allocation yet.","returns":{"_0":"isReady True if the BeraChef is ready to be used, false otherwise."}},"owner()":{"details":"Returns the address of the current owner."},"proxiableUUID()":{"details":"Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation\'s compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier."},"queueNewRewardAllocation(bytes,uint64,(address,uint96)[])":{"details":"The weights of the reward allocation must add up to 100% or 1e4. Only whitelisted pools may be used as well.","params":{"startBlock":"The block that the reward allocation goes into effect.","valPubkey":"The validator\'s pubkey.","weights":"The weights of the reward allocation."}},"renounceOwnership()":{"details":"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."},"setDefaultRewardAllocation((uint64,(address,uint96)[]))":{"details":"The caller of this function must be the governance module account.","params":{"rewardAllocation":"The default reward allocation."}},"setVaultWhitelistedStatus(address,bool,string)":{"params":{"isWhitelisted":"The whitelist status; true if the receiver is being whitelisted, false otherwise.","metadata":"The metadata of the vault.","receiver":"The address to remove or add as whitelisted vault."}},"transferOwnership(address)":{"details":"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."},"updateWhitelistedVaultMetadata(address,string)":{"params":{"metadata":"The metadata of the vault, to associate info with the vault in the events log.","receiver":"The address of the whitelisted vault."}},"upgradeToAndCall(address,bytes)":{"custom:oz-upgrades-unsafe-allow-reachable":"delegatecall","details":"Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event."}},"stateVariables":{"MAX_REWARD_ALLOCATION_BLOCK_DELAY":{"details":"With 2 second block time, this is ~30 days."},"ONE_HUNDRED_PERCENT":{"details":"Represents 100%. Chosen to be less granular."},"activeRewardAllocations":{"details":"Mapping of validator public key to active reward allocation."},"maxNumWeightsPerRewardAllocation":{"details":"The maximum number of weights per reward allocation."},"queuedRewardAllocations":{"details":"Mapping of validator public key address to queued reward allocation."}},"title":"BeraChef","version":1},"userdoc":{"events":{"ActivateRewardAllocation(bytes,uint64,(address,uint96)[])":{"notice":"Emitted when a new reward allocation has been activated."},"MaxNumWeightsPerRewardAllocationSet(uint8)":{"notice":"Emitted when the maximum number of weights per reward allocation has been set."},"QueueRewardAllocation(bytes,uint64,(address,uint96)[])":{"notice":"Emitted when a new reward allocation has been queued."},"RewardAllocationBlockDelaySet(uint64)":{"notice":"Emitted when the delay in blocks before a new reward allocation can go into effect has been set."},"SetDefaultRewardAllocation((uint64,(address,uint96)[]))":{"notice":"Emitted when the governance module has set a new default reward allocation."},"VaultWhitelistedStatusUpdated(address,bool,string)":{"notice":"Emitted when the vault\'s whitelisted status have been updated."},"WhitelistedVaultMetadataUpdated(address,string)":{"notice":"Emitted when the metadata of a whitelisted vault has been updated."}},"kind":"user","methods":{"activateReadyQueuedRewardAllocation(bytes)":{"notice":"Activates the queued reward allocation for a validator if its ready for the current block."},"distributor()":{"notice":"The address of the distributor contract."},"factory()":{"notice":"The address of the reward vault factory contract."},"getActiveRewardAllocation(bytes)":{"notice":"Returns the active reward allocation for validator with given pubkey"},"getDefaultRewardAllocation()":{"notice":"Returns the default reward allocation for validators that do not have a reward allocation."},"getQueuedRewardAllocation(bytes)":{"notice":"Returns the queued reward allocation for a validator with given pubkey"},"getSetActiveRewardAllocation(bytes)":{"notice":"Returns the active reward allocation set by the validator with given pubkey."},"isQueuedRewardAllocationReady(bytes,uint256)":{"notice":"Returns the status of whether a queued reward allocation is ready to be activated."},"isReady()":{"notice":"Returns the status of whether the BeraChef contract is ready to be used."},"isWhitelistedVault(address)":{"notice":"Mapping of receiver address to whether they are white-listed or not."},"queueNewRewardAllocation(bytes,uint64,(address,uint96)[])":{"notice":"Add a new reward allocation to the queue for validator with given pubkey. Does not allow overwriting of existing queued reward allocation."},"rewardAllocationBlockDelay()":{"notice":"The delay in blocks before a new reward allocation can go into effect."},"setDefaultRewardAllocation((uint64,(address,uint96)[]))":{"notice":"Sets the default reward allocation for validators that do not have a reward allocation."},"setMaxNumWeightsPerRewardAllocation(uint8)":{"notice":"Sets the maximum number of weights per reward allocation."},"setRewardAllocationBlockDelay(uint64)":{"notice":"Sets the delay in blocks before a new reward allocation can be queued."},"setVaultWhitelistedStatus(address,bool,string)":{"notice":"Updates the vault\'s whitelisted statusThe caller of this function must be the governance module account."},"updateWhitelistedVaultMetadata(address,string)":{"notice":"Updates the metadata of a whitelisted vault, reverts if vault is not whitelisted.The caller of this function must be the governance module account."}},"notice":"The BeraChef contract is responsible for managing the reward allocations and the whitelisted vaults. Reward allocation is a list of weights that determine the percentage of rewards that goes to each reward vault. Each validator could have a custom reward allocation, if not, the default reward allocation is used.","version":1}},"settings":{"compilationTarget":{"src/pol/rewards/BeraChef.sol":"BeraChef"},"evmVersion":"cancun","libraries":{},"metadata":{"bytecodeHash":"none"},"optimizer":{"enabled":true,"runs":4294967295},"remappings":[":@mock/=test/mock/",":@openzeppelin-gov-ext/=node_modules/@openzeppelin/contracts-upgradeable/governance/extensions/",":@openzeppelin-gov/=node_modules/@openzeppelin/contracts-upgradeable/governance/",":@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/",":@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/",":@prb/math/=node_modules/@prb/math/",":@pythnetwork/=node_modules/@pythnetwork/pyth-sdk-solidity/",":ds-test/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/src/",":forge-std/=lib/forge-std/src/",":openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/",":solady/src/=lib/solady/src/",":solady/test/=lib/solady/test/",":solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/",":transient-goodies/=lib/transient-goodies/src/"]},"sources":{"lib/solady/src/utils/FixedPointMathLib.sol":{"keccak256":"0x54dc2dda57990d37496e8c395540472770be93b0cd92b67c724f914b0f3d2b9d","license":"MIT","urls":["bzz-raw://c6abe12a9b29fb27c2cb9da9d65411e4a76e2e49ab3dac1549775e7cd42e7e19","dweb:/ipfs/QmTuMANdNhtJA86nXQnxKtThtNaLXMxMxK8Ukd4dtkKA9y"]},"lib/solady/src/utils/SafeTransferLib.sol":{"keccak256":"0x583f47701d9b47bb3ef80fcabbbd62fbb58a01733b7a57e19658b4b02468883a","license":"MIT","urls":["bzz-raw://2523bfac005e21ef9963fdb3c08b2c61824e2b5ce2f53d1a1828b01ed995217c","dweb:/ipfs/QmbBjVG9tZyeZSQH4m5GUzNBwo2iuvLoZYbmhT4gxnJc4J"]},"node_modules/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol":{"keccak256":"0x6662ec4e5cefca03eeadd073e9469df8d2944bb2ee8ec8f7622c2c46aab5f225","license":"MIT","urls":["bzz-raw://4d8544c6f8daa4d1bc215c6a72fe0acdb748664a105b0e5efc19295667521d45","dweb:/ipfs/QmdGWqdnXT8S3RgCR6aV8XHZrsybieMQLLnug1NtpSjEXN"]},"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol":{"keccak256":"0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a","license":"MIT","urls":["bzz-raw://9706d43a0124053d9880f6e31a59f31bc0a6a3dc1acd66ce0a16e1111658c5f6","dweb:/ipfs/QmUFmfowzkRwGtDu36cXV9SPTBHJ3n7dG9xQiK5B28jTf2"]},"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol":{"keccak256":"0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b","license":"MIT","urls":["bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609","dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM"]},"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol":{"keccak256":"0xf72d3b11f41fccbbdcacd121f994daab8267ccfceb1fb4f247e4ba274c169d27","license":"MIT","urls":["bzz-raw://1e46ee40ddc9e2009176ce5d76aa2c046fd68f2ed52d02d77db191365b7c5b2e","dweb:/ipfs/QmZnxgPmCCHosdvbh4J65uTaFYeGtZGzQ1sXRdeh1y68Zr"]},"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol":{"keccak256":"0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397","license":"MIT","urls":["bzz-raw://08e39f23d5b4692f9a40803e53a8156b72b4c1f9902a88cd65ba964db103dab9","dweb:/ipfs/QmPKn6EYDgpga7KtpkA8wV2yJCYGMtc9K4LkJfhKX2RVSV"]},"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol":{"keccak256":"0x92915b7f7f642c6be3f65bfd1522feb5d5b6ef25f755f4dbb51df32c868f2f97","license":"MIT","urls":["bzz-raw://85ad36d5cc7e190e1ee6c94b24659bc3a31396c4c36b6ffa6a509e10661f8007","dweb:/ipfs/QmPFyc4zMh2zo6YWZt25gjm3YdR2hg6wGETaWw256fMmJJ"]},"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol":{"keccak256":"0x361126a17677994081cd9cb69c3f50cffff6e920d25cb7e428acdb1ae41d1866","license":"MIT","urls":["bzz-raw://19ae787a7dd001269cd60a394b1a5261b78925a0fc3a6f927beb2986a9aa56cf","dweb:/ipfs/QmYLfXiuKmcRgTDBEDXMMjXU8t6JxsspUmjxYzqWS55oEv"]},"node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol":{"keccak256":"0xc8ed8d2056934b7675b695dec032f2920c2f5c6cf33a17ca85650940675323ab","license":"MIT","urls":["bzz-raw://3c8ccc75d1cd792d192aa09e54dd49ea35fe85baa9fcd17486f29227d9f29b89","dweb:/ipfs/QmbboSbFUEiM9tdEgBwuTRb7bykFoJXZ7dsSr1PSREJXMr"]},"node_modules/@openzeppelin/contracts/access/IAccessControl.sol":{"keccak256":"0xc1c2a7f1563b77050dc6d507db9f4ada5d042c1f6a9ddbffdc49c77cdc0a1606","license":"MIT","urls":["bzz-raw://fd54abb96a6156d9a761f6fdad1d3004bc48d2d4fce47f40a3f91a7ae83fc3a1","dweb:/ipfs/QmUrFSGkTDJ7WaZ6qPVVe3Gn5uN2viPb7x7QQ35UX4DofX"]},"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol":{"keccak256":"0x9b6b3e7803bc5f2f8cd7ad57db8ac1def61a9930a5a3107df4882e028a9605d7","license":"MIT","urls":["bzz-raw://da62d6be1f5c6edf577f0cb45666a8aa9c2086a4bac87d95d65f02e2f4c36a4b","dweb:/ipfs/QmNkpvBpoCMvX8JwAFNSc5XxJ2q5BXJpL5L1txb4QkqVFF"]},"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol":{"keccak256":"0xde7e9fd9aee8d4f40772f96bb3b58836cbc6dfc0227014a061947f8821ea9724","license":"MIT","urls":["bzz-raw://11fea9f8bc98949ac6709f0c1699db7430d2948137aa94d5a9e95a91f61a710a","dweb:/ipfs/QmQdfRXxQjwP6yn3DVo1GHPpriKNcFghSPi94Z1oKEFUNS"]},"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol":{"keccak256":"0xb25a4f11fa80c702bf5cd85adec90e6f6f507f32f4a8e6f5dbc31e8c10029486","license":"MIT","urls":["bzz-raw://6917f8a323e7811f041aecd4d9fd6e92455a6fba38a797ac6f6e208c7912b79d","dweb:/ipfs/QmShuYv55wYHGi4EFkDB8QfF7ZCHoKk2efyz3AWY1ExSq7"]},"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol":{"keccak256":"0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c","license":"MIT","urls":["bzz-raw://a2608291cb038b388d80b79a06b6118a42f7894ff67b7da10ec0dbbf5b2973ba","dweb:/ipfs/QmWohqcBLbcxmA4eGPhZDXe5RYMMEEpFq22nfkaUMvTfw1"]},"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol":{"keccak256":"0xc42facb5094f2f35f066a7155bda23545e39a3156faef3ddc00185544443ba7d","license":"MIT","urls":["bzz-raw://d3b36282ab029b46bd082619a308a2ea11c309967b9425b7b7a6eb0b0c1c3196","dweb:/ipfs/QmP2YVfDB2FoREax3vJu7QhDnyYRMw52WPrCD4vdT2kuDA"]},"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol":{"keccak256":"0x911c3346ee26afe188f3b9dc267ef62a7ccf940aba1afa963e3922f0ca3d8a06","license":"MIT","urls":["bzz-raw://04539f4419e44a831807d7203375d2bc6a733da256efd02e51290f5d5015218c","dweb:/ipfs/QmPZ97gsAAgaMRPiE2WJfkzRsudQnW5tPAvMgGj1jcTJtR"]},"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol":{"keccak256":"0xc59a78b07b44b2cf2e8ab4175fca91e8eca1eee2df7357b8d2a8833e5ea1f64c","license":"MIT","urls":["bzz-raw://5aa4f07e65444784c29cd7bfcc2341b34381e4e5b5da9f0c5bd00d7f430e66fa","dweb:/ipfs/QmWRMh4Q9DpaU9GvsiXmDdoNYMyyece9if7hnfLz7uqzWM"]},"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol":{"keccak256":"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7","license":"MIT","urls":["bzz-raw://df6f0c459663c9858b6cba2cda1d14a7d05a985bed6d2de72bd8e78c25ee79db","dweb:/ipfs/QmeTTxZ7qVk9rjEv2R4CpCwdf8UMCcRqDNMvzNxHc3Fnn9"]},"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol":{"keccak256":"0xca2ae13e0610f6a99238dd00b97bd786bc92732dae6d6b9d61f573ec51018310","license":"MIT","urls":["bzz-raw://75f8c71ce0c91c40dd5f249ace0b7d8270f8f1767231bcf71490f7157d6ba862","dweb:/ipfs/QmYXgxeDyFHvz3JsXxLEYN6GNUR44ThHeFj5XkpkgMoG4w"]},"node_modules/@openzeppelin/contracts/utils/Address.sol":{"keccak256":"0x9d8da059267bac779a2dbbb9a26c2acf00ca83085e105d62d5d4ef96054a47f5","license":"MIT","urls":["bzz-raw://c78e2aa4313323cecd1ef12a8d6265b96beee1a199923abf55d9a2a9e291ad23","dweb:/ipfs/QmUTs2KStXucZezzFo3EYeqYu47utu56qrF7jj1Gue65vb"]},"node_modules/@openzeppelin/contracts/utils/Errors.sol":{"keccak256":"0x6afa713bfd42cf0f7656efa91201007ac465e42049d7de1d50753a373648c123","license":"MIT","urls":["bzz-raw://ba1d02f4847670a1b83dec9f7d37f0b0418d6043447b69f3a29a5f9efc547fcf","dweb:/ipfs/QmQ7iH2keLNUKgq2xSWcRmuBE5eZ3F5whYAkAGzCNNoEWB"]},"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol":{"keccak256":"0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97","license":"MIT","urls":["bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b","dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM"]},"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol":{"keccak256":"0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8","license":"MIT","urls":["bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621","dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL"]},"src/base/FactoryOwnable.sol":{"keccak256":"0x0acb2d215a387ec7b00266303f66c9f47bec48ca87544188ec75dac623bcca3a","license":"MIT","urls":["bzz-raw://4b0a2abf6417c22ef255727817aabd024bd56e03f9f78eeedafe1ae7a1e6898b","dweb:/ipfs/QmZDNyqPAZLNJzAeck8Byr1uNLTaz4HkPpixzMbtE37Aet"]},"src/base/IStakingRewards.sol":{"keccak256":"0xf77be3e8bf1a82f911a54a53374f46100291c40985098b18e5d52dd280f809b4","license":"MIT","urls":["bzz-raw://ade2d0d5a7cce6b44c67900faacf42a27af5ef256cc6290b329f13be5dfa3fd6","dweb:/ipfs/QmWQ4jt8FwtTa6o89DCbrhD5TEVu5So4FF2j2nRha1R6Kn"]},"src/base/IStakingRewardsErrors.sol":{"keccak256":"0x33e3fb842a715f5af5b050daf7c396e220091c486ad3b1410fc80ebd2e7502b8","license":"MIT","urls":["bzz-raw://c8e4d5b93ea74a2b456c68c1434bae582fccc8cf6bd7d87a36128ebe6da4cb9d","dweb:/ipfs/QmNdYN5G7WiE73PyuHXK2JW7MUghNtHhxJL37qY2aE7jig"]},"src/base/StakingRewards.sol":{"keccak256":"0x8586a1d0ba513c6e5b6376ca2b60e604aa4c87b05a0918652cbad747f3fed901","license":"MIT","urls":["bzz-raw://c967c6c1b732b532fb7753588157ded58e694cf46777f1f96705721aa34a12c6","dweb:/ipfs/QmcAnZTGNt3oxfLUwe1F93usFSn6YXXNkHojDuVZyPfCzK"]},"src/libraries/Utils.sol":{"keccak256":"0x33466d27f0aa325072a109afd0933825d7123466771b8b4fc3649144c16f837e","license":"MIT","urls":["bzz-raw://1318a8da145d042715699be5c2a3f3a9e1aaef223206ad279b77be64c3cc6273","dweb:/ipfs/QmYCK4Vq3Pm3hCro7iV4fNGSFnJQ9rZXC8owWL3JdgGg8m"]},"src/pol/interfaces/IBeaconDeposit.sol":{"keccak256":"0xe9b8a9725bd59a1d4d480c09587025089d9a282eb18abe951c0e909cdb1035fc","license":"MIT","urls":["bzz-raw://d32be0c20a9a995f8ff9bc4bba459daee426dbb1a3889f0d735d2a1b2ae74e47","dweb:/ipfs/Qmag63XseRsA4gjGEFJsQxoaXJKeoMdGf5PT9WJ6Su7AEf"]},"src/pol/interfaces/IBeraChef.sol":{"keccak256":"0x40892fc52fe49947d80b4b525733fe2b114581fe51c701fb83f929eee444a14d","license":"MIT","urls":["bzz-raw://b0c87f05328a1bb999831308508facc8f9282e618d04589eeba58bd6c444ceb3","dweb:/ipfs/QmV5Kiqt64fDF6TvUgczDeDmm8nEbe5nF1KoU7MpRik5QY"]},"src/pol/interfaces/IPOLErrors.sol":{"keccak256":"0x8707b74334cee8ab454a54dd686c29a30a4ced9e4d19b35fea98ca5ec8909fc1","license":"MIT","urls":["bzz-raw://3aa8182c8694b233464d91bbc42132e0d98cab0e7c5c1552bfdd4c67bbf7d5f7","dweb:/ipfs/Qmb7GTV8EseozquWc1r4W3wkWeisKLo7frKAkPzWBQueem"]},"src/pol/interfaces/IRewardVault.sol":{"keccak256":"0x584fcc8a60bd8e72089591e825223c539c4be70ede13a9ef39041e2282e42db8","license":"MIT","urls":["bzz-raw://5555a25d336e67252f2c0dc9ccaacda504440fc657a6e393056b095716dbe323","dweb:/ipfs/QmQzYSNhUSVdQ7xpy2LoRMwMEqaHJd3yhskUgDhBqhKb5b"]},"src/pol/interfaces/IRewardVaultFactory.sol":{"keccak256":"0x288d862c4bede52ddfc713ac3b8d6b09d1fb653a77f70180321a29609631f4b7","license":"MIT","urls":["bzz-raw://43a8e23c517c78038d497030a2cf8be8e157b2ae46e254e69a9fc92e958c8d62","dweb:/ipfs/QmXFnZEs2asg41FZoamioWcZxvvfhkfTFZuVpq4WrMAT6s"]},"src/pol/rewards/BeraChef.sol":{"keccak256":"0x9f635eb07a5fce655f62313aa54dee4feca833507d83adeb0dfb0dd980c24f23","license":"MIT","urls":["bzz-raw://4d28f53d50dbc29cb31183423246e660c4305c8efd2f1485e00fba422d6a49a3","dweb:/ipfs/QmVrgK3jLTWUQGhDQsN8ngcgU6XRXur3EaNMCDHFB5RsEM"]},"src/pol/rewards/RewardVault.sol":{"keccak256":"0x63d7ae3d1c08b7cb133ae297f5dc6686c228dcea75f78a3af411bae90715d540","license":"MIT","urls":["bzz-raw://94ff94fe8088a92a3a0e75763d984efd9c7441f7ca4aaf6d39b448fa33d372ad","dweb:/ipfs/QmXQJAD8hXY7ney84etceLxf9szpNgC9V5KXYvL6cuLFYz"]}},"version":1}', + metadata: { + compiler: { version: "0.8.26+commit.8a97fa7a" }, + language: "Solidity", + output: { + abi: [ + { inputs: [], stateMutability: "nonpayable", type: "constructor" }, + { + inputs: [ + { internalType: "address", name: "target", type: "address" }, + ], + type: "error", + name: "AddressEmptyCode", + }, + { inputs: [], type: "error", name: "AlreadyInitialized" }, + { inputs: [], type: "error", name: "AmountLessThanMinIncentiveRate" }, + { inputs: [], type: "error", name: "CannotRecoverIncentiveToken" }, + { inputs: [], type: "error", name: "CannotRecoverRewardToken" }, + { inputs: [], type: "error", name: "CannotRecoverStakingToken" }, + { inputs: [], type: "error", name: "CommissionNotQueued" }, + { inputs: [], type: "error", name: "DepositNotMultipleOfGwei" }, + { inputs: [], type: "error", name: "DepositValueTooHigh" }, + { + inputs: [], + type: "error", + name: "DonateAmountLessThanPayoutAmount", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + type: "error", + name: "ERC1967InvalidImplementation", + }, + { inputs: [], type: "error", name: "ERC1967NonPayable" }, + { inputs: [], type: "error", name: "FailedCall" }, + { inputs: [], type: "error", name: "IncentiveRateTooHigh" }, + { inputs: [], type: "error", name: "IndexOutOfRange" }, + { inputs: [], type: "error", name: "InsolventReward" }, + { inputs: [], type: "error", name: "InsufficientDelegateStake" }, + { inputs: [], type: "error", name: "InsufficientDeposit" }, + { inputs: [], type: "error", name: "InsufficientSelfStake" }, + { inputs: [], type: "error", name: "InsufficientStake" }, + { inputs: [], type: "error", name: "InvalidActivateBoostDelay" }, + { + inputs: [], + type: "error", + name: "InvalidActivateCommissionChangeDelay", + }, + { inputs: [], type: "error", name: "InvalidBoostMultiplier" }, + { inputs: [], type: "error", name: "InvalidCommission" }, + { inputs: [], type: "error", name: "InvalidCredentialsLength" }, + { inputs: [], type: "error", name: "InvalidDropBoostDelay" }, + { inputs: [], type: "error", name: "InvalidInitialization" }, + { inputs: [], type: "error", name: "InvalidMaxIncentiveTokensCount" }, + { inputs: [], type: "error", name: "InvalidProof" }, + { inputs: [], type: "error", name: "InvalidPubKeyLength" }, + { inputs: [], type: "error", name: "InvalidRewardAllocationWeights" }, + { inputs: [], type: "error", name: "InvalidRewardConvexity" }, + { inputs: [], type: "error", name: "InvalidRewardVaultAddress" }, + { inputs: [], type: "error", name: "InvalidSignatureLength" }, + { inputs: [], type: "error", name: "InvalidStartBlock" }, + { + inputs: [], + type: "error", + name: "InvalidateDefaultRewardAllocation", + }, + { inputs: [], type: "error", name: "InvariantCheckFailed" }, + { + inputs: [], + type: "error", + name: "MaxNumWeightsPerRewardAllocationIsZero", + }, + { inputs: [], type: "error", name: "MinIncentiveRateIsZero" }, + { inputs: [], type: "error", name: "NotAContract" }, + { inputs: [], type: "error", name: "NotApprovedSender" }, + { inputs: [], type: "error", name: "NotBGT" }, + { inputs: [], type: "error", name: "NotBlockRewardController" }, + { inputs: [], type: "error", name: "NotDelegate" }, + { inputs: [], type: "error", name: "NotDistributor" }, + { inputs: [], type: "error", name: "NotEnoughBalance" }, + { inputs: [], type: "error", name: "NotEnoughBoostedBalance" }, + { inputs: [], type: "error", name: "NotEnoughTime" }, + { inputs: [], type: "error", name: "NotFactoryVault" }, + { inputs: [], type: "error", name: "NotFeeCollector" }, + { inputs: [], type: "error", name: "NotGovernance" }, + { inputs: [], type: "error", name: "NotIncentiveManager" }, + { inputs: [], type: "error", name: "NotInitializing" }, + { inputs: [], type: "error", name: "NotNewOperator" }, + { inputs: [], type: "error", name: "NotOperator" }, + { inputs: [], type: "error", name: "NotRootFollower" }, + { inputs: [], type: "error", name: "NotWhitelistedVault" }, + { inputs: [], type: "error", name: "OperatorAlreadySet" }, + { + inputs: [ + { internalType: "address", name: "owner", type: "address" }, + ], + type: "error", + name: "OwnableInvalidOwner", + }, + { + inputs: [ + { internalType: "address", name: "account", type: "address" }, + ], + type: "error", + name: "OwnableUnauthorizedAccount", + }, + { inputs: [], type: "error", name: "PayoutAmountIsZero" }, + { inputs: [], type: "error", name: "RewardAllocationAlreadyQueued" }, + { + inputs: [], + type: "error", + name: "RewardAllocationBlockDelayTooLarge", + }, + { inputs: [], type: "error", name: "RewardCycleNotEnded" }, + { inputs: [], type: "error", name: "RewardsDurationIsZero" }, + { inputs: [], type: "error", name: "StakeAmountIsZero" }, + { inputs: [], type: "error", name: "TimestampAlreadyProcessed" }, + { + inputs: [], + type: "error", + name: "TokenAlreadyWhitelistedOrLimitReached", + }, + { inputs: [], type: "error", name: "TokenNotWhitelisted" }, + { inputs: [], type: "error", name: "TooManyWeights" }, + { inputs: [], type: "error", name: "TotalSupplyOverflow" }, + { inputs: [], type: "error", name: "UUPSUnauthorizedCallContext" }, + { + inputs: [ + { internalType: "bytes32", name: "slot", type: "bytes32" }, + ], + type: "error", + name: "UUPSUnsupportedProxiableUUID", + }, + { inputs: [], type: "error", name: "VaultAlreadyExists" }, + { inputs: [], type: "error", name: "WithdrawAmountIsZero" }, + { inputs: [], type: "error", name: "ZeroAddress" }, + { inputs: [], type: "error", name: "ZeroOperatorOnFirstDeposit" }, + { inputs: [], type: "error", name: "ZeroPercentageWeight" }, + { + inputs: [ + { + internalType: "bytes", + name: "valPubkey", + type: "bytes", + indexed: true, + }, + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + indexed: false, + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + indexed: false, + }, + ], + type: "event", + name: "ActivateRewardAllocation", + anonymous: false, + }, + { + inputs: [ + { + internalType: "uint64", + name: "version", + type: "uint64", + indexed: false, + }, + ], + type: "event", + name: "Initialized", + anonymous: false, + }, + { + inputs: [ + { + internalType: "uint8", + name: "maxNumWeightsPerRewardAllocation", + type: "uint8", + indexed: false, + }, + ], + type: "event", + name: "MaxNumWeightsPerRewardAllocationSet", + anonymous: false, + }, + { + inputs: [ + { + internalType: "address", + name: "previousOwner", + type: "address", + indexed: true, + }, + { + internalType: "address", + name: "newOwner", + type: "address", + indexed: true, + }, + ], + type: "event", + name: "OwnershipTransferred", + anonymous: false, + }, + { + inputs: [ + { + internalType: "bytes", + name: "valPubkey", + type: "bytes", + indexed: true, + }, + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + indexed: false, + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + indexed: false, + }, + ], + type: "event", + name: "QueueRewardAllocation", + anonymous: false, + }, + { + inputs: [ + { + internalType: "uint64", + name: "rewardAllocationBlockDelay", + type: "uint64", + indexed: false, + }, + ], + type: "event", + name: "RewardAllocationBlockDelaySet", + anonymous: false, + }, + { + inputs: [ + { + internalType: "struct IBeraChef.RewardAllocation", + name: "rewardAllocation", + type: "tuple", + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + indexed: false, + }, + ], + type: "event", + name: "SetDefaultRewardAllocation", + anonymous: false, + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + indexed: true, + }, + ], + type: "event", + name: "Upgraded", + anonymous: false, + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + indexed: true, + }, + { + internalType: "bool", + name: "isWhitelisted", + type: "bool", + indexed: true, + }, + { + internalType: "string", + name: "metadata", + type: "string", + indexed: false, + }, + ], + type: "event", + name: "VaultWhitelistedStatusUpdated", + anonymous: false, + }, + { + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + indexed: true, + }, + { + internalType: "string", + name: "metadata", + type: "string", + indexed: false, + }, + ], + type: "event", + name: "WhitelistedVaultMetadataUpdated", + anonymous: false, + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "MAX_REWARD_ALLOCATION_BLOCK_DELAY", + outputs: [{ internalType: "uint64", name: "", type: "uint64" }], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "UPGRADE_INTERFACE_VERSION", + outputs: [{ internalType: "string", name: "", type: "string" }], + }, + { + inputs: [ + { internalType: "bytes", name: "valPubkey", type: "bytes" }, + ], + stateMutability: "nonpayable", + type: "function", + name: "activateReadyQueuedRewardAllocation", + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "beaconDepositContract", + outputs: [ + { + internalType: "contract IBeaconDeposit", + name: "", + type: "address", + }, + ], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "distributor", + outputs: [{ internalType: "address", name: "", type: "address" }], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "factory", + outputs: [{ internalType: "address", name: "", type: "address" }], + }, + { + inputs: [ + { internalType: "bytes", name: "valPubkey", type: "bytes" }, + ], + stateMutability: "view", + type: "function", + name: "getActiveRewardAllocation", + outputs: [ + { + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + }, + ], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "getDefaultRewardAllocation", + outputs: [ + { + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + }, + ], + }, + { + inputs: [ + { internalType: "bytes", name: "valPubkey", type: "bytes" }, + ], + stateMutability: "view", + type: "function", + name: "getQueuedRewardAllocation", + outputs: [ + { + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + }, + ], + }, + { + inputs: [ + { internalType: "bytes", name: "valPubkey", type: "bytes" }, + ], + stateMutability: "view", + type: "function", + name: "getSetActiveRewardAllocation", + outputs: [ + { + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + }, + ], + }, + { + inputs: [ + { + internalType: "address", + name: "_distributor", + type: "address", + }, + { internalType: "address", name: "_factory", type: "address" }, + { internalType: "address", name: "_governance", type: "address" }, + { + internalType: "address", + name: "_beaconDepositContract", + type: "address", + }, + { + internalType: "uint8", + name: "_maxNumWeightsPerRewardAllocation", + type: "uint8", + }, + ], + stateMutability: "nonpayable", + type: "function", + name: "initialize", + }, + { + inputs: [ + { internalType: "bytes", name: "valPubkey", type: "bytes" }, + { internalType: "uint256", name: "blockNumber", type: "uint256" }, + ], + stateMutability: "view", + type: "function", + name: "isQueuedRewardAllocationReady", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "isReady", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + }, + { + inputs: [ + { internalType: "address", name: "receiver", type: "address" }, + ], + stateMutability: "view", + type: "function", + name: "isWhitelistedVault", + outputs: [{ internalType: "bool", name: "", type: "bool" }], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "maxNumWeightsPerRewardAllocation", + outputs: [{ internalType: "uint8", name: "", type: "uint8" }], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "owner", + outputs: [{ internalType: "address", name: "", type: "address" }], + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "proxiableUUID", + outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }], + }, + { + inputs: [ + { internalType: "bytes", name: "valPubkey", type: "bytes" }, + { internalType: "uint64", name: "startBlock", type: "uint64" }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + stateMutability: "nonpayable", + type: "function", + name: "queueNewRewardAllocation", + }, + { + inputs: [], + stateMutability: "nonpayable", + type: "function", + name: "renounceOwnership", + }, + { + inputs: [], + stateMutability: "view", + type: "function", + name: "rewardAllocationBlockDelay", + outputs: [{ internalType: "uint64", name: "", type: "uint64" }], + }, + { + inputs: [ + { + internalType: "struct IBeraChef.RewardAllocation", + name: "ra", + type: "tuple", + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + }, + ], + }, + ], + stateMutability: "nonpayable", + type: "function", + name: "setDefaultRewardAllocation", + }, + { + inputs: [ + { + internalType: "uint8", + name: "_maxNumWeightsPerRewardAllocation", + type: "uint8", + }, + ], + stateMutability: "nonpayable", + type: "function", + name: "setMaxNumWeightsPerRewardAllocation", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_rewardAllocationBlockDelay", + type: "uint64", + }, + ], + stateMutability: "nonpayable", + type: "function", + name: "setRewardAllocationBlockDelay", + }, + { + inputs: [ + { internalType: "address", name: "receiver", type: "address" }, + { internalType: "bool", name: "isWhitelisted", type: "bool" }, + { internalType: "string", name: "metadata", type: "string" }, + ], + stateMutability: "nonpayable", + type: "function", + name: "setVaultWhitelistedStatus", + }, + { + inputs: [ + { internalType: "address", name: "newOwner", type: "address" }, + ], + stateMutability: "nonpayable", + type: "function", + name: "transferOwnership", + }, + { + inputs: [ + { internalType: "address", name: "vault", type: "address" }, + { internalType: "string", name: "metadata", type: "string" }, + ], + stateMutability: "nonpayable", + type: "function", + name: "updateWhitelistedVaultMetadata", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { internalType: "bytes", name: "data", type: "bytes" }, + ], + stateMutability: "payable", + type: "function", + name: "upgradeToAndCall", + }, + ], + devdoc: { + kind: "dev", + methods: { + "activateReadyQueuedRewardAllocation(bytes)": { + details: "Should be called by the distribution contract.", + params: { valPubkey: "The validator's pubkey." }, + }, + constructor: { "custom:oz-upgrades-unsafe-allow": "constructor" }, + "getActiveRewardAllocation(bytes)": { + details: + "Returns the active reward allocation if validator has a reward allocation and the weights are still valid, otherwise the default reward allocation.", + params: { valPubkey: "The validator's pubkey." }, + returns: { _0: "rewardAllocation The active reward allocation." }, + }, + "getDefaultRewardAllocation()": { + returns: { + _0: "rewardAllocation The default reward allocation.", + }, + }, + "getQueuedRewardAllocation(bytes)": { + params: { valPubkey: "The validator's pubkey." }, + returns: { _0: "rewardAllocation The queued reward allocation." }, + }, + "getSetActiveRewardAllocation(bytes)": { + details: + "This will return active reward allocation set by validators even if its not valid.", + params: { valPubkey: "The validator's pubkey." }, + returns: { _0: "rewardAllocation The reward allocation." }, + }, + "isQueuedRewardAllocationReady(bytes,uint256)": { + params: { + blockNumber: "The block number to be queried.", + valPubkey: "The validator's pubkey.", + }, + returns: { + _0: "isReady True if the queued reward allocation is ready to be activated, false otherwise.", + }, + }, + "isReady()": { + details: + "This function should be used by all contracts that depend on a system call.This will return false if the governance module has not set a default reward allocation yet.", + returns: { + _0: "isReady True if the BeraChef is ready to be used, false otherwise.", + }, + }, + "owner()": { details: "Returns the address of the current owner." }, + "proxiableUUID()": { + details: + "Implementation of the ERC-1822 {proxiableUUID} function. This returns the storage slot used by the implementation. It is used to validate the implementation's compatibility when performing an upgrade. IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier.", + }, + "queueNewRewardAllocation(bytes,uint64,(address,uint96)[])": { + details: + "The weights of the reward allocation must add up to 100% or 1e4. Only whitelisted pools may be used as well.", + params: { + startBlock: + "The block that the reward allocation goes into effect.", + valPubkey: "The validator's pubkey.", + weights: "The weights of the reward allocation.", + }, + }, + "renounceOwnership()": { + details: + "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.", + }, + "setDefaultRewardAllocation((uint64,(address,uint96)[]))": { + details: + "The caller of this function must be the governance module account.", + params: { rewardAllocation: "The default reward allocation." }, + }, + "setVaultWhitelistedStatus(address,bool,string)": { + params: { + isWhitelisted: + "The whitelist status; true if the receiver is being whitelisted, false otherwise.", + metadata: "The metadata of the vault.", + receiver: "The address to remove or add as whitelisted vault.", + }, + }, + "transferOwnership(address)": { + details: + "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.", + }, + "updateWhitelistedVaultMetadata(address,string)": { + params: { + metadata: + "The metadata of the vault, to associate info with the vault in the events log.", + receiver: "The address of the whitelisted vault.", + }, + }, + "upgradeToAndCall(address,bytes)": { + "custom:oz-upgrades-unsafe-allow-reachable": "delegatecall", + details: + "Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call encoded in `data`. Calls {_authorizeUpgrade}. Emits an {Upgraded} event.", + }, + }, + version: 1, + }, + userdoc: { + kind: "user", + methods: { + "activateReadyQueuedRewardAllocation(bytes)": { + notice: + "Activates the queued reward allocation for a validator if its ready for the current block.", + }, + "distributor()": { + notice: "The address of the distributor contract.", + }, + "factory()": { + notice: "The address of the reward vault factory contract.", + }, + "getActiveRewardAllocation(bytes)": { + notice: + "Returns the active reward allocation for validator with given pubkey", + }, + "getDefaultRewardAllocation()": { + notice: + "Returns the default reward allocation for validators that do not have a reward allocation.", + }, + "getQueuedRewardAllocation(bytes)": { + notice: + "Returns the queued reward allocation for a validator with given pubkey", + }, + "getSetActiveRewardAllocation(bytes)": { + notice: + "Returns the active reward allocation set by the validator with given pubkey.", + }, + "isQueuedRewardAllocationReady(bytes,uint256)": { + notice: + "Returns the status of whether a queued reward allocation is ready to be activated.", + }, + "isReady()": { + notice: + "Returns the status of whether the BeraChef contract is ready to be used.", + }, + "isWhitelistedVault(address)": { + notice: + "Mapping of receiver address to whether they are white-listed or not.", + }, + "queueNewRewardAllocation(bytes,uint64,(address,uint96)[])": { + notice: + "Add a new reward allocation to the queue for validator with given pubkey. Does not allow overwriting of existing queued reward allocation.", + }, + "rewardAllocationBlockDelay()": { + notice: + "The delay in blocks before a new reward allocation can go into effect.", + }, + "setDefaultRewardAllocation((uint64,(address,uint96)[]))": { + notice: + "Sets the default reward allocation for validators that do not have a reward allocation.", + }, + "setMaxNumWeightsPerRewardAllocation(uint8)": { + notice: + "Sets the maximum number of weights per reward allocation.", + }, + "setRewardAllocationBlockDelay(uint64)": { + notice: + "Sets the delay in blocks before a new reward allocation can be queued.", + }, + "setVaultWhitelistedStatus(address,bool,string)": { + notice: + "Updates the vault's whitelisted statusThe caller of this function must be the governance module account.", + }, + "updateWhitelistedVaultMetadata(address,string)": { + notice: + "Updates the metadata of a whitelisted vault, reverts if vault is not whitelisted.The caller of this function must be the governance module account.", + }, + }, + version: 1, + }, + }, + settings: { + remappings: [ + "@mock/=test/mock/", + "@openzeppelin-gov-ext/=node_modules/@openzeppelin/contracts-upgradeable/governance/extensions/", + "@openzeppelin-gov/=node_modules/@openzeppelin/contracts-upgradeable/governance/", + "@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/", + "@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/", + "@prb/math/=node_modules/@prb/math/", + "@pythnetwork/=node_modules/@pythnetwork/pyth-sdk-solidity/", + "ds-test/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/src/", + "forge-std/=lib/forge-std/src/", + "openzeppelin-foundry-upgrades/=lib/openzeppelin-foundry-upgrades/src/", + "solady/src/=lib/solady/src/", + "solady/test/=lib/solady/test/", + "solidity-stringutils/=lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/", + "transient-goodies/=lib/transient-goodies/src/", + ], + optimizer: { enabled: true, runs: 4294967295 }, + metadata: { bytecodeHash: "none" }, + compilationTarget: { "src/pol/rewards/BeraChef.sol": "BeraChef" }, + evmVersion: "cancun", + libraries: {}, + }, + sources: { + "lib/solady/src/utils/FixedPointMathLib.sol": { + keccak256: + "0x54dc2dda57990d37496e8c395540472770be93b0cd92b67c724f914b0f3d2b9d", + urls: [ + "bzz-raw://c6abe12a9b29fb27c2cb9da9d65411e4a76e2e49ab3dac1549775e7cd42e7e19", + "dweb:/ipfs/QmTuMANdNhtJA86nXQnxKtThtNaLXMxMxK8Ukd4dtkKA9y", + ], + license: "MIT", + }, + "lib/solady/src/utils/SafeTransferLib.sol": { + keccak256: + "0x583f47701d9b47bb3ef80fcabbbd62fbb58a01733b7a57e19658b4b02468883a", + urls: [ + "bzz-raw://2523bfac005e21ef9963fdb3c08b2c61824e2b5ce2f53d1a1828b01ed995217c", + "dweb:/ipfs/QmbBjVG9tZyeZSQH4m5GUzNBwo2iuvLoZYbmhT4gxnJc4J", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol": + { + keccak256: + "0x6662ec4e5cefca03eeadd073e9469df8d2944bb2ee8ec8f7622c2c46aab5f225", + urls: [ + "bzz-raw://4d8544c6f8daa4d1bc215c6a72fe0acdb748664a105b0e5efc19295667521d45", + "dweb:/ipfs/QmdGWqdnXT8S3RgCR6aV8XHZrsybieMQLLnug1NtpSjEXN", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol": + { + keccak256: + "0xc163fcf9bb10138631a9ba5564df1fa25db9adff73bd9ee868a8ae1858fe093a", + urls: [ + "bzz-raw://9706d43a0124053d9880f6e31a59f31bc0a6a3dc1acd66ce0a16e1111658c5f6", + "dweb:/ipfs/QmUFmfowzkRwGtDu36cXV9SPTBHJ3n7dG9xQiK5B28jTf2", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol": + { + keccak256: + "0x631188737069917d2f909d29ce62c4d48611d326686ba6683e26b72a23bfac0b", + urls: [ + "bzz-raw://7a61054ae84cd6c4d04c0c4450ba1d6de41e27e0a2c4f1bcdf58f796b401c609", + "dweb:/ipfs/QmUvtdp7X1mRVyC3CsHrtPbgoqWaXHp3S1ZR24tpAQYJWM", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol": + { + keccak256: + "0xf72d3b11f41fccbbdcacd121f994daab8267ccfceb1fb4f247e4ba274c169d27", + urls: [ + "bzz-raw://1e46ee40ddc9e2009176ce5d76aa2c046fd68f2ed52d02d77db191365b7c5b2e", + "dweb:/ipfs/QmZnxgPmCCHosdvbh4J65uTaFYeGtZGzQ1sXRdeh1y68Zr", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol": + { + keccak256: + "0xdbef5f0c787055227243a7318ef74c8a5a1108ca3a07f2b3a00ef67769e1e397", + urls: [ + "bzz-raw://08e39f23d5b4692f9a40803e53a8156b72b4c1f9902a88cd65ba964db103dab9", + "dweb:/ipfs/QmPKn6EYDgpga7KtpkA8wV2yJCYGMtc9K4LkJfhKX2RVSV", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol": + { + keccak256: + "0x92915b7f7f642c6be3f65bfd1522feb5d5b6ef25f755f4dbb51df32c868f2f97", + urls: [ + "bzz-raw://85ad36d5cc7e190e1ee6c94b24659bc3a31396c4c36b6ffa6a509e10661f8007", + "dweb:/ipfs/QmPFyc4zMh2zo6YWZt25gjm3YdR2hg6wGETaWw256fMmJJ", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol": + { + keccak256: + "0x361126a17677994081cd9cb69c3f50cffff6e920d25cb7e428acdb1ae41d1866", + urls: [ + "bzz-raw://19ae787a7dd001269cd60a394b1a5261b78925a0fc3a6f927beb2986a9aa56cf", + "dweb:/ipfs/QmYLfXiuKmcRgTDBEDXMMjXU8t6JxsspUmjxYzqWS55oEv", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol": + { + keccak256: + "0xc8ed8d2056934b7675b695dec032f2920c2f5c6cf33a17ca85650940675323ab", + urls: [ + "bzz-raw://3c8ccc75d1cd792d192aa09e54dd49ea35fe85baa9fcd17486f29227d9f29b89", + "dweb:/ipfs/QmbboSbFUEiM9tdEgBwuTRb7bykFoJXZ7dsSr1PSREJXMr", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/access/IAccessControl.sol": { + keccak256: + "0xc1c2a7f1563b77050dc6d507db9f4ada5d042c1f6a9ddbffdc49c77cdc0a1606", + urls: [ + "bzz-raw://fd54abb96a6156d9a761f6fdad1d3004bc48d2d4fce47f40a3f91a7ae83fc3a1", + "dweb:/ipfs/QmUrFSGkTDJ7WaZ6qPVVe3Gn5uN2viPb7x7QQ35UX4DofX", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol": { + keccak256: + "0x9b6b3e7803bc5f2f8cd7ad57db8ac1def61a9930a5a3107df4882e028a9605d7", + urls: [ + "bzz-raw://da62d6be1f5c6edf577f0cb45666a8aa9c2086a4bac87d95d65f02e2f4c36a4b", + "dweb:/ipfs/QmNkpvBpoCMvX8JwAFNSc5XxJ2q5BXJpL5L1txb4QkqVFF", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/interfaces/IERC165.sol": { + keccak256: + "0xde7e9fd9aee8d4f40772f96bb3b58836cbc6dfc0227014a061947f8821ea9724", + urls: [ + "bzz-raw://11fea9f8bc98949ac6709f0c1699db7430d2948137aa94d5a9e95a91f61a710a", + "dweb:/ipfs/QmQdfRXxQjwP6yn3DVo1GHPpriKNcFghSPi94Z1oKEFUNS", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol": { + keccak256: + "0xb25a4f11fa80c702bf5cd85adec90e6f6f507f32f4a8e6f5dbc31e8c10029486", + urls: [ + "bzz-raw://6917f8a323e7811f041aecd4d9fd6e92455a6fba38a797ac6f6e208c7912b79d", + "dweb:/ipfs/QmShuYv55wYHGi4EFkDB8QfF7ZCHoKk2efyz3AWY1ExSq7", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/interfaces/IERC20.sol": { + keccak256: + "0xce41876e78d1badc0512229b4d14e4daf83bc1003d7f83978d18e0e56f965b9c", + urls: [ + "bzz-raw://a2608291cb038b388d80b79a06b6118a42f7894ff67b7da10ec0dbbf5b2973ba", + "dweb:/ipfs/QmWohqcBLbcxmA4eGPhZDXe5RYMMEEpFq22nfkaUMvTfw1", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol": { + keccak256: + "0xc42facb5094f2f35f066a7155bda23545e39a3156faef3ddc00185544443ba7d", + urls: [ + "bzz-raw://d3b36282ab029b46bd082619a308a2ea11c309967b9425b7b7a6eb0b0c1c3196", + "dweb:/ipfs/QmP2YVfDB2FoREax3vJu7QhDnyYRMw52WPrCD4vdT2kuDA", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol": { + keccak256: + "0x911c3346ee26afe188f3b9dc267ef62a7ccf940aba1afa963e3922f0ca3d8a06", + urls: [ + "bzz-raw://04539f4419e44a831807d7203375d2bc6a733da256efd02e51290f5d5015218c", + "dweb:/ipfs/QmPZ97gsAAgaMRPiE2WJfkzRsudQnW5tPAvMgGj1jcTJtR", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol": { + keccak256: + "0xc59a78b07b44b2cf2e8ab4175fca91e8eca1eee2df7357b8d2a8833e5ea1f64c", + urls: [ + "bzz-raw://5aa4f07e65444784c29cd7bfcc2341b34381e4e5b5da9f0c5bd00d7f430e66fa", + "dweb:/ipfs/QmWRMh4Q9DpaU9GvsiXmDdoNYMyyece9if7hnfLz7uqzWM", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol": { + keccak256: + "0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7", + urls: [ + "bzz-raw://df6f0c459663c9858b6cba2cda1d14a7d05a985bed6d2de72bd8e78c25ee79db", + "dweb:/ipfs/QmeTTxZ7qVk9rjEv2R4CpCwdf8UMCcRqDNMvzNxHc3Fnn9", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": + { + keccak256: + "0xca2ae13e0610f6a99238dd00b97bd786bc92732dae6d6b9d61f573ec51018310", + urls: [ + "bzz-raw://75f8c71ce0c91c40dd5f249ace0b7d8270f8f1767231bcf71490f7157d6ba862", + "dweb:/ipfs/QmYXgxeDyFHvz3JsXxLEYN6GNUR44ThHeFj5XkpkgMoG4w", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/utils/Address.sol": { + keccak256: + "0x9d8da059267bac779a2dbbb9a26c2acf00ca83085e105d62d5d4ef96054a47f5", + urls: [ + "bzz-raw://c78e2aa4313323cecd1ef12a8d6265b96beee1a199923abf55d9a2a9e291ad23", + "dweb:/ipfs/QmUTs2KStXucZezzFo3EYeqYu47utu56qrF7jj1Gue65vb", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/utils/Errors.sol": { + keccak256: + "0x6afa713bfd42cf0f7656efa91201007ac465e42049d7de1d50753a373648c123", + urls: [ + "bzz-raw://ba1d02f4847670a1b83dec9f7d37f0b0418d6043447b69f3a29a5f9efc547fcf", + "dweb:/ipfs/QmQ7iH2keLNUKgq2xSWcRmuBE5eZ3F5whYAkAGzCNNoEWB", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/utils/StorageSlot.sol": { + keccak256: + "0xcf74f855663ce2ae00ed8352666b7935f6cddea2932fdf2c3ecd30a9b1cd0e97", + urls: [ + "bzz-raw://9f660b1f351b757dfe01438e59888f31f33ded3afcf5cb5b0d9bf9aa6f320a8b", + "dweb:/ipfs/QmarDJ5hZEgBtCmmrVzEZWjub9769eD686jmzb2XpSU1cM", + ], + license: "MIT", + }, + "node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol": + { + keccak256: + "0x79796192ec90263f21b464d5bc90b777a525971d3de8232be80d9c4f9fb353b8", + urls: [ + "bzz-raw://f6fda447a62815e8064f47eff0dd1cf58d9207ad69b5d32280f8d7ed1d1e4621", + "dweb:/ipfs/QmfDRc7pxfaXB2Dh9np5Uf29Na3pQ7tafRS684wd3GLjVL", + ], + license: "MIT", + }, + "src/base/FactoryOwnable.sol": { + keccak256: + "0x0acb2d215a387ec7b00266303f66c9f47bec48ca87544188ec75dac623bcca3a", + urls: [ + "bzz-raw://4b0a2abf6417c22ef255727817aabd024bd56e03f9f78eeedafe1ae7a1e6898b", + "dweb:/ipfs/QmZDNyqPAZLNJzAeck8Byr1uNLTaz4HkPpixzMbtE37Aet", + ], + license: "MIT", + }, + "src/base/IStakingRewards.sol": { + keccak256: + "0xf77be3e8bf1a82f911a54a53374f46100291c40985098b18e5d52dd280f809b4", + urls: [ + "bzz-raw://ade2d0d5a7cce6b44c67900faacf42a27af5ef256cc6290b329f13be5dfa3fd6", + "dweb:/ipfs/QmWQ4jt8FwtTa6o89DCbrhD5TEVu5So4FF2j2nRha1R6Kn", + ], + license: "MIT", + }, + "src/base/IStakingRewardsErrors.sol": { + keccak256: + "0x33e3fb842a715f5af5b050daf7c396e220091c486ad3b1410fc80ebd2e7502b8", + urls: [ + "bzz-raw://c8e4d5b93ea74a2b456c68c1434bae582fccc8cf6bd7d87a36128ebe6da4cb9d", + "dweb:/ipfs/QmNdYN5G7WiE73PyuHXK2JW7MUghNtHhxJL37qY2aE7jig", + ], + license: "MIT", + }, + "src/base/StakingRewards.sol": { + keccak256: + "0x8586a1d0ba513c6e5b6376ca2b60e604aa4c87b05a0918652cbad747f3fed901", + urls: [ + "bzz-raw://c967c6c1b732b532fb7753588157ded58e694cf46777f1f96705721aa34a12c6", + "dweb:/ipfs/QmcAnZTGNt3oxfLUwe1F93usFSn6YXXNkHojDuVZyPfCzK", + ], + license: "MIT", + }, + "src/libraries/Utils.sol": { + keccak256: + "0x33466d27f0aa325072a109afd0933825d7123466771b8b4fc3649144c16f837e", + urls: [ + "bzz-raw://1318a8da145d042715699be5c2a3f3a9e1aaef223206ad279b77be64c3cc6273", + "dweb:/ipfs/QmYCK4Vq3Pm3hCro7iV4fNGSFnJQ9rZXC8owWL3JdgGg8m", + ], + license: "MIT", + }, + "src/pol/interfaces/IBeaconDeposit.sol": { + keccak256: + "0xe9b8a9725bd59a1d4d480c09587025089d9a282eb18abe951c0e909cdb1035fc", + urls: [ + "bzz-raw://d32be0c20a9a995f8ff9bc4bba459daee426dbb1a3889f0d735d2a1b2ae74e47", + "dweb:/ipfs/Qmag63XseRsA4gjGEFJsQxoaXJKeoMdGf5PT9WJ6Su7AEf", + ], + license: "MIT", + }, + "src/pol/interfaces/IBeraChef.sol": { + keccak256: + "0x40892fc52fe49947d80b4b525733fe2b114581fe51c701fb83f929eee444a14d", + urls: [ + "bzz-raw://b0c87f05328a1bb999831308508facc8f9282e618d04589eeba58bd6c444ceb3", + "dweb:/ipfs/QmV5Kiqt64fDF6TvUgczDeDmm8nEbe5nF1KoU7MpRik5QY", + ], + license: "MIT", + }, + "src/pol/interfaces/IPOLErrors.sol": { + keccak256: + "0x8707b74334cee8ab454a54dd686c29a30a4ced9e4d19b35fea98ca5ec8909fc1", + urls: [ + "bzz-raw://3aa8182c8694b233464d91bbc42132e0d98cab0e7c5c1552bfdd4c67bbf7d5f7", + "dweb:/ipfs/Qmb7GTV8EseozquWc1r4W3wkWeisKLo7frKAkPzWBQueem", + ], + license: "MIT", + }, + "src/pol/interfaces/IRewardVault.sol": { + keccak256: + "0x584fcc8a60bd8e72089591e825223c539c4be70ede13a9ef39041e2282e42db8", + urls: [ + "bzz-raw://5555a25d336e67252f2c0dc9ccaacda504440fc657a6e393056b095716dbe323", + "dweb:/ipfs/QmQzYSNhUSVdQ7xpy2LoRMwMEqaHJd3yhskUgDhBqhKb5b", + ], + license: "MIT", + }, + "src/pol/interfaces/IRewardVaultFactory.sol": { + keccak256: + "0x288d862c4bede52ddfc713ac3b8d6b09d1fb653a77f70180321a29609631f4b7", + urls: [ + "bzz-raw://43a8e23c517c78038d497030a2cf8be8e157b2ae46e254e69a9fc92e958c8d62", + "dweb:/ipfs/QmXFnZEs2asg41FZoamioWcZxvvfhkfTFZuVpq4WrMAT6s", + ], + license: "MIT", + }, + "src/pol/rewards/BeraChef.sol": { + keccak256: + "0x9f635eb07a5fce655f62313aa54dee4feca833507d83adeb0dfb0dd980c24f23", + urls: [ + "bzz-raw://4d28f53d50dbc29cb31183423246e660c4305c8efd2f1485e00fba422d6a49a3", + "dweb:/ipfs/QmVrgK3jLTWUQGhDQsN8ngcgU6XRXur3EaNMCDHFB5RsEM", + ], + license: "MIT", + }, + "src/pol/rewards/RewardVault.sol": { + keccak256: + "0x63d7ae3d1c08b7cb133ae297f5dc6686c228dcea75f78a3af411bae90715d540", + urls: [ + "bzz-raw://94ff94fe8088a92a3a0e75763d984efd9c7441f7ca4aaf6d39b448fa33d372ad", + "dweb:/ipfs/QmXQJAD8hXY7ney84etceLxf9szpNgC9V5KXYvL6cuLFYz", + ], + license: "MIT", + }, + }, + version: 1, + }, + storageLayout: { + storage: [ + { + astId: 128582, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "distributor", + offset: 0, + slot: "0", + type: "t_address", + }, + { + astId: 128585, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "factory", + offset: 0, + slot: "1", + type: "t_address", + }, + { + astId: 128588, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "beaconDepositContract", + offset: 0, + slot: "2", + type: "t_contract(IBeaconDeposit)127557", + }, + { + astId: 128591, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "rewardAllocationBlockDelay", + offset: 20, + slot: "2", + type: "t_uint64", + }, + { + astId: 128594, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "maxNumWeightsPerRewardAllocation", + offset: 28, + slot: "2", + type: "t_uint8", + }, + { + astId: 128600, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "activeRewardAllocations", + offset: 0, + slot: "3", + type: "t_mapping(t_bytes_memory_ptr,t_struct(RewardAllocation)127572_storage)", + }, + { + astId: 128606, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "queuedRewardAllocations", + offset: 0, + slot: "4", + type: "t_mapping(t_bytes_memory_ptr,t_struct(RewardAllocation)127572_storage)", + }, + { + astId: 128611, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "isWhitelistedVault", + offset: 0, + slot: "5", + type: "t_mapping(t_address,t_bool)", + }, + { + astId: 128615, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "defaultRewardAllocation", + offset: 0, + slot: "6", + type: "t_struct(RewardAllocation)127572_storage", + }, + ], + types: { + t_address: { + encoding: "inplace", + label: "address", + numberOfBytes: "20", + }, + "t_array(t_struct(Weight)127578_storage)dyn_storage": { + encoding: "dynamic_array", + label: "struct IBeraChef.Weight[]", + numberOfBytes: "32", + base: "t_struct(Weight)127578_storage", + }, + t_bool: { encoding: "inplace", label: "bool", numberOfBytes: "1" }, + t_bytes_memory_ptr: { + encoding: "bytes", + label: "bytes", + numberOfBytes: "32", + }, + "t_contract(IBeaconDeposit)127557": { + encoding: "inplace", + label: "contract IBeaconDeposit", + numberOfBytes: "20", + }, + "t_mapping(t_address,t_bool)": { + encoding: "mapping", + key: "t_address", + label: "mapping(address => bool)", + numberOfBytes: "32", + value: "t_bool", + }, + "t_mapping(t_bytes_memory_ptr,t_struct(RewardAllocation)127572_storage)": + { + encoding: "mapping", + key: "t_bytes_memory_ptr", + label: "mapping(bytes => struct IBeraChef.RewardAllocation)", + numberOfBytes: "32", + value: "t_struct(RewardAllocation)127572_storage", + }, + "t_struct(RewardAllocation)127572_storage": { + encoding: "inplace", + label: "struct IBeraChef.RewardAllocation", + numberOfBytes: "64", + members: [ + { + astId: 127567, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "startBlock", + offset: 0, + slot: "0", + type: "t_uint64", + }, + { + astId: 127571, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "weights", + offset: 0, + slot: "1", + type: "t_array(t_struct(Weight)127578_storage)dyn_storage", + }, + ], + }, + "t_struct(Weight)127578_storage": { + encoding: "inplace", + label: "struct IBeraChef.Weight", + numberOfBytes: "32", + members: [ + { + astId: 127575, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "receiver", + offset: 0, + slot: "0", + type: "t_address", + }, + { + astId: 127577, + contract: "src/pol/rewards/BeraChef.sol:BeraChef", + label: "percentageNumerator", + offset: 20, + slot: "0", + type: "t_uint96", + }, + ], + }, + t_uint64: { encoding: "inplace", label: "uint64", numberOfBytes: "8" }, + t_uint8: { encoding: "inplace", label: "uint8", numberOfBytes: "1" }, + t_uint96: { encoding: "inplace", label: "uint96", numberOfBytes: "12" }, + }, + }, + ast: { + absolutePath: "src/pol/rewards/BeraChef.sol", + id: 129316, + exportedSymbols: { + BeraChef: [129315], + IBeaconDeposit: [127557], + IBeraChef: [127738], + IRewardVaultFactory: [128545], + OwnableUpgradeable: [68260], + RewardVault: [131436], + UUPSUpgradeable: [74181], + Utils: [123990], + }, + nodeType: "SourceUnit", + src: "32:14334:242", + nodes: [ + { + id: 128547, + nodeType: "PragmaDirective", + src: "32:24:242", + nodes: [], + literals: ["solidity", "^", "0.8", ".19"], + }, + { + id: 128549, + nodeType: "ImportDirective", + src: "58:103:242", + nodes: [], + absolutePath: + "node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol", + file: "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 68261, + symbolAliases: [ + { + foreign: { + id: 128548, + name: "OwnableUpgradeable", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 68260, + src: "67:18:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 128551, + nodeType: "ImportDirective", + src: "162:102:242", + nodes: [], + absolutePath: + "node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol", + file: "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 74182, + symbolAliases: [ + { + foreign: { + id: 128550, + name: "UUPSUpgradeable", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 74181, + src: "171:15:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 128553, + nodeType: "ImportDirective", + src: "266:50:242", + nodes: [], + absolutePath: "src/libraries/Utils.sol", + file: "../../libraries/Utils.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 123991, + symbolAliases: [ + { + foreign: { + id: 128552, + name: "Utils", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 123990, + src: "275:5:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 128555, + nodeType: "ImportDirective", + src: "317:66:242", + nodes: [], + absolutePath: "src/pol/interfaces/IBeaconDeposit.sol", + file: "../interfaces/IBeaconDeposit.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 127558, + symbolAliases: [ + { + foreign: { + id: 128554, + name: "IBeaconDeposit", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127557, + src: "326:14:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 128557, + nodeType: "ImportDirective", + src: "384:56:242", + nodes: [], + absolutePath: "src/pol/interfaces/IBeraChef.sol", + file: "../interfaces/IBeraChef.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 127739, + symbolAliases: [ + { + foreign: { + id: 128556, + name: "IBeraChef", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127738, + src: "393:9:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 128559, + nodeType: "ImportDirective", + src: "441:48:242", + nodes: [], + absolutePath: "src/pol/rewards/RewardVault.sol", + file: "./RewardVault.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 131437, + symbolAliases: [ + { + foreign: { + id: 128558, + name: "RewardVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 131436, + src: "450:11:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 128561, + nodeType: "ImportDirective", + src: "490:76:242", + nodes: [], + absolutePath: "src/pol/interfaces/IRewardVaultFactory.sol", + file: "../interfaces/IRewardVaultFactory.sol", + nameLocation: "-1:-1:-1", + scope: 129316, + sourceUnit: 128546, + symbolAliases: [ + { + foreign: { + id: 128560, + name: "IRewardVaultFactory", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128545, + src: "499:19:242", + typeDescriptions: {}, + }, + nameLocation: "-1:-1:-1", + }, + ], + unitAlias: "", + }, + { + id: 129315, + nodeType: "ContractDefinition", + src: "1003:13362:242", + nodes: [ + { + id: 128571, + nodeType: "UsingForDirective", + src: "1077:23:242", + nodes: [], + global: false, + libraryName: { + id: 128569, + name: "Utils", + nameLocations: ["1083:5:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 123990, + src: "1083:5:242", + }, + typeName: { + id: 128570, + name: "bytes4", + nodeType: "ElementaryTypeName", + src: "1093:6:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + }, + { + id: 128575, + nodeType: "VariableDeclaration", + src: "1164:50:242", + nodes: [], + constant: true, + documentation: { + id: 128572, + nodeType: "StructuredDocumentation", + src: "1106:53:242", + text: "@dev Represents 100%. Chosen to be less granular.", + }, + mutability: "constant", + name: "ONE_HUNDRED_PERCENT", + nameLocation: "1189:19:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + typeName: { + id: 128573, + name: "uint96", + nodeType: "ElementaryTypeName", + src: "1164:6:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + value: { + hexValue: "316534", + id: 128574, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "1211:3:242", + typeDescriptions: { + typeIdentifier: "t_rational_10000_by_1", + typeString: "int_const 10000", + }, + value: "1e4", + }, + visibility: "internal", + }, + { + id: 128579, + nodeType: "VariableDeclaration", + src: "1277:68:242", + nodes: [], + constant: true, + documentation: { + id: 128576, + nodeType: "StructuredDocumentation", + src: "1220:52:242", + text: "@dev With 2 second block time, this is ~30 days.", + }, + functionSelector: "4ce34525", + mutability: "constant", + name: "MAX_REWARD_ALLOCATION_BLOCK_DELAY", + nameLocation: "1300:33:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + typeName: { + id: 128577, + name: "uint64", + nodeType: "ElementaryTypeName", + src: "1277:6:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + value: { + hexValue: "315f3331355f303030", + id: 128578, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "1336:9:242", + typeDescriptions: { + typeIdentifier: "t_rational_1315000_by_1", + typeString: "int_const 1315000", + }, + value: "1_315_000", + }, + visibility: "public", + }, + { + id: 128582, + nodeType: "VariableDeclaration", + src: "1692:26:242", + nodes: [], + constant: false, + documentation: { + id: 128580, + nodeType: "StructuredDocumentation", + src: "1635:52:242", + text: "@notice The address of the distributor contract.", + }, + functionSelector: "bfe10928", + mutability: "mutable", + name: "distributor", + nameLocation: "1707:11:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128581, + name: "address", + nodeType: "ElementaryTypeName", + src: "1692:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "public", + }, + { + id: 128585, + nodeType: "VariableDeclaration", + src: "1790:22:242", + nodes: [], + constant: false, + documentation: { + id: 128583, + nodeType: "StructuredDocumentation", + src: "1724:61:242", + text: "@notice The address of the reward vault factory contract.", + }, + functionSelector: "c45a0155", + mutability: "mutable", + name: "factory", + nameLocation: "1805:7:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128584, + name: "address", + nodeType: "ElementaryTypeName", + src: "1790:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "public", + }, + { + id: 128588, + nodeType: "VariableDeclaration", + src: "1819:43:242", + nodes: [], + constant: false, + functionSelector: "eafe0f4c", + mutability: "mutable", + name: "beaconDepositContract", + nameLocation: "1841:21:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_contract$_IBeaconDeposit_$127557", + typeString: "contract IBeaconDeposit", + }, + typeName: { + id: 128587, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128586, + name: "IBeaconDeposit", + nameLocations: ["1819:14:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127557, + src: "1819:14:242", + }, + referencedDeclaration: 127557, + src: "1819:14:242", + typeDescriptions: { + typeIdentifier: "t_contract$_IBeaconDeposit_$127557", + typeString: "contract IBeaconDeposit", + }, + }, + visibility: "public", + }, + { + id: 128591, + nodeType: "VariableDeclaration", + src: "1956:40:242", + nodes: [], + constant: false, + documentation: { + id: 128589, + nodeType: "StructuredDocumentation", + src: "1869:82:242", + text: "@notice The delay in blocks before a new reward allocation can go into effect.", + }, + functionSelector: "53a35d1d", + mutability: "mutable", + name: "rewardAllocationBlockDelay", + nameLocation: "1970:26:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + typeName: { + id: 128590, + name: "uint64", + nodeType: "ElementaryTypeName", + src: "1956:6:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + visibility: "public", + }, + { + id: 128594, + nodeType: "VariableDeclaration", + src: "2069:45:242", + nodes: [], + constant: false, + documentation: { + id: 128592, + nodeType: "StructuredDocumentation", + src: "2003:61:242", + text: "@dev The maximum number of weights per reward allocation.", + }, + functionSelector: "c35569cd", + mutability: "mutable", + name: "maxNumWeightsPerRewardAllocation", + nameLocation: "2082:32:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + typeName: { + id: 128593, + name: "uint8", + nodeType: "ElementaryTypeName", + src: "2069:5:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + visibility: "public", + }, + { + id: 128600, + nodeType: "VariableDeclaration", + src: "2195:77:242", + nodes: [], + constant: false, + documentation: { + id: 128595, + nodeType: "StructuredDocumentation", + src: "2121:69:242", + text: "@dev Mapping of validator public key to active reward allocation.", + }, + mutability: "mutable", + name: "activeRewardAllocations", + nameLocation: "2249:23:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes => struct IBeraChef.RewardAllocation)", + }, + typeName: { + id: 128599, + keyName: "valPubkey", + keyNameLocation: "2209:9:242", + keyType: { + id: 128596, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "2203:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + nodeType: "Mapping", + src: "2195:44:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes => struct IBeraChef.RewardAllocation)", + }, + valueName: "", + valueNameLocation: "-1:-1:-1", + valueType: { + id: 128598, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128597, + name: "RewardAllocation", + nameLocations: ["2222:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "2222:16:242", + }, + referencedDeclaration: 127572, + src: "2222:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + }, + visibility: "internal", + }, + { + id: 128606, + nodeType: "VariableDeclaration", + src: "2361:77:242", + nodes: [], + constant: false, + documentation: { + id: 128601, + nodeType: "StructuredDocumentation", + src: "2279:77:242", + text: "@dev Mapping of validator public key address to queued reward allocation.", + }, + mutability: "mutable", + name: "queuedRewardAllocations", + nameLocation: "2415:23:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes => struct IBeraChef.RewardAllocation)", + }, + typeName: { + id: 128605, + keyName: "valPubkey", + keyNameLocation: "2375:9:242", + keyType: { + id: 128602, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "2369:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + nodeType: "Mapping", + src: "2361:44:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes => struct IBeraChef.RewardAllocation)", + }, + valueName: "", + valueNameLocation: "-1:-1:-1", + valueType: { + id: 128604, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128603, + name: "RewardAllocation", + nameLocations: ["2388:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "2388:16:242", + }, + referencedDeclaration: 127572, + src: "2388:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + }, + visibility: "internal", + }, + { + id: 128611, + nodeType: "VariableDeclaration", + src: "2530:59:242", + nodes: [], + constant: false, + documentation: { + id: 128607, + nodeType: "StructuredDocumentation", + src: "2445:80:242", + text: "@notice Mapping of receiver address to whether they are white-listed or not.", + }, + functionSelector: "a2ce2773", + mutability: "mutable", + name: "isWhitelistedVault", + nameLocation: "2571:18:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_mapping$_t_address_$_t_bool_$", + typeString: "mapping(address => bool)", + }, + typeName: { + id: 128610, + keyName: "receiver", + keyNameLocation: "2546:8:242", + keyType: { + id: 128608, + name: "address", + nodeType: "ElementaryTypeName", + src: "2538:7:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "Mapping", + src: "2530:33:242", + typeDescriptions: { + typeIdentifier: "t_mapping$_t_address_$_t_bool_$", + typeString: "mapping(address => bool)", + }, + valueName: "", + valueNameLocation: "-1:-1:-1", + valueType: { + id: 128609, + name: "bool", + nodeType: "ElementaryTypeName", + src: "2558:4:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + }, + visibility: "public", + }, + { + id: 128615, + nodeType: "VariableDeclaration", + src: "2702:49:242", + nodes: [], + constant: false, + documentation: { + id: 128612, + nodeType: "StructuredDocumentation", + src: "2596:101:242", + text: "@notice The Default reward allocation is used when a validator does not have a reward allocation.", + }, + mutability: "mutable", + name: "defaultRewardAllocation", + nameLocation: "2728:23:242", + scope: 129315, + stateVariable: true, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_struct$_RewardAllocation_$127572_storage", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 128614, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128613, + name: "RewardAllocation", + nameLocations: ["2702:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "2702:16:242", + }, + referencedDeclaration: 127572, + src: "2702:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + { + id: 128623, + nodeType: "FunctionDefinition", + src: "2811:53:242", + nodes: [], + body: { + id: 128622, + nodeType: "Block", + src: "2825:39:242", + nodes: [], + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + id: 128619, + name: "_disableInitializers", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 73967, + src: "2835:20:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_nonpayable$__$returns$__$", + typeString: "function ()", + }, + }, + id: 128620, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "2835:22:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128621, + nodeType: "ExpressionStatement", + src: "2835:22:242", + }, + ], + }, + documentation: { + id: 128616, + nodeType: "StructuredDocumentation", + src: "2758:48:242", + text: "@custom:oz-upgrades-unsafe-allow constructor", + }, + implemented: true, + kind: "constructor", + modifiers: [], + name: "", + nameLocation: "-1:-1:-1", + parameters: { + id: 128617, + nodeType: "ParameterList", + parameters: [], + src: "2822:2:242", + }, + returnParameters: { + id: 128618, + nodeType: "ParameterList", + parameters: [], + src: "2825:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "public", + }, + { + id: 128677, + nodeType: "FunctionDefinition", + src: "2870:890:242", + nodes: [], + body: { + id: 128676, + nodeType: "Block", + src: "3111:649:242", + nodes: [], + statements: [ + { + expression: { + arguments: [ + { + id: 128639, + name: "_governance", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128629, + src: "3136:11:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + ], + id: 128638, + name: "__Ownable_init", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 68120, + src: "3121:14:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_nonpayable$_t_address_$returns$__$", + typeString: "function (address)", + }, + }, + id: 128640, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "3121:27:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128641, + nodeType: "ExpressionStatement", + src: "3121:27:242", + }, + { + expression: { + id: 128644, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128642, + name: "distributor", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128582, + src: "3214:11:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128643, + name: "_distributor", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128625, + src: "3228:12:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + src: "3214:26:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + id: 128645, + nodeType: "ExpressionStatement", + src: "3214:26:242", + }, + { + expression: { + id: 128648, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128646, + name: "factory", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128585, + src: "3306:7:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128647, + name: "_factory", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128627, + src: "3316:8:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + src: "3306:18:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + id: 128649, + nodeType: "ExpressionStatement", + src: "3306:18:242", + }, + { + expression: { + id: 128654, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128650, + name: "beaconDepositContract", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128588, + src: "3390:21:242", + typeDescriptions: { + typeIdentifier: "t_contract$_IBeaconDeposit_$127557", + typeString: "contract IBeaconDeposit", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + arguments: [ + { + id: 128652, + name: "_beaconDepositContract", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128631, + src: "3429:22:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + ], + id: 128651, + name: "IBeaconDeposit", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127557, + src: "3414:14:242", + typeDescriptions: { + typeIdentifier: + "t_type$_t_contract$_IBeaconDeposit_$127557_$", + typeString: "type(contract IBeaconDeposit)", + }, + }, + id: 128653, + isConstant: false, + isLValue: false, + isPure: false, + kind: "typeConversion", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "3414:38:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_contract$_IBeaconDeposit_$127557", + typeString: "contract IBeaconDeposit", + }, + }, + src: "3390:62:242", + typeDescriptions: { + typeIdentifier: "t_contract$_IBeaconDeposit_$127557", + typeString: "contract IBeaconDeposit", + }, + }, + id: 128655, + nodeType: "ExpressionStatement", + src: "3390:62:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + id: 128658, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128656, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128633, + src: "3466:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + nodeType: "BinaryOperation", + operator: "==", + rightExpression: { + hexValue: "30", + id: 128657, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "3503:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "3466:38:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128667, + nodeType: "IfStatement", + src: "3462:129:242", + trueBody: { + id: 128666, + nodeType: "Block", + src: "3506:85:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128659, + name: "MaxNumWeightsPerRewardAllocationIsZero", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128135, + src: "3520:38:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128662, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "3559:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "3520:47:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128663, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "3568:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "3520:58:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128664, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "3520:60:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128665, + nodeType: "ExpressionStatement", + src: "3520:60:242", + }, + ], + }, + }, + { + eventCall: { + arguments: [ + { + id: 128669, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128633, + src: "3641:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + ], + expression: { + argumentTypes: [ + { typeIdentifier: "t_uint8", typeString: "uint8" }, + ], + id: 128668, + name: "MaxNumWeightsPerRewardAllocationSet", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127583, + src: "3605:35:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_uint8_$returns$__$", + typeString: "function (uint8)", + }, + }, + id: 128670, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "3605:70:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128671, + nodeType: "EmitStatement", + src: "3600:75:242", + }, + { + expression: { + id: 128674, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128672, + name: "maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128594, + src: "3685:32:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128673, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128633, + src: "3720:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + src: "3685:68:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + id: 128675, + nodeType: "ExpressionStatement", + src: "3685:68:242", + }, + ], + }, + functionSelector: "008c2676", + implemented: true, + kind: "function", + modifiers: [ + { + id: 128636, + kind: "modifierInvocation", + modifierName: { + id: 128635, + name: "initializer", + nameLocations: ["3095:11:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 73853, + src: "3095:11:242", + }, + nodeType: "ModifierInvocation", + src: "3095:11:242", + }, + ], + name: "initialize", + nameLocation: "2879:10:242", + parameters: { + id: 128634, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128625, + mutability: "mutable", + name: "_distributor", + nameLocation: "2907:12:242", + nodeType: "VariableDeclaration", + scope: 128677, + src: "2899:20:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128624, + name: "address", + nodeType: "ElementaryTypeName", + src: "2899:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128627, + mutability: "mutable", + name: "_factory", + nameLocation: "2937:8:242", + nodeType: "VariableDeclaration", + scope: 128677, + src: "2929:16:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128626, + name: "address", + nodeType: "ElementaryTypeName", + src: "2929:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128629, + mutability: "mutable", + name: "_governance", + nameLocation: "2963:11:242", + nodeType: "VariableDeclaration", + scope: 128677, + src: "2955:19:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128628, + name: "address", + nodeType: "ElementaryTypeName", + src: "2955:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128631, + mutability: "mutable", + name: "_beaconDepositContract", + nameLocation: "2992:22:242", + nodeType: "VariableDeclaration", + scope: 128677, + src: "2984:30:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128630, + name: "address", + nodeType: "ElementaryTypeName", + src: "2984:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128633, + mutability: "mutable", + name: "_maxNumWeightsPerRewardAllocation", + nameLocation: "3030:33:242", + nodeType: "VariableDeclaration", + scope: 128677, + src: "3024:39:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + typeName: { + id: 128632, + name: "uint8", + nodeType: "ElementaryTypeName", + src: "3024:5:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + visibility: "internal", + }, + ], + src: "2889:180:242", + }, + returnParameters: { + id: 128637, + nodeType: "ParameterList", + parameters: [], + src: "3111:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 128686, + nodeType: "FunctionDefinition", + src: "3766:85:242", + nodes: [], + body: { + id: 128685, + nodeType: "Block", + src: "3848:3:242", + nodes: [], + statements: [], + }, + baseFunctions: [74135], + implemented: true, + kind: "function", + modifiers: [ + { + id: 128683, + kind: "modifierInvocation", + modifierName: { + id: 128682, + name: "onlyOwner", + nameLocations: ["3838:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68155, + src: "3838:9:242", + }, + nodeType: "ModifierInvocation", + src: "3838:9:242", + }, + ], + name: "_authorizeUpgrade", + nameLocation: "3775:17:242", + overrides: { + id: 128681, + nodeType: "OverrideSpecifier", + overrides: [], + src: "3829:8:242", + }, + parameters: { + id: 128680, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128679, + mutability: "mutable", + name: "newImplementation", + nameLocation: "3801:17:242", + nodeType: "VariableDeclaration", + scope: 128686, + src: "3793:25:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128678, + name: "address", + nodeType: "ElementaryTypeName", + src: "3793:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + ], + src: "3792:27:242", + }, + returnParameters: { + id: 128684, + nodeType: "ParameterList", + parameters: [], + src: "3848:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "internal", + }, + { + id: 128703, + nodeType: "ModifierDefinition", + src: "4140:146:242", + nodes: [], + body: { + id: 128702, + nodeType: "Block", + src: "4167:119:242", + nodes: [], + statements: [ + { + condition: { + commonType: { + typeIdentifier: "t_address", + typeString: "address", + }, + id: 128691, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 128688, + name: "msg", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: -15, + src: "4181:3:242", + typeDescriptions: { + typeIdentifier: "t_magic_message", + typeString: "msg", + }, + }, + id: 128689, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4185:6:242", + memberName: "sender", + nodeType: "MemberAccess", + src: "4181:10:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "BinaryOperation", + operator: "!=", + rightExpression: { + id: 128690, + name: "distributor", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128582, + src: "4195:11:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + src: "4181:25:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128700, + nodeType: "IfStatement", + src: "4177:92:242", + trueBody: { + id: 128699, + nodeType: "Block", + src: "4208:61:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128692, + name: "NotDistributor", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128053, + src: "4222:14:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128695, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4237:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "4222:23:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128696, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4246:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "4222:34:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128697, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "4222:36:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128698, + nodeType: "ExpressionStatement", + src: "4222:36:242", + }, + ], + }, + }, + { + id: 128701, + nodeType: "PlaceholderStatement", + src: "4278:1:242", + }, + ], + }, + name: "onlyDistributor", + nameLocation: "4149:15:242", + parameters: { + id: 128687, + nodeType: "ParameterList", + parameters: [], + src: "4164:2:242", + }, + virtual: false, + visibility: "internal", + }, + { + id: 128725, + nodeType: "ModifierDefinition", + src: "4292:197:242", + nodes: [], + body: { + id: 128724, + nodeType: "Block", + src: "4340:149:242", + nodes: [], + statements: [ + { + condition: { + commonType: { + typeIdentifier: "t_address", + typeString: "address", + }, + id: 128713, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 128707, + name: "msg", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: -15, + src: "4354:3:242", + typeDescriptions: { + typeIdentifier: "t_magic_message", + typeString: "msg", + }, + }, + id: 128708, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4358:6:242", + memberName: "sender", + nodeType: "MemberAccess", + src: "4354:10:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "BinaryOperation", + operator: "!=", + rightExpression: { + arguments: [ + { + id: 128711, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128705, + src: "4402:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + ], + expression: { + id: 128709, + name: "beaconDepositContract", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128588, + src: "4368:21:242", + typeDescriptions: { + typeIdentifier: + "t_contract$_IBeaconDeposit_$127557", + typeString: "contract IBeaconDeposit", + }, + }, + id: 128710, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4390:11:242", + memberName: "getOperator", + nodeType: "MemberAccess", + referencedDeclaration: 127524, + src: "4368:33:242", + typeDescriptions: { + typeIdentifier: + "t_function_external_view$_t_bytes_memory_ptr_$returns$_t_address_$", + typeString: + "function (bytes memory) view external returns (address)", + }, + }, + id: 128712, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "4368:44:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + src: "4354:58:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128722, + nodeType: "IfStatement", + src: "4350:122:242", + trueBody: { + id: 128721, + nodeType: "Block", + src: "4414:58:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128714, + name: "NotOperator", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128061, + src: "4428:11:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128717, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4440:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "4428:20:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128718, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "4449:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "4428:31:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128719, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "4428:33:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128720, + nodeType: "ExpressionStatement", + src: "4428:33:242", + }, + ], + }, + }, + { + id: 128723, + nodeType: "PlaceholderStatement", + src: "4481:1:242", + }, + ], + }, + name: "onlyOperator", + nameLocation: "4301:12:242", + parameters: { + id: 128706, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128705, + mutability: "mutable", + name: "valPubkey", + nameLocation: "4329:9:242", + nodeType: "VariableDeclaration", + scope: 128725, + src: "4314:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 128704, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "4314:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + ], + src: "4313:26:242", + }, + virtual: false, + visibility: "internal", + }, + { + id: 128768, + nodeType: "FunctionDefinition", + src: "4808:684:242", + nodes: [], + body: { + id: 128767, + nodeType: "Block", + src: "4913:579:242", + nodes: [], + statements: [ + { + condition: { + commonType: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + id: 128735, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128733, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128728, + src: "4927:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + nodeType: "BinaryOperation", + operator: "==", + rightExpression: { + hexValue: "30", + id: 128734, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "4964:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "4927:38:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128744, + nodeType: "IfStatement", + src: "4923:129:242", + trueBody: { + id: 128743, + nodeType: "Block", + src: "4967:85:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128736, + name: "MaxNumWeightsPerRewardAllocationIsZero", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128135, + src: "4981:38:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128739, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5020:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "4981:47:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128740, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5029:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "4981:58:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128741, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "4981:60:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128742, + nodeType: "ExpressionStatement", + src: "4981:60:242", + }, + ], + }, + }, + { + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 128749, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128745, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128728, + src: "5166:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + nodeType: "BinaryOperation", + operator: "<", + rightExpression: { + expression: { + expression: { + id: 128746, + name: "defaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128615, + src: "5202:23:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + id: 128747, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "5226:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "5202:31:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + }, + id: 128748, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5234:6:242", + memberName: "length", + nodeType: "MemberAccess", + src: "5202:38:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + src: "5166:74:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128758, + nodeType: "IfStatement", + src: "5162:160:242", + trueBody: { + id: 128757, + nodeType: "Block", + src: "5242:80:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128750, + name: "InvalidateDefaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128091, + src: "5256:33:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128753, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5290:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "5256:42:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128754, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5299:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "5256:53:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128755, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "5256:55:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128756, + nodeType: "ExpressionStatement", + src: "5256:55:242", + }, + ], + }, + }, + { + expression: { + id: 128761, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128759, + name: "maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128594, + src: "5332:32:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128760, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128728, + src: "5367:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + src: "5332:68:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + id: 128762, + nodeType: "ExpressionStatement", + src: "5332:68:242", + }, + { + eventCall: { + arguments: [ + { + id: 128764, + name: "_maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128728, + src: "5451:33:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + ], + expression: { + argumentTypes: [ + { typeIdentifier: "t_uint8", typeString: "uint8" }, + ], + id: 128763, + name: "MaxNumWeightsPerRewardAllocationSet", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127583, + src: "5415:35:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_uint8_$returns$__$", + typeString: "function (uint8)", + }, + }, + id: 128765, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "5415:70:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128766, + nodeType: "EmitStatement", + src: "5410:75:242", + }, + ], + }, + baseFunctions: [127688], + documentation: { + id: 128726, + nodeType: "StructuredDocumentation", + src: "4778:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "66204c78", + implemented: true, + kind: "function", + modifiers: [ + { + id: 128731, + kind: "modifierInvocation", + modifierName: { + id: 128730, + name: "onlyOwner", + nameLocations: ["4903:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68155, + src: "4903:9:242", + }, + nodeType: "ModifierInvocation", + src: "4903:9:242", + }, + ], + name: "setMaxNumWeightsPerRewardAllocation", + nameLocation: "4817:35:242", + parameters: { + id: 128729, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128728, + mutability: "mutable", + name: "_maxNumWeightsPerRewardAllocation", + nameLocation: "4859:33:242", + nodeType: "VariableDeclaration", + scope: 128768, + src: "4853:39:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + typeName: { + id: 128727, + name: "uint8", + nodeType: "ElementaryTypeName", + src: "4853:5:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + visibility: "internal", + }, + ], + src: "4852:41:242", + }, + returnParameters: { + id: 128732, + nodeType: "ParameterList", + parameters: [], + src: "4913:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 128797, + nodeType: "FunctionDefinition", + src: "5528:399:242", + nodes: [], + body: { + id: 128796, + nodeType: "Block", + src: "5622:305:242", + nodes: [], + statements: [ + { + condition: { + commonType: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + id: 128778, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128776, + name: "_rewardAllocationBlockDelay", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128771, + src: "5636:27:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "BinaryOperation", + operator: ">", + rightExpression: { + id: 128777, + name: "MAX_REWARD_ALLOCATION_BLOCK_DELAY", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128579, + src: "5666:33:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + src: "5636:63:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128787, + nodeType: "IfStatement", + src: "5632:150:242", + trueBody: { + id: 128786, + nodeType: "Block", + src: "5701:81:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128779, + name: "RewardAllocationBlockDelayTooLarge", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128099, + src: "5715:34:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128782, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5750:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "5715:43:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128783, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "5759:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "5715:54:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128784, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "5715:56:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128785, + nodeType: "ExpressionStatement", + src: "5715:56:242", + }, + ], + }, + }, + { + expression: { + id: 128790, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128788, + name: "rewardAllocationBlockDelay", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128591, + src: "5791:26:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128789, + name: "_rewardAllocationBlockDelay", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128771, + src: "5820:27:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + src: "5791:56:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + id: 128791, + nodeType: "ExpressionStatement", + src: "5791:56:242", + }, + { + eventCall: { + arguments: [ + { + id: 128793, + name: "_rewardAllocationBlockDelay", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128771, + src: "5892:27:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + ], + expression: { + argumentTypes: [ + { typeIdentifier: "t_uint64", typeString: "uint64" }, + ], + id: 128792, + name: "RewardAllocationBlockDelaySet", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127588, + src: "5862:29:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_uint64_$returns$__$", + typeString: "function (uint64)", + }, + }, + id: 128794, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "5862:58:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128795, + nodeType: "EmitStatement", + src: "5857:63:242", + }, + ], + }, + baseFunctions: [127694], + documentation: { + id: 128769, + nodeType: "StructuredDocumentation", + src: "5498:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "9ca2626c", + implemented: true, + kind: "function", + modifiers: [ + { + id: 128774, + kind: "modifierInvocation", + modifierName: { + id: 128773, + name: "onlyOwner", + nameLocations: ["5612:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68155, + src: "5612:9:242", + }, + nodeType: "ModifierInvocation", + src: "5612:9:242", + }, + ], + name: "setRewardAllocationBlockDelay", + nameLocation: "5537:29:242", + parameters: { + id: 128772, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128771, + mutability: "mutable", + name: "_rewardAllocationBlockDelay", + nameLocation: "5574:27:242", + nodeType: "VariableDeclaration", + scope: 128797, + src: "5567:34:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + typeName: { + id: 128770, + name: "uint64", + nodeType: "ElementaryTypeName", + src: "5567:6:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + visibility: "internal", + }, + ], + src: "5566:36:242", + }, + returnParameters: { + id: 128775, + nodeType: "ParameterList", + parameters: [], + src: "5622:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 128873, + nodeType: "FunctionDefinition", + src: "5963:991:242", + nodes: [], + body: { + id: 128872, + nodeType: "Block", + src: "6129:825:242", + nodes: [], + statements: [ + { + expression: { + id: 128813, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + baseExpression: { + id: 128809, + name: "isWhitelistedVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128611, + src: "6139:18:242", + typeDescriptions: { + typeIdentifier: "t_mapping$_t_address_$_t_bool_$", + typeString: "mapping(address => bool)", + }, + }, + id: 128811, + indexExpression: { + id: 128810, + name: "receiver", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128800, + src: "6158:8:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: true, + nodeType: "IndexAccess", + src: "6139:28:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128812, + name: "isWhitelisted", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128802, + src: "6170:13:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + src: "6139:44:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128814, + nodeType: "ExpressionStatement", + src: "6139:44:242", + }, + { + condition: { + id: 128816, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "!", + prefix: true, + src: "6197:14:242", + subExpression: { + id: 128815, + name: "isWhitelisted", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128802, + src: "6198:13:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + falseBody: { + id: 128864, + nodeType: "Block", + src: "6498:371:242", + statements: [ + { + assignments: [128833], + declarations: [ + { + constant: false, + id: 128833, + mutability: "mutable", + name: "stakeToken", + nameLocation: "6603:10:242", + nodeType: "VariableDeclaration", + scope: 128864, + src: "6595:18:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128832, + name: "address", + nodeType: "ElementaryTypeName", + src: "6595:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + ], + id: 128842, + initialValue: { + arguments: [ + { + arguments: [], + expression: { + argumentTypes: [], + expression: { + arguments: [ + { + id: 128837, + name: "receiver", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128800, + src: "6636:8:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + ], + id: 128836, + name: "RewardVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 131436, + src: "6624:11:242", + typeDescriptions: { + typeIdentifier: + "t_type$_t_contract$_RewardVault_$131436_$", + typeString: + "type(contract RewardVault)", + }, + }, + id: 128838, + isConstant: false, + isLValue: false, + isPure: false, + kind: "typeConversion", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6624:21:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: + "t_contract$_RewardVault_$131436", + typeString: "contract RewardVault", + }, + }, + id: 128839, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "6646:10:242", + memberName: "stakeToken", + nodeType: "MemberAccess", + referencedDeclaration: 100696, + src: "6624:32:242", + typeDescriptions: { + typeIdentifier: + "t_function_external_view$__$returns$_t_contract$_IERC20_$79301_$", + typeString: + "function () view external returns (contract IERC20)", + }, + }, + id: 128840, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6624:34:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_contract$_IERC20_$79301", + typeString: "contract IERC20", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_contract$_IERC20_$79301", + typeString: "contract IERC20", + }, + ], + id: 128835, + isConstant: false, + isLValue: false, + isPure: true, + lValueRequested: false, + nodeType: "ElementaryTypeNameExpression", + src: "6616:7:242", + typeDescriptions: { + typeIdentifier: "t_type$_t_address_$", + typeString: "type(address)", + }, + typeName: { + id: 128834, + name: "address", + nodeType: "ElementaryTypeName", + src: "6616:7:242", + typeDescriptions: {}, + }, + }, + id: 128841, + isConstant: false, + isLValue: false, + isPure: false, + kind: "typeConversion", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6616:43:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "6595:64:242", + }, + { + assignments: [128844], + declarations: [ + { + constant: false, + id: 128844, + mutability: "mutable", + name: "factoryVault", + nameLocation: "6681:12:242", + nodeType: "VariableDeclaration", + scope: 128864, + src: "6673:20:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128843, + name: "address", + nodeType: "ElementaryTypeName", + src: "6673:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + ], + id: 128851, + initialValue: { + arguments: [ + { + id: 128849, + name: "stakeToken", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128833, + src: "6734:10:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + ], + expression: { + arguments: [ + { + id: 128846, + name: "factory", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128585, + src: "6716:7:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + ], + id: 128845, + name: "IRewardVaultFactory", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128545, + src: "6696:19:242", + typeDescriptions: { + typeIdentifier: + "t_type$_t_contract$_IRewardVaultFactory_$128545_$", + typeString: + "type(contract IRewardVaultFactory)", + }, + }, + id: 128847, + isConstant: false, + isLValue: false, + isPure: false, + kind: "typeConversion", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6696:28:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: + "t_contract$_IRewardVaultFactory_$128545", + typeString: "contract IRewardVaultFactory", + }, + }, + id: 128848, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "6725:8:242", + memberName: "getVault", + nodeType: "MemberAccess", + referencedDeclaration: 128530, + src: "6696:37:242", + typeDescriptions: { + typeIdentifier: + "t_function_external_view$_t_address_$returns$_t_address_$", + typeString: + "function (address) view external returns (address)", + }, + }, + id: 128850, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6696:49:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "6673:72:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_address", + typeString: "address", + }, + id: 128854, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128852, + name: "receiver", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128800, + src: "6763:8:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + nodeType: "BinaryOperation", + operator: "!=", + rightExpression: { + id: 128853, + name: "factoryVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128844, + src: "6775:12:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + src: "6763:24:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128863, + nodeType: "IfStatement", + src: "6759:100:242", + trueBody: { + id: 128862, + nodeType: "Block", + src: "6789:70:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128855, + name: "NotFactoryVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128101, + src: "6807:15:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128858, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "6823:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "6807:24:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128859, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "6832:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "6807:35:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128860, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6807:37:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128861, + nodeType: "ExpressionStatement", + src: "6807:37:242", + }, + ], + }, + }, + ], + }, + id: 128865, + nodeType: "IfStatement", + src: "6193:676:242", + trueBody: { + id: 128831, + nodeType: "Block", + src: "6213:279:242", + statements: [ + { + condition: { + id: 128821, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "!", + prefix: true, + src: "6343:52:242", + subExpression: { + arguments: [ + { + expression: { + id: 128818, + name: "defaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128615, + src: "6363:23:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + id: 128819, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "6387:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "6363:31:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + ], + id: 128817, + name: "_checkIfStillValid", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129314, + src: "6344:18:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_view$_t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr_$returns$_t_bool_$", + typeString: + "function (struct IBeraChef.Weight memory[] memory) view returns (bool)", + }, + }, + id: 128820, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6344:51:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128830, + nodeType: "IfStatement", + src: "6339:143:242", + trueBody: { + id: 128829, + nodeType: "Block", + src: "6397:85:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128822, + name: "InvalidRewardAllocationWeights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128079, + src: "6415:30:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128825, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "6446:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "6415:39:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128826, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "6455:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "6415:50:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128827, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6415:52:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128828, + nodeType: "ExpressionStatement", + src: "6415:52:242", + }, + ], + }, + }, + ], + }, + }, + { + eventCall: { + arguments: [ + { + id: 128867, + name: "receiver", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128800, + src: "6913:8:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + { + id: 128868, + name: "isWhitelisted", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128802, + src: "6923:13:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + { + id: 128869, + name: "metadata", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128804, + src: "6938:8:242", + typeDescriptions: { + typeIdentifier: "t_string_memory_ptr", + typeString: "string memory", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + { typeIdentifier: "t_bool", typeString: "bool" }, + { + typeIdentifier: "t_string_memory_ptr", + typeString: "string memory", + }, + ], + id: 128866, + name: "VaultWhitelistedStatusUpdated", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127597, + src: "6883:29:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_address_$_t_bool_$_t_string_memory_ptr_$returns$__$", + typeString: "function (address,bool,string memory)", + }, + }, + id: 128870, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "6883:64:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128871, + nodeType: "EmitStatement", + src: "6878:69:242", + }, + ], + }, + baseFunctions: [127704], + documentation: { + id: 128798, + nodeType: "StructuredDocumentation", + src: "5933:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "fb9f6fde", + implemented: true, + kind: "function", + modifiers: [ + { + id: 128807, + kind: "modifierInvocation", + modifierName: { + id: 128806, + name: "onlyOwner", + nameLocations: ["6115:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68155, + src: "6115:9:242", + }, + nodeType: "ModifierInvocation", + src: "6115:9:242", + }, + ], + name: "setVaultWhitelistedStatus", + nameLocation: "5972:25:242", + parameters: { + id: 128805, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128800, + mutability: "mutable", + name: "receiver", + nameLocation: "6015:8:242", + nodeType: "VariableDeclaration", + scope: 128873, + src: "6007:16:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128799, + name: "address", + nodeType: "ElementaryTypeName", + src: "6007:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128802, + mutability: "mutable", + name: "isWhitelisted", + nameLocation: "6038:13:242", + nodeType: "VariableDeclaration", + scope: 128873, + src: "6033:18:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + typeName: { + id: 128801, + name: "bool", + nodeType: "ElementaryTypeName", + src: "6033:4:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128804, + mutability: "mutable", + name: "metadata", + nameLocation: "6075:8:242", + nodeType: "VariableDeclaration", + scope: 128873, + src: "6061:22:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: "t_string_memory_ptr", + typeString: "string", + }, + typeName: { + id: 128803, + name: "string", + nodeType: "ElementaryTypeName", + src: "6061:6:242", + typeDescriptions: { + typeIdentifier: "t_string_storage_ptr", + typeString: "string", + }, + }, + visibility: "internal", + }, + ], + src: "5997:92:242", + }, + returnParameters: { + id: 128808, + nodeType: "ParameterList", + parameters: [], + src: "6129:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 128902, + nodeType: "FunctionDefinition", + src: "6990:275:242", + nodes: [], + body: { + id: 128901, + nodeType: "Block", + src: "7088:177:242", + nodes: [], + statements: [ + { + condition: { + id: 128886, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "!", + prefix: true, + src: "7102:26:242", + subExpression: { + baseExpression: { + id: 128883, + name: "isWhitelistedVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128611, + src: "7103:18:242", + typeDescriptions: { + typeIdentifier: "t_mapping$_t_address_$_t_bool_$", + typeString: "mapping(address => bool)", + }, + }, + id: 128885, + indexExpression: { + id: 128884, + name: "vault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128876, + src: "7122:5:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "7103:25:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128895, + nodeType: "IfStatement", + src: "7098:98:242", + trueBody: { + id: 128894, + nodeType: "Block", + src: "7130:66:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128887, + name: "NotWhitelistedVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128057, + src: "7144:19:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128890, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "7164:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "7144:28:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128891, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "7173:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "7144:39:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128892, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "7144:41:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128893, + nodeType: "ExpressionStatement", + src: "7144:41:242", + }, + ], + }, + }, + { + eventCall: { + arguments: [ + { + id: 128897, + name: "vault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128876, + src: "7242:5:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + { + id: 128898, + name: "metadata", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128878, + src: "7249:8:242", + typeDescriptions: { + typeIdentifier: "t_string_memory_ptr", + typeString: "string memory", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_address", + typeString: "address", + }, + { + typeIdentifier: "t_string_memory_ptr", + typeString: "string memory", + }, + ], + id: 128896, + name: "WhitelistedVaultMetadataUpdated", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127604, + src: "7210:31:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_address_$_t_string_memory_ptr_$returns$__$", + typeString: "function (address,string memory)", + }, + }, + id: 128899, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "7210:48:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128900, + nodeType: "EmitStatement", + src: "7205:53:242", + }, + ], + }, + baseFunctions: [127712], + documentation: { + id: 128874, + nodeType: "StructuredDocumentation", + src: "6960:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "69ed1708", + implemented: true, + kind: "function", + modifiers: [ + { + id: 128881, + kind: "modifierInvocation", + modifierName: { + id: 128880, + name: "onlyOwner", + nameLocations: ["7078:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68155, + src: "7078:9:242", + }, + nodeType: "ModifierInvocation", + src: "7078:9:242", + }, + ], + name: "updateWhitelistedVaultMetadata", + nameLocation: "6999:30:242", + parameters: { + id: 128879, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128876, + mutability: "mutable", + name: "vault", + nameLocation: "7038:5:242", + nodeType: "VariableDeclaration", + scope: 128902, + src: "7030:13:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + typeName: { + id: 128875, + name: "address", + nodeType: "ElementaryTypeName", + src: "7030:7:242", + stateMutability: "nonpayable", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128878, + mutability: "mutable", + name: "metadata", + nameLocation: "7059:8:242", + nodeType: "VariableDeclaration", + scope: 128902, + src: "7045:22:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: "t_string_memory_ptr", + typeString: "string", + }, + typeName: { + id: 128877, + name: "string", + nodeType: "ElementaryTypeName", + src: "7045:6:242", + typeDescriptions: { + typeIdentifier: "t_string_storage_ptr", + typeString: "string", + }, + }, + visibility: "internal", + }, + ], + src: "7029:39:242", + }, + returnParameters: { + id: 128882, + nodeType: "ParameterList", + parameters: [], + src: "7088:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 128925, + nodeType: "FunctionDefinition", + src: "7301:260:242", + nodes: [], + body: { + id: 128924, + nodeType: "Block", + src: "7386:175:242", + nodes: [], + statements: [ + { + expression: { + arguments: [ + { + expression: { + id: 128912, + name: "ra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128906, + src: "7459:2:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_calldata_ptr", + typeString: + "struct IBeraChef.RewardAllocation calldata", + }, + }, + id: 128913, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "7462:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "7459:10:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + ], + id: 128911, + name: "_validateWeights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129266, + src: "7442:16:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_view$_t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr_$returns$__$", + typeString: + "function (struct IBeraChef.Weight calldata[] calldata) view", + }, + }, + id: 128914, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "7442:28:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128915, + nodeType: "ExpressionStatement", + src: "7442:28:242", + }, + { + eventCall: { + arguments: [ + { + id: 128917, + name: "ra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128906, + src: "7513:2:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_calldata_ptr", + typeString: + "struct IBeraChef.RewardAllocation calldata", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_calldata_ptr", + typeString: + "struct IBeraChef.RewardAllocation calldata", + }, + ], + id: 128916, + name: "SetDefaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127632, + src: "7486:26:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_struct$_RewardAllocation_$127572_memory_ptr_$returns$__$", + typeString: + "function (struct IBeraChef.RewardAllocation memory)", + }, + }, + id: 128918, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "7486:30:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128919, + nodeType: "EmitStatement", + src: "7481:35:242", + }, + { + expression: { + id: 128922, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 128920, + name: "defaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128615, + src: "7526:23:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128921, + name: "ra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128906, + src: "7552:2:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_calldata_ptr", + typeString: + "struct IBeraChef.RewardAllocation calldata", + }, + }, + src: "7526:28:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + id: 128923, + nodeType: "ExpressionStatement", + src: "7526:28:242", + }, + ], + }, + baseFunctions: [127719], + documentation: { + id: 128903, + nodeType: "StructuredDocumentation", + src: "7271:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "c89f2665", + implemented: true, + kind: "function", + modifiers: [ + { + id: 128909, + kind: "modifierInvocation", + modifierName: { + id: 128908, + name: "onlyOwner", + nameLocations: ["7376:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68155, + src: "7376:9:242", + }, + nodeType: "ModifierInvocation", + src: "7376:9:242", + }, + ], + name: "setDefaultRewardAllocation", + nameLocation: "7310:26:242", + parameters: { + id: 128907, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128906, + mutability: "mutable", + name: "ra", + nameLocation: "7363:2:242", + nodeType: "VariableDeclaration", + scope: 128925, + src: "7337:28:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_calldata_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 128905, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128904, + name: "RewardAllocation", + nameLocations: ["7337:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "7337:16:242", + }, + referencedDeclaration: 127572, + src: "7337:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + src: "7336:30:242", + }, + returnParameters: { + id: 128910, + nodeType: "ParameterList", + parameters: [], + src: "7386:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 129021, + nodeType: "FunctionDefinition", + src: "7880:1125:242", + nodes: [], + body: { + id: 129020, + nodeType: "Block", + src: "8069:936:242", + nodes: [], + statements: [ + { + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 128945, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128940, + name: "startBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128930, + src: "8157:10:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "BinaryOperation", + operator: "<=", + rightExpression: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 128944, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 128941, + name: "block", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: -4, + src: "8171:5:242", + typeDescriptions: { + typeIdentifier: "t_magic_block", + typeString: "block", + }, + }, + id: 128942, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8177:6:242", + memberName: "number", + nodeType: "MemberAccess", + src: "8171:12:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: "+", + rightExpression: { + id: 128943, + name: "rewardAllocationBlockDelay", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128591, + src: "8186:26:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + src: "8171:41:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + src: "8157:55:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128954, + nodeType: "IfStatement", + src: "8153:125:242", + trueBody: { + id: 128953, + nodeType: "Block", + src: "8214:64:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128946, + name: "InvalidStartBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128075, + src: "8228:17:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128949, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8246:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "8228:26:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128950, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8255:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "8228:37:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128951, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "8228:39:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128952, + nodeType: "ExpressionStatement", + src: "8228:39:242", + }, + ], + }, + }, + { + assignments: [128957], + declarations: [ + { + constant: false, + id: 128957, + mutability: "mutable", + name: "qra", + nameLocation: "8313:3:242", + nodeType: "VariableDeclaration", + scope: 129020, + src: "8288:28:242", + stateVariable: false, + storageLocation: "storage", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 128956, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128955, + name: "RewardAllocation", + nameLocations: ["8288:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "8288:16:242", + }, + referencedDeclaration: 127572, + src: "8288:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + id: 128961, + initialValue: { + baseExpression: { + id: 128958, + name: "queuedRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128606, + src: "8319:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 128960, + indexExpression: { + id: 128959, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128928, + src: "8343:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "8319:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "8288:65:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + id: 128965, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 128962, + name: "qra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128957, + src: "8456:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: + "struct IBeraChef.RewardAllocation storage pointer", + }, + }, + id: 128963, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "8460:10:242", + memberName: "startBlock", + nodeType: "MemberAccess", + referencedDeclaration: 127567, + src: "8456:14:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "BinaryOperation", + operator: ">", + rightExpression: { + hexValue: "30", + id: 128964, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "8473:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "8456:18:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 128974, + nodeType: "IfStatement", + src: "8452:100:242", + trueBody: { + id: 128973, + nodeType: "Block", + src: "8476:76:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 128966, + name: "RewardAllocationAlreadyQueued", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128077, + src: "8490:29:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 128969, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8520:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "8490:38:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 128970, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8529:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "8490:49:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 128971, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "8490:51:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128972, + nodeType: "ExpressionStatement", + src: "8490:51:242", + }, + ], + }, + }, + { + expression: { + arguments: [ + { + id: 128976, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128934, + src: "8625:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + ], + id: 128975, + name: "_validateWeights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129266, + src: "8608:16:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_view$_t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr_$returns$__$", + typeString: + "function (struct IBeraChef.Weight calldata[] calldata) view", + }, + }, + id: 128977, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "8608:25:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 128978, + nodeType: "ExpressionStatement", + src: "8608:25:242", + }, + { + expression: { + id: 128983, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + expression: { + id: 128979, + name: "qra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128957, + src: "8687:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: + "struct IBeraChef.RewardAllocation storage pointer", + }, + }, + id: 128981, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: true, + memberLocation: "8691:10:242", + memberName: "startBlock", + nodeType: "MemberAccess", + referencedDeclaration: 127567, + src: "8687:14:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 128982, + name: "startBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128930, + src: "8704:10:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + src: "8687:27:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + id: 128984, + nodeType: "ExpressionStatement", + src: "8687:27:242", + }, + { + assignments: [128989], + declarations: [ + { + constant: false, + id: 128989, + mutability: "mutable", + name: "storageWeights", + nameLocation: "8741:14:242", + nodeType: "VariableDeclaration", + scope: 129020, + src: "8724:31:242", + stateVariable: false, + storageLocation: "storage", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + typeName: { + baseType: { + id: 128987, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128986, + name: "Weight", + nameLocations: ["8724:6:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127578, + src: "8724:6:242", + }, + referencedDeclaration: 127578, + src: "8724:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_storage_ptr", + typeString: "struct IBeraChef.Weight", + }, + }, + id: 128988, + nodeType: "ArrayTypeName", + src: "8724:8:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + }, + visibility: "internal", + }, + ], + id: 128992, + initialValue: { + expression: { + id: 128990, + name: "qra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128957, + src: "8758:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: + "struct IBeraChef.RewardAllocation storage pointer", + }, + }, + id: 128991, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "8762:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "8758:11:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "8724:45:242", + }, + { + body: { + id: 129012, + nodeType: "Block", + src: "8816:115:242", + statements: [ + { + expression: { + arguments: [ + { + baseExpression: { + id: 129003, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128934, + src: "8850:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + id: 129005, + indexExpression: { + id: 129004, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128994, + src: "8858:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "8850:10:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata", + }, + ], + expression: { + id: 129000, + name: "storageWeights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128989, + src: "8830:14:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr", + typeString: + "struct IBeraChef.Weight storage ref[] storage pointer", + }, + }, + id: 129002, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8845:4:242", + memberName: "push", + nodeType: "MemberAccess", + src: "8830:19:242", + typeDescriptions: { + typeIdentifier: + "t_function_arraypush_nonpayable$_t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr_$_t_struct$_Weight_$127578_storage_$returns$__$attached_to$_t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr_$", + typeString: + "function (struct IBeraChef.Weight storage ref[] storage pointer,struct IBeraChef.Weight storage ref)", + }, + }, + id: 129006, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "8830:31:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129007, + nodeType: "ExpressionStatement", + src: "8830:31:242", + }, + { + id: 129011, + nodeType: "UncheckedBlock", + src: "8875:46:242", + statements: [ + { + expression: { + id: 129009, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "++", + prefix: true, + src: "8903:3:242", + subExpression: { + id: 129008, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128994, + src: "8905:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + id: 129010, + nodeType: "ExpressionStatement", + src: "8903:3:242", + }, + ], + }, + ], + }, + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 128999, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 128996, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128994, + src: "8795:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: "<", + rightExpression: { + expression: { + id: 128997, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128934, + src: "8799:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + id: 128998, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "8807:6:242", + memberName: "length", + nodeType: "MemberAccess", + src: "8799:14:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + src: "8795:18:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129013, + initializationExpression: { + assignments: [128994], + declarations: [ + { + constant: false, + id: 128994, + mutability: "mutable", + name: "i", + nameLocation: "8792:1:242", + nodeType: "VariableDeclaration", + scope: 129013, + src: "8784:9:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + typeName: { + id: 128993, + name: "uint256", + nodeType: "ElementaryTypeName", + src: "8784:7:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + visibility: "internal", + }, + ], + id: 128995, + nodeType: "VariableDeclarationStatement", + src: "8784:9:242", + }, + isSimpleCounterLoop: false, + nodeType: "ForStatement", + src: "8779:152:242", + }, + { + eventCall: { + arguments: [ + { + id: 129015, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128928, + src: "8967:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + { + id: 129016, + name: "startBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128930, + src: "8978:10:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + { + id: 129017, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128934, + src: "8990:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + { typeIdentifier: "t_uint64", typeString: "uint64" }, + { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + ], + id: 129014, + name: "QueueRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127615, + src: "8945:21:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_bytes_memory_ptr_$_t_uint64_$_t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr_$returns$__$", + typeString: + "function (bytes memory,uint64,struct IBeraChef.Weight memory[] memory)", + }, + }, + id: 129018, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "8945:53:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129019, + nodeType: "EmitStatement", + src: "8940:58:242", + }, + ], + }, + baseFunctions: [127731], + documentation: { + id: 128926, + nodeType: "StructuredDocumentation", + src: "7850:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "e5eb90aa", + implemented: true, + kind: "function", + modifiers: [ + { + arguments: [ + { + id: 128937, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128928, + src: "8054:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + ], + id: 128938, + kind: "modifierInvocation", + modifierName: { + id: 128936, + name: "onlyOperator", + nameLocations: ["8041:12:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 128725, + src: "8041:12:242", + }, + nodeType: "ModifierInvocation", + src: "8041:23:242", + }, + ], + name: "queueNewRewardAllocation", + nameLocation: "7889:24:242", + parameters: { + id: 128935, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 128928, + mutability: "mutable", + name: "valPubkey", + nameLocation: "7938:9:242", + nodeType: "VariableDeclaration", + scope: 129021, + src: "7923:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 128927, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "7923:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128930, + mutability: "mutable", + name: "startBlock", + nameLocation: "7964:10:242", + nodeType: "VariableDeclaration", + scope: 129021, + src: "7957:17:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + typeName: { + id: 128929, + name: "uint64", + nodeType: "ElementaryTypeName", + src: "7957:6:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 128934, + mutability: "mutable", + name: "weights", + nameLocation: "8002:7:242", + nodeType: "VariableDeclaration", + scope: 129021, + src: "7984:25:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + typeName: { + baseType: { + id: 128932, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 128931, + name: "Weight", + nameLocations: ["7984:6:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127578, + src: "7984:6:242", + }, + referencedDeclaration: 127578, + src: "7984:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_storage_ptr", + typeString: "struct IBeraChef.Weight", + }, + }, + id: 128933, + nodeType: "ArrayTypeName", + src: "7984:8:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + }, + visibility: "internal", + }, + ], + src: "7913:102:242", + }, + returnParameters: { + id: 128939, + nodeType: "ParameterList", + parameters: [], + src: "8069:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 129068, + nodeType: "FunctionDefinition", + src: "9041:522:242", + nodes: [], + body: { + id: 129067, + nodeType: "Block", + src: "9137:426:242", + nodes: [], + statements: [ + { + condition: { + id: 129034, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "!", + prefix: true, + src: "9151:55:242", + subExpression: { + arguments: [ + { + id: 129030, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129024, + src: "9182:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + { + expression: { + id: 129031, + name: "block", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: -4, + src: "9193:5:242", + typeDescriptions: { + typeIdentifier: "t_magic_block", + typeString: "block", + }, + }, + id: 129032, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "9199:6:242", + memberName: "number", + nodeType: "MemberAccess", + src: "9193:12:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + ], + id: 129029, + name: "isQueuedRewardAllocationReady", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129164, + src: "9152:29:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_view$_t_bytes_calldata_ptr_$_t_uint256_$returns$_t_bool_$", + typeString: + "function (bytes calldata,uint256) view returns (bool)", + }, + }, + id: 129033, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "9152:54:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129036, + nodeType: "IfStatement", + src: "9147:68:242", + trueBody: { + functionReturnParameters: 129028, + id: 129035, + nodeType: "Return", + src: "9208:7:242", + }, + }, + { + assignments: [129039], + declarations: [ + { + constant: false, + id: 129039, + mutability: "mutable", + name: "qra", + nameLocation: "9249:3:242", + nodeType: "VariableDeclaration", + scope: 129067, + src: "9224:28:242", + stateVariable: false, + storageLocation: "storage", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 129038, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129037, + name: "RewardAllocation", + nameLocations: ["9224:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "9224:16:242", + }, + referencedDeclaration: 127572, + src: "9224:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + id: 129043, + initialValue: { + baseExpression: { + id: 129040, + name: "queuedRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128606, + src: "9255:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129042, + indexExpression: { + id: 129041, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129024, + src: "9279:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "9255:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "9224:65:242", + }, + { + assignments: [129045], + declarations: [ + { + constant: false, + id: 129045, + mutability: "mutable", + name: "startBlock", + nameLocation: "9306:10:242", + nodeType: "VariableDeclaration", + scope: 129067, + src: "9299:17:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + typeName: { + id: 129044, + name: "uint64", + nodeType: "ElementaryTypeName", + src: "9299:6:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + visibility: "internal", + }, + ], + id: 129048, + initialValue: { + expression: { + id: 129046, + name: "qra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129039, + src: "9319:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: + "struct IBeraChef.RewardAllocation storage pointer", + }, + }, + id: 129047, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "9323:10:242", + memberName: "startBlock", + nodeType: "MemberAccess", + referencedDeclaration: 127567, + src: "9319:14:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "9299:34:242", + }, + { + expression: { + id: 129053, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + baseExpression: { + id: 129049, + name: "activeRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128600, + src: "9343:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129051, + indexExpression: { + id: 129050, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129024, + src: "9367:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: true, + nodeType: "IndexAccess", + src: "9343:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + nodeType: "Assignment", + operator: "=", + rightHandSide: { + id: 129052, + name: "qra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129039, + src: "9380:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: + "struct IBeraChef.RewardAllocation storage pointer", + }, + }, + src: "9343:40:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + id: 129054, + nodeType: "ExpressionStatement", + src: "9343:40:242", + }, + { + eventCall: { + arguments: [ + { + id: 129056, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129024, + src: "9423:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + { + id: 129057, + name: "startBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129045, + src: "9434:10:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + { + expression: { + id: 129058, + name: "qra", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129039, + src: "9446:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: + "struct IBeraChef.RewardAllocation storage pointer", + }, + }, + id: 129059, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "9450:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "9446:11:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + { typeIdentifier: "t_uint64", typeString: "uint64" }, + { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + ], + id: 129055, + name: "ActivateRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 127626, + src: "9398:24:242", + typeDescriptions: { + typeIdentifier: + "t_function_event_nonpayable$_t_bytes_memory_ptr_$_t_uint64_$_t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr_$returns$__$", + typeString: + "function (bytes memory,uint64,struct IBeraChef.Weight memory[] memory)", + }, + }, + id: 129060, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "9398:60:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129061, + nodeType: "EmitStatement", + src: "9393:65:242", + }, + { + expression: { + id: 129065, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "delete", + prefix: true, + src: "9515:41:242", + subExpression: { + baseExpression: { + id: 129062, + name: "queuedRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128606, + src: "9522:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129064, + indexExpression: { + id: 129063, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129024, + src: "9546:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: true, + nodeType: "IndexAccess", + src: "9522:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129066, + nodeType: "ExpressionStatement", + src: "9515:41:242", + }, + ], + }, + baseFunctions: [127737], + documentation: { + id: 129022, + nodeType: "StructuredDocumentation", + src: "9011:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "6ed0bf9a", + implemented: true, + kind: "function", + modifiers: [ + { + id: 129027, + kind: "modifierInvocation", + modifierName: { + id: 129026, + name: "onlyDistributor", + nameLocations: ["9121:15:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 128703, + src: "9121:15:242", + }, + nodeType: "ModifierInvocation", + src: "9121:15:242", + }, + ], + name: "activateReadyQueuedRewardAllocation", + nameLocation: "9050:35:242", + parameters: { + id: 129025, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129024, + mutability: "mutable", + name: "valPubkey", + nameLocation: "9101:9:242", + nodeType: "VariableDeclaration", + scope: 129068, + src: "9086:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 129023, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "9086:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + ], + src: "9085:26:242", + }, + returnParameters: { + id: 129028, + nodeType: "ParameterList", + parameters: [], + src: "9137:0:242", + }, + scope: 129315, + stateMutability: "nonpayable", + virtual: false, + visibility: "external", + }, + { + id: 129100, + nodeType: "FunctionDefinition", + src: "10051:694:242", + nodes: [], + body: { + id: 129099, + nodeType: "Block", + src: "10160:585:242", + nodes: [], + statements: [ + { + assignments: [129079], + declarations: [ + { + constant: false, + id: 129079, + mutability: "mutable", + name: "ara", + nameLocation: "10194:3:242", + nodeType: "VariableDeclaration", + scope: 129099, + src: "10170:27:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 129078, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129077, + name: "RewardAllocation", + nameLocations: ["10170:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "10170:16:242", + }, + referencedDeclaration: 127572, + src: "10170:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + id: 129083, + initialValue: { + baseExpression: { + id: 129080, + name: "activeRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128600, + src: "10200:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129082, + indexExpression: { + id: 129081, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129071, + src: "10224:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "10200:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "10170:64:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + id: 129092, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + commonType: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + id: 129087, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 129084, + name: "ara", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129079, + src: "10298:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: + "struct IBeraChef.RewardAllocation memory", + }, + }, + id: 129085, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "10302:10:242", + memberName: "startBlock", + nodeType: "MemberAccess", + referencedDeclaration: 127567, + src: "10298:14:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "BinaryOperation", + operator: ">", + rightExpression: { + hexValue: "30", + id: 129086, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "10315:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "10298:18:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + nodeType: "BinaryOperation", + operator: "&&", + rightExpression: { + arguments: [ + { + expression: { + id: 129089, + name: "ara", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129079, + src: "10339:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: + "struct IBeraChef.RewardAllocation memory", + }, + }, + id: 129090, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "10343:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "10339:11:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr", + typeString: + "struct IBeraChef.Weight memory[] memory", + }, + }, + ], + expression: { + argumentTypes: [ + { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr", + typeString: + "struct IBeraChef.Weight memory[] memory", + }, + ], + id: 129088, + name: "_checkIfStillValid", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129314, + src: "10320:18:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_view$_t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr_$returns$_t_bool_$", + typeString: + "function (struct IBeraChef.Weight memory[] memory) view returns (bool)", + }, + }, + id: 129091, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "10320:31:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + src: "10298:53:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129096, + nodeType: "IfStatement", + src: "10294:94:242", + trueBody: { + id: 129095, + nodeType: "Block", + src: "10353:35:242", + statements: [ + { + expression: { + id: 129093, + name: "ara", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129079, + src: "10374:3:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: + "struct IBeraChef.RewardAllocation memory", + }, + }, + functionReturnParameters: 129076, + id: 129094, + nodeType: "Return", + src: "10367:10:242", + }, + ], + }, + }, + { + expression: { + id: 129097, + name: "defaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128615, + src: "10715:23:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + functionReturnParameters: 129076, + id: 129098, + nodeType: "Return", + src: "10708:30:242", + }, + ], + }, + baseFunctions: [127641], + documentation: { + id: 129069, + nodeType: "StructuredDocumentation", + src: "9852:194:242", + text: "@inheritdoc IBeraChef\n @dev Returns the active reward allocation if validator has a reward allocation and the weights are still valid,\n otherwise the default reward allocation.", + }, + functionSelector: "da6f7563", + implemented: true, + kind: "function", + modifiers: [], + name: "getActiveRewardAllocation", + nameLocation: "10060:25:242", + parameters: { + id: 129072, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129071, + mutability: "mutable", + name: "valPubkey", + nameLocation: "10101:9:242", + nodeType: "VariableDeclaration", + scope: 129100, + src: "10086:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 129070, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "10086:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + ], + src: "10085:26:242", + }, + returnParameters: { + id: 129076, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129075, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129100, + src: "10135:23:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 129074, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129073, + name: "RewardAllocation", + nameLocations: ["10135:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "10135:16:242", + }, + referencedDeclaration: 127572, + src: "10135:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + src: "10134:25:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "external", + }, + { + id: 129114, + nodeType: "FunctionDefinition", + src: "10781:167:242", + nodes: [], + body: { + id: 129113, + nodeType: "Block", + src: "10890:58:242", + nodes: [], + statements: [ + { + expression: { + baseExpression: { + id: 129109, + name: "queuedRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128606, + src: "10907:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129111, + indexExpression: { + id: 129110, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129103, + src: "10931:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "10907:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + functionReturnParameters: 129108, + id: 129112, + nodeType: "Return", + src: "10900:41:242", + }, + ], + }, + baseFunctions: [127650], + documentation: { + id: 129101, + nodeType: "StructuredDocumentation", + src: "10751:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "4ecbf5c0", + implemented: true, + kind: "function", + modifiers: [], + name: "getQueuedRewardAllocation", + nameLocation: "10790:25:242", + parameters: { + id: 129104, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129103, + mutability: "mutable", + name: "valPubkey", + nameLocation: "10831:9:242", + nodeType: "VariableDeclaration", + scope: 129114, + src: "10816:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 129102, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "10816:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + ], + src: "10815:26:242", + }, + returnParameters: { + id: 129108, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129107, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129114, + src: "10865:23:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 129106, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129105, + name: "RewardAllocation", + nameLocations: ["10865:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "10865:16:242", + }, + referencedDeclaration: 127572, + src: "10865:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + src: "10864:25:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "external", + }, + { + id: 129128, + nodeType: "FunctionDefinition", + src: "10984:170:242", + nodes: [], + body: { + id: 129127, + nodeType: "Block", + src: "11096:58:242", + nodes: [], + statements: [ + { + expression: { + baseExpression: { + id: 129123, + name: "activeRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128600, + src: "11113:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129125, + indexExpression: { + id: 129124, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129117, + src: "11137:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "11113:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + functionReturnParameters: 129122, + id: 129126, + nodeType: "Return", + src: "11106:41:242", + }, + ], + }, + baseFunctions: [127659], + documentation: { + id: 129115, + nodeType: "StructuredDocumentation", + src: "10954:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "230288ce", + implemented: true, + kind: "function", + modifiers: [], + name: "getSetActiveRewardAllocation", + nameLocation: "10993:28:242", + parameters: { + id: 129118, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129117, + mutability: "mutable", + name: "valPubkey", + nameLocation: "11037:9:242", + nodeType: "VariableDeclaration", + scope: 129128, + src: "11022:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 129116, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "11022:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + ], + src: "11021:26:242", + }, + returnParameters: { + id: 129122, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129121, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129128, + src: "11071:23:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 129120, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129119, + name: "RewardAllocation", + nameLocations: ["11071:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "11071:16:242", + }, + referencedDeclaration: 127572, + src: "11071:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + src: "11070:25:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "external", + }, + { + id: 129138, + nodeType: "FunctionDefinition", + src: "11190:133:242", + nodes: [], + body: { + id: 129137, + nodeType: "Block", + src: "11276:47:242", + nodes: [], + statements: [ + { + expression: { + id: 129135, + name: "defaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128615, + src: "11293:23:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + functionReturnParameters: 129134, + id: 129136, + nodeType: "Return", + src: "11286:30:242", + }, + ], + }, + baseFunctions: [127666], + documentation: { + id: 129129, + nodeType: "StructuredDocumentation", + src: "11160:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "17dbf270", + implemented: true, + kind: "function", + modifiers: [], + name: "getDefaultRewardAllocation", + nameLocation: "11199:26:242", + parameters: { + id: 129130, + nodeType: "ParameterList", + parameters: [], + src: "11225:2:242", + }, + returnParameters: { + id: 129134, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129133, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129138, + src: "11251:23:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_memory_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + typeName: { + id: 129132, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129131, + name: "RewardAllocation", + nameLocations: ["11251:16:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127572, + src: "11251:16:242", + }, + referencedDeclaration: 127572, + src: "11251:16:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage_ptr", + typeString: "struct IBeraChef.RewardAllocation", + }, + }, + visibility: "internal", + }, + ], + src: "11250:25:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "external", + }, + { + id: 129164, + nodeType: "FunctionDefinition", + src: "11359:256:242", + nodes: [], + body: { + id: 129163, + nodeType: "Block", + src: "11472:143:242", + nodes: [], + statements: [ + { + assignments: [129149], + declarations: [ + { + constant: false, + id: 129149, + mutability: "mutable", + name: "startBlock", + nameLocation: "11489:10:242", + nodeType: "VariableDeclaration", + scope: 129163, + src: "11482:17:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + typeName: { + id: 129148, + name: "uint64", + nodeType: "ElementaryTypeName", + src: "11482:6:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + visibility: "internal", + }, + ], + id: 129154, + initialValue: { + expression: { + baseExpression: { + id: 129150, + name: "queuedRewardAllocations", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128606, + src: "11502:23:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_bytes_memory_ptr_$_t_struct$_RewardAllocation_$127572_storage_$", + typeString: + "mapping(bytes memory => struct IBeraChef.RewardAllocation storage ref)", + }, + }, + id: 129152, + indexExpression: { + id: 129151, + name: "valPubkey", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129141, + src: "11526:9:242", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes calldata", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "11502:34:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + id: 129153, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "11537:10:242", + memberName: "startBlock", + nodeType: "MemberAccess", + referencedDeclaration: 127567, + src: "11502:45:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "11482:65:242", + }, + { + expression: { + commonType: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + id: 129161, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + commonType: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + id: 129157, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 129155, + name: "startBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129149, + src: "11564:10:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "BinaryOperation", + operator: "!=", + rightExpression: { + hexValue: "30", + id: 129156, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "11578:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "11564:15:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + nodeType: "BinaryOperation", + operator: "&&", + rightExpression: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 129160, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 129158, + name: "startBlock", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129149, + src: "11583:10:242", + typeDescriptions: { + typeIdentifier: "t_uint64", + typeString: "uint64", + }, + }, + nodeType: "BinaryOperation", + operator: "<=", + rightExpression: { + id: 129159, + name: "blockNumber", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129143, + src: "11597:11:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + src: "11583:25:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + src: "11564:44:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + functionReturnParameters: 129147, + id: 129162, + nodeType: "Return", + src: "11557:51:242", + }, + ], + }, + baseFunctions: [127676], + documentation: { + id: 129139, + nodeType: "StructuredDocumentation", + src: "11329:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "722f8e0a", + implemented: true, + kind: "function", + modifiers: [], + name: "isQueuedRewardAllocationReady", + nameLocation: "11368:29:242", + parameters: { + id: 129144, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129141, + mutability: "mutable", + name: "valPubkey", + nameLocation: "11413:9:242", + nodeType: "VariableDeclaration", + scope: 129164, + src: "11398:24:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: "t_bytes_calldata_ptr", + typeString: "bytes", + }, + typeName: { + id: 129140, + name: "bytes", + nodeType: "ElementaryTypeName", + src: "11398:5:242", + typeDescriptions: { + typeIdentifier: "t_bytes_storage_ptr", + typeString: "bytes", + }, + }, + visibility: "internal", + }, + { + constant: false, + id: 129143, + mutability: "mutable", + name: "blockNumber", + nameLocation: "11432:11:242", + nodeType: "VariableDeclaration", + scope: 129164, + src: "11424:19:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + typeName: { + id: 129142, + name: "uint256", + nodeType: "ElementaryTypeName", + src: "11424:7:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + visibility: "internal", + }, + ], + src: "11397:47:242", + }, + returnParameters: { + id: 129147, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129146, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129164, + src: "11466:4:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + typeName: { + id: 129145, + name: "bool", + nodeType: "ElementaryTypeName", + src: "11466:4:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + visibility: "internal", + }, + ], + src: "11465:6:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "public", + }, + { + id: 129177, + nodeType: "FunctionDefinition", + src: "11651:175:242", + nodes: [], + body: { + id: 129176, + nodeType: "Block", + src: "11699:127:242", + nodes: [], + statements: [ + { + expression: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 129174, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + expression: { + id: 129170, + name: "defaultRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128615, + src: "11777:23:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_RewardAllocation_$127572_storage", + typeString: + "struct IBeraChef.RewardAllocation storage ref", + }, + }, + id: 129171, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "11801:7:242", + memberName: "weights", + nodeType: "MemberAccess", + referencedDeclaration: 127571, + src: "11777:31:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage", + typeString: + "struct IBeraChef.Weight storage ref[] storage ref", + }, + }, + id: 129172, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "11809:6:242", + memberName: "length", + nodeType: "MemberAccess", + src: "11777:38:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: ">", + rightExpression: { + hexValue: "30", + id: 129173, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "11818:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "11777:42:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + functionReturnParameters: 129169, + id: 129175, + nodeType: "Return", + src: "11770:49:242", + }, + ], + }, + baseFunctions: [127682], + documentation: { + id: 129165, + nodeType: "StructuredDocumentation", + src: "11621:25:242", + text: "@inheritdoc IBeraChef", + }, + functionSelector: "a094a031", + implemented: true, + kind: "function", + modifiers: [], + name: "isReady", + nameLocation: "11660:7:242", + parameters: { + id: 129166, + nodeType: "ParameterList", + parameters: [], + src: "11667:2:242", + }, + returnParameters: { + id: 129169, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129168, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129177, + src: "11693:4:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + typeName: { + id: 129167, + name: "bool", + nodeType: "ElementaryTypeName", + src: "11693:4:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + visibility: "internal", + }, + ], + src: "11692:6:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "external", + }, + { + id: 129266, + nodeType: "FunctionDefinition", + src: "12252:976:242", + nodes: [], + body: { + id: 129265, + nodeType: "Block", + src: "12319:909:242", + nodes: [], + statements: [ + { + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 129188, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 129185, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129182, + src: "12333:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + id: 129186, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12341:6:242", + memberName: "length", + nodeType: "MemberAccess", + src: "12333:14:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: ">", + rightExpression: { + id: 129187, + name: "maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128594, + src: "12350:32:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + src: "12333:49:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129197, + nodeType: "IfStatement", + src: "12329:116:242", + trueBody: { + id: 129196, + nodeType: "Block", + src: "12384:61:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 129189, + name: "TooManyWeights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128089, + src: "12398:14:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 129192, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12413:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "12398:23:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 129193, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12422:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "12398:34:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 129194, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "12398:36:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129195, + nodeType: "ExpressionStatement", + src: "12398:36:242", + }, + ], + }, + }, + { + assignments: [129199], + declarations: [ + { + constant: false, + id: 129199, + mutability: "mutable", + name: "totalWeight", + nameLocation: "12511:11:242", + nodeType: "VariableDeclaration", + scope: 129265, + src: "12504:18:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + typeName: { + id: 129198, + name: "uint96", + nodeType: "ElementaryTypeName", + src: "12504:6:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + visibility: "internal", + }, + ], + id: 129200, + nodeType: "VariableDeclarationStatement", + src: "12504:18:242", + }, + { + body: { + id: 129251, + nodeType: "Block", + src: "12569:527:242", + statements: [ + { + assignments: [129210], + declarations: [ + { + constant: false, + id: 129210, + mutability: "mutable", + name: "weight", + nameLocation: "12599:6:242", + nodeType: "VariableDeclaration", + scope: 129251, + src: "12583:22:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: "struct IBeraChef.Weight", + }, + typeName: { + id: 129209, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129208, + name: "Weight", + nameLocations: ["12583:6:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127578, + src: "12583:6:242", + }, + referencedDeclaration: 127578, + src: "12583:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_storage_ptr", + typeString: "struct IBeraChef.Weight", + }, + }, + visibility: "internal", + }, + ], + id: 129214, + initialValue: { + baseExpression: { + id: 129211, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129182, + src: "12608:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + id: 129213, + indexExpression: { + id: 129212, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129202, + src: "12616:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "12608:10:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: "struct IBeraChef.Weight calldata", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "12583:35:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + id: 129218, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + expression: { + id: 129215, + name: "weight", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129210, + src: "12637:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata", + }, + }, + id: 129216, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12644:19:242", + memberName: "percentageNumerator", + nodeType: "MemberAccess", + referencedDeclaration: 127577, + src: "12637:26:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + nodeType: "BinaryOperation", + operator: "==", + rightExpression: { + hexValue: "30", + id: 129217, + isConstant: false, + isLValue: false, + isPure: true, + kind: "number", + lValueRequested: false, + nodeType: "Literal", + src: "12667:1:242", + typeDescriptions: { + typeIdentifier: "t_rational_0_by_1", + typeString: "int_const 0", + }, + value: "0", + }, + src: "12637:31:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129227, + nodeType: "IfStatement", + src: "12633:112:242", + trueBody: { + id: 129226, + nodeType: "Block", + src: "12670:75:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 129219, + name: "ZeroPercentageWeight", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128103, + src: "12688:20:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 129222, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12709:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "12688:29:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 129223, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12718:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "12688:40:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 129224, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "12688:42:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129225, + nodeType: "ExpressionStatement", + src: "12688:42:242", + }, + ], + }, + }, + { + condition: { + id: 129232, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "!", + prefix: true, + src: "12860:36:242", + subExpression: { + baseExpression: { + id: 129228, + name: "isWhitelistedVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128611, + src: "12861:18:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_address_$_t_bool_$", + typeString: "mapping(address => bool)", + }, + }, + id: 129231, + indexExpression: { + expression: { + id: 129229, + name: "weight", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129210, + src: "12880:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata", + }, + }, + id: 129230, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12887:8:242", + memberName: "receiver", + nodeType: "MemberAccess", + referencedDeclaration: 127575, + src: "12880:15:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "12861:35:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129241, + nodeType: "IfStatement", + src: "12856:116:242", + trueBody: { + id: 129240, + nodeType: "Block", + src: "12898:74:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 129233, + name: "NotWhitelistedVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128057, + src: "12916:19:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 129236, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12936:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "12916:28:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 129237, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12945:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "12916:39:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 129238, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "12916:41:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129239, + nodeType: "ExpressionStatement", + src: "12916:41:242", + }, + ], + }, + }, + { + expression: { + id: 129245, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftHandSide: { + id: 129242, + name: "totalWeight", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129199, + src: "12985:11:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + nodeType: "Assignment", + operator: "+=", + rightHandSide: { + expression: { + id: 129243, + name: "weight", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129210, + src: "13000:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata", + }, + }, + id: 129244, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "13007:19:242", + memberName: "percentageNumerator", + nodeType: "MemberAccess", + referencedDeclaration: 127577, + src: "13000:26:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + src: "12985:41:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + id: 129246, + nodeType: "ExpressionStatement", + src: "12985:41:242", + }, + { + id: 129250, + nodeType: "UncheckedBlock", + src: "13040:46:242", + statements: [ + { + expression: { + id: 129248, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "++", + prefix: true, + src: "13068:3:242", + subExpression: { + id: 129247, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129202, + src: "13070:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + id: 129249, + nodeType: "ExpressionStatement", + src: "13068:3:242", + }, + ], + }, + ], + }, + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 129207, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 129204, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129202, + src: "12548:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: "<", + rightExpression: { + expression: { + id: 129205, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129182, + src: "12552:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: + "struct IBeraChef.Weight calldata[] calldata", + }, + }, + id: 129206, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "12560:6:242", + memberName: "length", + nodeType: "MemberAccess", + src: "12552:14:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + src: "12548:18:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129252, + initializationExpression: { + assignments: [129202], + declarations: [ + { + constant: false, + id: 129202, + mutability: "mutable", + name: "i", + nameLocation: "12545:1:242", + nodeType: "VariableDeclaration", + scope: 129252, + src: "12537:9:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + typeName: { + id: 129201, + name: "uint256", + nodeType: "ElementaryTypeName", + src: "12537:7:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + visibility: "internal", + }, + ], + id: 129203, + nodeType: "VariableDeclarationStatement", + src: "12537:9:242", + }, + isSimpleCounterLoop: false, + nodeType: "ForStatement", + src: "12532:564:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + id: 129255, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 129253, + name: "totalWeight", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129199, + src: "13109:11:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + nodeType: "BinaryOperation", + operator: "!=", + rightExpression: { + id: 129254, + name: "ONE_HUNDRED_PERCENT", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128575, + src: "13124:19:242", + typeDescriptions: { + typeIdentifier: "t_uint96", + typeString: "uint96", + }, + }, + src: "13109:34:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129264, + nodeType: "IfStatement", + src: "13105:117:242", + trueBody: { + id: 129263, + nodeType: "Block", + src: "13145:77:242", + statements: [ + { + expression: { + arguments: [], + expression: { + argumentTypes: [], + expression: { + expression: { + id: 129256, + name: "InvalidRewardAllocationWeights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128079, + src: "13159:30:242", + typeDescriptions: { + typeIdentifier: + "t_function_error_pure$__$returns$_t_error_$", + typeString: + "function () pure returns (error)", + }, + }, + id: 129259, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "13190:8:242", + memberName: "selector", + nodeType: "MemberAccess", + src: "13159:39:242", + typeDescriptions: { + typeIdentifier: "t_bytes4", + typeString: "bytes4", + }, + }, + id: 129260, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "13199:10:242", + memberName: "revertWith", + nodeType: "MemberAccess", + referencedDeclaration: 123868, + src: "13159:50:242", + typeDescriptions: { + typeIdentifier: + "t_function_internal_pure$_t_bytes4_$returns$__$attached_to$_t_bytes4_$", + typeString: "function (bytes4) pure", + }, + }, + id: 129261, + isConstant: false, + isLValue: false, + isPure: false, + kind: "functionCall", + lValueRequested: false, + nameLocations: [], + names: [], + nodeType: "FunctionCall", + src: "13159:52:242", + tryCall: false, + typeDescriptions: { + typeIdentifier: "t_tuple$__$", + typeString: "tuple()", + }, + }, + id: 129262, + nodeType: "ExpressionStatement", + src: "13159:52:242", + }, + ], + }, + }, + ], + }, + documentation: { + id: 129178, + nodeType: "StructuredDocumentation", + src: "12115:132:242", + text: " @notice Validates the weights of a reward allocation.\n @param weights The weights of the reward allocation.", + }, + implemented: true, + kind: "function", + modifiers: [], + name: "_validateWeights", + nameLocation: "12261:16:242", + parameters: { + id: 129183, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129182, + mutability: "mutable", + name: "weights", + nameLocation: "12296:7:242", + nodeType: "VariableDeclaration", + scope: 129266, + src: "12278:25:242", + stateVariable: false, + storageLocation: "calldata", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_calldata_ptr_$dyn_calldata_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + typeName: { + baseType: { + id: 129180, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129179, + name: "Weight", + nameLocations: ["12278:6:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127578, + src: "12278:6:242", + }, + referencedDeclaration: 127578, + src: "12278:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_storage_ptr", + typeString: "struct IBeraChef.Weight", + }, + }, + id: 129181, + nodeType: "ArrayTypeName", + src: "12278:8:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + }, + visibility: "internal", + }, + ], + src: "12277:27:242", + }, + returnParameters: { + id: 129184, + nodeType: "ParameterList", + parameters: [], + src: "12319:0:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "internal", + }, + { + id: 129314, + nodeType: "FunctionDefinition", + src: "13565:798:242", + nodes: [], + body: { + id: 129313, + nodeType: "Block", + src: "13647:716:242", + nodes: [], + statements: [ + { + assignments: [129277], + declarations: [ + { + constant: false, + id: 129277, + mutability: "mutable", + name: "length", + nameLocation: "13665:6:242", + nodeType: "VariableDeclaration", + scope: 129313, + src: "13657:14:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + typeName: { + id: 129276, + name: "uint256", + nodeType: "ElementaryTypeName", + src: "13657:7:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + visibility: "internal", + }, + ], + id: 129280, + initialValue: { + expression: { + id: 129278, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129271, + src: "13674:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr", + typeString: "struct IBeraChef.Weight memory[] memory", + }, + }, + id: 129279, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + memberLocation: "13682:6:242", + memberName: "length", + nodeType: "MemberAccess", + src: "13674:14:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "VariableDeclarationStatement", + src: "13657:31:242", + }, + { + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 129283, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 129281, + name: "length", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129277, + src: "13885:6:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: ">", + rightExpression: { + id: 129282, + name: "maxNumWeightsPerRewardAllocation", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128594, + src: "13894:32:242", + typeDescriptions: { + typeIdentifier: "t_uint8", + typeString: "uint8", + }, + }, + src: "13885:41:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129287, + nodeType: "IfStatement", + src: "13881:84:242", + trueBody: { + id: 129286, + nodeType: "Block", + src: "13928:37:242", + statements: [ + { + expression: { + hexValue: "66616c7365", + id: 129284, + isConstant: false, + isLValue: false, + isPure: true, + kind: "bool", + lValueRequested: false, + nodeType: "Literal", + src: "13949:5:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + value: "false", + }, + functionReturnParameters: 129275, + id: 129285, + nodeType: "Return", + src: "13942:12:242", + }, + ], + }, + }, + { + body: { + id: 129309, + nodeType: "Block", + src: "14004:266:242", + statements: [ + { + condition: { + id: 129300, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "!", + prefix: true, + src: "14114:40:242", + subExpression: { + baseExpression: { + id: 129294, + name: "isWhitelistedVault", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 128611, + src: "14115:18:242", + typeDescriptions: { + typeIdentifier: + "t_mapping$_t_address_$_t_bool_$", + typeString: "mapping(address => bool)", + }, + }, + id: 129299, + indexExpression: { + expression: { + baseExpression: { + id: 129295, + name: "weights", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129271, + src: "14134:7:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr", + typeString: + "struct IBeraChef.Weight memory[] memory", + }, + }, + id: 129297, + indexExpression: { + id: 129296, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129289, + src: "14142:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "14134:10:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_memory_ptr", + typeString: + "struct IBeraChef.Weight memory", + }, + }, + id: 129298, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + memberLocation: "14145:8:242", + memberName: "receiver", + nodeType: "MemberAccess", + referencedDeclaration: 127575, + src: "14134:19:242", + typeDescriptions: { + typeIdentifier: "t_address", + typeString: "address", + }, + }, + isConstant: false, + isLValue: true, + isPure: false, + lValueRequested: false, + nodeType: "IndexAccess", + src: "14115:39:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129304, + nodeType: "IfStatement", + src: "14110:91:242", + trueBody: { + id: 129303, + nodeType: "Block", + src: "14156:45:242", + statements: [ + { + expression: { + hexValue: "66616c7365", + id: 129301, + isConstant: false, + isLValue: false, + isPure: true, + kind: "bool", + lValueRequested: false, + nodeType: "Literal", + src: "14181:5:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + value: "false", + }, + functionReturnParameters: 129275, + id: 129302, + nodeType: "Return", + src: "14174:12:242", + }, + ], + }, + }, + { + id: 129308, + nodeType: "UncheckedBlock", + src: "14214:46:242", + statements: [ + { + expression: { + id: 129306, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + nodeType: "UnaryOperation", + operator: "++", + prefix: true, + src: "14242:3:242", + subExpression: { + id: 129305, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129289, + src: "14244:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + id: 129307, + nodeType: "ExpressionStatement", + src: "14242:3:242", + }, + ], + }, + ], + }, + condition: { + commonType: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + id: 129293, + isConstant: false, + isLValue: false, + isPure: false, + lValueRequested: false, + leftExpression: { + id: 129291, + name: "i", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129289, + src: "13991:1:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + nodeType: "BinaryOperation", + operator: "<", + rightExpression: { + id: 129292, + name: "length", + nodeType: "Identifier", + overloadedDeclarations: [], + referencedDeclaration: 129277, + src: "13995:6:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + src: "13991:10:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + id: 129310, + initializationExpression: { + assignments: [129289], + declarations: [ + { + constant: false, + id: 129289, + mutability: "mutable", + name: "i", + nameLocation: "13988:1:242", + nodeType: "VariableDeclaration", + scope: 129310, + src: "13980:9:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + typeName: { + id: 129288, + name: "uint256", + nodeType: "ElementaryTypeName", + src: "13980:7:242", + typeDescriptions: { + typeIdentifier: "t_uint256", + typeString: "uint256", + }, + }, + visibility: "internal", + }, + ], + id: 129290, + nodeType: "VariableDeclarationStatement", + src: "13980:9:242", + }, + isSimpleCounterLoop: false, + nodeType: "ForStatement", + src: "13975:295:242", + }, + { + expression: { + hexValue: "74727565", + id: 129311, + isConstant: false, + isLValue: false, + isPure: true, + kind: "bool", + lValueRequested: false, + nodeType: "Literal", + src: "14352:4:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + value: "true", + }, + functionReturnParameters: 129275, + id: 129312, + nodeType: "Return", + src: "14345:11:242", + }, + ], + }, + documentation: { + id: 129267, + nodeType: "StructuredDocumentation", + src: "13234:326:242", + text: " @notice Checks if the weights of a reward allocation are still valid.\n @notice This method is used to check if the weights of a reward allocation are still valid in flight.\n @param weights The weights of the reward allocation.\n @return True if the weights are still valid, otherwise false.", + }, + implemented: true, + kind: "function", + modifiers: [], + name: "_checkIfStillValid", + nameLocation: "13574:18:242", + parameters: { + id: 129272, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129271, + mutability: "mutable", + name: "weights", + nameLocation: "13609:7:242", + nodeType: "VariableDeclaration", + scope: 129314, + src: "13593:23:242", + stateVariable: false, + storageLocation: "memory", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_memory_ptr_$dyn_memory_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + typeName: { + baseType: { + id: 129269, + nodeType: "UserDefinedTypeName", + pathNode: { + id: 129268, + name: "Weight", + nameLocations: ["13593:6:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127578, + src: "13593:6:242", + }, + referencedDeclaration: 127578, + src: "13593:6:242", + typeDescriptions: { + typeIdentifier: + "t_struct$_Weight_$127578_storage_ptr", + typeString: "struct IBeraChef.Weight", + }, + }, + id: 129270, + nodeType: "ArrayTypeName", + src: "13593:8:242", + typeDescriptions: { + typeIdentifier: + "t_array$_t_struct$_Weight_$127578_storage_$dyn_storage_ptr", + typeString: "struct IBeraChef.Weight[]", + }, + }, + visibility: "internal", + }, + ], + src: "13592:25:242", + }, + returnParameters: { + id: 129275, + nodeType: "ParameterList", + parameters: [ + { + constant: false, + id: 129274, + mutability: "mutable", + name: "", + nameLocation: "-1:-1:-1", + nodeType: "VariableDeclaration", + scope: 129314, + src: "13641:4:242", + stateVariable: false, + storageLocation: "default", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + typeName: { + id: 129273, + name: "bool", + nodeType: "ElementaryTypeName", + src: "13641:4:242", + typeDescriptions: { + typeIdentifier: "t_bool", + typeString: "bool", + }, + }, + visibility: "internal", + }, + ], + src: "13640:6:242", + }, + scope: 129315, + stateMutability: "view", + virtual: false, + visibility: "internal", + }, + ], + abstract: false, + baseContracts: [ + { + baseName: { + id: 128563, + name: "IBeraChef", + nameLocations: ["1024:9:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 127738, + src: "1024:9:242", + }, + id: 128564, + nodeType: "InheritanceSpecifier", + src: "1024:9:242", + }, + { + baseName: { + id: 128565, + name: "OwnableUpgradeable", + nameLocations: ["1035:18:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 68260, + src: "1035:18:242", + }, + id: 128566, + nodeType: "InheritanceSpecifier", + src: "1035:18:242", + }, + { + baseName: { + id: 128567, + name: "UUPSUpgradeable", + nameLocations: ["1055:15:242"], + nodeType: "IdentifierPath", + referencedDeclaration: 74181, + src: "1055:15:242", + }, + id: 128568, + nodeType: "InheritanceSpecifier", + src: "1055:15:242", + }, + ], + canonicalName: "BeraChef", + contractDependencies: [], + contractKind: "contract", + documentation: { + id: 128562, + nodeType: "StructuredDocumentation", + src: "568:435:242", + text: "@title BeraChef\n @author Berachain Team\n @notice The BeraChef contract is responsible for managing the reward allocations and the whitelisted vaults.\n Reward allocation is a list of weights that determine the percentage of rewards that goes to each reward vault.\n Each validator could have a custom reward allocation, if not, the default reward allocation is used.\n @dev It should be owned by the governance module.", + }, + fullyImplemented: true, + linearizedBaseContracts: [ + 129315, 74181, 77821, 68260, 75897, 73999, 127738, 128173, 100655, + ], + name: "BeraChef", + nameLocation: "1012:8:242", + scope: 129316, + usedErrors: [ + 68096, 68101, 73762, 73765, 74026, 74031, 78016, 78029, 79766, + 80157, 100642, 100644, 100646, 100648, 100650, 100652, 100654, + 128043, 128045, 128047, 128049, 128051, 128053, 128055, 128057, + 128059, 128061, 128063, 128065, 128067, 128069, 128071, 128073, + 128075, 128077, 128079, 128081, 128083, 128085, 128087, 128089, + 128091, 128093, 128095, 128097, 128099, 128101, 128103, 128105, + 128107, 128109, 128111, 128113, 128115, 128117, 128119, 128121, + 128123, 128125, 128127, 128129, 128131, 128133, 128135, 128137, + 128139, 128141, 128143, 128145, 128148, 128151, 128154, 128157, + 128160, 128163, 128166, 128169, 128172, + ], + usedEvents: [ + 68107, 73770, 77573, 127583, 127588, 127597, 127604, 127615, 127626, + 127632, + ], + }, + ], + license: "MIT", + }, + id: 242, }, - { type: "error", name: "VaultAlreadyExists", inputs: [] }, - { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, - { type: "error", name: "ZeroAddress", inputs: [] }, ] as const; diff --git a/packages/berajs/src/hooks/modules/bgt/useIsFriendOfTheChef.ts b/packages/berajs/src/hooks/modules/bgt/useIsFriendOfTheChef.ts index 578c83c9a..e10fa623b 100644 --- a/packages/berajs/src/hooks/modules/bgt/useIsFriendOfTheChef.ts +++ b/packages/berajs/src/hooks/modules/bgt/useIsFriendOfTheChef.ts @@ -17,7 +17,7 @@ export const useIsFriendOfTheChef = (address?: Address) => { return publicClient!.readContract({ address: beraChefAddress, abi: BERA_CHEF_ABI, - functionName: "isFriendOfTheChef", + functionName: "isWhitelistedVault", args: [address!], }); }, diff --git a/packages/berajs/src/hooks/modules/pol/hooks/useRewardVaultBalanceFromStakingToken.ts b/packages/berajs/src/hooks/modules/pol/hooks/useRewardVaultBalanceFromStakingToken.ts index 2b4b1d628..97f01af0b 100644 --- a/packages/berajs/src/hooks/modules/pol/hooks/useRewardVaultBalanceFromStakingToken.ts +++ b/packages/berajs/src/hooks/modules/pol/hooks/useRewardVaultBalanceFromStakingToken.ts @@ -44,7 +44,7 @@ export const useRewardVaultBalanceFromStakingToken = ({ client?.readContract({ address: beraChefAddress, abi: BERA_CHEF_ABI, - functionName: "isFriendOfTheChef", + functionName: "isWhitelistedVault", args: [rewardVaultAddress!], }), account From 9259f8b5f3dba3678647ea3b6ef0da3e18e92d5a Mon Sep 17 00:00:00 2001 From: brown Date: Thu, 21 Nov 2024 11:52:02 -0500 Subject: [PATCH 02/19] feat(berajs): update bgtstaker abi and references Ref BFE-252 --- .../src/abi/bend/lendRewardHelperAbi.js | 2 +- packages/berajs/src/abi/pol/bgtStaker.ts | 94 ++++++++++++------- 2 files changed, 61 insertions(+), 35 deletions(-) diff --git a/packages/berajs/src/abi/bend/lendRewardHelperAbi.js b/packages/berajs/src/abi/bend/lendRewardHelperAbi.js index 54c957427..a63ae255c 100755 --- a/packages/berajs/src/abi/bend/lendRewardHelperAbi.js +++ b/packages/berajs/src/abi/bend/lendRewardHelperAbi.js @@ -6,7 +6,7 @@ export const lendRewardHelperAbi = [ }, { type: "function", - name: "REWARD_TOKEN", + name: "REWARD_TOKEN", // TODO: Is this the same bgt staker abi? /packages/berajs/src/abi/pol/bgtStaker.ts inputs: [], outputs: [ { diff --git a/packages/berajs/src/abi/pol/bgtStaker.ts b/packages/berajs/src/abi/pol/bgtStaker.ts index d7329b8f4..2fe5003e1 100755 --- a/packages/berajs/src/abi/pol/bgtStaker.ts +++ b/packages/berajs/src/abi/pol/bgtStaker.ts @@ -7,20 +7,6 @@ export const BGT_STAKER_ABI = [ outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view", }, - { - type: "function", - name: "REWARD_TOKEN", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], - stateMutability: "view", - }, - { - type: "function", - name: "STAKE_TOKEN", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], - stateMutability: "view", - }, { type: "function", name: "UPGRADE_INTERFACE_VERSION", @@ -148,6 +134,13 @@ export const BGT_STAKER_ABI = [ outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view", }, + { + type: "function", + name: "rewardToken", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], + stateMutability: "view", + }, { type: "function", name: "rewards", @@ -181,6 +174,13 @@ export const BGT_STAKER_ABI = [ outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + name: "stakeToken", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], + stateMutability: "view", + }, { type: "function", name: "totalSupply", @@ -384,10 +384,13 @@ export const BGT_STAKER_ABI = [ }, { type: "error", name: "AlreadyInitialized", inputs: [] }, { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, - { type: "error", name: "BlockDoesNotExist", inputs: [] }, - { type: "error", name: "BlockNotInBuffer", inputs: [] }, + { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, + { type: "error", name: "CommissionNotQueued", inputs: [] }, + { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, + { type: "error", name: "DepositValueTooHigh", inputs: [] }, + { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, { type: "error", name: "ERC1967InvalidImplementation", @@ -396,33 +399,52 @@ export const BGT_STAKER_ABI = [ ], }, { type: "error", name: "ERC1967NonPayable", inputs: [] }, - { type: "error", name: "FailedInnerCall", inputs: [] }, + { type: "error", name: "FailedCall", inputs: [] }, + { type: "error", name: "IncentiveRateTooHigh", inputs: [] }, + { type: "error", name: "IndexOutOfRange", inputs: [] }, + { type: "error", name: "InsolventReward", inputs: [] }, + { type: "error", name: "InsufficientDelegateStake", inputs: [] }, + { type: "error", name: "InsufficientDeposit", inputs: [] }, { type: "error", name: "InsufficientSelfStake", inputs: [] }, + { type: "error", name: "InsufficientStake", inputs: [] }, + { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, + { type: "error", name: "InvalidActivateCommissionChangeDelay", inputs: [] }, + { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, { type: "error", name: "InvalidCommission", inputs: [] }, - { type: "error", name: "InvalidCuttingBoardWeights", inputs: [] }, + { type: "error", name: "InvalidCredentialsLength", inputs: [] }, + { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, - { type: "error", name: "InvalidMinter", inputs: [] }, + { type: "error", name: "InvalidProof", inputs: [] }, + { type: "error", name: "InvalidPubKeyLength", inputs: [] }, + { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, + { type: "error", name: "InvalidRewardConvexity", inputs: [] }, + { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, + { type: "error", name: "InvalidSignatureLength", inputs: [] }, { type: "error", name: "InvalidStartBlock", inputs: [] }, + { type: "error", name: "InvalidateDefaultRewardAllocation", inputs: [] }, { type: "error", name: "InvariantCheckFailed", inputs: [] }, - { type: "error", name: "MaxNumWeightsPerCuttingBoardIsZero", inputs: [] }, - { type: "error", name: "NoWhitelistedTokens", inputs: [] }, - { type: "error", name: "NotActionableBlock", inputs: [] }, + { type: "error", name: "MaxNumWeightsPerRewardAllocationIsZero", inputs: [] }, + { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, + { type: "error", name: "NotAContract", inputs: [] }, { type: "error", name: "NotApprovedSender", inputs: [] }, { type: "error", name: "NotBGT", inputs: [] }, { type: "error", name: "NotBlockRewardController", inputs: [] }, + { type: "error", name: "NotDelegate", inputs: [] }, { type: "error", name: "NotDistributor", inputs: [] }, { type: "error", name: "NotEnoughBalance", inputs: [] }, + { type: "error", name: "NotEnoughBoostedBalance", inputs: [] }, { type: "error", name: "NotEnoughTime", inputs: [] }, + { type: "error", name: "NotFactoryVault", inputs: [] }, { type: "error", name: "NotFeeCollector", inputs: [] }, - { type: "error", name: "NotFriendOfTheChef", inputs: [] }, { type: "error", name: "NotGovernance", inputs: [] }, + { type: "error", name: "NotIncentiveManager", inputs: [] }, { type: "error", name: "NotInitializing", inputs: [] }, + { type: "error", name: "NotNewOperator", inputs: [] }, { type: "error", name: "NotOperator", inputs: [] }, - { type: "error", name: "NotProver", inputs: [] }, { type: "error", name: "NotRootFollower", inputs: [] }, - { type: "error", name: "NotStaker", inputs: [] }, - { type: "error", name: "NotValidatorOrOperator", inputs: [] }, + { type: "error", name: "NotWhitelistedVault", inputs: [] }, + { type: "error", name: "OperatorAlreadySet", inputs: [] }, { type: "error", name: "OwnableInvalidOwner", @@ -434,26 +456,30 @@ export const BGT_STAKER_ABI = [ inputs: [{ name: "account", type: "address", internalType: "address" }], }, { type: "error", name: "PayoutAmountIsZero", inputs: [] }, - { type: "error", name: "ProvidedRewardTooHigh", inputs: [] }, - { type: "error", name: "QueuedCuttingBoardNotFound", inputs: [] }, - { type: "error", name: "QueuedCuttingBoardNotReady", inputs: [] }, + { type: "error", name: "RewardAllocationAlreadyQueued", inputs: [] }, + { type: "error", name: "RewardAllocationBlockDelayTooLarge", inputs: [] }, { type: "error", name: "RewardCycleNotEnded", inputs: [] }, + { type: "error", name: "RewardsDurationIsZero", inputs: [] }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [{ name: "token", type: "address", internalType: "address" }], + }, { type: "error", name: "StakeAmountIsZero", inputs: [] }, + { type: "error", name: "TimestampAlreadyProcessed", inputs: [] }, { type: "error", name: "TokenAlreadyWhitelistedOrLimitReached", inputs: [] }, { type: "error", name: "TokenNotWhitelisted", inputs: [] }, { type: "error", name: "TooManyWeights", inputs: [] }, + { type: "error", name: "TotalSupplyOverflow", inputs: [] }, { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, { type: "error", name: "UUPSUnsupportedProxiableUUID", inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }], }, - { - type: "error", - name: "Unauthorized", - inputs: [{ name: "", type: "address", internalType: "address" }], - }, { type: "error", name: "VaultAlreadyExists", inputs: [] }, { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, { type: "error", name: "ZeroAddress", inputs: [] }, + { type: "error", name: "ZeroOperatorOnFirstDeposit", inputs: [] }, + { type: "error", name: "ZeroPercentageWeight", inputs: [] }, ] as const; From bd26d32de0013f97f736119389b37bc0ccea35da Mon Sep 17 00:00:00 2001 From: brown Date: Thu, 21 Nov 2024 12:36:47 -0500 Subject: [PATCH 03/19] feat(berajs): update reward vault abi and references Ref BFE-252 --- .../components/my-gauge-details.tsx | 2 +- apps/hub/src/columns/user-bgt-columns.tsx | 2 +- apps/hub/src/hooks/useClaimAllBgtCalldata.ts | 4 +- packages/berajs/src/abi/pol/reward-vault.ts | 270 ++++++++++++------ .../src/actions/bgt/getIncentivesInfo.ts | 2 +- .../modules/lend/usePollUserBGTRewards.ts | 2 +- 6 files changed, 189 insertions(+), 93 deletions(-) diff --git a/apps/hub/src/app/vaults/[gaugeAddress]/components/my-gauge-details.tsx b/apps/hub/src/app/vaults/[gaugeAddress]/components/my-gauge-details.tsx index 66d511b72..b64cf1a50 100755 --- a/apps/hub/src/app/vaults/[gaugeAddress]/components/my-gauge-details.tsx +++ b/apps/hub/src/app/vaults/[gaugeAddress]/components/my-gauge-details.tsx @@ -81,7 +81,7 @@ export const MyGaugeDetails = ({ gauge }: { gauge: Gauge }) => { address: gauge.vaultAddress, abi: BERA_VAULT_REWARDS_ABI, functionName: "getReward", - params: [account!], + params: [account!, account!], // TODO: A second param is needed here for recipient. Added current account twice for now }) } > diff --git a/apps/hub/src/columns/user-bgt-columns.tsx b/apps/hub/src/columns/user-bgt-columns.tsx index 38ad87d96..93f9a1030 100755 --- a/apps/hub/src/columns/user-bgt-columns.tsx +++ b/apps/hub/src/columns/user-bgt-columns.tsx @@ -98,7 +98,7 @@ export const getUserBgtColumns = ({ address: row.original.vaultAddress, abi: BERA_VAULT_REWARDS_ABI, functionName: "getReward", - params: [account], + params: [account, account], // TODO: A second param is needed here for recipient. Added current account twice for now }); }} > diff --git a/apps/hub/src/hooks/useClaimAllBgtCalldata.ts b/apps/hub/src/hooks/useClaimAllBgtCalldata.ts index 5810758b5..25df2451b 100755 --- a/apps/hub/src/hooks/useClaimAllBgtCalldata.ts +++ b/apps/hub/src/hooks/useClaimAllBgtCalldata.ts @@ -1,5 +1,5 @@ -import { BERA_VAULT_REWARDS_ABI, useBeraJs } from "@bera/berajs"; import React from "react"; +import { BERA_VAULT_REWARDS_ABI, useBeraJs } from "@bera/berajs"; import { Address, encodeFunctionData } from "viem"; export const useClaimAllBgtCalldata = (vaultAddresses: Address[]) => { @@ -9,7 +9,7 @@ export const useClaimAllBgtCalldata = (vaultAddresses: Address[]) => { const data = encodeFunctionData({ abi: BERA_VAULT_REWARDS_ABI, functionName: "getReward", - args: [account as `0x${string}`], + args: [account!, account!], // TODO: A second param is needed here for recipient. Added current account twice for now }); return { target: vaultAddress as Address, diff --git a/packages/berajs/src/abi/pol/reward-vault.ts b/packages/berajs/src/abi/pol/reward-vault.ts index 21c2f9732..a78c2dcb5 100755 --- a/packages/berajs/src/abi/pol/reward-vault.ts +++ b/packages/berajs/src/abi/pol/reward-vault.ts @@ -1,19 +1,5 @@ export const BERA_VAULT_REWARDS_ABI = [ { type: "constructor", inputs: [], stateMutability: "nonpayable" }, - { - type: "function", - name: "REWARD_TOKEN", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], - stateMutability: "view", - }, - { - type: "function", - name: "STAKE_TOKEN", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], - stateMutability: "view", - }, { type: "function", name: "addIncentive", @@ -34,10 +20,10 @@ export const BERA_VAULT_REWARDS_ABI = [ }, { type: "function", - name: "beraChef", + name: "beaconDepositContract", inputs: [], outputs: [ - { name: "", type: "address", internalType: "contract IBeraChef" }, + { name: "", type: "address", internalType: "contract IBeaconDeposit" }, ], stateMutability: "view", }, @@ -78,14 +64,34 @@ export const BERA_VAULT_REWARDS_ABI = [ { type: "function", name: "exit", - inputs: [], + inputs: [{ name: "recipient", type: "address", internalType: "address" }], outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + name: "factory", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "address" }], + stateMutability: "view", + }, + { + type: "function", + name: "getDelegateStake", + inputs: [ + { name: "account", type: "address", internalType: "address" }, + { name: "delegate", type: "address", internalType: "address" }, + ], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, { type: "function", name: "getReward", - inputs: [{ name: "account", type: "address", internalType: "address" }], + inputs: [ + { name: "account", type: "address", internalType: "address" }, + { name: "recipient", type: "address", internalType: "address" }, + ], outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "nonpayable", }, @@ -96,6 +102,13 @@ export const BERA_VAULT_REWARDS_ABI = [ outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view", }, + { + type: "function", + name: "getTotalDelegateStaked", + inputs: [{ name: "account", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", + }, { type: "function", name: "getWhitelistedTokens", @@ -118,6 +131,7 @@ export const BERA_VAULT_REWARDS_ABI = [ { name: "minIncentiveRate", type: "uint256", internalType: "uint256" }, { name: "incentiveRate", type: "uint256", internalType: "uint256" }, { name: "amountRemaining", type: "uint256", internalType: "uint256" }, + { name: "manager", type: "address", internalType: "address" }, ], stateMutability: "view", }, @@ -125,15 +139,32 @@ export const BERA_VAULT_REWARDS_ABI = [ type: "function", name: "initialize", inputs: [ + { + name: "__beaconDepositContract", + type: "address", + internalType: "address", + }, { name: "_bgt", type: "address", internalType: "address" }, { name: "_distributor", type: "address", internalType: "address" }, - { name: "_berachef", type: "address", internalType: "address" }, - { name: "_governance", type: "address", internalType: "address" }, { name: "_stakingToken", type: "address", internalType: "address" }, ], outputs: [], stateMutability: "nonpayable", }, + { + type: "function", + name: "isFactoryOwner", + inputs: [{ name: "user", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, + { + type: "function", + name: "isFactoryVaultManager", + inputs: [{ name: "user", type: "address", internalType: "address" }], + outputs: [{ name: "", type: "bool", internalType: "bool" }], + stateMutability: "view", + }, { type: "function", name: "lastTimeRewardApplicable", @@ -159,7 +190,7 @@ export const BERA_VAULT_REWARDS_ABI = [ type: "function", name: "notifyRewardAmount", inputs: [ - { name: "coinbase", type: "address", internalType: "address" }, + { name: "pubkey", type: "bytes", internalType: "bytes" }, { name: "reward", type: "uint256", internalType: "uint256" }, ], outputs: [], @@ -172,17 +203,10 @@ export const BERA_VAULT_REWARDS_ABI = [ outputs: [{ name: "", type: "address", internalType: "address" }], stateMutability: "view", }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, { type: "function", name: "pause", - inputs: [{ name: "_paused", type: "bool", internalType: "bool" }], + inputs: [], outputs: [], stateMutability: "nonpayable", }, @@ -217,13 +241,6 @@ export const BERA_VAULT_REWARDS_ABI = [ outputs: [], stateMutability: "nonpayable", }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, { type: "function", name: "rewardPerToken", @@ -245,6 +262,13 @@ export const BERA_VAULT_REWARDS_ABI = [ outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view", }, + { + type: "function", + name: "rewardToken", + inputs: [], + outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], + stateMutability: "view", + }, { type: "function", name: "rewards", @@ -306,17 +330,17 @@ export const BERA_VAULT_REWARDS_ABI = [ }, { type: "function", - name: "totalSupply", + name: "stakeToken", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], stateMutability: "view", }, { type: "function", - name: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", + name: "totalSupply", + inputs: [], + outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + stateMutability: "view", }, { type: "function", @@ -325,6 +349,23 @@ export const BERA_VAULT_REWARDS_ABI = [ outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view", }, + { + type: "function", + name: "unpause", + inputs: [], + outputs: [], + stateMutability: "nonpayable", + }, + { + type: "function", + name: "updateIncentiveManager", + inputs: [ + { name: "token", type: "address", internalType: "address" }, + { name: "newManager", type: "address", internalType: "address" }, + ], + outputs: [], + stateMutability: "nonpayable", + }, { type: "function", name: "userRewardPerTokenPaid", @@ -338,6 +379,7 @@ export const BERA_VAULT_REWARDS_ABI = [ inputs: [ { name: "token", type: "address", internalType: "address" }, { name: "minIncentiveRate", type: "uint256", internalType: "uint256" }, + { name: "manager", type: "address", internalType: "address" }, ], outputs: [], stateMutability: "nonpayable", @@ -450,6 +492,31 @@ export const BERA_VAULT_REWARDS_ABI = [ ], anonymous: false, }, + { + type: "event", + name: "IncentiveManagerChanged", + inputs: [ + { + name: "token", + type: "address", + indexed: true, + internalType: "address", + }, + { + name: "newManager", + type: "address", + indexed: false, + internalType: "address", + }, + { + name: "oldManager", + type: "address", + indexed: false, + internalType: "address", + }, + ], + anonymous: false, + }, { type: "event", name: "IncentiveTokenRemoved", @@ -479,19 +546,46 @@ export const BERA_VAULT_REWARDS_ABI = [ indexed: false, internalType: "uint256", }, + { + name: "manager", + type: "address", + indexed: false, + internalType: "address", + }, ], anonymous: false, }, { type: "event", - name: "IncentivesProcessed", + name: "IncentivesProcessFailed", inputs: [ + { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { - name: "coinbase", + name: "token", type: "address", indexed: true, internalType: "address", }, + { + name: "bgtEmitted", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + { + name: "amount", + type: "uint256", + indexed: false, + internalType: "uint256", + }, + ], + anonymous: false, + }, + { + type: "event", + name: "IncentivesProcessed", + inputs: [ + { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { name: "token", type: "address", @@ -558,25 +652,6 @@ export const BERA_VAULT_REWARDS_ABI = [ ], 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", @@ -708,64 +783,85 @@ export const BERA_VAULT_REWARDS_ABI = [ }, { type: "error", name: "AlreadyInitialized", inputs: [] }, { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, - { type: "error", name: "BlockDoesNotExist", inputs: [] }, - { type: "error", name: "BlockNotInBuffer", inputs: [] }, + { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, + { type: "error", name: "CommissionNotQueued", inputs: [] }, + { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, + { type: "error", name: "DepositValueTooHigh", inputs: [] }, + { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, { type: "error", name: "EnforcedPause", inputs: [] }, { type: "error", name: "ExpectedPause", inputs: [] }, + { type: "error", name: "IncentiveRateTooHigh", inputs: [] }, + { type: "error", name: "IndexOutOfRange", inputs: [] }, + { type: "error", name: "InsolventReward", inputs: [] }, + { type: "error", name: "InsufficientDelegateStake", inputs: [] }, + { type: "error", name: "InsufficientDeposit", inputs: [] }, { type: "error", name: "InsufficientSelfStake", inputs: [] }, + { type: "error", name: "InsufficientStake", inputs: [] }, + { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, + { type: "error", name: "InvalidActivateCommissionChangeDelay", inputs: [] }, + { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, { type: "error", name: "InvalidCommission", inputs: [] }, - { type: "error", name: "InvalidCuttingBoardWeights", inputs: [] }, + { type: "error", name: "InvalidCredentialsLength", inputs: [] }, + { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, - { type: "error", name: "InvalidMinter", inputs: [] }, + { type: "error", name: "InvalidProof", inputs: [] }, + { type: "error", name: "InvalidPubKeyLength", inputs: [] }, + { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, + { type: "error", name: "InvalidRewardConvexity", inputs: [] }, + { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, + { type: "error", name: "InvalidSignatureLength", inputs: [] }, { type: "error", name: "InvalidStartBlock", inputs: [] }, + { type: "error", name: "InvalidateDefaultRewardAllocation", inputs: [] }, { type: "error", name: "InvariantCheckFailed", inputs: [] }, - { type: "error", name: "MaxNumWeightsPerCuttingBoardIsZero", inputs: [] }, - { type: "error", name: "NoWhitelistedTokens", inputs: [] }, - { type: "error", name: "NotActionableBlock", inputs: [] }, + { type: "error", name: "MaxNumWeightsPerRewardAllocationIsZero", inputs: [] }, + { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, + { type: "error", name: "NotAContract", inputs: [] }, { type: "error", name: "NotApprovedSender", inputs: [] }, { type: "error", name: "NotBGT", inputs: [] }, { type: "error", name: "NotBlockRewardController", inputs: [] }, + { type: "error", name: "NotDelegate", inputs: [] }, { type: "error", name: "NotDistributor", inputs: [] }, { type: "error", name: "NotEnoughBalance", inputs: [] }, + { type: "error", name: "NotEnoughBoostedBalance", inputs: [] }, { type: "error", name: "NotEnoughTime", inputs: [] }, + { type: "error", name: "NotFactoryVault", inputs: [] }, { type: "error", name: "NotFeeCollector", inputs: [] }, - { type: "error", name: "NotFriendOfTheChef", inputs: [] }, { type: "error", name: "NotGovernance", inputs: [] }, + { type: "error", name: "NotIncentiveManager", inputs: [] }, { type: "error", name: "NotInitializing", inputs: [] }, + { type: "error", name: "NotNewOperator", inputs: [] }, { type: "error", name: "NotOperator", inputs: [] }, - { type: "error", name: "NotProver", inputs: [] }, { type: "error", name: "NotRootFollower", inputs: [] }, - { type: "error", name: "NotStaker", inputs: [] }, - { type: "error", name: "NotValidatorOrOperator", inputs: [] }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, + { type: "error", name: "NotWhitelistedVault", inputs: [] }, + { type: "error", name: "OperatorAlreadySet", inputs: [] }, { type: "error", name: "OwnableUnauthorizedAccount", inputs: [{ name: "account", type: "address", internalType: "address" }], }, { type: "error", name: "PayoutAmountIsZero", inputs: [] }, - { type: "error", name: "ProvidedRewardTooHigh", inputs: [] }, - { type: "error", name: "QueuedCuttingBoardNotFound", inputs: [] }, - { type: "error", name: "QueuedCuttingBoardNotReady", inputs: [] }, { type: "error", name: "ReentrancyGuardReentrantCall", inputs: [] }, + { type: "error", name: "RewardAllocationAlreadyQueued", inputs: [] }, + { type: "error", name: "RewardAllocationBlockDelayTooLarge", inputs: [] }, { type: "error", name: "RewardCycleNotEnded", inputs: [] }, + { type: "error", name: "RewardsDurationIsZero", inputs: [] }, + { + type: "error", + name: "SafeERC20FailedOperation", + inputs: [{ name: "token", type: "address", internalType: "address" }], + }, { type: "error", name: "StakeAmountIsZero", inputs: [] }, + { type: "error", name: "TimestampAlreadyProcessed", inputs: [] }, { type: "error", name: "TokenAlreadyWhitelistedOrLimitReached", inputs: [] }, { type: "error", name: "TokenNotWhitelisted", inputs: [] }, { type: "error", name: "TooManyWeights", inputs: [] }, - { - type: "error", - name: "Unauthorized", - inputs: [{ name: "", type: "address", internalType: "address" }], - }, + { type: "error", name: "TotalSupplyOverflow", inputs: [] }, { type: "error", name: "VaultAlreadyExists", inputs: [] }, { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, { type: "error", name: "ZeroAddress", inputs: [] }, + { type: "error", name: "ZeroOperatorOnFirstDeposit", inputs: [] }, + { type: "error", name: "ZeroPercentageWeight", inputs: [] }, ] as const; diff --git a/packages/berajs/src/actions/bgt/getIncentivesInfo.ts b/packages/berajs/src/actions/bgt/getIncentivesInfo.ts index fd5f81a0c..007dcd02c 100755 --- a/packages/berajs/src/actions/bgt/getIncentivesInfo.ts +++ b/packages/berajs/src/actions/bgt/getIncentivesInfo.ts @@ -22,7 +22,7 @@ export const getIncentivesInfo = async ( abi: BERA_VAULT_REWARDS_ABI, functionName: "incentives", args: [token], - })) as [bigint, bigint, bigint]; + })) as [bigint, bigint, bigint, Address]; // TODO: Check if address is now being used. Was updated in new abi return { minIncentiveRate: result[0], incentiveRate: result[1], diff --git a/packages/berajs/src/hooks/modules/lend/usePollUserBGTRewards.ts b/packages/berajs/src/hooks/modules/lend/usePollUserBGTRewards.ts index f41f05fe7..db7fbe6b6 100755 --- a/packages/berajs/src/hooks/modules/lend/usePollUserBGTRewards.ts +++ b/packages/berajs/src/hooks/modules/lend/usePollUserBGTRewards.ts @@ -25,7 +25,7 @@ export const usePollLendUserBGTRewards = (options?: DefaultHookOptions) => { abi: BERA_VAULT_REWARDS_ABI, functionName: "getReward", account: account, - args: [account], + args: [account, account], // TODO: A second param is needed here for recipient. Added current account twice for now }); return result; } catch (e) { From 8c2108d80220d8094e13bb0f6db1f7b2901b7136 Mon Sep 17 00:00:00 2001 From: brown Date: Fri, 22 Nov 2024 01:07:48 -0500 Subject: [PATCH 04/19] feat(berajs): update bgt abi --- .../validator/undelegate-content.tsx | 5 +- packages/berajs/src/abi/pol/bgt.ts | 409 ++++++++++++++---- packages/shared-ui/src/hooks/useTxn.tsx | 6 +- 3 files changed, 322 insertions(+), 98 deletions(-) diff --git a/apps/hub/src/app/validators/validator/undelegate-content.tsx b/apps/hub/src/app/validators/validator/undelegate-content.tsx index 86774f8cb..8d1d67a73 100755 --- a/apps/hub/src/app/validators/validator/undelegate-content.tsx +++ b/apps/hub/src/app/validators/validator/undelegate-content.tsx @@ -24,7 +24,7 @@ export const UnDelegateContent = ({ userValidator: UserValidator; setIsValidatorDataLoading: (loading: boolean) => void; }) => { - const { isConnected } = useBeraJs(); + const { isConnected, account } = useBeraJs(); const { theme, systemTheme } = useTheme(); const t = theme === "system" ? systemTheme : theme; @@ -98,6 +98,7 @@ export const UnDelegateContent = ({ - - - - - - - ); -} - -const RewardModalContent = ({ - poolAddress, - amount, - setAmount, - write, - bgtRewards, -}: { - poolAddress: Address; - amount: `${number}` | undefined; - setAmount: (amount: `${number}` | undefined) => void; - write: (arg0: any) => void; - bgtRewards: string | undefined; -}) => { - const exceeding = amount !== undefined && Number(amount) > Number(bgtRewards); - - const { data: tokenData } = useTokens(); - return ( -
-
Unclaimed Rewards
-
- setAmount(amount as `${number}`)} - /> -
- - - -
- ); -}; diff --git a/apps/hub/src/app/vaults/create/components/useCreateRewardVault.ts b/apps/hub/src/app/vaults/create/components/useCreateRewardVault.ts index 8762bbbcc..e8819f60c 100644 --- a/apps/hub/src/app/vaults/create/components/useCreateRewardVault.ts +++ b/apps/hub/src/app/vaults/create/components/useCreateRewardVault.ts @@ -29,7 +29,7 @@ export const useCreateRewardVault = ({ ? write({ address: rewardVaultFactoryAddress, abi: rewardVaultFactoryAbi, - functionName: "createRewardsVault", + functionName: "createRewardVault", params: [tokenAddress], }) : undefined, diff --git a/apps/hub/src/hooks/useRedelegate.ts b/apps/hub/src/hooks/useRedelegate.ts deleted file mode 100755 index fc7bec0c1..000000000 --- a/apps/hub/src/hooks/useRedelegate.ts +++ /dev/null @@ -1,72 +0,0 @@ -// @ts-nocheck -// TODO DELETE NOCHECK -import { useState } from "react"; -import { useRouter } from "next/navigation"; -import { - STAKING_PRECOMPILE_ABI, - TransactionActionType, - truncateHash, - usePollAccountDelegations, - usePollActiveValidators, - useTokens, - type Validator, -} from "@bera/berajs"; -import { stakingAddress } from "@bera/config"; -import { useTxn } from "@bera/shared-ui"; -import { getAddress, parseUnits } from "viem"; - -export const useRedelegate = (fromAddress: `0x{string}`) => { - const [redelegateAmount, setRedelegateAmount] = useState(0); - const [dstValidator, setDstValidator] = useState(null); - const { useActiveValidator } = usePollActiveValidators(); - const srcValidator = useActiveValidator(fromAddress); - const { tokenList: tokens } = useTokens(); - const { useSelectedAccountDelegation } = - usePollAccountDelegations(fromAddress); - const accountDelegation = useSelectedAccountDelegation(); - const router = useRouter(); - - const { write, isLoading } = useTxn({ - message: `redelegate ${redelegateAmount} BGT from ${truncateHash( - fromAddress, - )} to ${ - dstValidator && truncateHash(getAddress(dstValidator.operatorAddr)) - }`, - onSuccess: () => { - void router.push("/"); - }, - onError: (e) => console.log(e), - actionType: TransactionActionType.REDELEGATE, - }); - - const redelegate = () => { - if (dstValidator && srcValidator) { - try { - write({ - address: stakingAddress, - abi: STAKING_PRECOMPILE_ABI, - functionName: "beginRedelegate", - params: [ - getAddress(srcValidator.operatorAddr).toLowerCase(), - getAddress(dstValidator.operatorAddr).toLowerCase(), - parseUnits(`${redelegateAmount}`, 18), - ], - }); - } catch (error) { - throw new Error("Redelegate error", error as Error); - } - } - }; - - return { - redelegateAmount, - setRedelegateAmount, - dstValidator, - setDstValidator, - srcValidator, - isLoading, - accountDelegation, - redelegate, - tokens, - }; -}; diff --git a/packages/berajs/src/abi/index.ts b/packages/berajs/src/abi/index.ts index 348516755..253ae9bf2 100755 --- a/packages/berajs/src/abi/index.ts +++ b/packages/berajs/src/abi/index.ts @@ -1,6 +1,4 @@ -export * from "./pol/staking"; export * from "./pol/bgt"; -export * from "./pol/rewards"; export * from "./pol/reward-vault-factory"; export * from "./pol/reward-vault"; export * from "./pol/beraChef"; diff --git a/packages/berajs/src/abi/pol/beraChef.ts b/packages/berajs/src/abi/pol/beraChef.ts index 1e76bf7fa..efd84fae9 100644 --- a/packages/berajs/src/abi/pol/beraChef.ts +++ b/packages/berajs/src/abi/pol/beraChef.ts @@ -1,713 +1,1215 @@ export const BERA_CHEF_ABI = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { - type: "function", - name: "MAX_REWARD_ALLOCATION_BLOCK_DELAY", inputs: [], - outputs: [{ name: "", type: "uint64", internalType: "uint64" }], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "AddressEmptyCode", + type: "error", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AmountLessThanMinIncentiveRate", + type: "error", + }, + { + inputs: [], + name: "CannotRecoverIncentiveToken", + type: "error", + }, + { + inputs: [], + name: "CannotRecoverRewardToken", + type: "error", + }, + { + inputs: [], + name: "CannotRecoverStakingToken", + type: "error", + }, + { + inputs: [], + name: "DepositNotMultipleOfGwei", + type: "error", + }, + { + inputs: [], + name: "DepositValueTooHigh", + type: "error", + }, + { + inputs: [], + name: "DonateAmountLessThanPayoutAmount", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "ERC1967InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "ERC1967NonPayable", + type: "error", + }, + { + inputs: [], + name: "FailedCall", + type: "error", + }, + { + inputs: [], + name: "IncentiveRateTooHigh", + type: "error", + }, + { + inputs: [], + name: "IndexOutOfRange", + type: "error", + }, + { + inputs: [], + name: "InsolventReward", + type: "error", + }, + { + inputs: [], + name: "InsufficientDelegateStake", + type: "error", + }, + { + inputs: [], + name: "InsufficientDeposit", + type: "error", + }, + { + inputs: [], + name: "InsufficientSelfStake", + type: "error", + }, + { + inputs: [], + name: "InsufficientStake", + type: "error", + }, + { + inputs: [], + name: "InvalidActivateBoostDelay", + type: "error", + }, + { + inputs: [], + name: "InvalidBaseRate", + type: "error", + }, + { + inputs: [], + name: "InvalidBoostMultiplier", + type: "error", + }, + { + inputs: [], + name: "InvalidCredentialsLength", + type: "error", + }, + { + inputs: [], + name: "InvalidDropBoostDelay", + type: "error", + }, + { + inputs: [], + name: "InvalidInitialization", + type: "error", + }, + { + inputs: [], + name: "InvalidMaxIncentiveTokensCount", + type: "error", + }, + { + inputs: [], + name: "InvalidMinBoostedRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidProof", + type: "error", + }, + { + inputs: [], + name: "InvalidPubKeyLength", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardAllocationWeights", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardConvexity", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardVaultAddress", + type: "error", + }, + { + inputs: [], + name: "InvalidSignatureLength", + type: "error", + }, + { + inputs: [], + name: "InvalidStartBlock", + type: "error", + }, + { + inputs: [], + name: "InvalidateDefaultRewardAllocation", + type: "error", + }, + { + inputs: [], + name: "InvariantCheckFailed", + type: "error", + }, + { + inputs: [], + name: "MaxNumWeightsPerRewardAllocationIsZero", + type: "error", + }, + { + inputs: [], + name: "MinIncentiveRateIsZero", + type: "error", + }, + { + inputs: [], + name: "NotAContract", + type: "error", + }, + { + inputs: [], + name: "NotApprovedSender", + type: "error", + }, + { + inputs: [], + name: "NotBGT", + type: "error", + }, + { + inputs: [], + name: "NotBlockRewardController", + type: "error", + }, + { + inputs: [], + name: "NotDelegate", + type: "error", + }, + { + inputs: [], + name: "NotDistributor", + type: "error", + }, + { + inputs: [], + name: "NotEnoughBalance", + type: "error", + }, + { + inputs: [], + name: "NotEnoughBoostedBalance", + type: "error", + }, + { + inputs: [], + name: "NotEnoughTime", + type: "error", + }, + { + inputs: [], + name: "NotFactoryVault", + type: "error", + }, + { + inputs: [], + name: "NotFeeCollector", + type: "error", + }, + { + inputs: [], + name: "NotGovernance", + type: "error", + }, + { + inputs: [], + name: "NotIncentiveManager", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "NotNewOperator", + type: "error", + }, + { + inputs: [], + name: "NotOperator", + type: "error", + }, + { + inputs: [], + name: "NotRootFollower", + type: "error", + }, + { + inputs: [], + name: "NotWhitelistedVault", + type: "error", + }, + { + inputs: [], + name: "OperatorAlreadySet", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "OwnableInvalidOwner", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "OwnableUnauthorizedAccount", + type: "error", + }, + { + inputs: [], + name: "PayoutAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "RewardAllocationAlreadyQueued", + type: "error", + }, + { + inputs: [], + name: "RewardAllocationBlockDelayTooLarge", + type: "error", + }, + { + inputs: [], + name: "RewardCycleNotEnded", + type: "error", + }, + { + inputs: [], + name: "RewardsDurationIsZero", + type: "error", + }, + { + inputs: [], + name: "StakeAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "TimestampAlreadyProcessed", + type: "error", + }, + { + inputs: [], + name: "TokenAlreadyWhitelistedOrLimitReached", + type: "error", + }, + { + inputs: [], + name: "TokenNotWhitelisted", + type: "error", + }, + { + inputs: [], + name: "TooManyWeights", + type: "error", + }, + { + inputs: [], + name: "TotalSupplyOverflow", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + inputs: [], + name: "VaultAlreadyExists", + type: "error", + }, + { + inputs: [], + name: "WithdrawAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + inputs: [], + name: "ZeroOperatorOnFirstDeposit", + type: "error", + }, + { + inputs: [], + name: "ZeroPercentageWeight", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes", + name: "valPubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + indexed: false, + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + }, + ], + name: "ActivateRewardAllocation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "maxNumWeightsPerRewardAllocation", + type: "uint8", + }, + ], + name: "MaxNumWeightsPerRewardAllocationSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes", + name: "valPubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + indexed: false, + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + }, + ], + name: "QueueRewardAllocation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "rewardAllocationBlockDelay", + type: "uint64", + }, + ], + name: "RewardAllocationBlockDelaySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { + components: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", + name: "percentageNumerator", + type: "uint96", + }, + ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", + }, + ], + indexed: false, + internalType: "struct IBeraChef.RewardAllocation", + name: "rewardAllocation", + type: "tuple", + }, + ], + name: "SetDefaultRewardAllocation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: true, + internalType: "bool", + name: "isWhitelisted", + type: "bool", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "VaultWhitelistedStatusUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "metadata", + type: "string", + }, + ], + name: "WhitelistedVaultMetadataUpdated", + type: "event", + }, + { + inputs: [], + name: "MAX_REWARD_ALLOCATION_BLOCK_DELAY", + outputs: [ + { + internalType: "uint64", + name: "", + type: "uint64", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", + inputs: [ + { + internalType: "bytes", + name: "valPubkey", + type: "bytes", + }, + ], name: "activateReadyQueuedRewardAllocation", - inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "beaconDepositContract", inputs: [], + name: "beaconDepositContract", outputs: [ { + internalType: "contract IBeaconDeposit", name: "", type: "address", - internalType: "contract IBeaconDeposit", }, ], stateMutability: "view", - }, - { type: "function", - name: "distributor", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", }, { - type: "function", - name: "factory", inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], + name: "distributor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "getActiveRewardAllocation", - inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + inputs: [], + name: "factory", outputs: [ { + internalType: "address", name: "", - type: "tuple", - internalType: "struct IBeraChef.RewardAllocation", - components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, - { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", - components: [ - { - name: "receiver", - type: "address", - internalType: "address", - }, - { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", - }, - ], - }, - ], + type: "address", }, ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "getDefaultRewardAllocation", - inputs: [], + inputs: [ + { + internalType: "bytes", + name: "valPubkey", + type: "bytes", + }, + ], + name: "getActiveRewardAllocation", outputs: [ { - name: "", - type: "tuple", - internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { components: [ { + internalType: "address", name: "receiver", type: "address", - internalType: "address", }, { + internalType: "uint96", name: "percentageNumerator", type: "uint96", - internalType: "uint96", }, ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", }, ], + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", }, ], stateMutability: "view", - }, - { type: "function", - name: "getQueuedRewardAllocation", - inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + }, + { + inputs: [], + name: "getDefaultRewardAllocation", outputs: [ { - name: "", - type: "tuple", - internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { components: [ { + internalType: "address", name: "receiver", type: "address", - internalType: "address", }, { + internalType: "uint96", name: "percentageNumerator", type: "uint96", - internalType: "uint96", }, ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", }, ], + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", }, ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "getSetActiveRewardAllocation", - inputs: [{ name: "valPubkey", type: "bytes", internalType: "bytes" }], + inputs: [ + { + internalType: "bytes", + name: "valPubkey", + type: "bytes", + }, + ], + name: "getQueuedRewardAllocation", outputs: [ { - name: "", - type: "tuple", - internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { components: [ { + internalType: "address", name: "receiver", type: "address", - internalType: "address", }, { + internalType: "uint96", name: "percentageNumerator", type: "uint96", - internalType: "uint96", }, ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", }, ], + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", }, ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "initialize", inputs: [ - { name: "_distributor", type: "address", internalType: "address" }, - { name: "_factory", type: "address", internalType: "address" }, - { name: "_governance", type: "address", internalType: "address" }, - { - name: "_beaconDepositContract", - type: "address", - internalType: "address", - }, { - name: "_maxNumWeightsPerRewardAllocation", - type: "uint8", - internalType: "uint8", + internalType: "bytes", + name: "valPubkey", + type: "bytes", }, ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "isQueuedRewardAllocationReady", - inputs: [ - { name: "valPubkey", type: "bytes", internalType: "bytes" }, - { name: "blockNumber", type: "uint256", internalType: "uint256" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isReady", - inputs: [], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "isWhitelistedVault", - inputs: [{ name: "receiver", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", - }, - { - type: "function", - name: "maxNumWeightsPerRewardAllocation", - inputs: [], - outputs: [{ name: "", type: "uint8", internalType: "uint8" }], - stateMutability: "view", - }, - { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", - }, - { - type: "function", - name: "proxiableUUID", - inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], - stateMutability: "view", - }, - { - type: "function", - name: "queueNewRewardAllocation", - inputs: [ - { name: "valPubkey", type: "bytes", internalType: "bytes" }, - { name: "startBlock", type: "uint64", internalType: "uint64" }, + name: "getSetActiveRewardAllocation", + outputs: [ { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", components: [ - { name: "receiver", type: "address", internalType: "address" }, { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", + internalType: "uint64", + name: "startBlock", + type: "uint64", }, - ], - }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "rewardAllocationBlockDelay", - inputs: [], - outputs: [{ name: "", type: "uint64", internalType: "uint64" }], - stateMutability: "view", - }, - { - type: "function", - name: "setDefaultRewardAllocation", - inputs: [ - { - name: "ra", - type: "tuple", - internalType: "struct IBeraChef.RewardAllocation", - components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", components: [ { + internalType: "address", name: "receiver", type: "address", - internalType: "address", }, { + internalType: "uint96", name: "percentageNumerator", type: "uint96", - internalType: "uint96", }, ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", }, ], + internalType: "struct IBeraChef.RewardAllocation", + name: "", + type: "tuple", }, ], - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", + type: "function", }, { - type: "function", - name: "setMaxNumWeightsPerRewardAllocation", inputs: [ { - name: "_maxNumWeightsPerRewardAllocation", - type: "uint8", - internalType: "uint8", + internalType: "address", + name: "_distributor", + type: "address", }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setRewardAllocationBlockDelay", - inputs: [ { - name: "_rewardAllocationBlockDelay", - type: "uint64", - internalType: "uint64", + internalType: "address", + name: "_factory", + type: "address", }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setVaultWhitelistedStatus", - inputs: [ - { name: "receiver", type: "address", internalType: "address" }, - { name: "isWhitelisted", type: "bool", internalType: "bool" }, - { name: "metadata", type: "string", internalType: "string" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "updateWhitelistedVaultMetadata", - inputs: [ - { name: "vault", type: "address", internalType: "address" }, - { name: "metadata", type: "string", internalType: "string" }, - ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "upgradeToAndCall", - inputs: [ { - name: "newImplementation", + internalType: "address", + name: "_governance", type: "address", + }, + { internalType: "address", + name: "_beaconDepositContract", + type: "address", + }, + { + internalType: "uint8", + name: "_maxNumWeightsPerRewardAllocation", + type: "uint8", }, - { name: "data", type: "bytes", internalType: "bytes" }, ], + name: "initialize", outputs: [], - stateMutability: "payable", + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "ActivateRewardAllocation", inputs: [ { + internalType: "bytes", name: "valPubkey", type: "bytes", - indexed: true, - internalType: "bytes", }, { - name: "startBlock", - type: "uint64", - indexed: false, - internalType: "uint64", + internalType: "uint256", + name: "blockNumber", + type: "uint256", }, + ], + name: "isQueuedRewardAllocationReady", + outputs: [ { - name: "weights", - type: "tuple[]", - indexed: false, - internalType: "struct IBeraChef.Weight[]", - components: [ - { name: "receiver", type: "address", internalType: "address" }, - { - name: "percentageNumerator", - type: "uint96", - internalType: "uint96", - }, - ], + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isReady", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "Initialized", inputs: [ { - name: "version", - type: "uint64", - indexed: false, - internalType: "uint64", + internalType: "address", + name: "receiver", + type: "address", }, ], - anonymous: false, + name: "isWhitelistedVault", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", }, { - type: "event", - name: "MaxNumWeightsPerRewardAllocationSet", - inputs: [ + inputs: [], + name: "maxNumWeightsPerRewardAllocation", + outputs: [ { - name: "maxNumWeightsPerRewardAllocation", - type: "uint8", - indexed: false, internalType: "uint8", + name: "", + type: "uint8", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "OwnershipTransferred", - inputs: [ + inputs: [], + name: "owner", + outputs: [ { - name: "previousOwner", - type: "address", - indexed: true, internalType: "address", + name: "", + type: "address", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proxiableUUID", + outputs: [ { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", + internalType: "bytes32", + name: "", + type: "bytes32", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "QueueRewardAllocation", inputs: [ { + internalType: "bytes", name: "valPubkey", type: "bytes", - indexed: true, - internalType: "bytes", }, { + internalType: "uint64", name: "startBlock", type: "uint64", - indexed: false, - internalType: "uint64", }, { - name: "weights", - type: "tuple[]", - indexed: false, - internalType: "struct IBeraChef.Weight[]", components: [ - { name: "receiver", type: "address", internalType: "address" }, { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint96", name: "percentageNumerator", type: "uint96", - internalType: "uint96", }, ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", }, ], - anonymous: false, + name: "queueNewRewardAllocation", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "RewardAllocationBlockDelaySet", - inputs: [ + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "rewardAllocationBlockDelay", + outputs: [ { - name: "rewardAllocationBlockDelay", - type: "uint64", - indexed: false, internalType: "uint64", + name: "", + type: "uint64", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "SetDefaultRewardAllocation", inputs: [ { - name: "rewardAllocation", - type: "tuple", - indexed: false, - internalType: "struct IBeraChef.RewardAllocation", components: [ - { name: "startBlock", type: "uint64", internalType: "uint64" }, { - name: "weights", - type: "tuple[]", - internalType: "struct IBeraChef.Weight[]", + internalType: "uint64", + name: "startBlock", + type: "uint64", + }, + { components: [ { + internalType: "address", name: "receiver", type: "address", - internalType: "address", }, { + internalType: "uint96", name: "percentageNumerator", type: "uint96", - internalType: "uint96", }, ], + internalType: "struct IBeraChef.Weight[]", + name: "weights", + type: "tuple[]", }, ], + internalType: "struct IBeraChef.RewardAllocation", + name: "ra", + type: "tuple", }, ], - anonymous: false, + name: "setDefaultRewardAllocation", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "Upgraded", inputs: [ { - name: "implementation", - type: "address", - indexed: true, - internalType: "address", + internalType: "uint8", + name: "_maxNumWeightsPerRewardAllocation", + type: "uint8", }, ], - anonymous: false, + name: "setMaxNumWeightsPerRewardAllocation", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint64", + name: "_rewardAllocationBlockDelay", + type: "uint64", + }, + ], + name: "setRewardAllocationBlockDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "VaultWhitelistedStatusUpdated", inputs: [ { + internalType: "address", name: "receiver", type: "address", - indexed: true, - internalType: "address", }, { + internalType: "bool", name: "isWhitelisted", type: "bool", - indexed: true, - internalType: "bool", }, { + internalType: "string", name: "metadata", type: "string", - indexed: false, - internalType: "string", }, ], - anonymous: false, + name: "setVaultWhitelistedStatus", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "WhitelistedVaultMetadataUpdated", inputs: [ { - name: "receiver", + internalType: "address", + name: "newOwner", type: "address", - indexed: true, + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { internalType: "address", + name: "vault", + type: "address", }, { + internalType: "string", name: "metadata", type: "string", - indexed: false, - internalType: "string", }, ], - anonymous: false, - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [{ name: "target", type: "address", internalType: "address" }], + name: "updateWhitelistedVaultMetadata", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, - { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, - { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, - { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, - { type: "error", name: "CommissionNotQueued", inputs: [] }, - { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, - { type: "error", name: "DepositValueTooHigh", inputs: [] }, - { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, { - type: "error", - name: "ERC1967InvalidImplementation", inputs: [ - { name: "implementation", type: "address", internalType: "address" }, + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", }, - { type: "error", name: "ERC1967NonPayable", inputs: [] }, - { type: "error", name: "FailedCall", inputs: [] }, - { type: "error", name: "IncentiveRateTooHigh", inputs: [] }, - { type: "error", name: "IndexOutOfRange", inputs: [] }, - { type: "error", name: "InsolventReward", inputs: [] }, - { type: "error", name: "InsufficientDelegateStake", inputs: [] }, - { type: "error", name: "InsufficientDeposit", inputs: [] }, - { type: "error", name: "InsufficientSelfStake", inputs: [] }, - { type: "error", name: "InsufficientStake", inputs: [] }, - { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, - { - type: "error", - name: "InvalidActivateCommissionChangeDelay", - inputs: [], - }, - { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, - { type: "error", name: "InvalidCommission", inputs: [] }, - { type: "error", name: "InvalidCredentialsLength", inputs: [] }, - { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, - { type: "error", name: "InvalidInitialization", inputs: [] }, - { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, - { type: "error", name: "InvalidProof", inputs: [] }, - { type: "error", name: "InvalidPubKeyLength", inputs: [] }, - { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, - { type: "error", name: "InvalidRewardConvexity", inputs: [] }, - { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, - { type: "error", name: "InvalidSignatureLength", inputs: [] }, - { type: "error", name: "InvalidStartBlock", inputs: [] }, - { type: "error", name: "InvalidateDefaultRewardAllocation", inputs: [] }, - { type: "error", name: "InvariantCheckFailed", inputs: [] }, - { - type: "error", - name: "MaxNumWeightsPerRewardAllocationIsZero", - inputs: [], - }, - { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, - { type: "error", name: "NotAContract", inputs: [] }, - { type: "error", name: "NotApprovedSender", inputs: [] }, - { type: "error", name: "NotBGT", inputs: [] }, - { type: "error", name: "NotBlockRewardController", inputs: [] }, - { type: "error", name: "NotDelegate", inputs: [] }, - { type: "error", name: "NotDistributor", inputs: [] }, - { type: "error", name: "NotEnoughBalance", inputs: [] }, - { type: "error", name: "NotEnoughBoostedBalance", inputs: [] }, - { type: "error", name: "NotEnoughTime", inputs: [] }, - { type: "error", name: "NotFactoryVault", inputs: [] }, - { type: "error", name: "NotFeeCollector", inputs: [] }, - { type: "error", name: "NotGovernance", inputs: [] }, - { type: "error", name: "NotIncentiveManager", inputs: [] }, - { type: "error", name: "NotInitializing", inputs: [] }, - { type: "error", name: "NotNewOperator", inputs: [] }, - { type: "error", name: "NotOperator", inputs: [] }, - { type: "error", name: "NotRootFollower", inputs: [] }, - { type: "error", name: "NotWhitelistedVault", inputs: [] }, - { type: "error", name: "OperatorAlreadySet", inputs: [] }, - { - 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: "PayoutAmountIsZero", inputs: [] }, - { type: "error", name: "RewardAllocationAlreadyQueued", inputs: [] }, - { type: "error", name: "RewardAllocationBlockDelayTooLarge", inputs: [] }, - { type: "error", name: "RewardCycleNotEnded", inputs: [] }, - { type: "error", name: "RewardsDurationIsZero", inputs: [] }, - { type: "error", name: "StakeAmountIsZero", inputs: [] }, - { type: "error", name: "TimestampAlreadyProcessed", inputs: [] }, - { - type: "error", - name: "TokenAlreadyWhitelistedOrLimitReached", - inputs: [], - }, - { type: "error", name: "TokenNotWhitelisted", inputs: [] }, - { type: "error", name: "TooManyWeights", inputs: [] }, - { type: "error", name: "TotalSupplyOverflow", inputs: [] }, - { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }], - }, - { type: "error", name: "VaultAlreadyExists", inputs: [] }, - { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, - { type: "error", name: "ZeroAddress", inputs: [] }, - { type: "error", name: "ZeroOperatorOnFirstDeposit", inputs: [] }, - { type: "error", name: "ZeroPercentageWeight", inputs: [] }, ] as const; diff --git a/packages/berajs/src/abi/pol/bgt.ts b/packages/berajs/src/abi/pol/bgt.ts index d37277321..e1b7b97e0 100755 --- a/packages/berajs/src/abi/pol/bgt.ts +++ b/packages/berajs/src/abi/pol/bgt.ts @@ -1,1132 +1,2018 @@ export const BGT_ABI = [ { - type: "function", - name: "CLOCK_MODE", inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view", + name: "AlreadyInitialized", + type: "error", }, { - type: "function", - name: "activateBoost", - inputs: [ - { name: "user", type: "address", internalType: "address" }, - { name: "pubkey", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "nonpayable", + inputs: [], + name: "AmountLessThanMinIncentiveRate", + type: "error", }, { - type: "function", - name: "activateBoostDelay", inputs: [], - outputs: [{ name: "", type: "uint32", internalType: "uint32" }], - stateMutability: "view", + name: "CannotRecoverIncentiveToken", + type: "error", }, { - type: "function", - name: "activateCommissionChange", - inputs: [{ name: "pubkey", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "CannotRecoverRewardToken", + type: "error", }, { - type: "function", - name: "activateCommissionChangeDelay", inputs: [], - outputs: [{ name: "", type: "uint32", internalType: "uint32" }], - stateMutability: "view", + name: "CannotRecoverStakingToken", + type: "error", }, { - type: "function", - name: "allowance", - inputs: [ - { name: "owner", type: "address", internalType: "address" }, - { name: "spender", type: "address", internalType: "address" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + inputs: [], + name: "CheckpointUnorderedInsertion", + type: "error", }, { - type: "function", - name: "approve", - inputs: [ - { name: "spender", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "nonpayable", + inputs: [], + name: "DepositNotMultipleOfGwei", + type: "error", }, { - type: "function", - name: "balanceOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + inputs: [], + name: "DepositValueTooHigh", + type: "error", }, { - type: "function", - name: "beaconDepositContract", inputs: [], - outputs: [ - { name: "", type: "address", internalType: "contract IBeaconDeposit" }, - ], - stateMutability: "view", + name: "DonateAmountLessThanPayoutAmount", + type: "error", + }, + { + inputs: [], + name: "ECDSAInvalidSignature", + type: "error", }, { - type: "function", - name: "boosted", inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "pubkey", type: "bytes", internalType: "bytes" }, + { + internalType: "uint256", + name: "length", + type: "uint256", + }, ], - outputs: [{ name: "", type: "uint128", internalType: "uint128" }], - stateMutability: "view", + name: "ECDSAInvalidSignatureLength", + type: "error", }, { - type: "function", - name: "boostedQueue", inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "pubkey", type: "bytes", internalType: "bytes" }, - ], - outputs: [ - { name: "blockNumberLast", type: "uint32", internalType: "uint32" }, - { name: "balance", type: "uint128", internalType: "uint128" }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, ], - stateMutability: "view", + name: "ECDSAInvalidSignatureS", + type: "error", }, { - type: "function", - name: "boostees", - inputs: [{ name: "pubkey", type: "bytes", internalType: "bytes" }], - outputs: [{ name: "", type: "uint128", internalType: "uint128" }], - stateMutability: "view", + inputs: [ + { + internalType: "uint256", + name: "increasedSupply", + type: "uint256", + }, + { + internalType: "uint256", + name: "cap", + type: "uint256", + }, + ], + name: "ERC20ExceededSafeSupply", + type: "error", }, { - type: "function", - name: "boosts", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint128", internalType: "uint128" }], - stateMutability: "view", + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "allowance", + type: "uint256", + }, + { + internalType: "uint256", + name: "needed", + type: "uint256", + }, + ], + name: "ERC20InsufficientAllowance", + type: "error", }, { - type: "function", - name: "cancelBoost", inputs: [ - { name: "pubkey", type: "bytes", internalType: "bytes" }, - { name: "amount", type: "uint128", internalType: "uint128" }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + { + internalType: "uint256", + name: "needed", + type: "uint256", + }, ], - outputs: [], - stateMutability: "nonpayable", + name: "ERC20InsufficientBalance", + type: "error", }, { - type: "function", - name: "cancelCommissionChange", - inputs: [{ name: "pubkey", type: "bytes", internalType: "bytes" }], - outputs: [], - stateMutability: "nonpayable", + inputs: [ + { + internalType: "address", + name: "approver", + type: "address", + }, + ], + name: "ERC20InvalidApprover", + type: "error", }, { - type: "function", - name: "cancelDropBoost", inputs: [ - { name: "pubkey", type: "bytes", internalType: "bytes" }, - { name: "amount", type: "uint128", internalType: "uint128" }, + { + internalType: "address", + name: "receiver", + type: "address", + }, ], - outputs: [], - stateMutability: "nonpayable", + name: "ERC20InvalidReceiver", + type: "error", }, { - type: "function", - name: "checkpoints", inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "pos", type: "uint32", internalType: "uint32" }, - ], - outputs: [ { - name: "", - type: "tuple", - internalType: "struct Checkpoints.Checkpoint208", - components: [ - { name: "_key", type: "uint48", internalType: "uint48" }, - { name: "_value", type: "uint208", internalType: "uint208" }, - ], + internalType: "address", + name: "sender", + type: "address", }, ], - stateMutability: "view", + name: "ERC20InvalidSender", + type: "error", }, { - type: "function", - name: "clock", - inputs: [], - outputs: [{ name: "", type: "uint48", internalType: "uint48" }], - stateMutability: "view", + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "ERC20InvalidSpender", + type: "error", }, { - type: "function", - name: "commissionRewardRate", inputs: [ - { name: "pubkey", type: "bytes", internalType: "bytes" }, - { name: "rewardRate", type: "uint256", internalType: "uint256" }, + { + internalType: "uint256", + name: "timepoint", + type: "uint256", + }, + { + internalType: "uint48", + name: "clock", + type: "uint48", + }, ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + name: "ERC5805FutureLookup", + type: "error", }, { - type: "function", - name: "commissions", - inputs: [{ name: "pubkey", type: "bytes", internalType: "bytes" }], - outputs: [{ name: "rate", type: "uint224", internalType: "uint224" }], - stateMutability: "view", + inputs: [], + name: "ERC6372InconsistentClock", + type: "error", }, { - type: "function", - name: "decimals", inputs: [], - outputs: [{ name: "", type: "uint8", internalType: "uint8" }], - stateMutability: "view", + name: "IncentiveRateTooHigh", + type: "error", }, { - type: "function", - name: "delegate", - inputs: [{ name: "delegatee", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "IndexOutOfRange", + type: "error", }, { - type: "function", - name: "delegateBySig", - inputs: [ - { name: "delegatee", type: "address", internalType: "address" }, - { name: "nonce", type: "uint256", internalType: "uint256" }, - { name: "expiry", type: "uint256", internalType: "uint256" }, - { name: "v", type: "uint8", internalType: "uint8" }, - { name: "r", type: "bytes32", internalType: "bytes32" }, - { name: "s", type: "bytes32", internalType: "bytes32" }, - ], - outputs: [], - stateMutability: "nonpayable", + inputs: [], + name: "InsolventReward", + type: "error", }, { - type: "function", - name: "delegates", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", + inputs: [], + name: "InsufficientDelegateStake", + type: "error", }, { - type: "function", - name: "dropBoost", - inputs: [ - { name: "user", type: "address", internalType: "address" }, - { name: "pubkey", type: "bytes", internalType: "bytes" }, - ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "nonpayable", + inputs: [], + name: "InsufficientDeposit", + type: "error", }, { - type: "function", - name: "dropBoostDelay", inputs: [], - outputs: [{ name: "", type: "uint32", internalType: "uint32" }], - stateMutability: "view", + name: "InsufficientSelfStake", + type: "error", + }, + { + inputs: [], + name: "InsufficientStake", + type: "error", }, { - type: "function", - name: "dropBoostQueue", inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "pubkey", type: "bytes", internalType: "bytes" }, - ], - outputs: [ - { name: "blockNumberLast", type: "uint32", internalType: "uint32" }, - { name: "balance", type: "uint128", internalType: "uint128" }, + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "currentNonce", + type: "uint256", + }, ], - stateMutability: "view", + name: "InvalidAccountNonce", + type: "error", }, { - type: "function", - name: "eip712Domain", inputs: [], - outputs: [ - { name: "fields", type: "bytes1", internalType: "bytes1" }, - { name: "name", type: "string", internalType: "string" }, - { name: "version", type: "string", internalType: "string" }, - { name: "chainId", type: "uint256", internalType: "uint256" }, - { name: "verifyingContract", type: "address", internalType: "address" }, - { name: "salt", type: "bytes32", internalType: "bytes32" }, - { name: "extensions", type: "uint256[]", internalType: "uint256[]" }, - ], - stateMutability: "view", + name: "InvalidActivateBoostDelay", + type: "error", }, { - type: "function", - name: "getPastTotalSupply", - inputs: [{ name: "timepoint", type: "uint256", internalType: "uint256" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + inputs: [], + name: "InvalidBaseRate", + type: "error", }, { - type: "function", - name: "getPastVotes", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "timepoint", type: "uint256", internalType: "uint256" }, - ], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + inputs: [], + name: "InvalidBoostMultiplier", + type: "error", + }, + { + inputs: [], + name: "InvalidCredentialsLength", + type: "error", + }, + { + inputs: [], + name: "InvalidDropBoostDelay", + type: "error", + }, + { + inputs: [], + name: "InvalidInitialization", + type: "error", + }, + { + inputs: [], + name: "InvalidMaxIncentiveTokensCount", + type: "error", + }, + { + inputs: [], + name: "InvalidMinBoostedRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidProof", + type: "error", + }, + { + inputs: [], + name: "InvalidPubKeyLength", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardAllocationWeights", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardConvexity", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardVaultAddress", + type: "error", + }, + { + inputs: [], + name: "InvalidSignatureLength", + type: "error", + }, + { + inputs: [], + name: "InvalidStartBlock", + type: "error", + }, + { + inputs: [], + name: "InvalidateDefaultRewardAllocation", + type: "error", + }, + { + inputs: [], + name: "InvariantCheckFailed", + type: "error", + }, + { + inputs: [], + name: "MaxNumWeightsPerRewardAllocationIsZero", + type: "error", + }, + { + inputs: [], + name: "MinIncentiveRateIsZero", + type: "error", + }, + { + inputs: [], + name: "NotAContract", + type: "error", + }, + { + inputs: [], + name: "NotApprovedSender", + type: "error", + }, + { + inputs: [], + name: "NotBGT", + type: "error", + }, + { + inputs: [], + name: "NotBlockRewardController", + type: "error", + }, + { + inputs: [], + name: "NotDelegate", + type: "error", + }, + { + inputs: [], + name: "NotDistributor", + type: "error", + }, + { + inputs: [], + name: "NotEnoughBalance", + type: "error", + }, + { + inputs: [], + name: "NotEnoughBoostedBalance", + type: "error", + }, + { + inputs: [], + name: "NotEnoughTime", + type: "error", + }, + { + inputs: [], + name: "NotFactoryVault", + type: "error", + }, + { + inputs: [], + name: "NotFeeCollector", + type: "error", + }, + { + inputs: [], + name: "NotGovernance", + type: "error", + }, + { + inputs: [], + name: "NotIncentiveManager", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "NotNewOperator", + type: "error", + }, + { + inputs: [], + name: "NotOperator", + type: "error", + }, + { + inputs: [], + name: "NotRootFollower", + type: "error", + }, + { + inputs: [], + name: "NotWhitelistedVault", + type: "error", + }, + { + inputs: [], + name: "OperatorAlreadySet", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "OwnableInvalidOwner", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "OwnableUnauthorizedAccount", + type: "error", + }, + { + inputs: [], + name: "PayoutAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "RewardAllocationAlreadyQueued", + type: "error", + }, + { + inputs: [], + name: "RewardAllocationBlockDelayTooLarge", + type: "error", + }, + { + inputs: [], + name: "RewardCycleNotEnded", + type: "error", + }, + { + inputs: [], + name: "RewardsDurationIsZero", + type: "error", + }, + { + inputs: [ + { + internalType: "uint8", + name: "bits", + type: "uint8", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "SafeCastOverflowedUintDowncast", + type: "error", + }, + { + inputs: [], + name: "StakeAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "TimestampAlreadyProcessed", + type: "error", + }, + { + inputs: [], + name: "TokenAlreadyWhitelistedOrLimitReached", + type: "error", + }, + { + inputs: [], + name: "TokenNotWhitelisted", + type: "error", + }, + { + inputs: [], + name: "TooManyWeights", + type: "error", + }, + { + inputs: [], + name: "TotalSupplyOverflow", + type: "error", + }, + { + inputs: [], + name: "VaultAlreadyExists", + type: "error", + }, + { + inputs: [ + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + ], + name: "VotesExpiredSignature", + type: "error", + }, + { + inputs: [], + name: "WithdrawAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + inputs: [], + name: "ZeroOperatorOnFirstDeposit", + type: "error", + }, + { + inputs: [], + name: "ZeroPercentageWeight", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "ActivateBoost", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "newDelay", + type: "uint32", + }, + ], + name: "ActivateBoostDelayChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previous", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "current", + type: "address", + }, + ], + name: "BeaconDepositContractChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "CancelBoost", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "CancelDropBoost", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousVotes", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotes", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "DropBoost", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint32", + name: "newDelay", + type: "uint32", + }, + ], + name: "DropBoostDelayChanged", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "EIP712DomainChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previous", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "current", + type: "address", + }, + ], + name: "MinterChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "QueueBoost", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: true, + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + indexed: false, + internalType: "uint128", + name: "amount", + type: "uint128", + }, + ], + name: "QueueDropBoost", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Redeem", + type: "event", }, { - type: "function", - name: "getVotes", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "SenderWhitelisted", + type: "event", }, { - type: "function", - name: "initialize", - inputs: [{ name: "_owner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previous", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "current", + type: "address", + }, + ], + name: "StakerChanged", + type: "event", }, { - type: "function", - name: "isWhitelistedSender", - inputs: [{ name: "sender", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "view", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", }, { + inputs: [], + name: "CLOCK_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", type: "function", - name: "mint", + }, + { inputs: [ - { name: "distributor", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "activateBoost", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, ], - outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "minter", inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], + name: "activateBoostDelay", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], stateMutability: "view", + type: "function", }, { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", type: "function", - name: "multicall", - inputs: [{ name: "data", type: "bytes[]", internalType: "bytes[]" }], - outputs: [{ name: "", type: "bytes[]", internalType: "bytes[]" }], - stateMutability: "nonpayable", }, { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", type: "function", - name: "name", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "pure", }, { - type: "function", - name: "nonces", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "normalizedBoost", - inputs: [{ name: "pubkey", type: "bytes", internalType: "bytes" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + inputs: [], + name: "beaconDepositContract", + outputs: [ + { + internalType: "contract IBeaconDeposit", + name: "", + type: "address", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "numCheckpoints", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint32", internalType: "uint32" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "boosted", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "boostedQueue", + outputs: [ + { + internalType: "uint32", + name: "blockNumberLast", + type: "uint32", + }, + { + internalType: "uint128", + name: "balance", + type: "uint128", + }, + ], stateMutability: "view", + type: "function", }, { + inputs: [ + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "boostees", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", type: "function", - name: "queueBoost", + }, + { inputs: [ - { name: "pubkey", type: "bytes", internalType: "bytes" }, - { name: "amount", type: "uint128", internalType: "uint128" }, + { + internalType: "address", + name: "account", + type: "address", + }, ], - outputs: [], - stateMutability: "nonpayable", + name: "boosts", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "queueCommissionChange", inputs: [ - { name: "pubkey", type: "bytes", internalType: "bytes" }, - { name: "rate", type: "uint256", internalType: "uint256" }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + internalType: "uint128", + name: "amount", + type: "uint128", + }, ], + name: "cancelBoost", outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "queueDropBoost", inputs: [ - { name: "pubkey", type: "bytes", internalType: "bytes" }, - { name: "amount", type: "uint128", internalType: "uint128" }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + internalType: "uint128", + name: "amount", + type: "uint128", + }, ], + name: "cancelDropBoost", outputs: [], stateMutability: "nonpayable", - }, - { type: "function", - name: "queuedBoost", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint128", internalType: "uint128" }], - stateMutability: "view", }, { - type: "function", - name: "queuedCommissions", - inputs: [{ name: "pubkey", type: "bytes", internalType: "bytes" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint32", + name: "pos", + type: "uint32", + }, + ], + name: "checkpoints", outputs: [ - { name: "blockNumberLast", type: "uint32", internalType: "uint32" }, - { name: "rate", type: "uint224", internalType: "uint224" }, + { + components: [ + { + internalType: "uint48", + name: "_key", + type: "uint48", + }, + { + internalType: "uint208", + name: "_value", + type: "uint208", + }, + ], + internalType: "struct Checkpoints.Checkpoint208", + name: "", + type: "tuple", + }, ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "redeem", - inputs: [ - { name: "receiver", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, + inputs: [], + name: "clock", + outputs: [ + { + internalType: "uint48", + name: "", + type: "uint48", + }, ], - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", + type: "function", }, { - type: "function", - name: "renounceOwnership", inputs: [], - outputs: [], - stateMutability: "nonpayable", + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "setActivateBoostDelay", inputs: [ - { name: "_activateBoostDelay", type: "uint32", internalType: "uint32" }, + { + internalType: "address", + name: "delegatee", + type: "address", + }, ], + name: "delegate", outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setActivateCommissionChangeDelay", inputs: [ { - name: "_activateCommissionChangeDelay", - type: "uint32", - internalType: "uint32", + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", }, ], + name: "delegateBySig", outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "setBeaconDepositContract", inputs: [ { - name: "_beaconDepositContract", + internalType: "address", + name: "account", type: "address", + }, + ], + name: "delegates", + outputs: [ + { internalType: "address", + name: "", + type: "address", }, ], - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", + type: "function", }, { - type: "function", - name: "setDropBoostDelay", inputs: [ - { name: "_dropBoostDelay", type: "uint32", internalType: "uint32" }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "dropBoost", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, ], - outputs: [], - stateMutability: "nonpayable", - }, - { - type: "function", - name: "setMinter", - inputs: [{ name: "_minter", type: "address", internalType: "address" }], - outputs: [], stateMutability: "nonpayable", - }, - { type: "function", - name: "setStaker", - inputs: [{ name: "_staker", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", }, { - type: "function", - name: "staker", inputs: [], + name: "dropBoostDelay", outputs: [ - { name: "", type: "address", internalType: "contract BGTStaker" }, + { + internalType: "uint32", + name: "", + type: "uint32", + }, ], stateMutability: "view", - }, - { type: "function", - name: "symbol", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "pure", }, { - type: "function", - name: "totalBoosts", - inputs: [], - outputs: [{ name: "", type: "uint128", internalType: "uint128" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "dropBoostQueue", + outputs: [ + { + internalType: "uint32", + name: "blockNumberLast", + type: "uint32", + }, + { + internalType: "uint128", + name: "balance", + type: "uint128", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "totalSupply", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "eip712Domain", + outputs: [ + { + internalType: "bytes1", + name: "fields", + type: "bytes1", + }, + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "version", + type: "string", + }, + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "address", + name: "verifyingContract", + type: "address", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "uint256[]", + name: "extensions", + type: "uint256[]", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "transfer", inputs: [ - { name: "to", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, + { + internalType: "uint256", + name: "timepoint", + type: "uint256", + }, ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "nonpayable", + name: "getPastTotalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - type: "function", - name: "transferFrom", inputs: [ - { name: "from", type: "address", internalType: "address" }, - { name: "to", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "timepoint", + type: "uint256", + }, ], - outputs: [{ name: "", type: "bool", internalType: "bool" }], - stateMutability: "nonpayable", - }, - { + name: "getPastVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", type: "function", - name: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", }, { - type: "function", - name: "unboostedBalanceOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "whitelistSender", inputs: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "approved", type: "bool", internalType: "bool" }, + { + internalType: "address", + name: "_owner", + type: "address", + }, ], + name: "initialize", outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "ActivateBoost", inputs: [ { + internalType: "address", name: "sender", type: "address", - indexed: true, + }, + ], + name: "isWhitelistedSender", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { internalType: "address", + name: "distributor", + type: "address", }, - { name: "user", type: "address", indexed: true, internalType: "address" }, - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { + internalType: "uint256", name: "amount", - type: "uint128", - indexed: false, - internalType: "uint128", + type: "uint256", }, ], - anonymous: false, + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "ActivateBoostDelayChanged", - inputs: [ + inputs: [], + name: "minter", + outputs: [ { - name: "newDelay", - type: "uint32", - indexed: false, - internalType: "uint32", + internalType: "address", + name: "", + type: "address", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "ActivateCommissionChange", inputs: [ - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { - name: "rate", - type: "uint256", - indexed: false, - internalType: "uint256", + internalType: "bytes[]", + name: "data", + type: "bytes[]", }, ], - anonymous: false, + name: "multicall", + outputs: [ + { + internalType: "bytes[]", + name: "", + type: "bytes[]", + }, + ], + stateMutability: "payable", + type: "function", }, { - type: "event", - name: "ActivateCommissionChangeDelayChanged", - inputs: [ + inputs: [], + name: "name", + outputs: [ { - name: "newDelay", - type: "uint32", - indexed: false, - internalType: "uint32", + internalType: "string", + name: "", + type: "string", }, ], - anonymous: false, + stateMutability: "pure", + type: "function", }, { - type: "event", - name: "Approval", inputs: [ { + internalType: "address", name: "owner", type: "address", - indexed: true, - internalType: "address", }, + ], + name: "nonces", + outputs: [ { - name: "spender", - type: "address", - indexed: true, - internalType: "address", + internalType: "uint256", + name: "", + type: "uint256", }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + ], + name: "normalizedBoost", + outputs: [ { - name: "value", - type: "uint256", - indexed: false, internalType: "uint256", + name: "", + type: "uint256", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "BeaconDepositContractChanged", inputs: [ { - name: "previous", - type: "address", - indexed: true, internalType: "address", + name: "account", + type: "address", }, + ], + name: "numCheckpoints", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ { - name: "current", - type: "address", - indexed: true, internalType: "address", + name: "", + type: "address", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "CancelBoost", inputs: [ { - name: "sender", - type: "address", - indexed: true, - internalType: "address", + internalType: "bytes", + name: "pubkey", + type: "bytes", }, - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { + internalType: "uint128", name: "amount", type: "uint128", - indexed: false, - internalType: "uint128", }, ], - anonymous: false, - }, - { - type: "event", - name: "CancelCommissionChange", - inputs: [ - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, - ], - anonymous: false, + name: "queueBoost", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "CancelDropBoost", inputs: [ - { name: "user", type: "address", indexed: true, internalType: "address" }, - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { + internalType: "bytes", + name: "pubkey", + type: "bytes", + }, + { + internalType: "uint128", name: "amount", type: "uint128", - indexed: false, - internalType: "uint128", }, ], - anonymous: false, + name: "queueDropBoost", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "DelegateChanged", inputs: [ { - name: "delegator", - type: "address", - indexed: true, internalType: "address", - }, - { - name: "fromDelegate", + name: "account", type: "address", - indexed: true, - internalType: "address", }, + ], + name: "queuedBoost", + outputs: [ { - name: "toDelegate", - type: "address", - indexed: true, - internalType: "address", + internalType: "uint128", + name: "", + type: "uint128", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "DelegateVotesChanged", inputs: [ { - name: "delegate", - type: "address", - indexed: true, internalType: "address", + name: "receiver", + type: "address", }, { - name: "previousVotes", - type: "uint256", - indexed: false, internalType: "uint256", - }, - { - name: "newVotes", + name: "amount", type: "uint256", - indexed: false, - internalType: "uint256", }, ], - anonymous: false, + name: "redeem", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "DropBoost", inputs: [ { - name: "sender", - type: "address", - indexed: true, - internalType: "address", + internalType: "uint32", + name: "_activateBoostDelay", + type: "uint32", }, - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, + ], + name: "setActivateBoostDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ { - name: "amount", - type: "uint128", - indexed: false, - internalType: "uint128", + internalType: "address", + name: "_beaconDepositContract", + type: "address", }, ], - anonymous: false, + name: "setBeaconDepositContract", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "DropBoostDelayChanged", inputs: [ { - name: "newDelay", - type: "uint32", - indexed: false, internalType: "uint32", + name: "_dropBoostDelay", + type: "uint32", }, ], - anonymous: false, + name: "setDropBoostDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, - { type: "event", name: "EIP712DomainChanged", inputs: [], anonymous: false }, { - type: "event", - name: "Initialized", inputs: [ { - name: "version", - type: "uint64", - indexed: false, - internalType: "uint64", + internalType: "address", + name: "_minter", + type: "address", }, ], - anonymous: false, + name: "setMinter", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "MinterChanged", inputs: [ { - name: "previous", - type: "address", - indexed: true, internalType: "address", - }, - { - name: "current", + name: "_staker", type: "address", - indexed: true, - internalType: "address", }, ], - anonymous: false, + name: "setStaker", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "OwnershipTransferred", - inputs: [ - { - name: "previousOwner", - type: "address", - indexed: true, - internalType: "address", - }, + inputs: [], + name: "staker", + outputs: [ { - name: "newOwner", + internalType: "contract BGTStaker", + name: "", type: "address", - indexed: true, - internalType: "address", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "QueueBoost", - inputs: [ + inputs: [], + name: "symbol", + outputs: [ { - name: "sender", - type: "address", - indexed: true, - internalType: "address", + internalType: "string", + name: "", + type: "string", }, - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "totalBoosts", + outputs: [ { - name: "amount", - type: "uint128", - indexed: false, internalType: "uint128", + name: "", + type: "uint128", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "QueueCommissionChange", - inputs: [ - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, + inputs: [], + name: "totalSupply", + outputs: [ { - name: "oldRate", - type: "uint256", - indexed: false, internalType: "uint256", - }, - { - name: "newRate", + name: "", type: "uint256", - indexed: false, - internalType: "uint256", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "QueueDropBoost", inputs: [ - { name: "user", type: "address", indexed: true, internalType: "address" }, - { name: "pubkey", type: "bytes", indexed: true, internalType: "bytes" }, { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", name: "amount", - type: "uint128", - indexed: false, - internalType: "uint128", + type: "uint256", }, ], - anonymous: false, + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "Redeem", inputs: [ - { name: "from", type: "address", indexed: true, internalType: "address" }, { - name: "receiver", + internalType: "address", + name: "from", type: "address", - indexed: true, + }, + { internalType: "address", + name: "to", + type: "address", }, { + internalType: "uint256", name: "amount", type: "uint256", - indexed: false, - internalType: "uint256", }, ], - anonymous: false, + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "SenderWhitelisted", inputs: [ { - name: "sender", - type: "address", - indexed: true, internalType: "address", + name: "newOwner", + type: "address", }, - { name: "approved", type: "bool", indexed: false, internalType: "bool" }, ], - anonymous: false, + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "StakerChanged", inputs: [ { - name: "previous", - type: "address", - indexed: true, internalType: "address", - }, - { - name: "current", + name: "account", type: "address", - indexed: true, - internalType: "address", }, ], - anonymous: false, - }, - { - type: "event", - name: "Transfer", - inputs: [ - { name: "from", type: "address", indexed: true, internalType: "address" }, - { name: "to", type: "address", indexed: true, internalType: "address" }, + name: "unboostedBalanceOf", + outputs: [ { - name: "value", - type: "uint256", - indexed: false, internalType: "uint256", + name: "", + type: "uint256", }, ], - anonymous: false, - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, - { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, - { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, - { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, - { type: "error", name: "CheckpointUnorderedInsertion", inputs: [] }, - { type: "error", name: "CommissionNotQueued", inputs: [] }, - { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, - { type: "error", name: "DepositValueTooHigh", inputs: [] }, - { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, - { type: "error", name: "ECDSAInvalidSignature", inputs: [] }, - { - type: "error", - name: "ECDSAInvalidSignatureLength", - inputs: [{ name: "length", type: "uint256", internalType: "uint256" }], - }, - { - type: "error", - name: "ECDSAInvalidSignatureS", - inputs: [{ name: "s", type: "bytes32", internalType: "bytes32" }], - }, - { - type: "error", - name: "ERC20ExceededSafeSupply", - inputs: [ - { name: "increasedSupply", type: "uint256", internalType: "uint256" }, - { name: "cap", type: "uint256", internalType: "uint256" }, - ], - }, - { - type: "error", - name: "ERC20InsufficientAllowance", - inputs: [ - { name: "spender", type: "address", internalType: "address" }, - { name: "allowance", type: "uint256", internalType: "uint256" }, - { name: "needed", type: "uint256", internalType: "uint256" }, - ], - }, - { - type: "error", - name: "ERC20InsufficientBalance", - inputs: [ - { name: "sender", type: "address", internalType: "address" }, - { name: "balance", type: "uint256", internalType: "uint256" }, - { name: "needed", type: "uint256", internalType: "uint256" }, - ], - }, - { - type: "error", - name: "ERC20InvalidApprover", - inputs: [{ name: "approver", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "ERC20InvalidReceiver", - inputs: [{ name: "receiver", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "ERC20InvalidSender", - inputs: [{ name: "sender", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "ERC20InvalidSpender", - inputs: [{ name: "spender", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "ERC5805FutureLookup", - inputs: [ - { name: "timepoint", type: "uint256", internalType: "uint256" }, - { name: "clock", type: "uint48", internalType: "uint48" }, - ], - }, - { type: "error", name: "ERC6372InconsistentClock", inputs: [] }, - { type: "error", name: "IncentiveRateTooHigh", inputs: [] }, - { type: "error", name: "IndexOutOfRange", inputs: [] }, - { type: "error", name: "InsolventReward", inputs: [] }, - { type: "error", name: "InsufficientDelegateStake", inputs: [] }, - { type: "error", name: "InsufficientDeposit", inputs: [] }, - { type: "error", name: "InsufficientSelfStake", inputs: [] }, - { type: "error", name: "InsufficientStake", inputs: [] }, - { - type: "error", - name: "InvalidAccountNonce", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "currentNonce", type: "uint256", internalType: "uint256" }, - ], - }, - { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, - { type: "error", name: "InvalidActivateCommissionChangeDelay", inputs: [] }, - { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, - { type: "error", name: "InvalidCommission", inputs: [] }, - { type: "error", name: "InvalidCredentialsLength", inputs: [] }, - { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, - { type: "error", name: "InvalidInitialization", inputs: [] }, - { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, - { type: "error", name: "InvalidProof", inputs: [] }, - { type: "error", name: "InvalidPubKeyLength", inputs: [] }, - { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, - { type: "error", name: "InvalidRewardConvexity", inputs: [] }, - { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, - { type: "error", name: "InvalidSignatureLength", inputs: [] }, - { type: "error", name: "InvalidStartBlock", inputs: [] }, - { type: "error", name: "InvalidateDefaultRewardAllocation", inputs: [] }, - { type: "error", name: "InvariantCheckFailed", inputs: [] }, - { type: "error", name: "MaxNumWeightsPerRewardAllocationIsZero", inputs: [] }, - { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, - { type: "error", name: "NotAContract", inputs: [] }, - { type: "error", name: "NotApprovedSender", inputs: [] }, - { type: "error", name: "NotBGT", inputs: [] }, - { type: "error", name: "NotBlockRewardController", inputs: [] }, - { type: "error", name: "NotDelegate", inputs: [] }, - { type: "error", name: "NotDistributor", inputs: [] }, - { type: "error", name: "NotEnoughBalance", inputs: [] }, - { type: "error", name: "NotEnoughBoostedBalance", inputs: [] }, - { type: "error", name: "NotEnoughTime", inputs: [] }, - { type: "error", name: "NotFactoryVault", inputs: [] }, - { type: "error", name: "NotFeeCollector", inputs: [] }, - { type: "error", name: "NotGovernance", inputs: [] }, - { type: "error", name: "NotIncentiveManager", inputs: [] }, - { type: "error", name: "NotInitializing", inputs: [] }, - { type: "error", name: "NotNewOperator", inputs: [] }, - { type: "error", name: "NotOperator", inputs: [] }, - { type: "error", name: "NotRootFollower", inputs: [] }, - { type: "error", name: "NotWhitelistedVault", inputs: [] }, - { type: "error", name: "OperatorAlreadySet", inputs: [] }, - { - type: "error", - name: "OwnableInvalidOwner", - inputs: [{ name: "owner", type: "address", internalType: "address" }], - }, - { - type: "error", - name: "OwnableUnauthorizedAccount", - inputs: [{ name: "account", type: "address", internalType: "address" }], + stateMutability: "view", + type: "function", }, - { type: "error", name: "PayoutAmountIsZero", inputs: [] }, - { type: "error", name: "RewardAllocationAlreadyQueued", inputs: [] }, - { type: "error", name: "RewardAllocationBlockDelayTooLarge", inputs: [] }, - { type: "error", name: "RewardCycleNotEnded", inputs: [] }, - { type: "error", name: "RewardsDurationIsZero", inputs: [] }, { - type: "error", - name: "SafeCastOverflowedUintDowncast", inputs: [ - { name: "bits", type: "uint8", internalType: "uint8" }, - { name: "value", type: "uint256", internalType: "uint256" }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, ], + name: "whitelistSender", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, - { type: "error", name: "StakeAmountIsZero", inputs: [] }, - { type: "error", name: "TimestampAlreadyProcessed", inputs: [] }, - { type: "error", name: "TokenAlreadyWhitelistedOrLimitReached", inputs: [] }, - { type: "error", name: "TokenNotWhitelisted", inputs: [] }, - { type: "error", name: "TooManyWeights", inputs: [] }, - { type: "error", name: "TotalSupplyOverflow", inputs: [] }, - { type: "error", name: "VaultAlreadyExists", inputs: [] }, - { - type: "error", - name: "VotesExpiredSignature", - inputs: [{ name: "expiry", type: "uint256", internalType: "uint256" }], - }, - { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, - { type: "error", name: "ZeroAddress", inputs: [] }, - { type: "error", name: "ZeroOperatorOnFirstDeposit", inputs: [] }, - { type: "error", name: "ZeroPercentageWeight", inputs: [] }, ] as const; diff --git a/packages/berajs/src/abi/pol/bgtStaker.ts b/packages/berajs/src/abi/pol/bgtStaker.ts index 2fe5003e1..1318eb788 100755 --- a/packages/berajs/src/abi/pol/bgtStaker.ts +++ b/packages/berajs/src/abi/pol/bgtStaker.ts @@ -1,485 +1,1034 @@ export const BGT_STAKER_ABI = [ - { type: "constructor", inputs: [], stateMutability: "nonpayable" }, { - type: "function", - name: "FEE_COLLECTOR", inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], - stateMutability: "view", + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + ], + name: "AddressEmptyCode", + type: "error", + }, + { + inputs: [], + name: "AlreadyInitialized", + type: "error", + }, + { + inputs: [], + name: "AmountLessThanMinIncentiveRate", + type: "error", + }, + { + inputs: [], + name: "CannotRecoverIncentiveToken", + type: "error", + }, + { + inputs: [], + name: "CannotRecoverRewardToken", + type: "error", + }, + { + inputs: [], + name: "CannotRecoverStakingToken", + type: "error", + }, + { + inputs: [], + name: "DepositNotMultipleOfGwei", + type: "error", + }, + { + inputs: [], + name: "DepositValueTooHigh", + type: "error", + }, + { + inputs: [], + name: "DonateAmountLessThanPayoutAmount", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "ERC1967InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "ERC1967NonPayable", + type: "error", + }, + { + inputs: [], + name: "FailedCall", + type: "error", + }, + { + inputs: [], + name: "IncentiveRateTooHigh", + type: "error", + }, + { + inputs: [], + name: "IndexOutOfRange", + type: "error", + }, + { + inputs: [], + name: "InsolventReward", + type: "error", + }, + { + inputs: [], + name: "InsufficientDelegateStake", + type: "error", + }, + { + inputs: [], + name: "InsufficientDeposit", + type: "error", + }, + { + inputs: [], + name: "InsufficientSelfStake", + type: "error", + }, + { + inputs: [], + name: "InsufficientStake", + type: "error", + }, + { + inputs: [], + name: "InvalidActivateBoostDelay", + type: "error", + }, + { + inputs: [], + name: "InvalidBaseRate", + type: "error", + }, + { + inputs: [], + name: "InvalidBoostMultiplier", + type: "error", + }, + { + inputs: [], + name: "InvalidCredentialsLength", + type: "error", + }, + { + inputs: [], + name: "InvalidDropBoostDelay", + type: "error", + }, + { + inputs: [], + name: "InvalidInitialization", + type: "error", + }, + { + inputs: [], + name: "InvalidMaxIncentiveTokensCount", + type: "error", + }, + { + inputs: [], + name: "InvalidMinBoostedRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidProof", + type: "error", + }, + { + inputs: [], + name: "InvalidPubKeyLength", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardAllocationWeights", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardConvexity", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardVaultAddress", + type: "error", + }, + { + inputs: [], + name: "InvalidSignatureLength", + type: "error", + }, + { + inputs: [], + name: "InvalidStartBlock", + type: "error", + }, + { + inputs: [], + name: "InvalidateDefaultRewardAllocation", + type: "error", + }, + { + inputs: [], + name: "InvariantCheckFailed", + type: "error", + }, + { + inputs: [], + name: "MaxNumWeightsPerRewardAllocationIsZero", + type: "error", + }, + { + inputs: [], + name: "MinIncentiveRateIsZero", + type: "error", + }, + { + inputs: [], + name: "NotAContract", + type: "error", + }, + { + inputs: [], + name: "NotApprovedSender", + type: "error", + }, + { + inputs: [], + name: "NotBGT", + type: "error", + }, + { + inputs: [], + name: "NotBlockRewardController", + type: "error", + }, + { + inputs: [], + name: "NotDelegate", + type: "error", + }, + { + inputs: [], + name: "NotDistributor", + type: "error", + }, + { + inputs: [], + name: "NotEnoughBalance", + type: "error", + }, + { + inputs: [], + name: "NotEnoughBoostedBalance", + type: "error", + }, + { + inputs: [], + name: "NotEnoughTime", + type: "error", + }, + { + inputs: [], + name: "NotFactoryVault", + type: "error", + }, + { + inputs: [], + name: "NotFeeCollector", + type: "error", + }, + { + inputs: [], + name: "NotGovernance", + type: "error", + }, + { + inputs: [], + name: "NotIncentiveManager", + type: "error", + }, + { + inputs: [], + name: "NotInitializing", + type: "error", + }, + { + inputs: [], + name: "NotNewOperator", + type: "error", + }, + { + inputs: [], + name: "NotOperator", + type: "error", + }, + { + inputs: [], + name: "NotRootFollower", + type: "error", + }, + { + inputs: [], + name: "NotWhitelistedVault", + type: "error", + }, + { + inputs: [], + name: "OperatorAlreadySet", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "OwnableInvalidOwner", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "OwnableUnauthorizedAccount", + type: "error", + }, + { + inputs: [], + name: "PayoutAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "RewardAllocationAlreadyQueued", + type: "error", + }, + { + inputs: [], + name: "RewardAllocationBlockDelayTooLarge", + type: "error", + }, + { + inputs: [], + name: "RewardCycleNotEnded", + type: "error", + }, + { + inputs: [], + name: "RewardsDurationIsZero", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "SafeERC20FailedOperation", + type: "error", + }, + { + inputs: [], + name: "StakeAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "TimestampAlreadyProcessed", + type: "error", + }, + { + inputs: [], + name: "TokenAlreadyWhitelistedOrLimitReached", + type: "error", + }, + { + inputs: [], + name: "TokenNotWhitelisted", + type: "error", + }, + { + inputs: [], + name: "TooManyWeights", + type: "error", + }, + { + inputs: [], + name: "TotalSupplyOverflow", + type: "error", + }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "slot", + type: "bytes32", + }, + ], + name: "UUPSUnsupportedProxiableUUID", + type: "error", + }, + { + inputs: [], + name: "VaultAlreadyExists", + type: "error", + }, + { + inputs: [], + name: "WithdrawAmountIsZero", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + inputs: [], + name: "ZeroOperatorOnFirstDeposit", + type: "error", + }, + { + inputs: [], + name: "ZeroPercentageWeight", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Recovered", + type: "event", }, { - type: "function", - name: "UPGRADE_INTERFACE_VERSION", - inputs: [], - outputs: [{ name: "", type: "string", internalType: "string" }], - stateMutability: "view", + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "RewardAdded", + type: "event", }, { - type: "function", - name: "balanceOf", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "RewardPaid", + type: "event", }, { - type: "function", - name: "earned", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "newDuration", + type: "uint256", + }, + ], + name: "RewardsDurationUpdated", + type: "event", }, { - type: "function", - name: "getReward", - inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "nonpayable", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Staked", + type: "event", }, { - type: "function", - name: "getRewardForDuration", - inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", }, { - type: "function", - name: "initialize", + anonymous: false, inputs: [ - { name: "_bgt", type: "address", internalType: "address" }, - { name: "_feeCollector", type: "address", internalType: "address" }, - { name: "_governance", type: "address", internalType: "address" }, - { name: "_rewardToken", type: "address", internalType: "address" }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, ], - outputs: [], - stateMutability: "nonpayable", + name: "Withdrawn", + type: "event", }, { - type: "function", - name: "lastTimeRewardApplicable", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "FEE_COLLECTOR", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "lastUpdateTime", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "UPGRADE_INTERFACE_VERSION", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], stateMutability: "view", + type: "function", }, { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", type: "function", - name: "notifyRewardAmount", - inputs: [{ name: "reward", type: "uint256", internalType: "uint256" }], - outputs: [], - stateMutability: "nonpayable", }, { - type: "function", - name: "owner", - inputs: [], - outputs: [{ name: "", type: "address", internalType: "address" }], + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "earned", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "periodFinish", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", + name: "getReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "proxiableUUID", inputs: [], - outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }], + name: "getRewardForDuration", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "recoverERC20", inputs: [ - { name: "tokenAddress", type: "address", internalType: "address" }, - { name: "tokenAmount", type: "uint256", internalType: "uint256" }, + { + internalType: "address", + name: "_bgt", + type: "address", + }, + { + internalType: "address", + name: "_feeCollector", + type: "address", + }, + { + internalType: "address", + name: "_governance", + type: "address", + }, + { + internalType: "address", + name: "_rewardToken", + type: "address", + }, ], + name: "initialize", outputs: [], stateMutability: "nonpayable", - }, - { type: "function", - name: "renounceOwnership", - inputs: [], - outputs: [], - stateMutability: "nonpayable", }, { - type: "function", - name: "rewardPerToken", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "lastTimeRewardApplicable", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "rewardPerTokenStored", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "lastUpdateTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { + inputs: [ + { + internalType: "uint256", + name: "reward", + type: "uint256", + }, + ], + name: "notifyRewardAmount", + outputs: [], + stateMutability: "nonpayable", type: "function", - name: "rewardRate", - inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], - stateMutability: "view", }, { - type: "function", - name: "rewardToken", inputs: [], - outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "rewards", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + inputs: [], + name: "periodFinish", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "rewardsDuration", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "setRewardsDuration", inputs: [ - { name: "_rewardsDuration", type: "uint256", internalType: "uint256" }, + { + internalType: "address", + name: "tokenAddress", + type: "address", + }, + { + internalType: "uint256", + name: "tokenAmount", + type: "uint256", + }, ], + name: "recoverERC20", outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "stake", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, - ], + inputs: [], + name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", + type: "function", }, { - type: "function", - name: "stakeToken", inputs: [], - outputs: [{ name: "", type: "address", internalType: "contract IERC20" }], + name: "rewardPerToken", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "totalSupply", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "rewardPerTokenStored", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], stateMutability: "view", + type: "function", }, { + inputs: [], + name: "rewardRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", type: "function", - name: "transferOwnership", - inputs: [{ name: "newOwner", type: "address", internalType: "address" }], - outputs: [], - stateMutability: "nonpayable", }, { - type: "function", - name: "undistributedRewards", inputs: [], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], + name: "rewardToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], stateMutability: "view", + type: "function", }, { - type: "function", - name: "upgradeToAndCall", inputs: [ - { name: "newImplementation", type: "address", internalType: "address" }, - { name: "data", type: "bytes", internalType: "bytes" }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "rewards", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, ], - outputs: [], - stateMutability: "payable", - }, - { - type: "function", - name: "userRewardPerTokenPaid", - inputs: [{ name: "account", type: "address", internalType: "address" }], - outputs: [{ name: "", type: "uint256", internalType: "uint256" }], stateMutability: "view", + type: "function", }, { - type: "function", - name: "withdraw", - inputs: [ - { name: "account", type: "address", internalType: "address" }, - { name: "amount", type: "uint256", internalType: "uint256" }, + inputs: [], + name: "rewardsDuration", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, ], - outputs: [], - stateMutability: "nonpayable", + stateMutability: "view", + type: "function", }, { - type: "event", - name: "Initialized", inputs: [ { - name: "version", - type: "uint64", - indexed: false, - internalType: "uint64", + internalType: "uint256", + name: "_rewardsDuration", + type: "uint256", }, ], - anonymous: false, + name: "setRewardsDuration", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "OwnershipTransferred", inputs: [ { - name: "previousOwner", - type: "address", - indexed: true, internalType: "address", + name: "account", + type: "address", }, { - name: "newOwner", - type: "address", - indexed: true, - internalType: "address", + internalType: "uint256", + name: "amount", + type: "uint256", }, ], - anonymous: false, + name: "stake", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "Recovered", - inputs: [ + inputs: [], + name: "stakeToken", + outputs: [ { - name: "token", + internalType: "contract IERC20", + name: "", type: "address", - indexed: false, - internalType: "address", - }, - { - name: "amount", - type: "uint256", - indexed: false, - internalType: "uint256", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "RewardAdded", - inputs: [ + inputs: [], + name: "totalSupply", + outputs: [ { - name: "reward", - type: "uint256", - indexed: false, internalType: "uint256", + name: "", + type: "uint256", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "RewardPaid", inputs: [ { - name: "account", - type: "address", - indexed: true, internalType: "address", - }, - { name: "to", type: "address", indexed: false, internalType: "address" }, - { - name: "reward", - type: "uint256", - indexed: false, - internalType: "uint256", + name: "newOwner", + type: "address", }, ], - anonymous: false, + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, { - type: "event", - name: "RewardsDurationUpdated", - inputs: [ + inputs: [], + name: "undistributedRewards", + outputs: [ { - name: "newDuration", - type: "uint256", - indexed: false, internalType: "uint256", + name: "", + type: "uint256", }, ], - anonymous: false, + stateMutability: "view", + type: "function", }, { - type: "event", - name: "Staked", inputs: [ { - name: "account", - type: "address", - indexed: true, internalType: "address", + name: "newImplementation", + type: "address", }, { - name: "amount", - type: "uint256", - indexed: false, - internalType: "uint256", + internalType: "bytes", + name: "data", + type: "bytes", }, ], - anonymous: false, + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", }, { - type: "event", - name: "Upgraded", inputs: [ { - name: "implementation", - type: "address", - indexed: true, internalType: "address", + name: "account", + type: "address", }, ], - anonymous: false, + name: "userRewardPerTokenPaid", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", }, { - type: "event", - name: "Withdrawn", inputs: [ { + internalType: "address", name: "account", type: "address", - indexed: true, - internalType: "address", }, { + internalType: "uint256", name: "amount", type: "uint256", - indexed: false, - internalType: "uint256", }, ], - anonymous: false, - }, - { - type: "error", - name: "AddressEmptyCode", - inputs: [{ name: "target", type: "address", internalType: "address" }], - }, - { type: "error", name: "AlreadyInitialized", inputs: [] }, - { type: "error", name: "AmountLessThanMinIncentiveRate", inputs: [] }, - { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, - { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, - { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, - { type: "error", name: "CommissionNotQueued", inputs: [] }, - { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, - { type: "error", name: "DepositValueTooHigh", inputs: [] }, - { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, - { - type: "error", - name: "ERC1967InvalidImplementation", - inputs: [ - { name: "implementation", type: "address", internalType: "address" }, - ], - }, - { type: "error", name: "ERC1967NonPayable", inputs: [] }, - { type: "error", name: "FailedCall", inputs: [] }, - { type: "error", name: "IncentiveRateTooHigh", inputs: [] }, - { type: "error", name: "IndexOutOfRange", inputs: [] }, - { type: "error", name: "InsolventReward", inputs: [] }, - { type: "error", name: "InsufficientDelegateStake", inputs: [] }, - { type: "error", name: "InsufficientDeposit", inputs: [] }, - { type: "error", name: "InsufficientSelfStake", inputs: [] }, - { type: "error", name: "InsufficientStake", inputs: [] }, - { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, - { type: "error", name: "InvalidActivateCommissionChangeDelay", inputs: [] }, - { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, - { type: "error", name: "InvalidCommission", inputs: [] }, - { type: "error", name: "InvalidCredentialsLength", inputs: [] }, - { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, - { type: "error", name: "InvalidInitialization", inputs: [] }, - { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, - { type: "error", name: "InvalidProof", inputs: [] }, - { type: "error", name: "InvalidPubKeyLength", inputs: [] }, - { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, - { type: "error", name: "InvalidRewardConvexity", inputs: [] }, - { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, - { type: "error", name: "InvalidSignatureLength", inputs: [] }, - { type: "error", name: "InvalidStartBlock", inputs: [] }, - { type: "error", name: "InvalidateDefaultRewardAllocation", inputs: [] }, - { type: "error", name: "InvariantCheckFailed", inputs: [] }, - { type: "error", name: "MaxNumWeightsPerRewardAllocationIsZero", inputs: [] }, - { type: "error", name: "MinIncentiveRateIsZero", inputs: [] }, - { type: "error", name: "NotAContract", inputs: [] }, - { type: "error", name: "NotApprovedSender", inputs: [] }, - { type: "error", name: "NotBGT", inputs: [] }, - { type: "error", name: "NotBlockRewardController", inputs: [] }, - { type: "error", name: "NotDelegate", inputs: [] }, - { type: "error", name: "NotDistributor", inputs: [] }, - { type: "error", name: "NotEnoughBalance", inputs: [] }, - { type: "error", name: "NotEnoughBoostedBalance", inputs: [] }, - { type: "error", name: "NotEnoughTime", inputs: [] }, - { type: "error", name: "NotFactoryVault", inputs: [] }, - { type: "error", name: "NotFeeCollector", inputs: [] }, - { type: "error", name: "NotGovernance", inputs: [] }, - { type: "error", name: "NotIncentiveManager", inputs: [] }, - { type: "error", name: "NotInitializing", inputs: [] }, - { type: "error", name: "NotNewOperator", inputs: [] }, - { type: "error", name: "NotOperator", inputs: [] }, - { type: "error", name: "NotRootFollower", inputs: [] }, - { type: "error", name: "NotWhitelistedVault", inputs: [] }, - { type: "error", name: "OperatorAlreadySet", inputs: [] }, - { - 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: "PayoutAmountIsZero", inputs: [] }, - { type: "error", name: "RewardAllocationAlreadyQueued", inputs: [] }, - { type: "error", name: "RewardAllocationBlockDelayTooLarge", inputs: [] }, - { type: "error", name: "RewardCycleNotEnded", inputs: [] }, - { type: "error", name: "RewardsDurationIsZero", inputs: [] }, - { - type: "error", - name: "SafeERC20FailedOperation", - inputs: [{ name: "token", type: "address", internalType: "address" }], - }, - { type: "error", name: "StakeAmountIsZero", inputs: [] }, - { type: "error", name: "TimestampAlreadyProcessed", inputs: [] }, - { type: "error", name: "TokenAlreadyWhitelistedOrLimitReached", inputs: [] }, - { type: "error", name: "TokenNotWhitelisted", inputs: [] }, - { type: "error", name: "TooManyWeights", inputs: [] }, - { type: "error", name: "TotalSupplyOverflow", inputs: [] }, - { type: "error", name: "UUPSUnauthorizedCallContext", inputs: [] }, - { - type: "error", - name: "UUPSUnsupportedProxiableUUID", - inputs: [{ name: "slot", type: "bytes32", internalType: "bytes32" }], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", }, - { type: "error", name: "VaultAlreadyExists", inputs: [] }, - { type: "error", name: "WithdrawAmountIsZero", inputs: [] }, - { type: "error", name: "ZeroAddress", inputs: [] }, - { type: "error", name: "ZeroOperatorOnFirstDeposit", inputs: [] }, - { type: "error", name: "ZeroPercentageWeight", inputs: [] }, ] as const; diff --git a/packages/berajs/src/abi/pol/reward-vault-factory.ts b/packages/berajs/src/abi/pol/reward-vault-factory.ts index 6f2977dbc..91e3928e2 100644 --- a/packages/berajs/src/abi/pol/reward-vault-factory.ts +++ b/packages/berajs/src/abi/pol/reward-vault-factory.ts @@ -1,34 +1,40 @@ export const rewardVaultFactoryAbi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AccessControlBadConfirmation", + type: "error", + }, { inputs: [ { internalType: "address", - name: "_bgt", - type: "address", - }, - { - internalType: "address", - name: "_distributor", + name: "account", type: "address", }, { - internalType: "address", - name: "_berachef", - type: "address", - }, - { - internalType: "address", - name: "_governance", - type: "address", + internalType: "bytes32", + name: "neededRole", + type: "bytes32", }, + ], + name: "AccessControlUnauthorizedAccount", + type: "error", + }, + { + inputs: [ { internalType: "address", - name: "_vaultImpl", + name: "target", type: "address", }, ], - stateMutability: "nonpayable", - type: "constructor", + name: "AddressEmptyCode", + type: "error", }, { inputs: [], @@ -42,27 +48,63 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "BlockDoesNotExist", + name: "CannotRecoverIncentiveToken", type: "error", }, { inputs: [], - name: "BlockNotInBuffer", + name: "CannotRecoverRewardToken", type: "error", }, { inputs: [], - name: "CannotRecoverRewardToken", + name: "CannotRecoverStakingToken", type: "error", }, { inputs: [], - name: "CannotRecoverStakingToken", + name: "DepositNotMultipleOfGwei", + type: "error", + }, + { + inputs: [], + name: "DepositValueTooHigh", + type: "error", + }, + { + inputs: [], + name: "DonateAmountLessThanPayoutAmount", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "ERC1967InvalidImplementation", + type: "error", + }, + { + inputs: [], + name: "ERC1967NonPayable", + type: "error", + }, + { + inputs: [], + name: "FailedCall", + type: "error", + }, + { + inputs: [], + name: "IncentiveRateTooHigh", type: "error", }, { inputs: [], - name: "DelegateStakedOverflow", + name: "IndexOutOfRange", type: "error", }, { @@ -75,6 +117,11 @@ export const rewardVaultFactoryAbi = [ name: "InsufficientDelegateStake", type: "error", }, + { + inputs: [], + name: "InsufficientDeposit", + type: "error", + }, { inputs: [], name: "InsufficientSelfStake", @@ -87,12 +134,32 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "InvalidCommission", + name: "InvalidActivateBoostDelay", + type: "error", + }, + { + inputs: [], + name: "InvalidBaseRate", + type: "error", + }, + { + inputs: [], + name: "InvalidBoostMultiplier", + type: "error", + }, + { + inputs: [], + name: "InvalidCredentialsLength", + type: "error", + }, + { + inputs: [], + name: "InvalidDropBoostDelay", type: "error", }, { inputs: [], - name: "InvalidCuttingBoardWeights", + name: "InvalidInitialization", type: "error", }, { @@ -102,7 +169,42 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "InvalidMinter", + name: "InvalidMinBoostedRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidProof", + type: "error", + }, + { + inputs: [], + name: "InvalidPubKeyLength", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardAllocationWeights", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardConvexity", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardRate", + type: "error", + }, + { + inputs: [], + name: "InvalidRewardVaultAddress", + type: "error", + }, + { + inputs: [], + name: "InvalidSignatureLength", type: "error", }, { @@ -110,6 +212,11 @@ export const rewardVaultFactoryAbi = [ name: "InvalidStartBlock", type: "error", }, + { + inputs: [], + name: "InvalidateDefaultRewardAllocation", + type: "error", + }, { inputs: [], name: "InvariantCheckFailed", @@ -117,17 +224,17 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "MaxNumWeightsPerCuttingBoardIsZero", + name: "MaxNumWeightsPerRewardAllocationIsZero", type: "error", }, { inputs: [], - name: "NoWhitelistedTokens", + name: "MinIncentiveRateIsZero", type: "error", }, { inputs: [], - name: "NotActionableBlock", + name: "NotAContract", type: "error", }, { @@ -160,6 +267,11 @@ export const rewardVaultFactoryAbi = [ name: "NotEnoughBalance", type: "error", }, + { + inputs: [], + name: "NotEnoughBoostedBalance", + type: "error", + }, { inputs: [], name: "NotEnoughTime", @@ -167,12 +279,12 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "NotFeeCollector", + name: "NotFactoryVault", type: "error", }, { inputs: [], - name: "NotFriendOfTheChef", + name: "NotFeeCollector", type: "error", }, { @@ -182,64 +294,52 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "NotOperator", + name: "NotIncentiveManager", type: "error", }, { inputs: [], - name: "NotProver", + name: "NotInitializing", type: "error", }, { inputs: [], - name: "NotRootFollower", + name: "NotNewOperator", type: "error", }, { inputs: [], - name: "NotValidatorOrOperator", + name: "NotOperator", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "owner", - type: "address", - }, - ], - name: "OwnableInvalidOwner", + inputs: [], + name: "NotRootFollower", type: "error", }, { - inputs: [ - { - internalType: "address", - name: "account", - type: "address", - }, - ], - name: "OwnableUnauthorizedAccount", + inputs: [], + name: "NotWhitelistedVault", type: "error", }, { inputs: [], - name: "PayoutAmountIsZero", + name: "OperatorAlreadySet", type: "error", }, { inputs: [], - name: "PayoutTokenIsZero", + name: "PayoutAmountIsZero", type: "error", }, { inputs: [], - name: "QueuedCuttingBoardNotFound", + name: "RewardAllocationAlreadyQueued", type: "error", }, { inputs: [], - name: "QueuedCuttingBoardNotReady", + name: "RewardAllocationBlockDelayTooLarge", type: "error", }, { @@ -247,11 +347,21 @@ export const rewardVaultFactoryAbi = [ name: "RewardCycleNotEnded", type: "error", }, + { + inputs: [], + name: "RewardsDurationIsZero", + type: "error", + }, { inputs: [], name: "StakeAmountIsZero", type: "error", }, + { + inputs: [], + name: "TimestampAlreadyProcessed", + type: "error", + }, { inputs: [], name: "TokenAlreadyWhitelistedOrLimitReached", @@ -272,15 +382,20 @@ export const rewardVaultFactoryAbi = [ name: "TotalSupplyOverflow", type: "error", }, + { + inputs: [], + name: "UUPSUnauthorizedCallContext", + type: "error", + }, { inputs: [ { - internalType: "address", - name: "", - type: "address", + internalType: "bytes32", + name: "slot", + type: "bytes32", }, ], - name: "Unauthorized", + name: "UUPSUnsupportedProxiableUUID", type: "error", }, { @@ -298,23 +413,134 @@ export const rewardVaultFactoryAbi = [ name: "ZeroAddress", type: "error", }, + { + inputs: [], + name: "ZeroOperatorOnFirstDeposit", + type: "error", + }, + { + inputs: [], + name: "ZeroPercentageWeight", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint64", + name: "version", + type: "uint64", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, { anonymous: false, inputs: [ { indexed: true, internalType: "address", - name: "previousOwner", + name: "oldVaultImpl", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newVaultImpl", type: "address", }, + ], + name: "UpdateRewardVaultImplementation", + type: "event", + }, + { + anonymous: false, + inputs: [ { indexed: true, internalType: "address", - name: "newOwner", + name: "implementation", type: "address", }, ], - name: "OwnershipTransferred", + name: "Upgraded", type: "event", }, { @@ -337,19 +563,26 @@ export const rewardVaultFactoryAbi = [ type: "event", }, { - inputs: [ + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ { - internalType: "uint256", + internalType: "bytes32", name: "", - type: "uint256", + type: "bytes32", }, ], - name: "allVaults", + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "UPGRADE_INTERFACE_VERSION", outputs: [ { - internalType: "address", + internalType: "string", name: "", - type: "address", + type: "string", }, ], stateMutability: "view", @@ -357,25 +590,44 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "allVaultsLength", + name: "VAULT_MANAGER_ROLE", outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ { internalType: "uint256", name: "", type: "uint256", }, ], + name: "allVaults", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], stateMutability: "view", type: "function", }, { inputs: [], - name: "beacon", + name: "allVaultsLength", outputs: [ { - internalType: "address", + internalType: "uint256", name: "", - type: "address", + type: "uint256", }, ], stateMutability: "view", @@ -383,7 +635,7 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "berachef", + name: "beaconDepositContract", outputs: [ { internalType: "address", @@ -415,7 +667,7 @@ export const rewardVaultFactoryAbi = [ type: "address", }, ], - name: "createRewardsVault", + name: "createRewardVault", outputs: [ { internalType: "address", @@ -439,6 +691,25 @@ export const rewardVaultFactoryAbi = [ stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, { inputs: [ { @@ -459,18 +730,80 @@ export const rewardVaultFactoryAbi = [ type: "function", }, { - inputs: [], - name: "owner", - outputs: [ + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, { internalType: "address", - name: "", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", type: "address", }, ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], stateMutability: "view", type: "function", }, + { + inputs: [ + { + internalType: "address", + name: "_bgt", + type: "address", + }, + { + internalType: "address", + name: "_distributor", + type: "address", + }, + { + internalType: "address", + name: "_beaconDepositContract", + type: "address", + }, + { + internalType: "address", + name: "_governance", + type: "address", + }, + { + internalType: "address", + name: "_vaultImpl", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, { inputs: [ { @@ -479,7 +812,7 @@ export const rewardVaultFactoryAbi = [ type: "address", }, ], - name: "predictRewardsVaultAddress", + name: "predictRewardVaultAddress", outputs: [ { internalType: "address", @@ -492,7 +825,49 @@ export const rewardVaultFactoryAbi = [ }, { inputs: [], - name: "renounceOwnership", + name: "proxiableUUID", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "callerConfirmation", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", outputs: [], stateMutability: "nonpayable", type: "function", @@ -501,13 +876,63 @@ export const rewardVaultFactoryAbi = [ inputs: [ { internalType: "address", - name: "newOwner", + name: "_vaultImpl", type: "address", }, ], - name: "transferOwnership", + name: "setRewardVaultImplementation", outputs: [], stateMutability: "nonpayable", type: "function", }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "vaultImpl", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, ] as const; diff --git a/packages/berajs/src/abi/pol/reward-vault.ts b/packages/berajs/src/abi/pol/reward-vault.ts index a78c2dcb5..60dcd488d 100755 --- a/packages/berajs/src/abi/pol/reward-vault.ts +++ b/packages/berajs/src/abi/pol/reward-vault.ts @@ -140,7 +140,7 @@ export const BERA_VAULT_REWARDS_ABI = [ name: "initialize", inputs: [ { - name: "__beaconDepositContract", + name: "_beaconDepositContract", type: "address", internalType: "address", }, @@ -786,7 +786,6 @@ export const BERA_VAULT_REWARDS_ABI = [ { type: "error", name: "CannotRecoverIncentiveToken", inputs: [] }, { type: "error", name: "CannotRecoverRewardToken", inputs: [] }, { type: "error", name: "CannotRecoverStakingToken", inputs: [] }, - { type: "error", name: "CommissionNotQueued", inputs: [] }, { type: "error", name: "DepositNotMultipleOfGwei", inputs: [] }, { type: "error", name: "DepositValueTooHigh", inputs: [] }, { type: "error", name: "DonateAmountLessThanPayoutAmount", inputs: [] }, @@ -800,17 +799,18 @@ export const BERA_VAULT_REWARDS_ABI = [ { type: "error", name: "InsufficientSelfStake", inputs: [] }, { type: "error", name: "InsufficientStake", inputs: [] }, { type: "error", name: "InvalidActivateBoostDelay", inputs: [] }, - { type: "error", name: "InvalidActivateCommissionChangeDelay", inputs: [] }, + { type: "error", name: "InvalidBaseRate", inputs: [] }, { type: "error", name: "InvalidBoostMultiplier", inputs: [] }, - { type: "error", name: "InvalidCommission", inputs: [] }, { type: "error", name: "InvalidCredentialsLength", inputs: [] }, { type: "error", name: "InvalidDropBoostDelay", inputs: [] }, { type: "error", name: "InvalidInitialization", inputs: [] }, { type: "error", name: "InvalidMaxIncentiveTokensCount", inputs: [] }, + { type: "error", name: "InvalidMinBoostedRewardRate", inputs: [] }, { type: "error", name: "InvalidProof", inputs: [] }, { type: "error", name: "InvalidPubKeyLength", inputs: [] }, { type: "error", name: "InvalidRewardAllocationWeights", inputs: [] }, { type: "error", name: "InvalidRewardConvexity", inputs: [] }, + { type: "error", name: "InvalidRewardRate", inputs: [] }, { type: "error", name: "InvalidRewardVaultAddress", inputs: [] }, { type: "error", name: "InvalidSignatureLength", inputs: [] }, { type: "error", name: "InvalidStartBlock", inputs: [] }, diff --git a/packages/berajs/src/abi/pol/rewards.js b/packages/berajs/src/abi/pol/rewards.js deleted file mode 100755 index 82851031b..000000000 --- a/packages/berajs/src/abi/pol/rewards.js +++ /dev/null @@ -1,323 +0,0 @@ -/** - * @deprecated - */ -export const REWARDS_PRECOMPILE_ABI = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "caller", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "depositor", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "assets", - type: "tuple[]", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin", - name: "shares", - type: "tuple", - }, - ], - name: "InitializeDeposit", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "depositor", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "withdrawAddress", - type: "address", - }, - ], - name: "SetDepositorWithdrawAddress", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "withdrawer", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "rewardAmount", - type: "tuple[]", - }, - ], - name: "WithdrawDepositRewards", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "depositor", - type: "address", - }, - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "getCurrentRewards", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - internalType: "struct Cosmos.Coin[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "depositor", - type: "address", - }, - ], - name: "getDepositorWithdrawAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "getOutstandingRewards", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - internalType: "struct Cosmos.Coin[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "withdrawAddress", - type: "address", - }, - ], - name: "setDepositorWithdrawAddress", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - ], - name: "withdrawAllDepositorRewards", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - internalType: "struct Cosmos.Coin[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdrawDepositorRewards", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - internalType: "struct Cosmos.Coin[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "receiver", - type: "address", - }, - { - internalType: "address", - name: "recipient", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "withdrawDepositorRewardsTo", - outputs: [ - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - internalType: "struct Cosmos.Coin[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "nonpayable", - type: "function", - }, -]; diff --git a/packages/berajs/src/abi/pol/staking.js b/packages/berajs/src/abi/pol/staking.js deleted file mode 100755 index 7d9f9dd02..000000000 --- a/packages/berajs/src/abi/pol/staking.js +++ /dev/null @@ -1,1275 +0,0 @@ -/** - * @deprecated - */ -export const STAKING_PRECOMPILE_ABI = [ - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "validator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "delegator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "amount", - type: "tuple[]", - }, - { - indexed: false, - internalType: "int64", - name: "creationHeight", - type: "int64", - }, - ], - name: "CancelUnbondingDelegation", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "validator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "amount", - type: "tuple[]", - }, - ], - name: "CreateValidator", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "validator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "amount", - type: "tuple[]", - }, - ], - name: "Delegate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "sourceValidator", - type: "address", - }, - { - indexed: true, - internalType: "address", - name: "destinationValidator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "amount", - type: "tuple[]", - }, - ], - name: "Redelegate", - type: "event", - }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "validator", - type: "address", - }, - { - components: [ - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "string", - name: "denom", - type: "string", - }, - ], - indexed: false, - internalType: "struct Cosmos.Coin[]", - name: "amount", - type: "tuple[]", - }, - ], - name: "Unbond", - type: "event", - }, - { - inputs: [ - { - internalType: "address", - name: "srcValidator", - type: "address", - }, - { - internalType: "address", - name: "dstValidator", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "beginRedelegate", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - { - internalType: "int64", - name: "creationHeight", - type: "int64", - }, - ], - name: "cancelUnbondingDelegation", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "delegate", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint64", - name: "offset", - type: "uint64", - }, - { - internalType: "uint64", - name: "limit", - type: "uint64", - }, - { - internalType: "bool", - name: "countTotal", - type: "bool", - }, - { - internalType: "bool", - name: "reverse", - type: "bool", - }, - ], - internalType: "struct Cosmos.PageRequest", - name: "pagination", - type: "tuple", - }, - ], - name: "getBondedValidators", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - { - components: [ - { - internalType: "string", - name: "nextKey", - type: "string", - }, - { - internalType: "uint64", - name: "total", - type: "uint64", - }, - ], - internalType: "struct Cosmos.PageResponse", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [], - name: "getBondedValidatorsByPower", - outputs: [ - { - internalType: "address[]", - name: "", - type: "address[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatorAddress", - type: "address", - }, - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - ], - name: "getDelegation", - outputs: [ - { - internalType: "uint256", - name: "", - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatorAddress", - type: "address", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint64", - name: "offset", - type: "uint64", - }, - { - internalType: "uint64", - name: "limit", - type: "uint64", - }, - { - internalType: "bool", - name: "countTotal", - type: "bool", - }, - { - internalType: "bool", - name: "reverse", - type: "bool", - }, - ], - internalType: "struct Cosmos.PageRequest", - name: "pagination", - type: "tuple", - }, - ], - name: "getDelegatorUnbondingDelegations", - outputs: [ - { - components: [ - { - internalType: "address", - name: "delegatorAddress", - type: "address", - }, - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - { - components: [ - { - internalType: "int64", - name: "creationHeight", - type: "int64", - }, - { - internalType: "string", - name: "completionTime", - type: "string", - }, - { - internalType: "uint256", - name: "initialBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "balance", - type: "uint256", - }, - { - internalType: "uint64", - name: "unbondingId", - type: "uint64", - }, - ], - internalType: "struct IStakingModule.UnbondingDelegationEntry[]", - name: "entries", - type: "tuple[]", - }, - ], - internalType: "struct IStakingModule.UnbondingDelegation[]", - name: "", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "nextKey", - type: "string", - }, - { - internalType: "uint64", - name: "total", - type: "uint64", - }, - ], - internalType: "struct Cosmos.PageResponse", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatorAddress", - type: "address", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint64", - name: "offset", - type: "uint64", - }, - { - internalType: "uint64", - name: "limit", - type: "uint64", - }, - { - internalType: "bool", - name: "countTotal", - type: "bool", - }, - { - internalType: "bool", - name: "reverse", - type: "bool", - }, - ], - internalType: "struct Cosmos.PageRequest", - name: "pagination", - type: "tuple", - }, - ], - name: "getDelegatorValidators", - outputs: [ - { - components: [ - { - internalType: "address", - name: "operatorAddr", - type: "address", - }, - { - internalType: "bytes", - name: "consAddr", - type: "bytes", - }, - { - internalType: "bool", - name: "jailed", - type: "bool", - }, - { - internalType: "string", - name: "status", - type: "string", - }, - { - internalType: "uint256", - name: "tokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "delegatorShares", - type: "uint256", - }, - { - components: [ - { - internalType: "string", - name: "moniker", - type: "string", - }, - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "website", - type: "string", - }, - { - internalType: "string", - name: "securityContact", - type: "string", - }, - { - internalType: "string", - name: "details", - type: "string", - }, - ], - internalType: "struct IStakingModule.Description", - name: "description", - type: "tuple", - }, - { - internalType: "int64", - name: "unbondingHeight", - type: "int64", - }, - { - internalType: "string", - name: "unbondingTime", - type: "string", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "rate", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxRate", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxChangeRate", - type: "uint256", - }, - ], - internalType: "struct IStakingModule.CommissionRates", - name: "commissionRates", - type: "tuple", - }, - { - internalType: "string", - name: "updateTime", - type: "string", - }, - ], - internalType: "struct IStakingModule.Commission", - name: "commission", - type: "tuple", - }, - { - internalType: "uint256", - name: "minSelfDelegation", - type: "uint256", - }, - { - internalType: "int64", - name: "unbondingOnHoldRefCount", - type: "int64", - }, - { - internalType: "uint64[]", - name: "unbondingIds", - type: "uint64[]", - }, - ], - internalType: "struct IStakingModule.Validator[]", - name: "", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "nextKey", - type: "string", - }, - { - internalType: "uint64", - name: "total", - type: "uint64", - }, - ], - internalType: "struct Cosmos.PageResponse", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatorAddress", - type: "address", - }, - { - internalType: "address", - name: "srcValidator", - type: "address", - }, - { - internalType: "address", - name: "dstValidator", - type: "address", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint64", - name: "offset", - type: "uint64", - }, - { - internalType: "uint64", - name: "limit", - type: "uint64", - }, - { - internalType: "bool", - name: "countTotal", - type: "bool", - }, - { - internalType: "bool", - name: "reverse", - type: "bool", - }, - ], - internalType: "struct Cosmos.PageRequest", - name: "pagination", - type: "tuple", - }, - ], - name: "getRedelegations", - outputs: [ - { - components: [ - { - internalType: "int64", - name: "creationHeight", - type: "int64", - }, - { - internalType: "string", - name: "completionTime", - type: "string", - }, - { - internalType: "uint256", - name: "initialBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "sharesDst", - type: "uint256", - }, - { - internalType: "uint64", - name: "unbondingId", - type: "uint64", - }, - ], - internalType: "struct IStakingModule.RedelegationEntry[]", - name: "", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "nextKey", - type: "string", - }, - { - internalType: "uint64", - name: "total", - type: "uint64", - }, - ], - internalType: "struct Cosmos.PageResponse", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "delegatorAddress", - type: "address", - }, - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - ], - name: "getUnbondingDelegation", - outputs: [ - { - components: [ - { - internalType: "int64", - name: "creationHeight", - type: "int64", - }, - { - internalType: "string", - name: "completionTime", - type: "string", - }, - { - internalType: "uint256", - name: "initialBalance", - type: "uint256", - }, - { - internalType: "uint256", - name: "balance", - type: "uint256", - }, - { - internalType: "uint64", - name: "unbondingId", - type: "uint64", - }, - ], - internalType: "struct IStakingModule.UnbondingDelegationEntry[]", - name: "", - type: "tuple[]", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - ], - name: "getValidator", - outputs: [ - { - components: [ - { - internalType: "address", - name: "operatorAddr", - type: "address", - }, - { - internalType: "bytes", - name: "consAddr", - type: "bytes", - }, - { - internalType: "bool", - name: "jailed", - type: "bool", - }, - { - internalType: "string", - name: "status", - type: "string", - }, - { - internalType: "uint256", - name: "tokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "delegatorShares", - type: "uint256", - }, - { - components: [ - { - internalType: "string", - name: "moniker", - type: "string", - }, - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "website", - type: "string", - }, - { - internalType: "string", - name: "securityContact", - type: "string", - }, - { - internalType: "string", - name: "details", - type: "string", - }, - ], - internalType: "struct IStakingModule.Description", - name: "description", - type: "tuple", - }, - { - internalType: "int64", - name: "unbondingHeight", - type: "int64", - }, - { - internalType: "string", - name: "unbondingTime", - type: "string", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "rate", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxRate", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxChangeRate", - type: "uint256", - }, - ], - internalType: "struct IStakingModule.CommissionRates", - name: "commissionRates", - type: "tuple", - }, - { - internalType: "string", - name: "updateTime", - type: "string", - }, - ], - internalType: "struct IStakingModule.Commission", - name: "commission", - type: "tuple", - }, - { - internalType: "uint256", - name: "minSelfDelegation", - type: "uint256", - }, - { - internalType: "int64", - name: "unbondingOnHoldRefCount", - type: "int64", - }, - { - internalType: "uint64[]", - name: "unbondingIds", - type: "uint64[]", - }, - ], - internalType: "struct IStakingModule.Validator", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint64", - name: "offset", - type: "uint64", - }, - { - internalType: "uint64", - name: "limit", - type: "uint64", - }, - { - internalType: "bool", - name: "countTotal", - type: "bool", - }, - { - internalType: "bool", - name: "reverse", - type: "bool", - }, - ], - internalType: "struct Cosmos.PageRequest", - name: "pagination", - type: "tuple", - }, - ], - name: "getValidatorDelegations", - outputs: [ - { - components: [ - { - internalType: "address", - name: "delegator", - type: "address", - }, - { - internalType: "uint256", - name: "balance", - type: "uint256", - }, - { - internalType: "uint256", - name: "shares", - type: "uint256", - }, - ], - internalType: "struct IStakingModule.Delegation[]", - name: "", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "nextKey", - type: "string", - }, - { - internalType: "uint64", - name: "total", - type: "uint64", - }, - ], - internalType: "struct Cosmos.PageResponse", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - components: [ - { - internalType: "string", - name: "key", - type: "string", - }, - { - internalType: "uint64", - name: "offset", - type: "uint64", - }, - { - internalType: "uint64", - name: "limit", - type: "uint64", - }, - { - internalType: "bool", - name: "countTotal", - type: "bool", - }, - { - internalType: "bool", - name: "reverse", - type: "bool", - }, - ], - internalType: "struct Cosmos.PageRequest", - name: "pagination", - type: "tuple", - }, - ], - name: "getValidators", - outputs: [ - { - components: [ - { - internalType: "address", - name: "operatorAddr", - type: "address", - }, - { - internalType: "bytes", - name: "consAddr", - type: "bytes", - }, - { - internalType: "bool", - name: "jailed", - type: "bool", - }, - { - internalType: "string", - name: "status", - type: "string", - }, - { - internalType: "uint256", - name: "tokens", - type: "uint256", - }, - { - internalType: "uint256", - name: "delegatorShares", - type: "uint256", - }, - { - components: [ - { - internalType: "string", - name: "moniker", - type: "string", - }, - { - internalType: "string", - name: "identity", - type: "string", - }, - { - internalType: "string", - name: "website", - type: "string", - }, - { - internalType: "string", - name: "securityContact", - type: "string", - }, - { - internalType: "string", - name: "details", - type: "string", - }, - ], - internalType: "struct IStakingModule.Description", - name: "description", - type: "tuple", - }, - { - internalType: "int64", - name: "unbondingHeight", - type: "int64", - }, - { - internalType: "string", - name: "unbondingTime", - type: "string", - }, - { - components: [ - { - components: [ - { - internalType: "uint256", - name: "rate", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxRate", - type: "uint256", - }, - { - internalType: "uint256", - name: "maxChangeRate", - type: "uint256", - }, - ], - internalType: "struct IStakingModule.CommissionRates", - name: "commissionRates", - type: "tuple", - }, - { - internalType: "string", - name: "updateTime", - type: "string", - }, - ], - internalType: "struct IStakingModule.Commission", - name: "commission", - type: "tuple", - }, - { - internalType: "uint256", - name: "minSelfDelegation", - type: "uint256", - }, - { - internalType: "int64", - name: "unbondingOnHoldRefCount", - type: "int64", - }, - { - internalType: "uint64[]", - name: "unbondingIds", - type: "uint64[]", - }, - ], - internalType: "struct IStakingModule.Validator[]", - name: "", - type: "tuple[]", - }, - { - components: [ - { - internalType: "string", - name: "nextKey", - type: "string", - }, - { - internalType: "uint64", - name: "total", - type: "uint64", - }, - ], - internalType: "struct Cosmos.PageResponse", - name: "", - type: "tuple", - }, - ], - stateMutability: "view", - type: "function", - }, - { - inputs: [ - { - internalType: "address", - name: "validatorAddress", - type: "address", - }, - { - internalType: "uint256", - name: "amount", - type: "uint256", - }, - ], - name: "undelegate", - outputs: [ - { - internalType: "bool", - name: "", - type: "bool", - }, - ], - stateMutability: "payable", - type: "function", - }, - { - inputs: [ - { - internalType: "bytes", - name: "consAddr", - type: "bytes", - }, - ], - name: "valAddressFromConsAddress", - outputs: [ - { - internalType: "address", - name: "", - type: "address", - }, - ], - stateMutability: "pure", - type: "function", - }, -]; From 922a9f233b5461737399b2f7f396c6078590ef05 Mon Sep 17 00:00:00 2001 From: bearpong <178402093+bearpong@users.noreply.github.com> Date: Fri, 29 Nov 2024 14:01:18 +0100 Subject: [PATCH 17/19] feat: getTokens filter out tokens with different chain id in default list --- packages/berajs/src/actions/dex/getTokens.ts | 20 +++++++++++++++----- secrets | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/berajs/src/actions/dex/getTokens.ts b/packages/berajs/src/actions/dex/getTokens.ts index 311974fc8..20f0260ea 100755 --- a/packages/berajs/src/actions/dex/getTokens.ts +++ b/packages/berajs/src/actions/dex/getTokens.ts @@ -1,3 +1,5 @@ +import { chainId } from "@bera/config"; + import { BeraConfig } from "../../types"; import { Token } from "../../types/dex"; @@ -46,13 +48,19 @@ export const getTokens = async ({ featuredTokenList: [], tokenDictionary: {}, }; - const defaultList = temp.tokens.map((token: any) => { - return { ...token, default: true }; - }); + const defaultList = temp.tokens + .filter( + (token: any) => + !token.chainId || Number(token.chainId) === Number(chainId), + ) + .map((token: any) => { + return { ...token, default: true }; + }); + + const isFeatured = (tag: string) => tag === "featured"; - const defaultFeaturedList = temp.tokens + const defaultFeaturedList = defaultList .filter((token: any) => { - const isFeatured = (tag: string) => tag === "featured"; return token.tags.some(isFeatured); }) .map((token: any) => { @@ -66,6 +74,8 @@ export const getTokens = async ({ list.findIndex((i) => i.address === item.address) === index, ); + console.log({ uniqueList, temp, defaultList, defaultFeaturedList }); + return { tokenList: uniqueList, customTokenList: [...(externalList ?? [])], diff --git a/secrets b/secrets index 949c389a9..c707fec1d 160000 --- a/secrets +++ b/secrets @@ -1 +1 @@ -Subproject commit 949c389a9e63def706d573fc2083de3738747031 +Subproject commit c707fec1dbe6c9ac25acad97c86a096ca7fcb91b From df930d189f67dac7c834c2ba1c399f1e627a479e Mon Sep 17 00:00:00 2001 From: bearpong <178402093+bearpong@users.noreply.github.com> Date: Fri, 29 Nov 2024 15:57:37 +0100 Subject: [PATCH 18/19] ci: pauses ipfs deploy --- .github/workflows/ipfs-deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ipfs-deploy.yml b/.github/workflows/ipfs-deploy.yml index 24b9c1694..12586bb19 100644 --- a/.github/workflows/ipfs-deploy.yml +++ b/.github/workflows/ipfs-deploy.yml @@ -1,8 +1,8 @@ name: Deploy on Fleek on: - push: - branches: [ "v2" ] + # push: + # branches: [ "v2" ] workflow_dispatch: jobs: From da34e879ece31c6aba34d71d05dd5aaa357ddea9 Mon Sep 17 00:00:00 2001 From: bearpong <178402093+bearpong@users.noreply.github.com> Date: Fri, 29 Nov 2024 16:39:50 +0100 Subject: [PATCH 19/19] ci: supports new env --- .github/workflows/ipfs-deploy.yml | 7 ++----- .github/workflows/ipfs-static-build-test.yml | 7 ++----- package.json | 4 ++-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ipfs-deploy.yml b/.github/workflows/ipfs-deploy.yml index 12586bb19..74653bde2 100644 --- a/.github/workflows/ipfs-deploy.yml +++ b/.github/workflows/ipfs-deploy.yml @@ -32,14 +32,11 @@ jobs: node-version: 18.18.2 cache: 'pnpm' - - name: Install dependencies - run: pnpm install + - name: Install + run: bash ./.scripts/vercel-install.sh ${{ secrets.ENV_NAME }} - name: Install Fleek CLI run: pnpm i -g @fleek-platform/cli@3.5.2 - - - name: Set environment variables - run: pnpm setenv:bartio - name: Build all projects env: diff --git a/.github/workflows/ipfs-static-build-test.yml b/.github/workflows/ipfs-static-build-test.yml index 0104dd37c..f84a6d7ae 100644 --- a/.github/workflows/ipfs-static-build-test.yml +++ b/.github/workflows/ipfs-static-build-test.yml @@ -27,12 +27,9 @@ jobs: with: node-version: 18.18.2 cache: 'pnpm' - - - name: Install dependencies - run: pnpm install - - name: Set environment variables - run: pnpm setenv:bartio + - name: Install + run: bash ./.scripts/vercel-install.sh ${{ secrets.ENV_NAME }} - name: Build all projects env: diff --git a/package.json b/package.json index 9e1a4d34f..a8780c50b 100755 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "setenv:artio": "pnpm run setenv artio", "setenv:bartio": "pnpm run setenv bartio", "dev": "turbo dev --concurrency=20", - "build:ipfs": "NEXT_PUBLIC_HOST=ipfs turbo build --filter=hub --filter=honey --filter=bend --filter='./packages/*' --concurrency=20", + "build:ipfs": "NEXT_PUBLIC_HOST=ipfs turbo build --filter=hub --filter=honey --filter='./packages/*' --concurrency=20", "build:hub": "turbo build --filter=hub --filter='./packages/*' --concurrency=20", "build:honey": "turbo build --filter=honey --filter='./packages/*' --concurrency=20", "build:storybook": "turbo build --filter=storybook --filter='./packages/*' --concurrency=20 --filter='!b-sdk'", @@ -29,7 +29,7 @@ "dev:perp": "turbo dev --filter=perp --filter='./packages/*' --concurrency=20", "dev:docs": "turbo dev --filter=berajs-docs --filter='./packages/*' --concurrency=20", "check-types": "turbo check-types", - "lint": "biome lint . ", + "lint": "biome lint .", "format:check": "biome format .", "format": "biome format --write .", "postformat": "cd ./packages/b-sdk && pnpm format",