diff --git a/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.json b/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.json new file mode 100644 index 0000000..c090a35 --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/new-block-specimen-proof.abi.json @@ -0,0 +1,956 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "threshold", + "type": "uint64" + } + ], + "name": "BlockHeightSubmissionThresholdChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "specimenHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "storageURL", + "type": "string" + } + ], + "name": "BlockSpecimenProductionProofSubmitted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorBitMap", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "specimenHash", + "type": "bytes32" + } + ], + "name": "BlockSpecimenQuorum", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "newBlockSpecimenRewardAllocation", + "type": "uint128" + } + ], + "name": "BlockSpecimenRewardChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockOnTargetChain", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockOnCurrentChain", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "secondsPerBlockTargetChain", + "type": "uint256" + } + ], + "name": "ChainSyncDataChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxSubmissions", + "type": "uint256" + } + ], + "name": "MaxSubmissionsPerBlockHeightChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "newStakeRequirement", + "type": "uint128" + } + ], + "name": "MinimumRequiredStakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "nthBlock", + "type": "uint64" + } + ], + "name": "NthBlockChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "OperatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "activeOperatorCount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "OperatorRemoved", + "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": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + } + ], + "name": "QuorumNotReached", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "secondsPerBlockCurrentChain", + "type": "uint64" + } + ], + "name": "SecondsPerBlockCurrentChainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint64", + "name": "chainId", + "type": "uint64" + }, + { + "indexed": true, + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { + "indexed": false, + "internalType": "uint64", + "name": "deadline", + "type": "uint64" + } + ], + "name": "SessionStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "newSessionDuration", + "type": "uint64" + } + ], + "name": "SpecimenSessionDurationChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "minSubmissions", + "type": "uint64" + } + ], + "name": "SpecimenSessionMinSubmissionChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "newQuorumThreshold", + "type": "uint256" + } + ], + "name": "SpecimenSessionQuorumChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "newStakingManager", + "type": "address" + } + ], + "name": "StakingManagerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "ValidatorDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "ValidatorEnabled", + "type": "event" + }, + { + "inputs": [], + "name": "AUDITOR_ROLE", + "outputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "BLOCK_SPECIMEN_PRODUCER_ROLE", + "outputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "GOVERNANCE_ROLE", + "outputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "auditor", "type": "address" } + ], + "name": "addAuditor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "addBSPOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "governor", "type": "address" } + ], + "name": "addGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "disableValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "enableValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + } + ], + "name": "finalizeSpecimenSession", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllOperators", + "outputs": [ + { + "internalType": "address[]", + "name": "_bsps", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "__governors", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "__auditors", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getBSPRoleData", + "outputs": [ + { + "internalType": "uint128", + "name": "requiredStake", + "type": "uint128" + }, + { + "internalType": "address[]", + "name": "activeMembers", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" } + ], + "name": "getChainData", + "outputs": [ + { + "internalType": "uint256", + "name": "blockOnTargetChain", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockOnCurrentChain", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "secondsPerBlockTargetChain", + "type": "uint256" + }, + { + "internalType": "uint128", + "name": "allowedThreshold", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "maxSubmissionsPerBlockHeight", + "type": "uint128" + }, + { "internalType": "uint64", "name": "nthBlock", "type": "uint64" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getEnabledOperatorCount", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMetadata", + "outputs": [ + { + "internalType": "address", + "name": "stakingManager", + "type": "address" + }, + { + "internalType": "uint128", + "name": "blockSpecimenRewardAllocation", + "type": "uint128" + }, + { + "internalType": "uint64", + "name": "blockSpecimenSessionDuration", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "minSubmissionsRequired", + "type": "uint64" + }, + { + "internalType": "uint256", + "name": "blockSpecimenQuorum", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "secondsPerBlockCurrentChain", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getOperators", + "outputs": [ + { "internalType": "address[]", "name": "", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "specimenhash", + "type": "bytes32" + } + ], + "name": "getURLS", + "outputs": [ + { "internalType": "string[]", "name": "", "type": "string[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "initialGovernor", + "type": "address" + }, + { + "internalType": "address", + "name": "stakingManager", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "operator", "type": "address" } + ], + "name": "isEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { "internalType": "address", "name": "operator", "type": "address" } + ], + "name": "isSessionOpen", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "isValidatorEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "operatorRoles", + "outputs": [ + { "internalType": "bytes32", "name": "", "type": "bytes32" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "auditor", "type": "address" } + ], + "name": "removeAuditor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "operator", "type": "address" } + ], + "name": "removeBSPOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "governor", "type": "address" } + ], + "name": "removeGovernor", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { "internalType": "uint64", "name": "threshold", "type": "uint64" } + ], + "name": "setBlockHeightSubmissionsThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "newBlockSpecimenReward", + "type": "uint128" + } + ], + "name": "setBlockSpecimenReward", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "newSessionDuration", + "type": "uint64" + } + ], + "name": "setBlockSpecimenSessionDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { + "internalType": "uint256", + "name": "blockOnTargetChain", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "blockOnCurrentChain", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "secondsPerBlockTargetChain", + "type": "uint256" + } + ], + "name": "setChainSyncData", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { + "internalType": "uint64", + "name": "maxSubmissions", + "type": "uint64" + } + ], + "name": "setMaxSubmissionsPerBlockHeight", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "minSubmissions", + "type": "uint64" + } + ], + "name": "setMinSubmissionsRequired", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { "internalType": "uint64", "name": "n", "type": "uint64" } + ], + "name": "setNthBlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "quorum", "type": "uint256" } + ], + "name": "setQuorumThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "secondsPerBlockCurrentChain", + "type": "uint64" + } + ], + "name": "setSecondsPerBlockCurrentChain", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "stakingManagerAddress", + "type": "address" + } + ], + "name": "setStakingManagerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint64", "name": "chainId", "type": "uint64" }, + { + "internalType": "uint64", + "name": "blockHeight", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "specimenHash", + "type": "bytes32" + }, + { "internalType": "string", "name": "storageURL", "type": "string" } + ], + "name": "submitBlockSpecimenProof", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "validatorIDs", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.json b/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.json new file mode 100644 index 0000000..50c87c4 --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/new-operational-staking.abi.json @@ -0,0 +1,1572 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "AllocatedTokensTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "CommissionRewardRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "DelegatorMinStakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "DelegatorUnstakeCooldownChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "cqt", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorCoolDown", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "delegatorCoolDown", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "recoverUnstakingCoolDown", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "maxCapMultiplier", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorMaxStake", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorEnableMinStake", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "delegatorMinStake", + "type": "uint128" + } + ], + "name": "InitializedSemantics", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "newMaxCapMultiplier", + "type": "uint128" + } + ], + "name": "MaxCapMultiplierChanged", + "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": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RecoverUnstakeCooldownChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "RecoveredUnstake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldValidatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newValidatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "Redelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueValidatorDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueValidatorFrozen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueZeroStake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardTokensDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "rewardId", + "type": "uint128" + } + ], + "name": "RewardsDisbursed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationalManager", + "type": "address" + } + ], + "name": "StakingManagerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "unstakeId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "UnstakeRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "unstakeId", + "type": "uint128" + } + ], + "name": "Unstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "id", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "commissionRate", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "ValidatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "ValidatorAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorCommissionRateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "ValidatorDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorEnableMinStakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "ValidatorEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "ValidatorFrozen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorMaxCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "ValidatorUnfrozen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorUnstakeCooldownChanged", + "type": "event" + }, + { + "inputs": [], + "name": "CQT", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_DELEGATOR_MIN_STAKE", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_VALIDATOR_ENABLE_MIN_STAKE", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DIVIDER", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REWARD_REDEEM_THRESHOLD", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "internalType": "uint128", + "name": "commissionRate", + "type": "uint128" + } + ], + "name": "addValidator", + "outputs": [ + { "internalType": "uint256", "name": "id", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "checkDelegatorExists", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delegatorCoolDown", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delegatorMinStake", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "depositRewardTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "disableValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "enableValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "string", "name": "reason", "type": "string" } + ], + "name": "freezeValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllValidatorsMetadata", + "outputs": [ + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint128[]", + "name": "staked", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "delegated", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "commissionRates", + "type": "uint128[]" + }, + { + "internalType": "uint256[]", + "name": "disabledAtBlocks", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getDelegatorMetadata", + "outputs": [ + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { "internalType": "uint128", "name": "rewards", "type": "uint128" }, + { + "internalType": "uint128", + "name": "commissionEarned", + "type": "uint128" + }, + { + "internalType": "uint128[]", + "name": "unstakingAmounts", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "unstakingsEndEpochs", + "type": "uint128[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + } + ], + "name": "getDelegatorTotalLocked", + "outputs": [ + { + "internalType": "uint128", + "name": "totalValueLocked", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMetadata", + "outputs": [ + { + "internalType": "address", + "name": "CQTaddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakingManager", + "type": "address" + }, + { + "internalType": "uint128", + "name": "_validatorsN", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_rewardPool", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_validatorCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_delegatorCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_recoverUnstakingCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_maxCapMultiplier", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_validatorMaxStake", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_validatorEnableMinStake", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_delegatorMinStake", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getValidatorCompoundedStakingData", + "outputs": [ + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "delegated", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getValidatorMetadata", + "outputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "delegated", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "commissionRate", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "disabledAtBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getValidatorStakingData", + "outputs": [ + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "delegated", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getValidatorsCompoundedStakes", + "outputs": [ + { + "internalType": "uint128[]", + "name": "validatorIds", + "type": "uint128[]" + }, + { + "internalType": "bool[]", + "name": "isEnableds", + "type": "bool[]" + }, + { + "internalType": "uint128[]", + "name": "cstaked", + "type": "uint128[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "startId", "type": "uint128" }, + { "internalType": "uint128", "name": "endId", "type": "uint128" } + ], + "name": "getValidatorsMetadata", + "outputs": [ + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint128[]", + "name": "staked", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "delegated", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "commissionRates", + "type": "uint128[]" + }, + { + "internalType": "uint256[]", + "name": "disabledAtBlocks", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "cqt", "type": "address" }, + { + "internalType": "uint128", + "name": "dCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "vCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "rCoolDown", + "type": "uint128" + }, + { "internalType": "uint128", "name": "maxCapM", "type": "uint128" }, + { + "internalType": "uint128", + "name": "vMaxStake", + "type": "uint128" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "isValidatorEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxCapMultiplier", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "recoverUnstaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "recoverUnstakingCoolDown", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + } + ], + "name": "redeemAllCommission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + } + ], + "name": "redeemAllRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "redeemCommission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "redeemRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" }, + { + "internalType": "uint128", + "name": "oldValidatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "newValidatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "redelegateUnstaked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPool", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "rewardId", + "type": "uint128" + }, + { "internalType": "uint128[]", "name": "ids", "type": "uint128[]" }, + { + "internalType": "uint128[]", + "name": "amounts", + "type": "uint128[]" + } + ], + "name": "rewardValidators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "coolDown", "type": "uint128" } + ], + "name": "setDelegatorCoolDown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "minStake", "type": "uint128" } + ], + "name": "setDelegatorMinStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "newMaxCapMultiplier", + "type": "uint128" + } + ], + "name": "setMaxCapMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "coolDown", "type": "uint128" } + ], + "name": "setRecoverUnstakingCoolDown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "setStakingManagerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "setValidatorAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "setValidatorCommissionRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "coolDown", "type": "uint128" } + ], + "name": "setValidatorCoolDown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "minStake", "type": "uint128" } + ], + "name": "setValidatorEnableMinStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "maxStake", "type": "uint128" } + ], + "name": "setValidatorMaxStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingManager", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "takeOutRewardTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "transferUnstakedOut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "unfreezeValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "unstakeAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "validatorCoolDown", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorEnableMinStake", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorMaxStake", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorsN", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/services/decoder/protocols/covalent-network/abis/transparent-upgradeable-proxy.abi.json b/services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.json similarity index 100% rename from services/decoder/protocols/covalent-network/abis/transparent-upgradeable-proxy.abi.json rename to services/decoder/protocols/covalent-network/abis/old-block-specimen-proof.abi.json diff --git a/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.json b/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.json new file mode 100644 index 0000000..f8fd012 --- /dev/null +++ b/services/decoder/protocols/covalent-network/abis/old-operational-staking.abi.json @@ -0,0 +1,1488 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "AllocatedTokensTaken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "CommissionRewardRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "DelegatorMinStakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "DelegatorUnstakeCooldownChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "cqt", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorCoolDown", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "delegatorCoolDown", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "maxCapMultiplier", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorMaxStake", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "validatorEnableMinStake", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "delegatorMinStake", + "type": "uint128" + } + ], + "name": "InitializedSemantics", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "newMaxCapMultiplier", + "type": "uint128" + } + ], + "name": "MaxCapMultiplierChanged", + "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": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "RecoveredUnstake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "oldValidatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "newValidatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "Redelegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueLowPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueValidatorDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueValidatorFrozen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardFailedDueZeroStake", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "RewardTokensDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "Staked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operationalManager", + "type": "address" + } + ], + "name": "StakingManagerAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint128", + "name": "unstakeId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "UnstakeRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "unstakeId", + "type": "uint128" + } + ], + "name": "Unstaked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "id", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "commissionRate", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "validator", + "type": "address" + } + ], + "name": "ValidatorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "ValidatorAddressChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorCommissionRateChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "ValidatorDisabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorEnableMinStakeChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "ValidatorEnabled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "ValidatorFrozen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorMaxCapChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "ValidatorUnfrozen", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint128", + "name": "amount", + "type": "uint128" + } + ], + "name": "ValidatorUnstakeCooldownChanged", + "type": "event" + }, + { + "inputs": [], + "name": "CQT", + "outputs": [ + { + "internalType": "contract IERC20Upgradeable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "CURRENT_MIGRATION_STEPPING", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_DELEGATOR_MIN_STAKE", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_VALIDATOR_ENABLE_MIN_STAKE", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DIVIDER", + "outputs": [ + { "internalType": "uint256", "name": "", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REWARD_REDEEM_THRESHOLD", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "validator", + "type": "address" + }, + { + "internalType": "uint128", + "name": "commissionRate", + "type": "uint128" + } + ], + "name": "addValidator", + "outputs": [ + { "internalType": "uint256", "name": "id", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "delegatorCoolDown", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "delegatorMinStake", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "depositRewardTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "disableValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "enableValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "string", "name": "reason", "type": "string" } + ], + "name": "freezeValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getAllValidatorsMetadata", + "outputs": [ + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint128[]", + "name": "staked", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "delegated", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "commissionRates", + "type": "uint128[]" + }, + { + "internalType": "uint256[]", + "name": "disabledAtBlocks", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getDelegatorMetadata", + "outputs": [ + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { "internalType": "uint128", "name": "rewards", "type": "uint128" }, + { + "internalType": "uint128", + "name": "commissionEarned", + "type": "uint128" + }, + { + "internalType": "uint128[]", + "name": "unstakingAmounts", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "unstakingsEndEpochs", + "type": "uint128[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMetadata", + "outputs": [ + { + "internalType": "address", + "name": "CQTaddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakingManager", + "type": "address" + }, + { + "internalType": "uint128", + "name": "_validatorsN", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_rewardPool", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_validatorCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_delegatorCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_maxCapMultiplier", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "_validatorMaxStake", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getValidatorCompoundedStakingData", + "outputs": [ + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "delegated", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getValidatorMetadata", + "outputs": [ + { + "internalType": "address", + "name": "_address", + "type": "address" + }, + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "delegated", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "commissionRate", + "type": "uint128" + }, + { + "internalType": "uint256", + "name": "disabledAtBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "getValidatorStakingData", + "outputs": [ + { "internalType": "uint128", "name": "staked", "type": "uint128" }, + { + "internalType": "uint128", + "name": "delegated", + "type": "uint128" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "startId", "type": "uint128" }, + { "internalType": "uint128", "name": "endId", "type": "uint128" } + ], + "name": "getValidatorsMetadata", + "outputs": [ + { + "internalType": "address[]", + "name": "addresses", + "type": "address[]" + }, + { + "internalType": "uint128[]", + "name": "staked", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "delegated", + "type": "uint128[]" + }, + { + "internalType": "uint128[]", + "name": "commissionRates", + "type": "uint128[]" + }, + { + "internalType": "uint256[]", + "name": "disabledAtBlocks", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "cqt", "type": "address" }, + { + "internalType": "uint128", + "name": "dCoolDown", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "vCoolDown", + "type": "uint128" + }, + { "internalType": "uint128", "name": "maxCapM", "type": "uint128" }, + { + "internalType": "uint128", + "name": "vMaxStake", + "type": "uint128" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "isValidatorEnabled", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxCapMultiplier", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "goalStepping", + "type": "uint256" + } + ], + "name": "migrateTo", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "recoverUnstaking", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + } + ], + "name": "redeemAllCommission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + } + ], + "name": "redeemAllRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "redeemCommission", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "beneficiary", + "type": "address" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "redeemRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" }, + { + "internalType": "uint128", + "name": "oldValidatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "newValidatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "redelegateUnstaked", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPool", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128[]", "name": "ids", "type": "uint128[]" }, + { + "internalType": "uint128[]", + "name": "amounts", + "type": "uint128[]" + } + ], + "name": "rewardValidators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "coolDown", "type": "uint128" } + ], + "name": "setDelegatorCoolDown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "minStake", "type": "uint128" } + ], + "name": "setDelegatorMinStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "newMaxCapMultiplier", + "type": "uint128" + } + ], + "name": "setMaxCapMultiplier", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "setStakingManagerAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "setValidatorAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "setValidatorCommissionRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "coolDown", "type": "uint128" } + ], + "name": "setValidatorCoolDown", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "minStake", "type": "uint128" } + ], + "name": "setValidatorEnableMinStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "maxStake", "type": "uint128" } + ], + "name": "setValidatorMaxStake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "stake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "stakingManager", + "outputs": [ + { "internalType": "address", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "takeOutRewardTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint128", "name": "amount", "type": "uint128" }, + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { + "internalType": "uint128", + "name": "unstakingId", + "type": "uint128" + } + ], + "name": "transferUnstakedOut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "unfreezeValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + }, + { "internalType": "uint128", "name": "amount", "type": "uint128" } + ], + "name": "unstake", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint128", + "name": "validatorId", + "type": "uint128" + } + ], + "name": "unstakeAll", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "validatorCoolDown", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorEnableMinStake", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorMaxStake", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorsN", + "outputs": [ + { "internalType": "uint128", "name": "", "type": "uint128" } + ], + "stateMutability": "view", + "type": "function" + } +] diff --git a/services/decoder/protocols/covalent-network/covalent-network.configs.ts b/services/decoder/protocols/covalent-network/covalent-network.configs.ts index 4d67cd5..aee794c 100644 --- a/services/decoder/protocols/covalent-network/covalent-network.configs.ts +++ b/services/decoder/protocols/covalent-network/covalent-network.configs.ts @@ -7,6 +7,24 @@ const configs: Configs = [ is_factory: false, chain_name: "moonbeam-mainnet", }, + { + protocol_name: "covalent-network", + address: "0x7487b04899c2572a223a8c6ec9ba919e27bbcd36", + is_factory: false, + chain_name: "moonbeam-mainnet", + }, + { + protocol_name: "covalent-network", + address: "0x8ebba081291b908096d19f6614df041c95fc4469", + is_factory: false, + chain_name: "moonbeam-mainnet", + }, + { + protocol_name: "covalent-network", + address: "0xfe97b0C517a84F98fc6eDe3CD26B43012d31992a", + is_factory: false, + chain_name: "eth-mainnet", + }, ]; export default configs; diff --git a/services/decoder/protocols/covalent-network/covalent-network.decoders.ts b/services/decoder/protocols/covalent-network/covalent-network.decoders.ts index 189bbf0..937e540 100644 --- a/services/decoder/protocols/covalent-network/covalent-network.decoders.ts +++ b/services/decoder/protocols/covalent-network/covalent-network.decoders.ts @@ -1,16 +1,21 @@ import { GoldRushDecoder } from "../../decoder"; -import { type EventType } from "../../decoder.types"; +import { type EventTokens, type EventType } from "../../decoder.types"; import { DECODED_ACTION, DECODED_EVENT_CATEGORY, } from "../../decoder.constants"; import { decodeEventLog, type Abi } from "viem"; -import TransparentUpgradeableProxyABI from "./abis/transparent-upgradeable-proxy.abi.json"; +import OldBlockSpecimenProofABI from "./abis/old-block-specimen-proof.abi.json"; +import NewBlockSpecimenProofABI from "./abis/new-block-specimen-proof.abi.json"; +import OldOperationalStakingABI from "./abis/old-operational-staking.abi.json"; +import NewOperationalStakingABI from "./abis/new-operational-staking.abi.json"; +import { timestampParser } from "../../../../utils/functions"; +import { prettifyCurrency } from "@covalenthq/client-sdk"; GoldRushDecoder.on( "covalent-network:BlockSpecimenProductionProofSubmitted", ["moonbeam-mainnet"], - TransparentUpgradeableProxyABI as Abi, + OldBlockSpecimenProofABI as Abi, async ( log_event, tx, @@ -21,7 +26,7 @@ GoldRushDecoder.on( const { raw_log_data, raw_log_topics } = log_event; const { args: decoded } = decodeEventLog({ - abi: TransparentUpgradeableProxyABI, + abi: OldBlockSpecimenProofABI, topics: raw_log_topics as [], data: raw_log_data as `0x${string}`, eventName: "BlockSpecimenProductionProofSubmitted", @@ -68,3 +73,391 @@ GoldRushDecoder.on( }; } ); + +GoldRushDecoder.on( + "covalent-network:Unstaked", + ["moonbeam-mainnet"], + OldOperationalStakingABI as Abi, + async ( + log_event, + tx, + chain_name, + covalent_client, + options + ): Promise => { + const { block_signed_at, raw_log_data, raw_log_topics } = log_event; + + const { args: decoded } = decodeEventLog({ + abi: OldOperationalStakingABI, + topics: raw_log_topics as [], + data: raw_log_data as `0x${string}`, + eventName: "Unstaked", + }) as { + eventName: "Unstaked"; + args: { + validatorId: bigint; + delegator: string; + amount: bigint; + unstakeId: bigint; + }; + }; + + const date = timestampParser(block_signed_at, "YYYY-MM-DD"); + const { data } = await covalent_client.PricingService.getTokenPrices( + chain_name, + "USD", + "0xbe4c130aaff02ee7c723351b7d8c2b6da1d22ebd", + { + from: date, + to: date, + } + ); + const tokens: EventTokens = [ + { + heading: "Amount", + value: decoded.amount.toString(), + decimals: data?.[0]?.contract_decimals ?? 18, + pretty_quote: prettifyCurrency( + data?.[0]?.items?.[0]?.price * + (Number(decoded.amount) / + Math.pow( + 10, + data?.[0]?.items?.[0]?.contract_metadata + ?.contract_decimals ?? 18 + )) + ), + ticker_symbol: data?.[0]?.contract_ticker_symbol, + ticker_logo: data?.[0]?.logo_urls?.token_logo_url, + }, + ]; + + return { + action: DECODED_ACTION.APPROVAL, + category: DECODED_EVENT_CATEGORY.OTHERS, + name: "Unstaked", + protocol: { + logo: log_event.sender_logo_url as string, + name: "Covalent Network", + }, + ...(options.raw_logs ? { raw_log: log_event } : {}), + details: [ + { + heading: "Delegator", + type: "address", + value: decoded.delegator, + }, + { + heading: "Validator ID", + type: "text", + value: decoded.validatorId.toLocaleString(), + }, + { + heading: "Unstake ID", + type: "text", + value: decoded.unstakeId.toLocaleString(), + }, + ], + tokens, + }; + } +); + +GoldRushDecoder.on( + "covalent-network:RewardRedeemed", + ["moonbeam-mainnet"], + OldOperationalStakingABI as Abi, + async ( + log_event, + tx, + chain_name, + covalent_client, + options + ): Promise => { + const { block_signed_at, raw_log_data, raw_log_topics } = log_event; + + const { args: decoded } = decodeEventLog({ + abi: OldOperationalStakingABI, + topics: raw_log_topics as [], + data: raw_log_data as `0x${string}`, + eventName: "RewardRedeemed", + }) as { + eventName: "RewardRedeemed"; + args: { + validatorId: bigint; + beneficiary: string; + amount: bigint; + }; + }; + + const date = timestampParser(block_signed_at, "YYYY-MM-DD"); + const { data } = await covalent_client.PricingService.getTokenPrices( + chain_name, + "USD", + "0xbe4c130aaff02ee7c723351b7d8c2b6da1d22ebd", + { + from: date, + to: date, + } + ); + const tokens: EventTokens = [ + { + heading: "Amount", + value: decoded.amount.toString(), + decimals: data?.[0]?.contract_decimals ?? 18, + pretty_quote: prettifyCurrency( + data?.[0]?.items?.[0]?.price * + (Number(decoded.amount) / + Math.pow( + 10, + data?.[0]?.items?.[0]?.contract_metadata + ?.contract_decimals ?? 18 + )) + ), + ticker_symbol: data?.[0]?.contract_ticker_symbol, + ticker_logo: data?.[0]?.logo_urls?.token_logo_url, + }, + ]; + + return { + action: DECODED_ACTION.APPROVAL, + category: DECODED_EVENT_CATEGORY.OTHERS, + name: "Reward Redeemed", + protocol: { + logo: log_event.sender_logo_url as string, + name: "Covalent Network", + }, + ...(options.raw_logs ? { raw_log: log_event } : {}), + details: [ + { + heading: "Delegator", + type: "address", + value: decoded.beneficiary, + }, + { + heading: "Validator ID", + type: "text", + value: decoded.validatorId.toLocaleString(), + }, + ], + tokens, + }; + } +); + +GoldRushDecoder.on( + "covalent-network:CommissionRewardRedeemed", + ["moonbeam-mainnet"], + OldOperationalStakingABI as Abi, + async ( + log_event, + tx, + chain_name, + covalent_client, + options + ): Promise => { + const { block_signed_at, raw_log_data, raw_log_topics } = log_event; + + const { args: decoded } = decodeEventLog({ + abi: OldOperationalStakingABI, + topics: raw_log_topics as [], + data: raw_log_data as `0x${string}`, + eventName: "CommissionRewardRedeemed", + }) as { + eventName: "CommissionRewardRedeemed"; + args: { + validatorId: bigint; + beneficiary: string; + amount: bigint; + }; + }; + + const date = timestampParser(block_signed_at, "YYYY-MM-DD"); + const { data } = await covalent_client.PricingService.getTokenPrices( + chain_name, + "USD", + "0xbe4c130aaff02ee7c723351b7d8c2b6da1d22ebd", + { + from: date, + to: date, + } + ); + const tokens: EventTokens = [ + { + heading: "Amount", + value: decoded.amount.toString(), + decimals: data?.[0]?.contract_decimals ?? 18, + pretty_quote: prettifyCurrency( + data?.[0]?.items?.[0]?.price * + (Number(decoded.amount) / + Math.pow( + 10, + data?.[0]?.items?.[0]?.contract_metadata + ?.contract_decimals ?? 18 + )) + ), + ticker_symbol: data?.[0]?.contract_ticker_symbol, + ticker_logo: data?.[0]?.logo_urls?.token_logo_url, + }, + ]; + + return { + action: DECODED_ACTION.APPROVAL, + category: DECODED_EVENT_CATEGORY.OTHERS, + name: "Commission Reward Redeemed", + protocol: { + logo: log_event.sender_logo_url as string, + name: "Covalent Network", + }, + ...(options.raw_logs ? { raw_log: log_event } : {}), + details: [ + { + heading: "Delegator", + type: "address", + value: decoded.beneficiary, + }, + { + heading: "Validator ID", + type: "text", + value: decoded.validatorId.toLocaleString(), + }, + ], + tokens, + }; + } +); + +GoldRushDecoder.on( + "covalent-network:BlockSpecimenProductionProofSubmitted", + ["moonbeam-mainnet"], + NewBlockSpecimenProofABI as Abi, + async ( + log_event, + tx, + chain_name, + covalent_client, + options + ): Promise => { + const { raw_log_data, raw_log_topics } = log_event; + + const { args: decoded } = decodeEventLog({ + abi: NewBlockSpecimenProofABI, + topics: raw_log_topics as [], + data: raw_log_data as `0x${string}`, + eventName: "BlockSpecimenProductionProofSubmitted", + }) as { + eventName: "BlockSpecimenProductionProofSubmitted"; + args: { + chainId: bigint; + blockHeight: bigint; + blockHash: string; + specimenHash: string; + storageURL: string; + }; + }; + + return { + action: DECODED_ACTION.APPROVAL, + category: DECODED_EVENT_CATEGORY.OTHERS, + name: "Block Specimen Production Proof Submitted", + protocol: { + logo: log_event.sender_logo_url as string, + name: "Covalent Network", + }, + ...(options.raw_logs ? { raw_log: log_event } : {}), + details: [ + { + heading: "Specimen Hash", + value: decoded.specimenHash, + type: "address", + }, + { + heading: "Storage URL", + value: decoded.storageURL, + type: "text", + }, + ], + }; + } +); + +GoldRushDecoder.on( + "covalent-network:Staked", + ["eth-mainnet"], + NewOperationalStakingABI as Abi, + async ( + log_event, + tx, + chain_name, + covalent_client, + options + ): Promise => { + const { block_signed_at, raw_log_data, raw_log_topics } = log_event; + + const { args: decoded } = decodeEventLog({ + abi: NewOperationalStakingABI, + topics: raw_log_topics as [], + data: raw_log_data as `0x${string}`, + eventName: "Staked", + }) as { + eventName: "Staked"; + args: { + validatorId: bigint; + delegator: string; + amount: bigint; + }; + }; + + const date = timestampParser(block_signed_at, "YYYY-MM-DD"); + const { data } = await covalent_client.PricingService.getTokenPrices( + chain_name, + "USD", + "0xd417144312dbf50465b1c641d016962017ef6240", + { + from: date, + to: date, + } + ); + const tokens: EventTokens = [ + { + heading: "Amount", + value: decoded.amount.toString(), + decimals: data?.[0]?.contract_decimals ?? 18, + pretty_quote: prettifyCurrency( + data?.[0]?.items?.[0]?.price * + (Number(decoded.amount) / + Math.pow( + 10, + data?.[0]?.items?.[0]?.contract_metadata + ?.contract_decimals ?? 18 + )) + ), + ticker_symbol: data?.[0]?.contract_ticker_symbol, + ticker_logo: data?.[0]?.logo_urls?.token_logo_url, + }, + ]; + + return { + action: DECODED_ACTION.APPROVAL, + category: DECODED_EVENT_CATEGORY.OTHERS, + name: "Staked", + protocol: { + logo: log_event.sender_logo_url as string, + name: "Covalent Network", + }, + ...(options.raw_logs ? { raw_log: log_event } : {}), + details: [ + { + heading: "Delegator", + type: "address", + value: decoded.delegator, + }, + { + heading: "Validator ID", + type: "text", + value: decoded.validatorId.toLocaleString(), + }, + ], + tokens, + }; + } +); diff --git a/services/decoder/protocols/covalent-network/covalent-network.test.ts b/services/decoder/protocols/covalent-network/covalent-network.test.ts index f41cfd4..0880859 100644 --- a/services/decoder/protocols/covalent-network/covalent-network.test.ts +++ b/services/decoder/protocols/covalent-network/covalent-network.test.ts @@ -12,7 +12,7 @@ describe("covalent-network", () => { .send({ chain_name: "moonbeam-mainnet", tx_hash: - "0x34ff300049313fde3ffb055d4fcbea1257fd8ca341c913033ccff6976eb7b231", + "0x62ca953422e00605ce8561a4cee863e063a892ba69b578875747c4d54f6e353e", }); const { events } = res.body as { events: EventType[] }; const event = events.find( @@ -24,3 +24,116 @@ describe("covalent-network", () => { expect(event.details?.length).toEqual(3); }); }); + +describe("covalent-network", () => { + test("moonbeam-mainnet:Unstaked", async () => { + const res = await request(app) + .post("/api/v1/tx/decode") + .set({ + "x-covalent-api-key": process.env.TEST_COVALENT_API_KEY, + }) + .send({ + chain_name: "moonbeam-mainnet", + tx_hash: + "0x0f165e83c3f353ee14bb78c01f88a0620aa7b4c9de24bb69ba1653ad90fda93d", + }); + const { events } = res.body as { events: EventType[] }; + const event = events.find(({ name }) => name === "Unstaked"); + if (!event) { + throw Error("Event not found"); + } + expect(event.details?.length).toEqual(3); + expect(event.tokens?.length).toEqual(1); + }); +}); + +describe("covalent-network", () => { + test("moonbeam-mainnet:RewardRedeemed", async () => { + const res = await request(app) + .post("/api/v1/tx/decode") + .set({ + "x-covalent-api-key": process.env.TEST_COVALENT_API_KEY, + }) + .send({ + chain_name: "moonbeam-mainnet", + tx_hash: + "0x90a20c7f7d1bfbda38c1532131232ed056cb9ef49ccba8b28498974dd837eed1", + }); + const { events } = res.body as { events: EventType[] }; + const event = events.find(({ name }) => name === "Reward Redeemed"); + if (!event) { + throw Error("Event not found"); + } + expect(event.details?.length).toEqual(2); + expect(event.tokens?.length).toEqual(1); + }); +}); + +describe("covalent-network", () => { + test("moonbeam-mainnet:CommissionRewardRedeemed", async () => { + const res = await request(app) + .post("/api/v1/tx/decode") + .set({ + "x-covalent-api-key": process.env.TEST_COVALENT_API_KEY, + }) + .send({ + chain_name: "moonbeam-mainnet", + tx_hash: + "0x9d0d9ddc5e06aafcd8c1ab6e8b5dc0cb81d4e62a247b2d3e364bcf650ad61594", + }); + const { events } = res.body as { events: EventType[] }; + const event = events.find( + ({ name }) => name === "Commission Reward Redeemed" + ); + if (!event) { + throw Error("Event not found"); + } + expect(event.details?.length).toEqual(2); + expect(event.tokens?.length).toEqual(1); + }); +}); + +describe("covalent-network", () => { + test("moonbeam-mainnet:BlockSpecimenProductionProofSubmitted", async () => { + const res = await request(app) + .post("/api/v1/tx/decode") + .set({ + "x-covalent-api-key": process.env.TEST_COVALENT_API_KEY, + }) + .send({ + chain_name: "moonbeam-mainnet", + tx_hash: + "0x2c601a9a34f906769b241567e6c778920d14c8884740dea31a75de58c22cf663", + }); + const { events } = res.body as { events: EventType[] }; + const event = events.find( + ({ name }) => name === "Block Specimen Production Proof Submitted" + ); + if (!event) { + throw Error("Event not found"); + } + expect(event.details?.length).toEqual(2); + }); +}); + +describe("covalent-network", () => { + test("eth-mainnet:Staked", async () => { + const res = await request(app) + .post("/api/v1/tx/decode") + .set({ + "x-covalent-api-key": process.env.TEST_COVALENT_API_KEY, + }) + .send({ + chain_name: "eth-mainnet", + tx_hash: + "0xd8f4de64159857c609f6ab92a5d6914b149fcd02b49e31839c6cea5d78c1667d", + }); + const { events } = res.body as { events: EventType[] }; + const event = events.find(({ name }) => name === "Staked"); + if (!event) { + throw Error("Event not found"); + } + expect(event.details?.length).toEqual(2); + expect(event.tokens?.length).toEqual(1); + }); +});