diff --git a/.golangci.yml b/.golangci.yml index 15f510047..ed4f24cf0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -13,8 +13,6 @@ linters-settings: - style govet: check-shadowing: true - enable: - - fieldalignment nolintlint: require-explanation: true require-specific: true @@ -33,8 +31,7 @@ linters: - gocritic - gofmt - goimports - - gomnd - - gocyclo + # - gocyclo - gosec - gosimple - govet diff --git a/abis/OperatorRewardsCollector.abi.json b/abis/OperatorRewardsCollector.abi.json index 594208ca2..5794e4c04 100644 --- a/abis/OperatorRewardsCollector.abi.json +++ b/abis/OperatorRewardsCollector.abi.json @@ -1,374 +1,166 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Claimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "DepositedFor", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "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": "staderConfig", - "type": "address" - } - ], - "name": "UpdatedStaderConfig", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "balances", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_receiver", - "type": "address" - } - ], - "name": "depositFor", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "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": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "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" - }, - { - "inputs": [], - "name": "staderConfig", - "outputs": [ - { - "internalType": "contract IStaderConfig", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "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": "_staderConfig", - "type": "address" - } - ], - "name": "updateStaderConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file + { + "inputs": [], + "name": "InsufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "WethTransferFailed", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Claimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "DepositedFor", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staderConfig", + "type": "address" + } + ], + "name": "UpdatedStaderConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "weth", + "type": "address" + } + ], + "name": "UpdatedWethAddress", + "type": "event" + }, + { + "inputs": [], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "claimLiquidation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "claimWithAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_receiver", + "type": "address" + } + ], + "name": "depositFor", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "getBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "withdrawableInEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ] \ No newline at end of file diff --git a/abis/PermissionlessNodeRegistry.abi.json b/abis/PermissionlessNodeRegistry.abi.json index 93f109089..30962b83f 100644 --- a/abis/PermissionlessNodeRegistry.abi.json +++ b/abis/PermissionlessNodeRegistry.abi.json @@ -1,1649 +1,1788 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CallerNotManager", - "type": "error" - }, - { - "inputs": [], - "name": "CallerNotOperator", - "type": "error" - }, - { - "inputs": [], - "name": "CallerNotStaderContract", - "type": "error" - }, - { - "inputs": [], - "name": "CooldownNotComplete", - "type": "error" - }, - { - "inputs": [], - "name": "DuplicatePoolIDOrPoolNotAdded", - "type": "error" - }, - { - "inputs": [], - "name": "InSufficientBalance", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidBondEthValue", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidKeyCount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidStartAndEndIndex", - "type": "error" - }, - { - "inputs": [], - "name": "MisMatchingInputKeysSize", - "type": "error" - }, - { - "inputs": [], - "name": "NoChangeInState", - "type": "error" - }, - { - "inputs": [], - "name": "NotEnoughSDCollateral", - "type": "error" - }, - { - "inputs": [], - "name": "OperatorAlreadyOnBoardedInProtocol", - "type": "error" - }, - { - "inputs": [], - "name": "OperatorIsDeactivate", - "type": "error" - }, - { - "inputs": [], - "name": "OperatorNotOnBoarded", - "type": "error" - }, - { - "inputs": [], - "name": "PageNumberIsZero", - "type": "error" - }, - { - "inputs": [], - "name": "PubkeyAlreadyExist", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyVerifiedKeysReported", - "type": "error" - }, - { - "inputs": [], - "name": "TooManyWithdrawnKeysReported", - "type": "error" - }, - { - "inputs": [], - "name": "TransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "UNEXPECTED_STATUS", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "inputs": [], - "name": "maxKeyLimitReached", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "AddedValidatorKey", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "totalActiveValidatorCount", - "type": "uint256" - } - ], - "name": "DecreasedTotalActiveValidatorCount", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "totalActiveValidatorCount", - "type": "uint256" - } - ], - "name": "IncreasedTotalActiveValidatorCount", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "nodeRewardAddress", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "operatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "optInForSocializingPool", - "type": "bool" - } - ], - "name": "OnboardedOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "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": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TransferredCollateralToPool", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "batchKeyDepositLimit", - "type": "uint256" - } - ], - "name": "UpdatedInputKeyCountLimit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint64", + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CallerNotExistingRewardAddress", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotManager", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotNewRewardAddress", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotOperator", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotStaderContract", + "type": "error" + }, + { + "inputs": [], + "name": "CooldownNotComplete", + "type": "error" + }, + { + "inputs": [], + "name": "DuplicatePoolIDOrPoolNotAdded", + "type": "error" + }, + { + "inputs": [], + "name": "InSufficientBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidBondEthValue", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidKeyCount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidStartAndEndIndex", + "type": "error" + }, + { + "inputs": [], + "name": "MisMatchingInputKeysSize", + "type": "error" + }, + { + "inputs": [], + "name": "NoChangeInState", + "type": "error" + }, + { + "inputs": [], + "name": "NotEnoughSDCollateral", + "type": "error" + }, + { + "inputs": [], + "name": "OperatorAlreadyOnBoardedInProtocol", + "type": "error" + }, + { + "inputs": [], + "name": "OperatorIsDeactivate", + "type": "error" + }, + { + "inputs": [], + "name": "OperatorNotOnBoarded", + "type": "error" + }, + { + "inputs": [], + "name": "PageNumberIsZero", + "type": "error" + }, + { + "inputs": [], + "name": "PubkeyAlreadyExist", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyVerifiedKeysReported", + "type": "error" + }, + { + "inputs": [], + "name": "TooManyWithdrawnKeysReported", + "type": "error" + }, + { + "inputs": [], + "name": "TransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "UNEXPECTED_STATUS", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "maxKeyLimitReached", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "nodeOperator", + "type": "address" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "AddedValidatorKey", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "totalActiveValidatorCount", + "type": "uint256" + } + ], + "name": "DecreasedTotalActiveValidatorCount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "totalActiveValidatorCount", + "type": "uint256" + } + ], + "name": "IncreasedTotalActiveValidatorCount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "nodeOperator", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "nodeRewardAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "operatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "optInForSocializingPool", + "type": "bool" + } + ], + "name": "OnboardedOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "nodeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardAddress", + "type": "address" + } + ], + "name": "OperatorRewardAddressUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "nodeOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "rewardAddress", + "type": "address" + } + ], + "name": "RewardAddressProposed", + "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": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TransferredCollateralToPool", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "batchKeyDepositLimit", + "type": "uint256" + } + ], + "name": "UpdatedInputKeyCountLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "maxNonTerminalKeyPerOperator", + "type": "uint64" + } + ], + "name": "UpdatedMaxNonTerminalKeyPerOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "nextQueuedValidatorIndex", + "type": "uint256" + } + ], + "name": "UpdatedNextQueuedValidatorIndex", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "nodeOperator", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "operatorName", + "type": "string" + } + ], + "name": "UpdatedOperatorName", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "operatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "bool", + "name": "optedForSocializingPool", + "type": "bool" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "block", + "type": "uint256" + } + ], + "name": "UpdatedSocializingPoolState", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "staderConfig", + "type": "address" + } + ], + "name": "UpdatedStaderConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "depositBlock", + "type": "uint256" + } + ], + "name": "UpdatedValidatorDepositBlock", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "verifiedKeysBatchSize", + "type": "uint256" + } + ], + "name": "UpdatedVerifiedKeyBatchSize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawnKeysBatchSize", + "type": "uint256" + } + ], + "name": "UpdatedWithdrawnKeyBatchSize", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "referralId", + "type": "string" + } + ], + "name": "ValidatorAddedViaReferral", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "ValidatorMarkedAsFrontRunned", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "ValidatorMarkedReadyToDeposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "ValidatorStatusMarkedAsInvalidSignature", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "validatorId", + "type": "uint256" + } + ], + "name": "ValidatorWithdrawn", + "type": "event" + }, + { + "inputs": [], + "name": "COLLATERAL_ETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FRONT_RUN_PENALTY", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_ID", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_pubkey", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "_preDepositSignature", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "_depositSignature", + "type": "bytes[]" + } + ], + "name": "addValidatorKeys", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_referralId", + "type": "string" + }, + { + "internalType": "uint256", + "name": "_amountOfSDToUtilize", + "type": "uint256" + }, + { + "internalType": "bytes[]", + "name": "_pubkey", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "_preDepositSignature", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "_depositSignature", + "type": "bytes[]" + } + ], + "name": "addValidatorKeysWithUtilizeSD", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_optInForSocializingPool", + "type": "bool" + } + ], + "name": "changeSocializingPoolState", + "outputs": [ + { + "internalType": "address", + "name": "feeRecipientAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operatorAddress", + "type": "address" + } + ], + "name": "confirmRewardAddressChange", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pageNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_pageSize", + "type": "uint256" + } + ], + "name": "getAllActiveValidators", + "outputs": [ + { + "components": [ + { + "internalType": "enum ValidatorStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "preDepositSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "depositSignature", + "type": "bytes" + }, + { + "internalType": "address", + "name": "withdrawVaultAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "operatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawnBlock", + "type": "uint256" + } + ], + "internalType": "struct Validator[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_pageNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_pageSize", + "type": "uint256" + } + ], + "name": "getAllNodeELVaultAddress", + "outputs": [ + { + "internalType": "address[]", + "name": "", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCollateralETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_operatorId", + "type": "uint256" + } + ], + "name": "getOperatorRewardAddress", + "outputs": [ + { + "internalType": "address payable", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_operatorId", + "type": "uint256" + } + ], + "name": "getOperatorTotalKeys", + "outputs": [ + { + "internalType": "uint256", + "name": "_totalKeys", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeOperator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_startIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_endIndex", + "type": "uint256" + } + ], + "name": "getOperatorTotalNonTerminalKeys", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_operatorId", + "type": "uint256" + } + ], + "name": "getSocializingPoolStateChangeBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalActiveValidatorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalQueuedValidatorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_pageNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_pageSize", + "type": "uint256" + } + ], + "name": "getValidatorsByOperator", + "outputs": [ + { + "components": [ + { + "internalType": "enum ValidatorStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "preDepositSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "depositSignature", + "type": "bytes" + }, + { + "internalType": "address", + "name": "withdrawVaultAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "operatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawnBlock", + "type": "uint256" + } + ], + "internalType": "struct Validator[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "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": "uint256", + "name": "_count", + "type": "uint256" + } + ], + "name": "increaseTotalActiveValidatorCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "inputKeyCountLimit", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operAddr", + "type": "address" + } + ], + "name": "isExistingOperator", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "_pubkey", + "type": "bytes" + } + ], + "name": "isExistingPubkey", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_readyToDepositPubkey", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "_frontRunPubkey", + "type": "bytes[]" + }, + { + "internalType": "bytes[]", + "name": "_invalidSignaturePubkey", + "type": "bytes[]" + } + ], + "name": "markValidatorReadyToDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], "name": "maxNonTerminalKeyPerOperator", - "type": "uint64" - } - ], - "name": "UpdatedMaxNonTerminalKeyPerOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextOperatorId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], "name": "nextQueuedValidatorIndex", - "type": "uint256" - } - ], - "name": "UpdatedNextQueuedValidatorIndex", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "nodeOperator", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "operatorName", - "type": "string" - }, - { - "indexed": false, - "internalType": "address", - "name": "rewardAddress", - "type": "address" - } - ], - "name": "UpdatedOperatorDetails", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "operatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "bool", - "name": "optedForSocializingPool", - "type": "bool" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "block", - "type": "uint256" - } - ], - "name": "UpdatedSocializingPoolState", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextValidatorId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "nodeELRewardVaultByOperatorId", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_optInForSocializingPool", + "type": "bool" + }, + { + "internalType": "string", + "name": "_operatorName", + "type": "string" + }, + { + "internalType": "address payable", + "name": "_operatorRewardAddress", + "type": "address" + } + ], + "name": "onboardNodeOperator", + "outputs": [ + { + "internalType": "address", + "name": "feeRecipientAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "operatorIDByAddress", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "operatorStructById", + "outputs": [ + { + "internalType": "bool", + "name": "active", + "type": "bool" + }, + { + "internalType": "bool", + "name": "optedForSocializingPool", + "type": "bool" + }, + { + "internalType": "string", + "name": "operatorName", + "type": "string" + }, + { + "internalType": "address payable", + "name": "operatorRewardAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "operatorAddress", + "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": "address", + "name": "_operatorAddress", + "type": "address" + }, + { + "internalType": "address", + "name": "_newRewardAddress", + "type": "address" + } + ], + "name": "proposeRewardAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "proposedRewardAddressByOperatorId", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "queuedValidators", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "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" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "socializingPoolStateChangeBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], "name": "staderConfig", - "type": "address" - } - ], - "name": "UpdatedStaderConfig", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "depositBlock", - "type": "uint256" - } - ], - "name": "UpdatedValidatorDepositBlock", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "verifiedKeysBatchSize", - "type": "uint256" - } - ], - "name": "UpdatedVerifiedKeyBatchSize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawnKeysBatchSize", - "type": "uint256" - } - ], - "name": "UpdatedWithdrawnKeyBatchSize", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "ValidatorMarkedAsFrontRunned", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "ValidatorMarkedReadyToDeposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "ValidatorStatusMarkedAsInvalidSignature", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "validatorId", - "type": "uint256" - } - ], - "name": "ValidatorWithdrawn", - "type": "event" - }, - { - "inputs": [], - "name": "COLLATERAL_ETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FRONT_RUN_PENALTY", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "POOL_ID", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "_pubkey", - "type": "bytes[]" - }, - { - "internalType": "bytes[]", - "name": "_preDepositSignature", - "type": "bytes[]" - }, - { - "internalType": "bytes[]", - "name": "_depositSignature", - "type": "bytes[]" - } - ], - "name": "addValidatorKeys", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_optInForSocializingPool", - "type": "bool" - } - ], - "name": "changeSocializingPoolState", - "outputs": [ - { - "internalType": "address", - "name": "feeRecipientAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_pageNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pageSize", - "type": "uint256" - } - ], - "name": "getAllActiveValidators", - "outputs": [ - { - "components": [ - { - "internalType": "enum ValidatorStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "preDepositSignature", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "depositSignature", - "type": "bytes" - }, - { - "internalType": "address", - "name": "withdrawVaultAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "operatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "depositBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawnBlock", - "type": "uint256" - } - ], - "internalType": "struct Validator[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_pageNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pageSize", - "type": "uint256" - } - ], - "name": "getAllNodeELVaultAddress", - "outputs": [ - { - "internalType": "address[]", - "name": "", - "type": "address[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCollateralETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "pure", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_operatorId", - "type": "uint256" - } - ], - "name": "getOperatorRewardAddress", - "outputs": [ - { - "internalType": "address payable", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_operatorId", - "type": "uint256" - } - ], - "name": "getOperatorTotalKeys", - "outputs": [ - { - "internalType": "uint256", - "name": "_totalKeys", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeOperator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_startIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_endIndex", - "type": "uint256" - } - ], - "name": "getOperatorTotalNonTerminalKeys", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_operatorId", - "type": "uint256" - } - ], - "name": "getSocializingPoolStateChangeBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalActiveValidatorCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalQueuedValidatorCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_pageNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_pageSize", - "type": "uint256" - } - ], - "name": "getValidatorsByOperator", - "outputs": [ - { - "components": [ - { - "internalType": "enum ValidatorStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "preDepositSignature", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "depositSignature", - "type": "bytes" - }, - { - "internalType": "address", - "name": "withdrawVaultAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "operatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "depositBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawnBlock", - "type": "uint256" - } - ], - "internalType": "struct Validator[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "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": "uint256", - "name": "_count", - "type": "uint256" - } - ], - "name": "increaseTotalActiveValidatorCount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "inputKeyCountLimit", - "outputs": [ - { - "internalType": "uint16", - "name": "", - "type": "uint16" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operAddr", - "type": "address" - } - ], - "name": "isExistingOperator", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "_pubkey", - "type": "bytes" - } - ], - "name": "isExistingPubkey", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "_readyToDepositPubkey", - "type": "bytes[]" - }, - { - "internalType": "bytes[]", - "name": "_frontRunPubkey", - "type": "bytes[]" - }, - { - "internalType": "bytes[]", - "name": "_invalidSignaturePubkey", - "type": "bytes[]" - } - ], - "name": "markValidatorReadyToDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxNonTerminalKeyPerOperator", - "outputs": [ - { - "internalType": "uint64", - "name": "", - "type": "uint64" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextOperatorId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextQueuedValidatorIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "nextValidatorId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "nodeELRewardVaultByOperatorId", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_optInForSocializingPool", - "type": "bool" - }, - { - "internalType": "string", - "name": "_operatorName", - "type": "string" - }, - { - "internalType": "address payable", - "name": "_operatorRewardAddress", - "type": "address" - } - ], - "name": "onboardNodeOperator", - "outputs": [ - { - "internalType": "address", - "name": "feeRecipientAddress", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "operatorIDByAddress", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "operatorStructById", - "outputs": [ - { - "internalType": "bool", - "name": "active", - "type": "bool" - }, - { - "internalType": "bool", - "name": "optedForSocializingPool", - "type": "bool" - }, - { - "internalType": "string", - "name": "operatorName", - "type": "string" - }, - { - "internalType": "address payable", - "name": "operatorRewardAddress", - "type": "address" - }, - { - "internalType": "address", - "name": "operatorAddress", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "paused", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "queuedValidators", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "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" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "socializingPoolStateChangeBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "staderConfig", - "outputs": [ - { - "internalType": "contract IStaderConfig", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalActiveValidatorCount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferCollateralToPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_validatorId", - "type": "uint256" - } - ], - "name": "updateDepositStatusAndBlock", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint16", - "name": "_inputKeyCountLimit", - "type": "uint16" - } - ], - "name": "updateInputKeyCountLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint64", - "name": "_maxNonTerminalKeyPerOperator", - "type": "uint64" - } - ], - "name": "updateMaxNonTerminalKeyPerOperator", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_nextQueuedValidatorIndex", - "type": "uint256" - } - ], - "name": "updateNextQueuedValidatorIndex", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "string", - "name": "_operatorName", - "type": "string" - }, - { - "internalType": "address payable", - "name": "_rewardAddress", - "type": "address" - } - ], - "name": "updateOperatorDetails", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "updateStaderConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_verifiedKeysBatchSize", - "type": "uint256" - } - ], - "name": "updateVerifiedKeysBatchSize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes", - "name": "", - "type": "bytes" - } - ], - "name": "validatorIdByPubkey", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "validatorIdsByOperatorId", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "validatorQueueSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "validatorRegistry", - "outputs": [ - { - "internalType": "enum ValidatorStatus", - "name": "status", - "type": "uint8" - }, - { - "internalType": "bytes", - "name": "pubkey", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "preDepositSignature", - "type": "bytes" - }, - { - "internalType": "bytes", - "name": "depositSignature", - "type": "bytes" - }, - { - "internalType": "address", - "name": "withdrawVaultAddress", - "type": "address" - }, - { - "internalType": "uint256", - "name": "operatorId", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "depositBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawnBlock", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "verifiedKeyBatchSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "_pubkeys", - "type": "bytes[]" - } - ], - "name": "withdrawnValidators", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } + "outputs": [ + { + "internalType": "contract IStaderConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalActiveValidatorCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "transferCollateralToPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_validatorId", + "type": "uint256" + } + ], + "name": "updateDepositStatusAndBlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint16", + "name": "_inputKeyCountLimit", + "type": "uint16" + } + ], + "name": "updateInputKeyCountLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint64", + "name": "_maxNonTerminalKeyPerOperator", + "type": "uint64" + } + ], + "name": "updateMaxNonTerminalKeyPerOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_nextQueuedValidatorIndex", + "type": "uint256" + } + ], + "name": "updateNextQueuedValidatorIndex", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "_operatorName", + "type": "string" + } + ], + "name": "updateOperatorName", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "updateStaderConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_verifiedKeysBatchSize", + "type": "uint256" + } + ], + "name": "updateVerifiedKeysBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "validatorIdByPubkey", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "validatorIdsByOperatorId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "validatorQueueSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "validatorRegistry", + "outputs": [ + { + "internalType": "enum ValidatorStatus", + "name": "status", + "type": "uint8" + }, + { + "internalType": "bytes", + "name": "pubkey", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "preDepositSignature", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "depositSignature", + "type": "bytes" + }, + { + "internalType": "address", + "name": "withdrawVaultAddress", + "type": "address" + }, + { + "internalType": "uint256", + "name": "operatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "depositBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawnBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "verifiedKeyBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "_pubkeys", + "type": "bytes[]" + } + ], + "name": "withdrawnValidators", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ] \ No newline at end of file diff --git a/abis/SDUtilityPool.abi.json b/abis/SDUtilityPool.abi.json new file mode 100644 index 000000000..09d5b84b3 --- /dev/null +++ b/abis/SDUtilityPool.abi.json @@ -0,0 +1,2000 @@ +[ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyClaimed", + "type": "error" + }, + { + "inputs": [], + "name": "AlreadyLiquidated", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotAuthorizedToRedeem", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotManager", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotStaderContract", + "type": "error" + }, + { + "inputs": [], + "name": "CannotFindRequestId", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientPoolBalance", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmountOfWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInput", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidWithdrawAmount", + "type": "error" + }, + { + "inputs": [], + "name": "MaxLimitOnWithdrawRequestCountReached", + "type": "error" + }, + { + "inputs": [], + "name": "NotClaimable", + "type": "error" + }, + { + "inputs": [], + "name": "NotLiquidatable", + "type": "error" + }, + { + "inputs": [], + "name": "NotLiquidator", + "type": "error" + }, + { + "inputs": [], + "name": "OperatorUtilizedSDBalanceNonZero", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requestId", + "type": "uint256" + } + ], + "name": "RequestIdNotFinalized", + "type": "error" + }, + { + "inputs": [], + "name": "SDTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "SDUtilizeLimitReached", + "type": "error" + }, + { + "inputs": [], + "name": "UnHealthyPosition", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "feeAccumulated", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalProtocolFee", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalUtilizedSD", + "type": "uint256" + } + ], + "name": "AccruedFees", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "utilizer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdInterest", + "type": "uint256" + } + ], + "name": "ClearedUtilizerInterest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "name": "CompleteLiquidation", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdXToMint", + "type": "uint256" + } + ], + "name": "Delegated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "nextRequestIdToFinalize", + "type": "uint256" + } + ], + "name": "FinalizedWithdrawRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalLiquidationAmountInEth", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationBonusInEth", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationFeeInEth", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "liquidator", + "type": "address" + } + ], + "name": "LiquidationCall", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "protocolFeeFactor", + "type": "uint256" + } + ], + "name": "ProtocolFeeFactorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "delegator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdXAmount", + "type": "uint256" + } + ], + "name": "Redeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "utilizer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "Repaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "utilizer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "utilizedSDAmount", + "type": "uint256" + } + ], + "name": "RepaidUtilizedSDBalance", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdToTransfer", + "type": "uint256" + } + ], + "name": "RequestRedeemed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationBonusPercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "liquidationFeePercent", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ltv", + "type": "uint256" + } + ], + "name": "RiskConfigUpdated", + "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": false, + "internalType": "address", + "name": "utilizer", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "utilizeAmount", + "type": "uint256" + } + ], + "name": "SDUtilized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "conservativeEthPerKey", + "type": "uint256" + } + ], + "name": "UpdatedConservativeEthPerKey", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "finalizationBatchLimit", + "type": "uint256" + } + ], + "name": "UpdatedFinalizationBatchLimit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "maxETHWorthOfSDPerValidator", + "type": "uint256" + } + ], + "name": "UpdatedMaxETHWorthOfSDPerValidator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "count", + "type": "uint256" + } + ], + "name": "UpdatedMaxNonRedeemedDelegatorRequestCount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "minBlockDelayToFinalizeRequest", + "type": "uint256" + } + ], + "name": "UpdatedMinBlockDelayToFinalizeRequest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "UpdatedStaderConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "utilizationRatePerBlock", + "type": "uint256" + } + ], + "name": "UtilizationRatePerBlockUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "nextRequestId", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmountToWithdraw", + "type": "uint256" + } + ], + "name": "WithdrawRequestReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "WithdrawnProtocolFee", + "type": "event" + }, + { + "inputs": [], + "name": "DECIMAL", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_PROTOCOL_FEE", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_UTILIZATION_RATE_PER_BLOCK", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_SD_DELEGATE_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_SD_WITHDRAW_LIMIT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accrualBlockNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "accrueFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "accumulatedProtocolFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cTokenTotalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requestId", + "type": "uint256" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_utilizer", + "type": "address" + } + ], + "name": "clearUtilizerInterest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "completeLiquidation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "conservativeEthPerKey", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + } + ], + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegatorCTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "delegatorWithdrawRequestedCTokenCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "delegatorWithdrawRequests", + "outputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amountOfCToken", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sdExpected", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sdFinalized", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requestBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finalizationBatchLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "finalizeDelegatorWithdrawalRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getDelegationRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "getDelegatorLatestSDBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLatestExchangeRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLiquidationThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getOperatorLiquidation", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "totalAmountInEth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBonusInEth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFeeInEth", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRepaid", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isClaimed", + "type": "bool" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + } + ], + "internalType": "struct OperatorLiquidation", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "getOperatorTotalEth", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPoolAvailableSDBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_delegator", + "type": "address" + } + ], + "name": "getRequestIdsByDelegator", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "getUserData", + "outputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "totalInterestSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalCollateralInEth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "healthFactor", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lockedEth", + "type": "uint256" + } + ], + "internalType": "struct UserData", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_utilizer", + "type": "address" + } + ], + "name": "getUtilizerLatestBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "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": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "liquidationCall", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "liquidationIndexByOperator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "liquidations", + "outputs": [ + { + "internalType": "uint256", + "name": "totalAmountInEth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalBonusInEth", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalFeeInEth", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "isRepaid", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isClaimed", + "type": "bool" + }, + { + "internalType": "address", + "name": "liquidator", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxApproveSD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxETHWorthOfSDPerValidator", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxNonRedeemedDelegatorRequestCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "minBlockDelayToFinalizeRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextRequestId", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nextRequestIdToFinalize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "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": [], + "name": "poolUtilization", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "protocolFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "renounceRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repay", + "outputs": [ + { + "internalType": "uint256", + "name": "repaidAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feePaid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "repayFullAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "repaidAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feePaid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "utilizer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "repayOnBehalf", + "outputs": [ + { + "internalType": "uint256", + "name": "repaidAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feePaid", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_utilizer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "repayUtilizedSDBalance", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "requestIdsByDelegatorAddress", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_cTokenAmount", + "type": "uint256" + } + ], + "name": "requestWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "_requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sdAmount", + "type": "uint256" + } + ], + "name": "requestWithdrawWithSDAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "_requestId", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "revokeRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "riskConfig", + "outputs": [ + { + "internalType": "uint256", + "name": "liquidationThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationBonusPercent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationFeePercent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ltv", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sdRequestedForWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "sdReservedForClaim", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "staderConfig", + "outputs": [ + { + "internalType": "contract IStaderConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalUtilizedSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_newEthPerKey", + "type": "uint256" + } + ], + "name": "updateConservativeEthPerKey", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_finalizationBatchLimit", + "type": "uint256" + } + ], + "name": "updateFinalizationBatchLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxETHWorthOfSDPerValidator", + "type": "uint256" + } + ], + "name": "updateMaxETHWorthOfSDPerValidator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_count", + "type": "uint256" + } + ], + "name": "updateMaxNonRedeemedDelegatorRequestCount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minBlockDelayToFinalizeRequest", + "type": "uint256" + } + ], + "name": "updateMinBlockDelayToFinalizeRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_protocolFee", + "type": "uint256" + } + ], + "name": "updateProtocolFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "liquidationThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationBonusPercent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "liquidationFeePercent", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ltv", + "type": "uint256" + } + ], + "name": "updateRiskConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "updateStaderConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_utilizationRatePerBlock", + "type": "uint256" + } + ], + "name": "updateUtilizationRatePerBlock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "utilizationRatePerBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "utilizeAmount", + "type": "uint256" + } + ], + "name": "utilize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "utilizeIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "utilizeAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonTerminalKeyCount", + "type": "uint256" + } + ], + "name": "utilizeWhileAddingKeys", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "utilizerBalanceCurrent", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "utilizerBalanceStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "utilizerData", + "outputs": [ + { + "internalType": "uint256", + "name": "principal", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "utilizeIndex", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdrawProtocolFee", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] \ No newline at end of file diff --git a/abis/SdCollateral.abi.json b/abis/SdCollateral.abi.json index 29a7b1958..6307e63d9 100644 --- a/abis/SdCollateral.abi.json +++ b/abis/SdCollateral.abi.json @@ -1,729 +1,953 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CallerNotManager", - "type": "error" - }, - { - "inputs": [], - "name": "CallerNotWithdrawVault", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "operatorSDCollateral", - "type": "uint256" - } - ], - "name": "InsufficientSDToWithdraw", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPoolId", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidPoolLimit", - "type": "error" - }, - { - "inputs": [], - "name": "NoStateChange", - "type": "error" - }, - { - "inputs": [], - "name": "SDTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "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": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sdAmount", - "type": "uint256" - } - ], - "name": "SDDeposited", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "auction", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sdSlashed", - "type": "uint256" - } - ], - "name": "SDSlashed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sdAmount", - "type": "uint256" - } - ], - "name": "SDWithdrawn", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "poolId", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "UpdatedPoolIdForOperator", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "poolId", - "type": "uint8" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "minThreshold", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "withdrawThreshold", - "type": "uint256" - } - ], - "name": "UpdatedPoolThreshold", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CallerNotManager", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotStaderContract", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotWithdrawVault", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "operatorSDCollateral", + "type": "uint256" + } + ], + "name": "InsufficientSDToWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientSelfBondToRepay", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidPoolId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidPoolLimit", + "type": "error" + }, + { + "inputs": [], + "name": "NoStateChange", + "type": "error" + }, + { + "inputs": [], + "name": "NonTerminalKeysNotZero", + "type": "error" + }, + { + "inputs": [], + "name": "SDTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + } + ], + "name": "ReducedUtilizedPosition", + "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": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + } + ], + "name": "SDDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "repayAmount", + "type": "uint256" + } + ], + "name": "SDRepaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "auction", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdSlashed", + "type": "uint256" + } + ], + "name": "SDSlashed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + } + ], + "name": "SDWithdrawn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "poolId", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "UpdatedPoolIdForOperator", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "poolId", + "type": "uint8" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minThreshold", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "withdrawThreshold", + "type": "uint256" + } + ], + "name": "UpdatedPoolThreshold", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staderConfig", + "type": "address" + } + ], + "name": "UpdatedStaderConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdAmount", + "type": "uint256" + } + ], + "name": "UtilizedSDDeposited", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdSlashFromUtilized", + "type": "uint256" + } + ], + "name": "UtilizedSDSlashed", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_ethAmount", + "type": "uint256" + } + ], + "name": "convertETHToSD", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sdAmount", + "type": "uint256" + } + ], + "name": "convertSDToETH", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_sdAmount", + "type": "uint256" + } + ], + "name": "depositSDAsCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_sdAmount", + "type": "uint256" + } + ], + "name": "depositSDAsCollateralOnBehalf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_sdAmount", + "type": "uint256" + } + ], + "name": "depositSDFromUtilityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "_poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_numValidator", + "type": "uint256" + } + ], + "name": "getMinimumSDToBond", + "outputs": [ + { + "internalType": "uint256", + "name": "_minSDToBond", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "getOperatorInfo", + "outputs": [ + { + "internalType": "uint8", + "name": "_poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_operatorId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_validatorCount", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "getOperatorWithdrawThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "operatorWithdrawThreshold", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_numValidator", + "type": "uint256" + } + ], + "name": "getRemainingSDToBond", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "getRewardEligibleSD", + "outputs": [ + { + "internalType": "uint256", + "name": "_rewardEligibleSD", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint8", + "name": "_poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_numValidator", + "type": "uint256" + } + ], + "name": "hasEnoughSDCollateral", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "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": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "maxApproveSD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "operatorSDBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "operatorUtilizedSDBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "name": "poolThresholdbyPoolId", + "outputs": [ + { + "internalType": "uint256", + "name": "minThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "withdrawThreshold", + "type": "uint256" + }, + { + "internalType": "string", + "name": "units", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_sdAmount", + "type": "uint256" + } + ], + "name": "reduceUtilizedSDPosition", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "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" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_validatorId", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "_poolId", + "type": "uint8" + } + ], + "name": "slashValidatorSD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], "name": "staderConfig", - "type": "address" - } - ], - "name": "UpdatedStaderConfig", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_ethAmount", - "type": "uint256" - } - ], - "name": "convertETHToSD", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_sdAmount", - "type": "uint256" - } - ], - "name": "convertSDToETH", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_sdAmount", - "type": "uint256" - } - ], - "name": "depositSDAsCollateral", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "_poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "_numValidator", - "type": "uint256" - } - ], - "name": "getMinimumSDToBond", - "outputs": [ - { - "internalType": "uint256", - "name": "_minSDToBond", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "name": "getOperatorWithdrawThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "operatorWithdrawThreshold", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "uint8", - "name": "_poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "_numValidator", - "type": "uint256" - } - ], - "name": "getRemainingSDToBond", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - } - ], - "name": "getRewardEligibleSD", - "outputs": [ - { - "internalType": "uint256", - "name": "_rewardEligibleSD", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "uint8", - "name": "_poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "_numValidator", - "type": "uint256" - } - ], - "name": "hasEnoughSDCollateral", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "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": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "maxApproveSD", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "operatorSDBalance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "name": "poolThresholdbyPoolId", - "outputs": [ - { - "internalType": "uint256", - "name": "minThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "withdrawThreshold", - "type": "uint256" - }, - { - "internalType": "string", - "name": "units", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "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" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_validatorId", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "_poolId", - "type": "uint8" - } - ], - "name": "slashValidatorSD", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "staderConfig", - "outputs": [ - { - "internalType": "contract IStaderConfig", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint8", - "name": "_poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "_minThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_maxThreshold", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_withdrawThreshold", - "type": "uint256" - }, - { - "internalType": "string", - "name": "_units", - "type": "string" - } - ], - "name": "updatePoolThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "updateStaderConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_requestedSD", - "type": "uint256" - } - ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } + "outputs": [ + { + "internalType": "contract IStaderConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "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": "_operator", + "type": "address" + } + ], + "name": "transferBackUtilizedSD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint8", + "name": "_poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "_minThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_maxThreshold", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_withdrawThreshold", + "type": "uint256" + }, + { + "internalType": "string", + "name": "_units", + "type": "string" + } + ], + "name": "updatePoolThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "updateStaderConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requestedSD", + "type": "uint256" + } + ], + "name": "withdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_requestedSD", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + } + ], + "name": "withdrawOnBehalf", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } ] \ No newline at end of file diff --git a/abis/SocializingPool.abi.json b/abis/SocializingPool.abi.json index 397b322b3..2cc95528d 100644 --- a/abis/SocializingPool.abi.json +++ b/abis/SocializingPool.abi.json @@ -1,929 +1,964 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "CallerNotManager", - "type": "error" - }, - { - "inputs": [], - "name": "CallerNotStaderContract", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ETHTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "FutureCycleIndex", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientETHRewards", - "type": "error" - }, - { - "inputs": [], - "name": "InsufficientSDRewards", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidAmount", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidCycleIndex", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "cycle", - "type": "uint256" - }, - { - "internalType": "address", - "name": "operator", - "type": "address" - } - ], - "name": "InvalidProof", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "operator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "cycle", - "type": "uint256" - } - ], - "name": "RewardAlreadyClaimed", - "type": "error" - }, - { - "inputs": [], - "name": "RewardAlreadyHandled", - "type": "error" - }, - { - "inputs": [], - "name": "SDTransferFailed", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "ETHReceived", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "ethRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sdRewards", - "type": "uint256" - } - ], - "name": "OperatorRewardsClaimed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "ethRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalETHRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "sdRewards", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "totalSDRewards", - "type": "uint256" - } - ], - "name": "OperatorRewardsUpdated", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "ethRewards", - "type": "uint256" - } - ], - "name": "ProtocolETHRewardsTransferred", - "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": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "staderConfig", - "type": "address" - } - ], - "name": "UpdatedStaderConfig", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "staderOperatorRegistry", - "type": "address" - } - ], - "name": "UpdatedStaderOperatorRegistry", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "staderValidatorRegistry", - "type": "address" - } - ], - "name": "UpdatedStaderValidatorRegistry", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint256", - "name": "ethRewards", - "type": "uint256" - } - ], - "name": "UserETHRewardsTransferred", - "type": "event" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256[]", - "name": "_index", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_amountSD", - "type": "uint256[]" - }, - { - "internalType": "uint256[]", - "name": "_amountETH", - "type": "uint256[]" - }, - { - "internalType": "bytes32[][]", - "name": "_merkleProof", - "type": "bytes32[][]" - } - ], - "name": "claim", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "claimedRewards", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getCurrentRewardsIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - } - ], - "name": "getRewardCycleDetails", - "outputs": [ - { - "internalType": "uint256", - "name": "_startBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_endBlock", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRewardDetails", - "outputs": [ - { - "internalType": "uint256", - "name": "currentIndex", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentStartBlock", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "currentEndBlock", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "grantRole", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "uint256", - "name": "reportingBlockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "merkleRoot", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "operatorETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "userETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "protocolETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "operatorSDRewards", - "type": "uint256" - } - ], - "internalType": "struct RewardsData", - "name": "_rewardsData", - "type": "tuple" - } - ], - "name": "handleRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "handledRewards", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "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": [], - "name": "initialBlock", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "lastReportedRewardsData", - "outputs": [ - { - "internalType": "uint256", - "name": "reportingBlockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "merkleRoot", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "operatorETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "userETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "protocolETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "operatorSDRewards", - "type": "uint256" - } - ], - "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": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "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" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "rewardsDataMap", - "outputs": [ - { - "internalType": "uint256", - "name": "reportingBlockNumber", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "index", - "type": "uint256" - }, - { - "internalType": "bytes32", - "name": "merkleRoot", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "poolId", - "type": "uint8" - }, - { - "internalType": "uint256", - "name": "operatorETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "userETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "protocolETHRewards", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "operatorSDRewards", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "staderConfig", - "outputs": [ - { - "internalType": "contract IStaderConfig", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalOperatorETHRewardsRemaining", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalOperatorSDRewardsRemaining", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "unpause", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "updateStaderConfig", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_index", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_operator", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amountSD", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amountETH", - "type": "uint256" - }, - { - "internalType": "bytes32[]", - "name": "_merkleProof", - "type": "bytes32[]" - } - ], - "name": "verifyProof", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "CallerNotManager", + "type": "error" + }, + { + "inputs": [], + "name": "CallerNotStaderContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ETHTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "FutureCycleIndex", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientETHRewards", + "type": "error" + }, + { + "inputs": [], + "name": "InsufficientSDRewards", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidAmount", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidCycleIndex", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "cycle", + "type": "uint256" + }, + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "InvalidProof", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "cycle", + "type": "uint256" + } + ], + "name": "RewardAlreadyClaimed", + "type": "error" + }, + { + "inputs": [], + "name": "RewardAlreadyHandled", + "type": "error" + }, + { + "inputs": [], + "name": "SDTransferFailed", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "ETHReceived", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdRewards", + "type": "uint256" + } + ], + "name": "OperatorRewardsClaimed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ethRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalETHRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "sdRewards", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "totalSDRewards", + "type": "uint256" + } + ], + "name": "OperatorRewardsUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ethRewards", + "type": "uint256" + } + ], + "name": "ProtocolETHRewardsTransferred", + "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": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staderConfig", + "type": "address" + } + ], + "name": "UpdatedStaderConfig", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staderOperatorRegistry", + "type": "address" + } + ], + "name": "UpdatedStaderOperatorRegistry", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "staderValidatorRegistry", + "type": "address" + } + ], + "name": "UpdatedStaderValidatorRegistry", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "ethRewards", + "type": "uint256" + } + ], + "name": "UserETHRewardsTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_index", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amountSD", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amountETH", + "type": "uint256[]" + }, + { + "internalType": "bytes32[][]", + "name": "_merkleProof", + "type": "bytes32[][]" + } + ], + "name": "claim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256[]", + "name": "_index", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amountSD", + "type": "uint256[]" + }, + { + "internalType": "uint256[]", + "name": "_amountETH", + "type": "uint256[]" + }, + { + "internalType": "bytes32[][]", + "name": "_merkleProof", + "type": "bytes32[][]" + } + ], + "name": "claimAndDepositSD", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "claimedRewards", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentRewardsIndex", + "outputs": [ + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + } + ], + "name": "getRewardCycleDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "_startBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_endBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRewardDetails", + "outputs": [ + { + "internalType": "uint256", + "name": "currentIndex", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentStartBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentEndBlock", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "grantRole", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "uint256", + "name": "reportingBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "operatorETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "protocolETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "operatorSDRewards", + "type": "uint256" + } + ], + "internalType": "struct RewardsData", + "name": "_rewardsData", + "type": "tuple" + } + ], + "name": "handleRewards", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "handledRewards", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "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": [], + "name": "initialBlock", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastReportedRewardsData", + "outputs": [ + { + "internalType": "uint256", + "name": "reportingBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "operatorETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "protocolETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "operatorSDRewards", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxApproveSD", + "outputs": [], + "stateMutability": "nonpayable", + "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": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "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" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "rewardsDataMap", + "outputs": [ + { + "internalType": "uint256", + "name": "reportingBlockNumber", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "index", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "merkleRoot", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "poolId", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "operatorETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "userETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "protocolETHRewards", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "operatorSDRewards", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "staderConfig", + "outputs": [ + { + "internalType": "contract IStaderConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalOperatorETHRewardsRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalOperatorSDRewardsRemaining", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderConfig", + "type": "address" + } + ], + "name": "updateStaderConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_index", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_amountSD", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amountETH", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "_merkleProof", + "type": "bytes32[]" + } + ], + "name": "verifyProof", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } ] \ No newline at end of file diff --git a/abis/StaderConfig.abi.json b/abis/StaderConfig.abi.json index b169a981a..b6d1c201d 100644 --- a/abis/StaderConfig.abi.json +++ b/abis/StaderConfig.abi.json @@ -1,1963 +1,2046 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "InvalidLimits", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMaxDepositValue", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMaxWithdrawValue", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMinDepositValue", - "type": "error" - }, - { - "inputs": [], - "name": "InvalidMinWithdrawValue", - "type": "error" - }, - { - "inputs": [], - "name": "ZeroAddress", - "type": "error" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "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": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "SetAccount", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "SetConstant", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "SetContract", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "address", - "name": "newAddress", - "type": "address" - } - ], - "name": "SetToken", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "SetVariable", - "type": "event" - }, - { - "inputs": [], - "name": "ADMIN", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "AUCTION_CONTRACT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DECIMALS", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DEFAULT_ADMIN_ROLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETHX_SUPPLY_POR_FEED", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETH_BALANCE_POR_FEED", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETH_DEPOSIT_CONTRACT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETH_PER_NODE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "ETHx", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "FULL_DEPOSIT_SIZE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MANAGER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_DEPOSIT_AMOUNT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MAX_WITHDRAW_AMOUNT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_BLOCK_DELAY_TO_FINALIZE_WITHDRAW_REQUEST", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_DEPOSIT_AMOUNT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "MIN_WITHDRAW_AMOUNT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "NODE_EL_REWARD_VAULT_IMPLEMENTATION", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OPERATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OPERATOR_MAX_NAME_LENGTH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "OPERATOR_REWARD_COLLECTOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PENALTY_CONTRACT", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMISSIONED_NODE_REGISTRY", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMISSIONED_POOL", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMISSIONED_SOCIALIZING_POOL", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMISSIONLESS_NODE_REGISTRY", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMISSIONLESS_POOL", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PERMISSIONLESS_SOCIALIZING_POOL", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "POOL_SELECTOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "POOL_UTILS", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "PRE_DEPOSIT_SIZE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "REWARD_THRESHOLD", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SD", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SD_COLLATERAL", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SOCIALIZING_POOL_CYCLE_DURATION", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "SOCIALIZING_POOL_OPT_IN_COOLING_PERIOD", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STADER_INSURANCE_FUND", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STADER_ORACLE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STADER_TREASURY", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "STAKE_POOL_MANAGER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "TOTAL_FEE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "USER_WITHDRAW_MANAGER", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VALIDATOR_WITHDRAWAL_VAULT_IMPLEMENTATION", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VAULT_FACTORY", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "WITHDRAWN_KEYS_BATCH_SIZE", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAdmin", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getAuctionContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getDecimals", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getETHBalancePORFeedProxy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getETHDepositContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getETHXSupplyPORFeedProxy", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getETHxToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getFullDepositSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxDepositAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMaxWithdrawAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMinBlockDelayToFinalizeWithdrawRequest", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMinDepositAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getMinWithdrawAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getNodeELRewardVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getOperatorMaxNameLength", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getOperatorRewardsCollector", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPenaltyContract", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPermissionedNodeRegistry", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPermissionedPool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPermissionedSocializingPool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPermissionlessNodeRegistry", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPermissionlessPool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPermissionlessSocializingPool", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolSelector", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPoolUtils", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getPreDepositSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getRewardsThreshold", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSDCollateral", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSocializingPoolCycleDuration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getSocializingPoolOptInCoolingPeriod", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStaderInsuranceFund", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStaderOracle", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStaderToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStaderTreasury", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStakePoolManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getStakedEthPerNode", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getTotalFee", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getUserWithdrawManager", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getValidatorWithdrawalVaultImplementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getVaultFactory", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "getWithdrawnKeyBatchSize", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "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": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_ethDepositContract", - "type": "address" - } - ], - "name": "initialize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "onlyManagerRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "onlyOperatorRole", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_addr", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "_contractName", - "type": "bytes32" - } - ], - "name": "onlyStaderContract", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "account", - "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" - }, - { - "inputs": [ - { - "internalType": "bytes4", - "name": "interfaceId", - "type": "bytes4" - } - ], - "name": "supportsInterface", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - } - ], - "name": "updateAdmin", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_auctionContract", - "type": "address" - } - ], - "name": "updateAuctionContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_ethBalanceProxy", - "type": "address" - } - ], - "name": "updateETHBalancePORFeedProxy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_ethXSupplyProxy", - "type": "address" - } - ], - "name": "updateETHXSupplyPORFeedProxy", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_ethX", - "type": "address" - } - ], - "name": "updateETHxToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxDepositAmount", - "type": "uint256" - } - ], - "name": "updateMaxDepositAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxWithdrawAmount", - "type": "uint256" - } - ], - "name": "updateMaxWithdrawAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minBlockDelay", - "type": "uint256" - } - ], - "name": "updateMinBlockDelayToFinalizeWithdrawRequest", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minDepositAmount", - "type": "uint256" - } - ], - "name": "updateMinDepositAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_minWithdrawAmount", - "type": "uint256" - } - ], - "name": "updateMinWithdrawAmount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_nodeELRewardVaultImpl", - "type": "address" - } - ], - "name": "updateNodeELRewardImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_operatorRewardsCollector", - "type": "address" - } - ], - "name": "updateOperatorRewardsCollector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_penaltyContract", - "type": "address" - } - ], - "name": "updatePenaltyContract", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_permissionedNodeRegistry", - "type": "address" - } - ], - "name": "updatePermissionedNodeRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_permissionedPool", - "type": "address" - } - ], - "name": "updatePermissionedPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_permissionedSocializePool", - "type": "address" - } - ], - "name": "updatePermissionedSocializingPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_permissionlessNodeRegistry", - "type": "address" - } - ], - "name": "updatePermissionlessNodeRegistry", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_permissionlessPool", - "type": "address" - } - ], - "name": "updatePermissionlessPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_permissionlessSocializePool", - "type": "address" - } - ], - "name": "updatePermissionlessSocializingPool", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_poolSelector", - "type": "address" - } - ], - "name": "updatePoolSelector", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_poolUtils", - "type": "address" - } - ], - "name": "updatePoolUtils", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_rewardsThreshold", - "type": "uint256" - } - ], - "name": "updateRewardsThreshold", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sdCollateral", - "type": "address" - } - ], - "name": "updateSDCollateral", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_socializingPoolCycleDuration", - "type": "uint256" - } - ], - "name": "updateSocializingPoolCycleDuration", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_SocializePoolOptInCoolingPeriod", - "type": "uint256" - } - ], - "name": "updateSocializingPoolOptInCoolingPeriod", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderInsuranceFund", - "type": "address" - } - ], - "name": "updateStaderInsuranceFund", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderOracle", - "type": "address" - } - ], - "name": "updateStaderOracle", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderToken", - "type": "address" - } - ], - "name": "updateStaderToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_staderTreasury", - "type": "address" - } - ], - "name": "updateStaderTreasury", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_stakePoolManager", - "type": "address" - } - ], - "name": "updateStakePoolManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_userWithdrawManager", - "type": "address" - } - ], - "name": "updateUserWithdrawManager", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_validatorWithdrawalVaultImpl", - "type": "address" - } - ], - "name": "updateValidatorWithdrawalVaultImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_vaultFactory", - "type": "address" - } - ], - "name": "updateVaultFactory", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_withdrawnKeysBatchSize", - "type": "uint256" - } - ], - "name": "updateWithdrawnKeysBatchSize", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } -] \ No newline at end of file + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "IndenticalValue", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidLimits", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMaxDepositValue", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMaxWithdrawValue", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinDepositValue", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidMinWithdrawValue", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "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": false, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "SetAccount", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SetConstant", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "SetContract", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "SetToken", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "SetVariable", + "type": "event" + }, + { + "inputs": [], + "name": "ADMIN", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "AUCTION_CONTRACT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DECIMALS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DEFAULT_ADMIN_ROLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETHX_SUPPLY_POR_FEED", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETH_BALANCE_POR_FEED", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETH_DEPOSIT_CONTRACT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETH_PER_NODE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "ETHx", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "FULL_DEPOSIT_SIZE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MANAGER", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_DEPOSIT_AMOUNT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MAX_WITHDRAW_AMOUNT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_BLOCK_DELAY_TO_FINALIZE_WITHDRAW_REQUEST", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_DEPOSIT_AMOUNT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "MIN_WITHDRAW_AMOUNT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "NODE_EL_REWARD_VAULT_IMPLEMENTATION", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR_MAX_NAME_LENGTH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "OPERATOR_REWARD_COLLECTOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PENALTY_CONTRACT", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMISSIONED_NODE_REGISTRY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMISSIONED_POOL", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMISSIONED_SOCIALIZING_POOL", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMISSIONLESS_NODE_REGISTRY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMISSIONLESS_POOL", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMISSIONLESS_SOCIALIZING_POOL", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_SELECTOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "POOL_UTILS", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRE_DEPOSIT_SIZE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REWARD_THRESHOLD", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SD", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SD_COLLATERAL", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SD_INCENTIVE_CONTROLLER", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SD_UTILITY_POOL", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SOCIALIZING_POOL_CYCLE_DURATION", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SOCIALIZING_POOL_OPT_IN_COOLING_PERIOD", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STADER_INSURANCE_FUND", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STADER_ORACLE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STADER_TREASURY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "STAKE_POOL_MANAGER", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TOTAL_FEE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "USER_WITHDRAW_MANAGER", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VALIDATOR_WITHDRAWAL_VAULT_IMPLEMENTATION", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VAULT_FACTORY", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WITHDRAWN_KEYS_BATCH_SIZE", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAdmin", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAuctionContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getDecimals", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getETHBalancePORFeedProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getETHDepositContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getETHXSupplyPORFeedProxy", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getETHxToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getFullDepositSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMaxWithdrawAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinBlockDelayToFinalizeWithdrawRequest", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinDepositAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getMinWithdrawAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getNodeELRewardVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOperatorMaxNameLength", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getOperatorRewardsCollector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPenaltyContract", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPermissionedNodeRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPermissionedPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPermissionedSocializingPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPermissionlessNodeRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPermissionlessPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPermissionlessSocializingPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPoolSelector", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPoolUtils", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPreDepositSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRewardsThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + } + ], + "name": "getRoleAdmin", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSDCollateral", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSDIncentiveController", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSDUtilityPool", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSocializingPoolCycleDuration", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSocializingPoolOptInCoolingPeriod", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStaderInsuranceFund", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStaderOracle", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStaderToken", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStaderTreasury", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStakePoolManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getStakedEthPerNode", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTotalFee", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getUserWithdrawManager", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getValidatorWithdrawalVaultImplementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVaultFactory", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getWithdrawnKeyBatchSize", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "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": "_admin", + "type": "address" + }, + { + "internalType": "address", + "name": "_ethDepositContract", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "onlyManagerRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "onlyOperatorRole", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_addr", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_contractName", + "type": "bytes32" + } + ], + "name": "onlyStaderContract", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "role", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "account", + "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" + }, + { + "inputs": [ + { + "internalType": "bytes4", + "name": "interfaceId", + "type": "bytes4" + } + ], + "name": "supportsInterface", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_admin", + "type": "address" + } + ], + "name": "updateAdmin", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_auctionContract", + "type": "address" + } + ], + "name": "updateAuctionContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ethBalanceProxy", + "type": "address" + } + ], + "name": "updateETHBalancePORFeedProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ethXSupplyProxy", + "type": "address" + } + ], + "name": "updateETHXSupplyPORFeedProxy", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_ethX", + "type": "address" + } + ], + "name": "updateETHxToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDepositAmount", + "type": "uint256" + } + ], + "name": "updateMaxDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxWithdrawAmount", + "type": "uint256" + } + ], + "name": "updateMaxWithdrawAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minBlockDelay", + "type": "uint256" + } + ], + "name": "updateMinBlockDelayToFinalizeWithdrawRequest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minDepositAmount", + "type": "uint256" + } + ], + "name": "updateMinDepositAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_minWithdrawAmount", + "type": "uint256" + } + ], + "name": "updateMinWithdrawAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_nodeELRewardVaultImpl", + "type": "address" + } + ], + "name": "updateNodeELRewardImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_operatorRewardsCollector", + "type": "address" + } + ], + "name": "updateOperatorRewardsCollector", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_penaltyContract", + "type": "address" + } + ], + "name": "updatePenaltyContract", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_permissionedNodeRegistry", + "type": "address" + } + ], + "name": "updatePermissionedNodeRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_permissionedPool", + "type": "address" + } + ], + "name": "updatePermissionedPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_permissionedSocializePool", + "type": "address" + } + ], + "name": "updatePermissionedSocializingPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_permissionlessNodeRegistry", + "type": "address" + } + ], + "name": "updatePermissionlessNodeRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_permissionlessPool", + "type": "address" + } + ], + "name": "updatePermissionlessPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_permissionlessSocializePool", + "type": "address" + } + ], + "name": "updatePermissionlessSocializingPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_poolSelector", + "type": "address" + } + ], + "name": "updatePoolSelector", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_poolUtils", + "type": "address" + } + ], + "name": "updatePoolUtils", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_rewardsThreshold", + "type": "uint256" + } + ], + "name": "updateRewardsThreshold", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sdCollateral", + "type": "address" + } + ], + "name": "updateSDCollateral", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_sdIncentiveController", + "type": "address" + } + ], + "name": "updateSDIncentiveController", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_utilityPool", + "type": "address" + } + ], + "name": "updateSDUtilityPool", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_socializingPoolCycleDuration", + "type": "uint256" + } + ], + "name": "updateSocializingPoolCycleDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_SocializePoolOptInCoolingPeriod", + "type": "uint256" + } + ], + "name": "updateSocializingPoolOptInCoolingPeriod", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderInsuranceFund", + "type": "address" + } + ], + "name": "updateStaderInsuranceFund", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderOracle", + "type": "address" + } + ], + "name": "updateStaderOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderToken", + "type": "address" + } + ], + "name": "updateStaderToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_staderTreasury", + "type": "address" + } + ], + "name": "updateStaderTreasury", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_stakePoolManager", + "type": "address" + } + ], + "name": "updateStakePoolManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_userWithdrawManager", + "type": "address" + } + ], + "name": "updateUserWithdrawManager", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_validatorWithdrawalVaultImpl", + "type": "address" + } + ], + "name": "updateValidatorWithdrawalVaultImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_vaultFactory", + "type": "address" + } + ], + "name": "updateVaultFactory", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_withdrawnKeysBatchSize", + "type": "uint256" + } + ], + "name": "updateWithdrawnKeysBatchSize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/shared/services/bc-manager.go b/shared/services/bc-manager.go index 6ff1b1147..1582123c8 100644 --- a/shared/services/bc-manager.go +++ b/shared/services/bc-manager.go @@ -141,6 +141,7 @@ func (m *BeaconClientManager) GetNodeVersion() (beacon.NodeVersion, error) { if err != nil { return beacon.NodeVersion{}, err } + return result.(beacon.NodeVersion), nil } diff --git a/shared/services/beacon/client/std-http-client.go b/shared/services/beacon/client/std-http-client.go index 34ed242d9..f3f6f9325 100644 --- a/shared/services/beacon/client/std-http-client.go +++ b/shared/services/beacon/client/std-http-client.go @@ -423,10 +423,12 @@ func (c *StandardHttpClient) GetValidatorIndex(pubkey types.ValidatorPubkey) (ui // Get domain data for a domain type at a given epoch func (c *StandardHttpClient) GetExitDomainData(domainType []byte, network config.Network) ([]byte, error) { - var genesis GenesisResponse genesis, err := c.getGenesis() + if err != nil { + return []byte{}, fmt.Errorf("GetGenesis %w", err) + } // Get fork version var capellaForkVersion string @@ -445,8 +447,8 @@ func (c *StandardHttpClient) GetExitDomainData(domainType []byte, network config // Compute & return domain var dt [4]byte copy(dt[:], domainType[:]) - return eth2types.Domain(dt, decodedForkVersion, genesis.Data.GenesisValidatorsRoot), nil + return eth2types.Domain(dt, decodedForkVersion, genesis.Data.GenesisValidatorsRoot), nil } // Perform a voluntary exit on a validator @@ -589,13 +591,16 @@ func (c *StandardHttpClient) getNodeVersion() (NodeVersionResponse, error) { if err != nil { return NodeVersionResponse{}, fmt.Errorf("Could not get node sync status: %w", err) } + if status != http.StatusOK { return NodeVersionResponse{}, fmt.Errorf("Could not get node sync status: HTTP status %d; response body: '%s'", status, string(responseBody)) } + var nodeVersion NodeVersionResponse if err := json.Unmarshal(responseBody, &nodeVersion); err != nil { return NodeVersionResponse{}, fmt.Errorf("Could not decode node sync status: %w", err) } + return nodeVersion, nil } diff --git a/shared/services/config/stader-config.go b/shared/services/config/stader-config.go index 0fce3fd35..474f0b8cc 100644 --- a/shared/services/config/stader-config.go +++ b/shared/services/config/stader-config.go @@ -986,6 +986,7 @@ func (cfg *StaderConfig) GenerateEnvironmentVariables() map[string]string { envVars["PROMETHEUS_ADDITIONAL_FLAGS"] = fmt.Sprintf(", \"%s\"", cfg.Prometheus.AdditionalFlags.Value.(string)) } } + if cfg.ExposeGuardianPort.Value == true { envVars["GUARDIAN_OPEN_PORTS"] = fmt.Sprintf("%d:%d/tcp", cfg.NodeMetricsPort.Value, cfg.NodeMetricsPort.Value) } diff --git a/shared/services/ec-manager.go b/shared/services/ec-manager.go index b3216279a..f61769ff8 100644 --- a/shared/services/ec-manager.go +++ b/shared/services/ec-manager.go @@ -541,12 +541,12 @@ func (p *ExecutionClientManager) Version() (string, error) { Jsonrpc string `json:"jsonrpc"` Method string `json:"method"` Params []string `json:"params"` - Id int64 `json:"id"` + ID int64 `json:"id"` }{ Jsonrpc: "2.0", Method: "web3_clientVersion", Params: []string{}, - Id: 1, + ID: 1, } res, err := net.MakePostRequest(url, payload) diff --git a/shared/services/services.go b/shared/services/services.go index 2eabbedd0..ef9b09501 100644 --- a/shared/services/services.go +++ b/shared/services/services.go @@ -223,6 +223,15 @@ func GetStakePoolManagerAddress(c *cli.Context) (common.Address, error) { return stader_config.GetStakePoolManagerAddress(sdcfg, nil) } +func GetSdUtilityAddress(c *cli.Context) (common.Address, error) { + sdcfg, err := GetStaderConfigContract(c) + if err != nil { + return common.Address{}, err + } + + return stader_config.GetSDUtilityPoolAddress(sdcfg, nil) +} + func GetPermissionlessNodeRegistry(c *cli.Context) (*stader.PermissionlessNodeRegistryContractManager, error) { cfg, err := getConfig(c) if err != nil { @@ -422,6 +431,25 @@ func GetStakePoolManager(c *cli.Context) (*stader.StakePoolManagerContractManage return stader.NewStakePoolManager(ec, stakePoolManagerAddress) } +func GetSdUtilityContract(c *cli.Context) (*stader.SDUtilityPoolContractManager, error) { + _cfg, err := getConfig(c) + if err != nil { + return nil, err + } + + ec, err := getEthClient(c, _cfg) + if err != nil { + return nil, err + } + + sdUtilityAddress, err := GetSdUtilityAddress(c) + if err != nil { + return nil, err + } + + return stader.NewSDUtilityPool(ec, sdUtilityAddress) +} + func GetBeaconClient(c *cli.Context) (*BeaconClientManager, error) { cfg, err := getConfig(c) if err != nil { diff --git a/shared/services/stader/node.go b/shared/services/stader/node.go index 38e711992..e3b26ff89 100644 --- a/shared/services/stader/node.go +++ b/shared/services/stader/node.go @@ -113,34 +113,39 @@ func (c *Client) CanNodeDepositSd(amountWei *big.Int) (api.CanNodeDepositSdRespo } // Get the gas estimate for approving new SD interaction -func (c *Client) NodeDepositSdApprovalGas(amountWei *big.Int) (api.NodeDepositSdApproveGasResponse, error) { - responseBytes, err := c.callAPI(fmt.Sprintf("node get-deposit-sd-approval-gas %s", amountWei.String())) +func (c *Client) NodeSdApprovalGas(amountWei *big.Int, address common.Address) (api.SdApproveGasResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node get-sd-approval-gas %s %s", amountWei.String(), address)) if err != nil { - return api.NodeDepositSdApproveGasResponse{}, fmt.Errorf("could not get new SD approval gas: %w", err) + return api.SdApproveGasResponse{}, fmt.Errorf("could not get new SD approval gas: %w", err) } - var response api.NodeDepositSdApproveGasResponse + + var response api.SdApproveGasResponse if err := json.Unmarshal(responseBytes, &response); err != nil { - return api.NodeDepositSdApproveGasResponse{}, fmt.Errorf("could not decode node deposit S approve gas response: %w", err) + return api.SdApproveGasResponse{}, fmt.Errorf("could not decode node deposit S approve gas response: %w", err) } + if response.Error != "" { - return api.NodeDepositSdApproveGasResponse{}, fmt.Errorf("could not get new SD approval gas: %s", response.Error) + return api.SdApproveGasResponse{}, fmt.Errorf("could not get new SD approval gas: %s", response.Error) } return response, nil } // Approve SD for depositing as collateral -func (c *Client) NodeDepositSdApprove(amountWei *big.Int) (api.NodeDepositSdApproveResponse, error) { - responseBytes, err := c.callAPI(fmt.Sprintf("node deposit-sd-approve-sd %s", amountWei.String())) +func (c *Client) NodeSdApprove(amountWei *big.Int, address common.Address) (api.SdApproveResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node sd-approve-sd %s %s", amountWei.String(), address)) if err != nil { - return api.NodeDepositSdApproveResponse{}, fmt.Errorf("could not approve SD for staking: %w", err) + return api.SdApproveResponse{}, fmt.Errorf("could not approve SD for staking: %w", err) } - var response api.NodeDepositSdApproveResponse + + var response api.SdApproveResponse if err := json.Unmarshal(responseBytes, &response); err != nil { - return api.NodeDepositSdApproveResponse{}, fmt.Errorf("could not decode deposit node SD approve response: %w", err) + return api.SdApproveResponse{}, fmt.Errorf("could not decode deposit node SD approve response: %w", err) } + if response.Error != "" { - return api.NodeDepositSdApproveResponse{}, fmt.Errorf("could not approve SD for staking: %s", response.Error) + return api.SdApproveResponse{}, fmt.Errorf("could not approve SD for staking: %s", response.Error) } + return response, nil } @@ -191,24 +196,27 @@ func (c *Client) UpdateSocializeEl(socializeEl bool) (api.UpdateSocializeElRespo } // Get the node's SD allowance -func (c *Client) GetNodeDepositSdAllowance() (api.NodeDepositSdAllowanceResponse, error) { - responseBytes, err := c.callAPI(fmt.Sprintf("node deposit-sd-allowance")) +func (c *Client) GetNodeSdAllowance(contractAddress common.Address) (api.SdAllowanceResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node sd-allowance %s", contractAddress.String())) if err != nil { - return api.NodeDepositSdAllowanceResponse{}, fmt.Errorf("could not get node deposit SD allowance: %w", err) + return api.SdAllowanceResponse{}, fmt.Errorf("could not get node deposit SD allowance: %w", err) } - var response api.NodeDepositSdAllowanceResponse + + var response api.SdAllowanceResponse if err := json.Unmarshal(responseBytes, &response); err != nil { - return api.NodeDepositSdAllowanceResponse{}, fmt.Errorf("could not decode node deposit SD allowance response: %w", err) + return api.SdAllowanceResponse{}, fmt.Errorf("could not decode node deposit SD allowance response: %w", err) } + if response.Error != "" { - return api.NodeDepositSdAllowanceResponse{}, fmt.Errorf("could not get node deposit SD allowance: %s", response.Error) + return api.SdAllowanceResponse{}, fmt.Errorf("could not get node deposit SD allowance: %s", response.Error) } + return response, nil } // Check whether the node can make a deposit -func (c *Client) CanNodeDeposit(amountWei *big.Int, numValidators *big.Int, reloadKeys bool) (api.CanNodeDepositResponse, error) { - responseBytes, err := c.callAPI(fmt.Sprintf("validator can-deposit %s %s %t", amountWei.String(), numValidators, reloadKeys)) +func (c *Client) CanNodeDeposit(amountBasedWei, amountUtilityWei, numValidators *big.Int, reloadKeys bool) (api.CanNodeDepositResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("validator can-deposit %s %s %s %t", amountBasedWei.String(), amountUtilityWei.String(), numValidators, reloadKeys)) if err != nil { return api.CanNodeDepositResponse{}, fmt.Errorf("could not get can validator deposit status: %w", err) } @@ -268,8 +276,8 @@ func (c *Client) GetContractsInfo() (api.ContractsInfoResponse, error) { } // Make a node deposit -func (c *Client) NodeDeposit(amountWei *big.Int, numValidators *big.Int, reloadKeys bool) (api.NodeDepositResponse, error) { - responseBytes, err := c.callAPI(fmt.Sprintf("validator deposit %s %s %t", amountWei.String(), numValidators, reloadKeys)) +func (c *Client) NodeDeposit(amountWei, numValidators, utilitySDAmount *big.Int, reloadKeys bool) (api.NodeDepositResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("validator deposit %s %s %s %t", amountWei.String(), utilitySDAmount.String(), numValidators, reloadKeys)) if err != nil { return api.NodeDepositResponse{}, fmt.Errorf("could not make validator deposit as er: %w", err) } @@ -541,9 +549,9 @@ func (c *Client) CanClaimSpRewards() (api.CanClaimSpRewardsResponse, error) { return response, nil } -func (c *Client) EstimateClaimSpRewardsGas(cycles []*big.Int) (api.EstimateClaimSpRewardsGasResponse, error) { +func (c *Client) EstimateClaimSpRewardsGas(cycles []*big.Int, depositSd bool) (api.EstimateClaimSpRewardsGasResponse, error) { stringifiedCycleList := string_utils.StringifyArray(cycles) - responseBytes, err := c.callAPI(fmt.Sprintf("node estimate-claim-sp-rewards-gas %s", stringifiedCycleList)) + responseBytes, err := c.callAPI(fmt.Sprintf("node estimate-claim-sp-rewards-gas %s %s", stringifiedCycleList, strconv.FormatBool(depositSd))) if err != nil { return api.EstimateClaimSpRewardsGasResponse{}, fmt.Errorf("could not get node estimate-claim-sp-rewards-gas response: %w", err) } @@ -558,9 +566,9 @@ func (c *Client) EstimateClaimSpRewardsGas(cycles []*big.Int) (api.EstimateClaim return response, nil } -func (c *Client) ClaimSpRewards(cycles []*big.Int) (api.ClaimSpRewardsResponse, error) { +func (c *Client) ClaimSpRewards(cycles []*big.Int, depositSd bool) (api.ClaimSpRewardsResponse, error) { stringifiedCycleList := string_utils.StringifyArray(cycles) - responseBytes, err := c.callAPI(fmt.Sprintf("node claim-sp-rewards %s", stringifiedCycleList)) + responseBytes, err := c.callAPI(fmt.Sprintf("node claim-sp-rewards %s %s", stringifiedCycleList, strconv.FormatBool(depositSd))) if err != nil { return api.ClaimSpRewardsResponse{}, fmt.Errorf("could not get node claim-sp-rewards response: %w", err) } @@ -625,12 +633,105 @@ func (c *Client) SetRewardAddress(operatorRewardAddress common.Address) (api.Set if err != nil { return api.SetRewardAddress{}, fmt.Errorf("could not get set-reward-address response: %w", err) } + var response api.SetRewardAddress if err := json.Unmarshal(responseBytes, &response); err != nil { return api.SetRewardAddress{}, fmt.Errorf("could not decode set-reward-address response: %w", err) } + if response.Error != "" { return api.SetRewardAddress{}, fmt.Errorf("could not get set-reward-address response: %s", response.Error) } + + return response, nil +} + +func (c *Client) RepaySd(amountWei *big.Int) (api.NodeRepaySDResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node repay-sd %s", amountWei.String())) + if err != nil { + return api.NodeRepaySDResponse{}, fmt.Errorf("could not repay SD: %w", err) + } + + var response api.NodeRepaySDResponse + if err := json.Unmarshal(responseBytes, &response); err != nil { + return api.NodeRepaySDResponse{}, fmt.Errorf("could not decode repay node SD response: %w", err) + } + + if response.Error != "" { + return api.NodeRepaySDResponse{}, fmt.Errorf("could not repay SD: %s", response.Error) + } + + return response, nil +} + +func (c *Client) CanRepaySd(amountWei *big.Int) (api.CanRepaySDResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node can-repay-sd %s", amountWei.String())) + if err != nil { + return api.CanRepaySDResponse{}, fmt.Errorf("could not get CanNodeRepaySd SD: %w", err) + } + + var response api.CanRepaySDResponse + if err := json.Unmarshal(responseBytes, &response); err != nil { + return api.CanRepaySDResponse{}, fmt.Errorf("could not decode CanNodeRepaySd response: %w", err) + } + + if response.Error != "" { + return api.CanRepaySDResponse{}, fmt.Errorf("could not can-repay SD: %s", response.Error) + } + + return response, nil +} + +func (c *Client) NodeUtilizeSd(amountWei *big.Int) (api.NodeUtilitySDResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node utilize-sd %s", amountWei.String())) + if err != nil { + return api.NodeUtilitySDResponse{}, fmt.Errorf("could not utilize SD: %w", err) + } + + var response api.NodeUtilitySDResponse + if err := json.Unmarshal(responseBytes, &response); err != nil { + return api.NodeUtilitySDResponse{}, fmt.Errorf("could not decode utilize response: %w", err) + } + + if response.Error != "" { + return api.NodeUtilitySDResponse{}, fmt.Errorf("could not utilize SD: %s", response.Error) + } + + return response, nil +} + +func (c *Client) CanNodeUtilizeSd(amountWei *big.Int) (api.CanUtilitySDResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node can-utilize-sd %s", amountWei.String())) + if err != nil { + return api.CanUtilitySDResponse{}, fmt.Errorf("could not utilize SD: %w", err) + } + + var response api.CanUtilitySDResponse + if err := json.Unmarshal(responseBytes, &response); err != nil { + return api.CanUtilitySDResponse{}, fmt.Errorf("could not decode node SD utilize response: %w", err) + } + + if response.Error != "" { + return api.CanUtilitySDResponse{}, fmt.Errorf("could not utilize SD: %s", response.Error) + } + + return response, nil +} + +func (c *Client) GetSDStatus(numValidators *big.Int) (api.GetSdStatusResponse, error) { + responseBytes, err := c.callAPI(fmt.Sprintf("node get-sd-status %s", numValidators)) + if err != nil { + return api.GetSdStatusResponse{}, fmt.Errorf("could not get-sd-status: %w", err) + } + + var response api.GetSdStatusResponse + if err := json.Unmarshal(responseBytes, &response); err != nil { + return api.GetSdStatusResponse{}, fmt.Errorf("could not decode node get SD status response: %w", err) + } + + if response.Error != "" { + return api.GetSdStatusResponse{}, fmt.Errorf("could not get SD status: %s", response.Error) + } + return response, nil } diff --git a/shared/services/state/network-state.go b/shared/services/state/network-state.go index cc75a468c..86527f297 100644 --- a/shared/services/state/network-state.go +++ b/shared/services/state/network-state.go @@ -8,6 +8,7 @@ import ( "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/utils/stdr" "github.com/stader-labs/stader-node/stader-lib/contracts" + "github.com/stader-labs/stader-node/stader-lib/sdutility" "github.com/urfave/cli" "github.com/stader-labs/stader-node/shared/utils/math" @@ -62,6 +63,12 @@ type MetricDetails struct { // done MaxEthThreshold float64 + // done + TotalSDUtilized float64 + + // done + SDUtilizationTVL float64 + // Validator specific info // done @@ -114,6 +121,34 @@ type MetricDetails struct { OperatorStakedSdInEth float64 // done OperatorEthCollateral float64 + + // done + OperatorSDUtilized float64 + // done + SdUtilityPoolBalance float64 + + // The utilize amount + fee + OperatorSDUtilizationPosition float64 + + // The amount SD self bond + OperatorSDSelfBond float64 + + // done + OperatorSDInterest float64 + + // done + SdCollateralPct float64 + + // done + LockedEth float64 + + // done + HealthFactor float64 + + // done + LiquidationStatus float64 + + ClaimVaultBalance float64 } type MetricsCache struct { @@ -153,6 +188,11 @@ func CreateMetricsCache( if err != nil { return nil, err } + + sduAddress, err := services.GetSdUtilityAddress(c) + if err != nil { + return nil, err + } ethxAddress, err := services.GetEthxTokenAddress(c) if err != nil { return nil, err @@ -212,6 +252,11 @@ func CreateMetricsCache( return nil, err } + sdu, err := stader.NewSDUtilityPool(ec, sduAddress) + if err != nil { + return nil, err + } + // Get the execution block for the given slot beaconBlock, exists, err := bc.GetBeaconBlock(fmt.Sprintf("%d", slotNumber)) if err != nil { @@ -253,10 +298,12 @@ func CreateMetricsCache( if err != nil { return nil, err } - operatorSdColletaral, err := sd_collateral.GetOperatorSdBalance(sdc, nodeAddress, nil) + + operatorSdCollateral, err := sd_collateral.GetOperatorSdBalance(sdc, nodeAddress, nil) if err != nil { return nil, err } + totalValidatorKeys, err := node.GetTotalValidatorKeys(prn, operatorId, nil) if err != nil { return nil, err @@ -265,7 +312,8 @@ func CreateMetricsCache( if err != nil { return nil, err } - operatorSdCollateralInEth, err := sd_collateral.ConvertSdToEth(sdc, operatorSdColletaral, nil) + + operatorSdCollateralInEth, err := sd_collateral.ConvertSdToEth(sdc, operatorSdCollateral, nil) if err != nil { return nil, err } @@ -449,13 +497,58 @@ func CreateMetricsCache( return nil, err } + sdUtilized, err := sd_collateral.GetOperatorUtilizedSDBalance(sdc, nodeAddress, nil) + if err != nil { + return nil, err + } + + totalPosition, err := sdutility.GetUtilizerLatestBalance(sdu, nodeAddress, nil) + if err != nil { + return nil, err + } + + utilityPoolBalance, err := sdutility.GetPoolAvailableSDBalance(sdu, nil) + if err != nil { + return nil, err + } + + totalSDUtilized, err := sdutility.GetTotalUtilized(sdu, nil) + if err != nil { + return nil, err + } + + sDUtilizationTVL, err := sdutility.GetTotalTVL(sdu, nil) + if err != nil { + return nil, err + } + + userData, err := sdutility.GetUserData(sdu, nodeAddress, nil) + if err != nil { + return nil, err + } + + liquidIndex, err := sdutility.LiquidationIndexByOperator(sdu, nodeAddress, nil) + if err != nil { + return nil, err + } + + orc, err := services.GetOperatorRewardsCollectorContract(c) + if err != nil { + return nil, err + } + + operatorClaimVaultBalance, err := node.GetOperatorRewardsCollectorBalance(orc, nodeAddress, nil) + if err != nil { + return nil, err + } + minThreshold := math.RoundDown(eth.WeiToEth(permissionlessPoolThreshold.MinThreshold), 2) sdPriceFormatted := math.RoundDown(eth.WeiToEth(sdPrice), 2) collateralRatioInSd := minThreshold * sdPriceFormatted metricsDetails.SdPrice = sdPriceFormatted metricsDetails.EthPrice = math.RoundDown(eth.WeiToEth(ethPrice), 10) - metricsDetails.OperatorStakedSd = math.RoundDown(eth.WeiToEth(operatorSdColletaral), 10) + metricsDetails.OperatorStakedSdInEth = math.RoundDown(eth.WeiToEth(operatorSdCollateralInEth), 10) metricsDetails.OperatorEthCollateral = operatorEthCollateral metricsDetails.TotalOperators = totalOperators.Sub(totalOperators, big.NewInt(1)) @@ -468,6 +561,7 @@ func CreateMetricsCache( metricsDetails.TotalStakedEthByNos = big.NewInt(0).Mul(totalValidators, big.NewInt(4)) metricsDetails.CollateralRatio = math.RoundDown(eth.WeiToEth(permissionlessPoolThreshold.MinThreshold), 2) metricsDetails.CollateralRatioInSd = collateralRatioInSd + metricsDetails.MinEthThreshold = math.RoundDown(eth.WeiToEth(poolThreshold.MinThreshold), 4) metricsDetails.MaxEthThreshold = math.RoundDown(eth.WeiToEth(poolThreshold.MaxThreshold), 4) @@ -497,6 +591,39 @@ func CreateMetricsCache( metricsDetails.UnclaimedSocializingPoolElRewards = math.RoundDown(eth.WeiToEth(rewardClaimData.unclaimedEth), SixDecimalRound) metricsDetails.UnclaimedSocializingPoolSDRewards = math.RoundDown(eth.WeiToEth(rewardClaimData.unclaimedSd), SixDecimalRound) + // amount NO utilized, not include fee + metricsDetails.OperatorSDUtilized = math.RoundDown(eth.WeiToEth(sdUtilized), SixDecimalRound) + + metricsDetails.OperatorSDInterest = math.RoundDown(eth.WeiToEth(userData.TotalInterestSD), SixDecimalRound) + + metricsDetails.SdUtilityPoolBalance = math.RoundDown(eth.WeiToEth(utilityPoolBalance), SixDecimalRound) + // + operatorStakedSd := eth.WeiToEth(operatorSdCollateral) + metricsDetails.OperatorSDUtilized + requireCollateral := collateralRatioInSd * float64(operatorNonTerminalKeys) + + collateralPct := 0.0 + if requireCollateral > 0 { + collateralPct = (operatorStakedSd / requireCollateral) * 10 + } + + metricsDetails.OperatorStakedSd = math.RoundDown(operatorStakedSd, 10) + + metricsDetails.SdCollateralPct = collateralPct + + metricsDetails.LockedEth = math.RoundDown(eth.WeiToEth(userData.LockedEth), SixDecimalRound) + metricsDetails.HealthFactor = math.RoundDown(eth.WeiToEth(userData.HealthFactor), SixDecimalRound) + + metricsDetails.OperatorSDUtilizationPosition = math.RoundDown(eth.WeiToEth(totalPosition), SixDecimalRound) + + metricsDetails.OperatorSDSelfBond = math.RoundDown(eth.WeiToEth(operatorSdCollateral), SixDecimalRound) + + metricsDetails.LiquidationStatus = float64(liquidIndex.Int64()) + metricsDetails.ClaimVaultBalance = math.RoundDown(eth.WeiToEth(operatorClaimVaultBalance), SixDecimalRound) + + metricsDetails.TotalSDUtilized = math.RoundDown(eth.WeiToEth(totalSDUtilized), SixDecimalRound) + + metricsDetails.SDUtilizationTVL = math.RoundDown(eth.WeiToEth(sDUtilizationTVL), SixDecimalRound) + state.StaderNetworkDetails = metricsDetails state.logLine("Retrieved Stader Network Details (total time: %s)", time.Since(start)) diff --git a/shared/services/wallet/node.go b/shared/services/wallet/node.go index 695282175..28a285774 100644 --- a/shared/services/wallet/node.go +++ b/shared/services/wallet/node.go @@ -190,7 +190,6 @@ func (w *Wallet) getNodeDerivedKey(index uint) (*hdkeychain.ExtendedKey, string, // Get the node hex encoding public key func (w *Wallet) GetNodePubkey() (string, error) { - // Check wallet is initialized if !w.IsInitialized() { return "", errors.New("Wallet is not initialized") @@ -204,6 +203,7 @@ func (w *Wallet) GetNodePubkey() (string, error) { // Get public key publicKey := privateKey.Public() + publicKeyECDSA, ok := publicKey.(*ecdsa.PublicKey) if !ok { return "", errors.New("Could not get node public key") diff --git a/shared/types/api/node.go b/shared/types/api/node.go index a8ec3582a..50f72ff29 100644 --- a/shared/types/api/node.go +++ b/shared/types/api/node.go @@ -35,6 +35,7 @@ type NodeStatusResponse struct { OperatorELRewardsAddress common.Address `json:"operatorELRewardsAddress"` OperatorELRewardsAddressBalance *big.Int `json:"operatorELRewardsAddressBalance"` OperatorRewardCollectorBalance *big.Int `json:"operatorRewardCollectorBalance"` + OperatorWithdrawableEth *big.Int `json:"operatorWithdrawableEth"` DepositedSdCollateral *big.Int `json:"depositedSdCollateral"` SdCollateralWorthValidators *big.Int `json:"sdCollateralWorthValidators"` Registered bool `json:"registered"` @@ -69,22 +70,26 @@ type CanNodeDepositSdResponse struct { InsufficientBalance bool `json:"insufficientBalance"` GasInfo stader.GasInfo `json:"gasInfo"` } -type NodeDepositSdApproveGasResponse struct { + +type SdApproveGasResponse struct { Status string `json:"status"` Error string `json:"error"` GasInfo stader.GasInfo `json:"gasInfo"` } -type NodeDepositSdApproveResponse struct { + +type SdApproveResponse struct { Status string `json:"status"` Error string `json:"error"` ApproveTxHash common.Hash `json:"approveTxHash"` } + type NodeDepositSdResponse struct { Status string `json:"status"` Error string `json:"error"` DepositTxHash common.Hash `json:"stakeTxHash"` } -type NodeDepositSdAllowanceResponse struct { + +type SdAllowanceResponse struct { Status string `json:"status"` Error string `json:"error"` Allowance *big.Int `json:"allowance"` @@ -97,7 +102,6 @@ type CanNodeDepositResponse struct { InsufficientBalance bool `json:"insufficientBalance"` InvalidAmount bool `json:"invalidAmount"` DepositPaused bool `json:"depositPaused"` - NotEnoughSdCollateral bool `json:"notEnoughSdCollateral"` MaxValidatorLimitReached bool `json:"maxValidatorLimitReached"` InputKeyLimitReached bool `json:"inputKeyLimitReached"` InputKeyLimit uint16 `json:"inputKeyLimit"` @@ -148,6 +152,7 @@ type ContractsInfoResponse struct { StaderOracle common.Address `json:"staderOracle"` PenaltyTracker common.Address `json:"penaltyTracker"` StakePoolManager common.Address `json:"stakePoolManager"` + SdUtilityContract common.Address `json:"sdUtilityContract"` } type DebugExitResponse struct { @@ -393,10 +398,12 @@ type NodeSignResponse struct { } type CanClaimRewards struct { - Status string `json:"status"` - Error string `json:"error"` - NoRewards bool `json:"noRewards"` - GasInfo stader.GasInfo `json:"gasInfo"` + Status string `json:"status"` + Error string `json:"error"` + NoRewards bool `json:"noRewards"` + WithdrawableInEth *big.Int `json:"withdrawableInEth"` + ClaimsBalance *big.Int `json:"claimsBalance"` + GasInfo stader.GasInfo `json:"gasInfo"` } type ClaimRewards struct { @@ -404,5 +411,65 @@ type ClaimRewards struct { Error string `json:"error"` OperatorRewardsBalance *big.Int `json:"operatorRewardsBalance"` OperatorRewardAddress common.Address `json:"operatorRewardAddress"` + RewardsClaimed *big.Int `json:"rewardsClaimed"` TxHash common.Hash `json:"txHash"` } + +type NodeRepaySDResponse struct { + Status string `json:"status"` + Error string `json:"error"` + TxHash common.Hash `json:"txHash"` +} + +type CanRepaySDResponse struct { + Status string `json:"status"` + Error string `json:"error"` + GasInfo stader.GasInfo `json:"gasInfo"` +} + +type NodeUtilitySDResponse struct { + Status string `json:"status"` + Error string `json:"error"` + TxHash common.Hash `json:"txHash"` +} + +type CanUtilitySDResponse struct { + Status string `json:"status"` + Error string `json:"error"` + NonTerminalValidators uint64 `json:"nonTerminalValidators"` + GasInfo stader.GasInfo `json:"gasInfo"` +} + +type GetSdStatusResponse struct { + SDStatus *SdStatusResponse `json:"sdStatusResponse"` + Status string `json:"status"` + Error string `json:"error"` +} + +type SdStatusResponse struct { + SdUtilizerLatestBalance *big.Int `json:"sdUtilizerLatestBalance"` + SdUtilizedBalance *big.Int `json:"sdUtilizedBalance"` + SdCollateralCurrentAmount *big.Int `json:"sdCollateralCurrentAmount"` + SdCollateralRequireAmount *big.Int `json:"sdCollateralRequireAmount"` + SdMaxUtilizableAmount *big.Int `json:"sdMaxUtilizableAmount"` + UtilizationRate *big.Float `json:"utilizationRate"` + SdBalance *big.Int `json:"sdBalance"` + PoolAvailableSDBalance *big.Int `json:"poolAvailableSDBalance"` + SdRewardEligible *big.Int `json:"sdRewardEligible"` + HealthFactor *big.Int `json:"healthFactor"` + AccumulatedInterest *big.Int `json:"accumulatedInterest"` + NotEnoughSdCollateral bool `json:"notEnoughSdCollateral"` + AlreadyLiquidated bool `json:"alreadyLiquidated"` +} + +type NodeRepayExcessSDResponse struct { + Status string `json:"status"` + Error string `json:"error"` + TxHash common.Hash `json:"txHash"` +} + +type CanRepayExcessSDResponse struct { + Status string `json:"status"` + Error string `json:"error"` + GasInfo stader.GasInfo `json:"gasInfo"` +} diff --git a/shared/utils/cli/prompt.go b/shared/utils/cli/prompt.go index ee6692039..704da66c3 100644 --- a/shared/utils/cli/prompt.go +++ b/shared/utils/cli/prompt.go @@ -58,8 +58,11 @@ func Select(initialPrompt string, options []string) (int, string) { // Get prompt prompt := initialPrompt + errPromptMsg := "Please enter a number corresponding to an option" + for i, option := range options { prompt += fmt.Sprintf("\n%d: %s", (i + 1), option) + errPromptMsg += fmt.Sprintf("\n%d: %s", (i + 1), option) } // Get expected response format @@ -70,7 +73,7 @@ func Select(initialPrompt string, options []string) (int, string) { expectedFormat := fmt.Sprintf("^(%s)$", strings.Join(optionNumbers, "|")) // Prompt user - response := Prompt(prompt, expectedFormat, "Please enter a number corresponding to an option") + response := Prompt(prompt, expectedFormat, errPromptMsg) // Get selected option index, _ := strconv.Atoi(response) @@ -91,3 +94,11 @@ func ConfirmSecureSession(warning string) bool { return true } + +func PrintError(msg string) { + fmt.Printf("%s%s%s\n", colorRed, msg, colorReset) +} + +func PrintWarning(msg string) { + fmt.Printf("%s%s%s\n", colorYellow, msg, colorReset) +} diff --git a/shared/utils/stader/node-diversity.go b/shared/utils/stader/node-diversity.go index 6902c4080..b42957d6e 100644 --- a/shared/utils/stader/node-diversity.go +++ b/shared/utils/stader/node-diversity.go @@ -33,5 +33,4 @@ func SendNodeDiversityResponseType( } return &resp, nil - } diff --git a/shared/version.go b/shared/version.go index cd78269f0..c4d9be051 100644 --- a/shared/version.go +++ b/shared/version.go @@ -21,7 +21,7 @@ package shared const BinaryBucket string = "/stader-node-build/permissionless" const DockerAccount string = "staderlabs" -const StaderVersion string = "1.4.9" +const StaderVersion string = "1.5.0-dev" const Logo string = ` _____ _ _ _ _ 𝅺 diff --git a/stader-cli/node/approve-sd.go b/stader-cli/node/approve-sd.go index 094761537..3ead42c11 100644 --- a/stader-cli/node/approve-sd.go +++ b/stader-cli/node/approve-sd.go @@ -5,6 +5,7 @@ import ( "math/big" "strconv" + "github.com/ethereum/go-ethereum/common" "github.com/urfave/cli" "github.com/stader-labs/stader-node/shared/services/gas" @@ -13,8 +14,7 @@ import ( "github.com/stader-labs/stader-node/stader-lib/utils/eth" ) -func nodeApproveSd(c *cli.Context) error { - +func nodeApproveDepositSd(c *cli.Context, amountInString string) error { staderClient, err := stader.NewClientFromCtx(c) if err != nil { return err @@ -32,9 +32,6 @@ func nodeApproveSd(c *cli.Context) error { cliutils.PrintMultiTransactionNonceWarning() } - // Get stake mount - amountInString := c.String("amount") - amount, err := strconv.ParseFloat(amountInString, 64) if err != nil { return err @@ -42,7 +39,16 @@ func nodeApproveSd(c *cli.Context) error { amountWei := eth.EthToWei(amount) - err = nodeApproveSdWithAmount(c, staderClient, amountWei) + contracts, err := staderClient.GetContractsInfo() + if err != nil { + return err + } + + autoConfirm := c.Bool("yes") + + nonce := c.GlobalUint64("nonce") + + err = nodeApproveSdWithAmountAndAddress(staderClient, amountWei, contracts.SdCollateralContract, autoConfirm, nonce) if err != nil { return err } @@ -50,30 +56,72 @@ func nodeApproveSd(c *cli.Context) error { return nil } -func nodeApproveSdWithAmount(c *cli.Context, staderClient *stader.Client, amountWei *big.Int) error { +func nodeApproveUtilitySd(c *cli.Context, amountInString string) error { + staderClient, err := stader.NewClientFromCtx(c) + if err != nil { + return err + } + defer staderClient.Close() + + // Check and assign the EC status + err = cliutils.CheckClientStatus(staderClient) + if err != nil { + return err + } + // If a custom nonce is set, print the multi-transaction warning if c.GlobalUint64("nonce") != 0 { cliutils.PrintMultiTransactionNonceWarning() } + amount, err := strconv.ParseFloat(amountInString, 64) + if err != nil { + return err + } + + amountWei := eth.EthToWei(amount) + + contracts, err := staderClient.GetContractsInfo() + if err != nil { + return err + } + + autoConfirm := c.Bool("yes") + + nonce := c.GlobalUint64("nonce") + + err = nodeApproveSdWithAmountAndAddress(staderClient, amountWei, contracts.SdUtilityContract, autoConfirm, nonce) + if err != nil { + return err + } + + return nil +} + +func nodeApproveSdWithAmountAndAddress(staderClient *stader.Client, amountWei *big.Int, address common.Address, autoConfirm bool, nonce uint64) error { + // If a custom nonce is set, print the multi-transaction warning + if nonce != 0 { + cliutils.PrintMultiTransactionNonceWarning() + } + // Get approval gas - approvalGas, err := staderClient.NodeDepositSdApprovalGas(amountWei) + approvalGas, err := staderClient.NodeSdApprovalGas(amountWei, address) if err != nil { return err } // Assign max fees - err = gas.AssignMaxFeeAndLimit(approvalGas.GasInfo, staderClient, c.Bool("yes")) + err = gas.AssignMaxFeeAndLimit(approvalGas.GasInfo, staderClient, autoConfirm) if err != nil { return err } // Prompt for confirmation - if !(c.Bool("yes") || cliutils.Confirm("Do you want to approve SD to be spent by the Collateral Contract?")) { + if !(autoConfirm || cliutils.Confirm("Do you want to approve SD to be spent by the Collateral Contract?")) { fmt.Println("Cancelled.") return nil } - response, err := staderClient.NodeDepositSdApprove(amountWei) + response, err := staderClient.NodeSdApprove(amountWei, address) if err != nil { return err } @@ -90,9 +138,18 @@ func nodeApproveSdWithAmount(c *cli.Context, staderClient *stader.Client, amount fmt.Println("Successfully approved SD.") // If a custom nonce is set, increment it for the next transaction - if c.GlobalUint64("nonce") != 0 { + if nonce != 0 { staderClient.IncrementCustomNonce() } return nil } + +// Calculate max uint256 value +func maxUint256() *big.Int { + maxUint256 := big.NewInt(2) + maxUint256 = maxUint256.Exp(maxUint256, big.NewInt(256), nil) + maxUint256 = maxUint256.Sub(maxUint256, big.NewInt(1)) + + return maxUint256 +} diff --git a/stader-cli/node/claim-rewards.go b/stader-cli/node/claim-rewards.go index 2b56628e4..3ce2599ed 100644 --- a/stader-cli/node/claim-rewards.go +++ b/stader-cli/node/claim-rewards.go @@ -2,10 +2,11 @@ package node import ( "fmt" + "math/big" + "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" - "github.com/stader-labs/stader-node/shared/utils/math" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" ) @@ -36,6 +37,28 @@ func ClaimRewards(c *cli.Context) error { return nil } + sdStatusResponse, err := staderClient.GetSDStatus(big.NewInt(0)) + if err != nil { + return err + } + + sdStatus := sdStatusResponse.SDStatus + + // totalFee := sdStatus.AccumulatedInterest + // if withdrawableInEth < claimsBalance, then there is an existing utilization position + if canClaimRewardsResponse.ClaimsBalance.Cmp(canClaimRewardsResponse.WithdrawableInEth) != 0 { + if sdStatus.SdUtilizerLatestBalance.Cmp(big.NewInt(0)) > 0 { + fmt.Printf("You currently have an existing SD Utilization Position of %s. Based on the current Health Factor, you can claim %s at the moment, and the remaining ETH can be claimed after closing the Utilization Position", eth.DisplayAmountInUnits(sdStatusResponse.SDStatus.SdUtilizerLatestBalance, "sd"), eth.DisplayAmountInUnits(canClaimRewardsResponse.WithdrawableInEth, "eth")) + + if !cliutils.Confirm("Do you wish to proceed?\n\n") { + fmt.Println("Cancelled.") + return nil + } + + fmt.Printf("Note: Please repay your utilized SD by using the following command to claim the remaining ETH: stader-cli sd repay --amount .\n") + } + } + err = gas.AssignMaxFeeAndLimit(canClaimRewardsResponse.GasInfo, staderClient, c.Bool("yes")) if err != nil { return err @@ -53,13 +76,15 @@ func ClaimRewards(c *cli.Context) error { if err != nil { return err } - fmt.Printf("Withdrawing %.6f ETH Rewards to Operator Reward Address: %s\n\n", math.RoundDown(eth.WeiToEth(res.OperatorRewardsBalance), 6), res.OperatorRewardAddress) + + fmt.Printf("Withdrawing %s Rewards to Operator Reward Address: %s\n\n", eth.DisplayAmountInUnits(res.RewardsClaimed, "eth"), res.OperatorRewardAddress) cliutils.PrintTransactionHash(staderClient, res.TxHash) + if _, err = staderClient.WaitForTransaction(res.TxHash); err != nil { return err } // Log & return - fmt.Printf("Withdrawn %.6f ETH Rewards to Operator Reward Address: %s\n\n", math.RoundDown(eth.WeiToEth(res.OperatorRewardsBalance), 6), res.OperatorRewardAddress) + fmt.Printf("Successful withdrawal of %s to Operator Reward Address: %s\n\n", eth.DisplayAmountInUnits(res.RewardsClaimed, "eth"), res.OperatorRewardAddress) return nil } diff --git a/stader-cli/node/claim-sp-rewards.go b/stader-cli/node/claim-sp-rewards.go index 53c8c0b4c..e8bec40e3 100644 --- a/stader-cli/node/claim-sp-rewards.go +++ b/stader-cli/node/claim-sp-rewards.go @@ -8,6 +8,7 @@ import ( "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" + stader_backend "github.com/stader-labs/stader-node/shared/types/stader-backend" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/stader-labs/stader-node/shared/utils/math" "github.com/stader-labs/stader-node/stader-lib/utils/eth" @@ -61,6 +62,11 @@ func ClaimSpRewards(c *cli.Context) error { return nil } + indexedDetailedCyclesInfo := map[int64]stader_backend.CycleMerkleProofs{} + for _, cycleInfo := range detailedCyclesInfo.DetailedCyclesInfo { + indexedDetailedCyclesInfo[cycleInfo.MerkleProofInfo.Cycle] = cycleInfo.MerkleProofInfo + } + cycleIndexes := []*big.Int{} for _, cycleInfo := range detailedCyclesInfo.DetailedCyclesInfo { cycleIndexes = append(cycleIndexes, big.NewInt(cycleInfo.MerkleProofInfo.Cycle)) @@ -76,11 +82,14 @@ func ClaimSpRewards(c *cli.Context) error { if !ok { return fmt.Errorf("Unable to parse eth rewards: %s", cycleInfo.MerkleProofInfo.Eth) } + ethRewardsConverted := math.RoundDown(eth.WeiToEth(ethRewards), 5) + sdRewards, ok := big.NewInt(0).SetString(cycleInfo.MerkleProofInfo.Sd, 10) if !ok { return fmt.Errorf("Unable to parse sd rewards: %s", cycleInfo.MerkleProofInfo.Sd) } + sdRewardsConverted := math.RoundDown(eth.WeiToEth(sdRewards), 5) if ethRewards.Cmp(big.NewInt(0)) == 0 && sdRewards.Cmp(big.NewInt(0)) == 0 { @@ -134,9 +143,64 @@ func ClaimSpRewards(c *cli.Context) error { cyclesToClaimArray = append(cyclesToClaimArray, big.NewInt(cycle)) } + totalClaimableEth := big.NewInt(0) + totalClaimableSd := big.NewInt(0) + + for _, cycle := range cyclesToClaimArray { + cycleInfo := indexedDetailedCyclesInfo[cycle.Int64()] + + ethRewards, ok := big.NewInt(0).SetString(cycleInfo.Eth, 10) + if !ok { + return fmt.Errorf("Unable to parse eth rewards: %s", cycleInfo.Eth) + } + + totalClaimableEth = totalClaimableEth.Add(totalClaimableEth, ethRewards) + + sdRewards, ok := big.NewInt(0).SetString(cycleInfo.Sd, 10) + if !ok { + return fmt.Errorf("Unable to parse sd rewards: %s", cycleInfo.Sd) + } + + totalClaimableSd = totalClaimableSd.Add(totalClaimableSd, sdRewards) + } + + depositSd := false + + if totalClaimableSd.Cmp(big.NewInt(0)) > 0 { + fmt.Printf("You will claim %s and %s with the following selection - cycles %v\n\n", eth.DisplayAmountInUnits(totalClaimableSd, "sd"), eth.DisplayAmountInUnits(totalClaimableEth, "eth"), cyclesToClaimArray) + fmt.Printf("Your ETH rewards will be sent to your Reward Address\n") + fmt.Printf("For SD rewards, you can claim all the rewards to your Reward Address or redeposit them as SD collateral to earn more rewards\n") + + fmt.Printf("Please select one of the following options:\n") + fmt.Printf("1. Claim all SD rewards to your Reward Address\n") + fmt.Printf("2. Redeposit all the SD rewards as SD collateral for additional earnings\n") + + option := cliutils.Prompt("", "^(1|2)$", "Please enter a valid option") + if option == "1" { + if !cliutils.Confirm(fmt.Sprintf( + "Are you sure you want to claim %s and %s for cycles %v to your reward address?", eth.DisplayAmountInUnits(totalClaimableEth, "eth"), eth.DisplayAmountInUnits(totalClaimableSd, "sd"), cyclesToClaimArray)) { + fmt.Println("Claim Cancelled.") + return nil + } + } else if option == "2" { + if !cliutils.Confirm(fmt.Sprintf( + "Your %s rewards will be sent to your Reward Address.\nFor your %s rewards, are you sure you want to re-deposit it as SD collateral for additional earnings?", eth.DisplayAmountInUnits(totalClaimableEth, "eth"), eth.DisplayAmountInUnits(totalClaimableSd, "sd"))) { + fmt.Println("Claim Cancelled.") + return nil + } + + depositSd = true + } + } else if !cliutils.Confirm(fmt.Sprintf( + "Are you sure you want to claim %s ETH for cycles %v to your reward address?", totalClaimableEth.String(), cyclesToClaimArray)) { + fmt.Println("Cancelled.") + return nil + } + // estimate gas fmt.Println("Estimating gas...") - estimateGasResponse, err := staderClient.EstimateClaimSpRewardsGas(cyclesToClaimArray) + + estimateGasResponse, err := staderClient.EstimateClaimSpRewardsGas(cyclesToClaimArray, depositSd) if err != nil { return err } @@ -147,14 +211,8 @@ func ClaimSpRewards(c *cli.Context) error { return err } - if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf( - "Are you sure you want to claim the rewards for cycles %v?", cyclesToClaimArray))) { - fmt.Println("Cancelled.") - return nil - } - fmt.Printf("Claiming rewards for cycles %v\n", cyclesToClaimArray) - res, err := staderClient.ClaimSpRewards(cyclesToClaimArray) + res, err := staderClient.ClaimSpRewards(cyclesToClaimArray, depositSd) if err != nil { return err } @@ -165,8 +223,17 @@ func ClaimSpRewards(c *cli.Context) error { return err } - fmt.Printf("Rewards Claim successful for cycles: %v\n", cyclesToClaimArray) - fmt.Printf("Please check your Operator Reward Address for the claimed rewards\n") + fmt.Printf("Transaction Successful\n") + + if depositSd { + fmt.Printf("%s rewards have been sent to your Reward Address and %s rewards have been re-deposited as SD collateral\n", eth.DisplayAmountInUnits(totalClaimableEth, "eth"), eth.DisplayAmountInUnits(totalClaimableSd, "sd")) + } else { + if totalClaimableSd.Cmp(big.NewInt(0)) <= 0 { + fmt.Printf("%s rewards have been sent to your Reward Address\n", eth.DisplayAmountInUnits(totalClaimableEth, "eth")) + } else { + fmt.Printf("%s rewards and %s rewards have been sent to your Reward Address\n", eth.DisplayAmountInUnits(totalClaimableSd, "sd"), eth.DisplayAmountInUnits(totalClaimableEth, "eth")) + } + } return nil } diff --git a/stader-cli/node/commands.go b/stader-cli/node/commands.go index 2f66bf09d..7b78ad0dd 100644 --- a/stader-cli/node/commands.go +++ b/stader-cli/node/commands.go @@ -70,7 +70,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, { Name: "update-socialize-el", - Aliases: []string{"y"}, + Aliases: []string{"use"}, Usage: "Opt in or Opt out of socializing pool", UsageText: "stader-cli node update-socialize-el [options]", Flags: []cli.Flag{ @@ -125,7 +125,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, { Name: "deposit-sd", - Aliases: []string{"k"}, + Aliases: []string{"ds"}, Usage: "Deposit SD against the node", UsageText: "stader-cli node deposit-sd [options]", Flags: []cli.Flag{ @@ -198,7 +198,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, { Name: "send-el-rewards", - Aliases: []string{"wer"}, + Aliases: []string{"ser"}, Usage: "Send all Execution Layer rewards to the operator claim vault. This only includes non-socializing pool rewards", UsageText: "stader-cli node send-el-rewards", Flags: []cli.Flag{cli.BoolFlag{ @@ -212,7 +212,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, { Name: "claim-rewards", - Aliases: []string{"wer"}, + Aliases: []string{"cr"}, Usage: "Claim rewards from claim vault to the operator reward address", UsageText: "stader-cli node claim-rewards", Flags: []cli.Flag{cli.BoolFlag{ @@ -226,7 +226,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, { Name: "withdraw-sd-collateral", - Aliases: []string{"sef"}, + Aliases: []string{"wsc"}, Usage: "Withdraw Sd collateral", UsageText: "stader-cli node withdraw-sd-collateral --amount", Flags: []cli.Flag{ @@ -344,9 +344,35 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, }, { - Name: "approve-sd", - Aliases: []string{"k"}, - Usage: "Approve SD against the node", + Name: "utilize-sd", + Aliases: []string{"us"}, + Usage: "Utilize from the Utility pool.", + UsageText: "stader-cli node utilize-sd", + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "yes, y", + Usage: "Automatically confirm SD utilize", + }, + }, + Action: utilizeSD, + }, + { + Name: "repay-sd", + Aliases: []string{"rs"}, + Usage: "Repay the amount to reduce their utilization position", + UsageText: "stader-cli node repay-sd [options]", + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "yes, y", + Usage: "Automatically confirm SD repay", + }, + }, + Action: repaySD, + }, + { + Name: "approve-deposit-sd", + Aliases: []string{"ad"}, + Usage: "Approve SD for SD collateral contract", UsageText: "stader-cli node approve-sd [options]", Flags: []cli.Flag{ cli.StringFlag{ @@ -359,13 +385,40 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, }, Action: func(c *cli.Context) error { - if _, err := cliutils.ValidatePositiveEthAmount("sd deposit amount", c.String("amount")); err != nil { return err } + amount := c.String("amount") + + // Run + return nodeApproveDepositSd(c, amount) + }, + }, + { + Name: "approve-utility-sd", + Aliases: []string{"au"}, + Usage: "Approve SD for SD utility pool contract", + UsageText: "stader-cli node approve-utility-sd [options]", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "amount, a", + Usage: "The amount of SD to approve", + }, + cli.BoolFlag{ + Name: "yes, y", + Usage: "Automatically confirm SD approve", + }, + }, + Action: func(c *cli.Context) error { + if _, err := cliutils.ValidatePositiveEthAmount("sd amount", c.String("amount")); err != nil { + return err + } + + amountInString := c.String("amount") + // Run - return nodeApproveSd(c) + return nodeApproveUtilitySd(c, amountInString) }, }, }, diff --git a/stader-cli/node/deposit-sd.go b/stader-cli/node/deposit-sd.go index 9207ad153..fde3c0468 100644 --- a/stader-cli/node/deposit-sd.go +++ b/stader-cli/node/deposit-sd.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "math/big" "strconv" "github.com/stader-labs/stader-node/stader-lib/utils/eth" @@ -10,7 +11,6 @@ import ( "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" - "github.com/stader-labs/stader-node/shared/utils/math" ) func nodeDepositSd(c *cli.Context) error { @@ -27,28 +27,44 @@ func nodeDepositSd(c *cli.Context) error { return err } + nounce := c.GlobalUint64("nonce") // If a custom nonce is set, print the multi-transaction warning - if c.GlobalUint64("nonce") != 0 { + if nounce != 0 { cliutils.PrintMultiTransactionNonceWarning() } - // Get stake mount amountInString := c.String("amount") + amount, err := strconv.ParseFloat(amountInString, 64) if err != nil { return err } + + autoConfirm := c.Bool("yes") + amountWei := eth.EthToWei(amount) + return DepositSdWithAmount(staderClient, amountWei, autoConfirm, nounce) +} + +func DepositSdWithAmount(staderClient *stader.Client, amountWei *big.Int, autoConfirm bool, nonce uint64) error { + contracts, err := staderClient.GetContractsInfo() + if err != nil { + return err + } + // Check allowance - allowance, err := staderClient.GetNodeDepositSdAllowance() + allowance, err := staderClient.GetNodeSdAllowance(contracts.SdCollateralContract) if err != nil { return err } if allowance.Allowance.Cmp(amountWei) < 0 { - fmt.Println("Before depositing SD, you must first give the collateral contract approval to interact with your SD. Amount to approve: ", eth.WeiToEth(amountWei)) - err = nodeApproveSdWithAmount(c, staderClient, amountWei) + maxApproval := maxUint256() + + fmt.Println("Before depositing SD, you must first give the collateral contract approval to interact with your SD.") + + err = nodeApproveSdWithAmountAndAddress(staderClient, maxApproval, contracts.SdCollateralContract, autoConfirm, nonce) if err != nil { return err } @@ -60,7 +76,7 @@ func nodeDepositSd(c *cli.Context) error { } if canDeposit.InsufficientBalance { - fmt.Println("The node's SD balance is insufficient.") + fmt.Println("You don't have sufficient SD in your Operator Address to add as collateral. Please deposit SD into your Operator Address and try again.") return nil } @@ -69,18 +85,18 @@ func nodeDepositSd(c *cli.Context) error { return nil } - // Assign max fees - err = gas.AssignMaxFeeAndLimit(canDeposit.GasInfo, staderClient, c.Bool("yes")) - if err != nil { - return err - } - // Prompt for confirmation - if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf("Are you sure you want to deposit %.6f SD? You will not be able to withdraw this SD until you exit your validators", math.RoundDown(eth.WeiToEth(amountWei), 6)))) { + if !(autoConfirm || cliutils.Confirm(fmt.Sprintf("Are you sure you want to deposit %s as collateral?", eth.DisplayAmountInUnits(amountWei, "sd")))) { fmt.Println("Cancelled.") return nil } + // Assign max fees + err = gas.AssignMaxFeeAndLimit(canDeposit.GasInfo, staderClient, autoConfirm) + if err != nil { + return err + } + depositSdResponse, err := staderClient.NodeDepositSd(amountWei) if err != nil { return err @@ -94,7 +110,7 @@ func nodeDepositSd(c *cli.Context) error { } // Log & return - fmt.Printf("Successfully deposited %.6f SD.\n", math.RoundDown(eth.WeiToEth(amountWei), 6)) + fmt.Printf("Successfully deposited %s.\n", eth.DisplayAmountInUnits(amountWei, "sd")) return nil } diff --git a/stader-cli/node/get-contracts-info.go b/stader-cli/node/get-contracts-info.go index 6d4e3480d..ae27c5e34 100644 --- a/stader-cli/node/get-contracts-info.go +++ b/stader-cli/node/get-contracts-info.go @@ -2,6 +2,7 @@ package node import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/stader-labs/stader-node/shared/utils/log" @@ -42,6 +43,7 @@ func getContractsInfo(c *cli.Context) error { fmt.Printf("Socializing Pool: %s\n\n", response.SocializingPoolContract) fmt.Printf("Permissionless Pool: %s\n\n", response.PermisionlessPool) fmt.Printf("Stader Oracle: %s\n\n", response.StaderOracle) + fmt.Printf("Sd Utility Pool: %s\n\n", response.SdUtilityContract) fmt.Printf("Pre-sign encryption key is %s\n\n", response.EncryptionKey) return nil diff --git a/stader-cli/node/repay-sd.go b/stader-cli/node/repay-sd.go new file mode 100644 index 000000000..4c8eb2840 --- /dev/null +++ b/stader-cli/node/repay-sd.go @@ -0,0 +1,155 @@ +package node + +import ( + "fmt" + "math/big" + + "github.com/urfave/cli" + + "github.com/stader-labs/stader-node/shared/services/gas" + "github.com/stader-labs/stader-node/shared/services/stader" + "github.com/stader-labs/stader-node/shared/types/api" + cliutils "github.com/stader-labs/stader-node/shared/utils/cli" + "github.com/stader-labs/stader-node/shared/utils/log" + "github.com/stader-labs/stader-node/stader-lib/utils/eth" + "github.com/stader-labs/stader-node/stader-lib/utils/sd" +) + +func repaySD(c *cli.Context) error { + staderClient, err := stader.NewClientFromCtx(c) + if err != nil { + return err + } + defer staderClient.Close() + + // Check and assign the EC status + err = cliutils.CheckClientStatus(staderClient) + if err != nil { + return err + } + + // Print what network we're on + err = cliutils.PrintNetwork(staderClient) + if err != nil { + return err + } + + contracts, err := staderClient.GetContractsInfo() + if err != nil { + return err + } + + sdStatusResponse, err := staderClient.GetSDStatus(big.NewInt(0)) + if err != nil { + return err + } + + sdStatus := sdStatusResponse.SDStatus + + if sdStatus.SdUtilizerLatestBalance.Cmp(big.NewInt(0)) == 0 { + fmt.Println("You do not have an existing Utilization Position.") + return nil + } + + // Check allowance + allowance, err := staderClient.GetNodeSdAllowance(contracts.SdUtilityContract) + if err != nil { + return err + } + + ops := []string{"Repay full amount", "Repay a custom amount"} + i, _ := cliutils.Select("Please choose one of the following options for repayment. Enter 1 or 2:", ops) + + fullRepay := false + + var amountWei *big.Int + + switch i { + case 0: + // 1. If user had enough to repay + fullRepay = true + amountWei = sdStatus.SdUtilizerLatestBalance + + case 1: + amountWei, err = PromptChooseRepayAmount(sdStatus) + if err != nil { + return err + } + + default: + return nil + } + + if amountWei.Cmp(sdStatus.SdBalance) > 0 { + fmt.Printf("You don't have sufficient SD in your Operator Address for the repayment. Please deposit SD into your Operator Address and try again.\n") + return nil + } + + if allowance.Allowance.Cmp(sdStatus.SdUtilizerLatestBalance) < 0 { + fmt.Println("Before repaying the SD, you must first give the utility contract approval to interact with your SD.") + + maxApproval := maxUint256() + + err = nodeApproveUtilitySd(c, maxApproval.String()) + if err != nil { + return err + } + } + + // Prompt for confirmation + if !cliutils.Confirm(fmt.Sprintf("Are you sure you want to repay %s from your Operator Address?", eth.DisplayAmountInUnits(amountWei, "sd"))) { + fmt.Printf("Cancelled\n") + return nil + } + + if fullRepay { + amountWei = maxUint256() + } + + canRepaySdResponse, err := staderClient.CanRepaySd(amountWei) + if err != nil { + return err + } + + err = gas.AssignMaxFeeAndLimit(canRepaySdResponse.GasInfo, staderClient, c.Bool("yes")) + if err != nil { + return err + } + + res, err := staderClient.RepaySd(amountWei) + if err != nil { + return err + } + + cliutils.PrintTransactionHash(staderClient, res.TxHash) + + if _, err = staderClient.WaitForTransaction(res.TxHash); err != nil { + return err + } + + if amountWei.Cmp(maxUint256()) == 0 { + fmt.Printf("Repayment of %s successful. Current Utilization Position: 0 SD.\n", eth.DisplayAmountInUnits(sdStatus.SdUtilizerLatestBalance, "sd")) + } else { + remainUtilize := new(big.Int).Sub(sdStatus.SdUtilizerLatestBalance, amountWei) + fmt.Printf("Repayment of %s successful. Current Utilization Position: %s.\n", eth.DisplayAmountInUnits(amountWei, "sd"), eth.DisplayAmountInUnits(remainUtilize, "sd")) + } + + return nil +} + +func PromptChooseRepayAmount(sdStatus *api.SdStatusResponse) (*big.Int, error) { + msg := fmt.Sprintf(`%sPlease enter the amount of SD you wish to repay. Your current Utilization Position is %s%s`, log.ColorYellow, eth.DisplayAmountInUnits(sdStatus.SdUtilizerLatestBalance, "sd"), log.ColorReset) + + errMsg := fmt.Sprintf("%sInvalid input, please specify a valid amount of SD you wish to repay. Your current Utilization Position is %s SD%s", log.ColorRed, eth.DisplayAmountInUnits(sdStatus.SdUtilizerLatestBalance, "sd"), log.ColorReset) + + utilityAmount, err := sd.PromptChooseSDWithMaxMin(msg, errMsg, big.NewInt(0), sdStatus.SdUtilizerLatestBalance) + if err != nil { + return nil, err + } + + if sd.WeiAlmostEqual(utilityAmount, sdStatus.SdUtilizerLatestBalance) { + utilityAmount = sdStatus.SdUtilizerLatestBalance + } + + return utilityAmount, nil +} diff --git a/stader-cli/node/send-el-rewards.go b/stader-cli/node/send-el-rewards.go index 284271e5f..79256b449 100644 --- a/stader-cli/node/send-el-rewards.go +++ b/stader-cli/node/send-el-rewards.go @@ -2,10 +2,10 @@ package node import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" - "github.com/stader-labs/stader-node/shared/utils/math" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" ) @@ -48,18 +48,19 @@ func SendElRewards(c *cli.Context) error { return nil } - // Withdraw El Rewards res, err := staderClient.SendElRewards() if err != nil { return err } - fmt.Printf("Sending %.6f EL Rewards to Claim Vault\n\n", math.RoundDown(eth.WeiToEth(res.ElRewardsAmount), 6)) + + fmt.Printf("Sending %s EL Rewards to Claim Vault\n\n", eth.DisplayAmountInUnits(res.ElRewardsAmount, "eth")) cliutils.PrintTransactionHash(staderClient, res.TxHash) + if _, err = staderClient.WaitForTransaction(res.TxHash); err != nil { return err } // Log & return - fmt.Printf("Sent %.6f EL Rewards to Claim Vault\n\n", math.RoundDown(eth.WeiToEth(res.ElRewardsAmount), 6)) + fmt.Printf("Sent %s EL Rewards to Claim Vault\n\n", eth.DisplayAmountInUnits(res.ElRewardsAmount, "eth")) return nil } diff --git a/stader-cli/node/send.go b/stader-cli/node/send.go index f105fbd40..6e4112e64 100644 --- a/stader-cli/node/send.go +++ b/stader-cli/node/send.go @@ -78,7 +78,7 @@ func nodeSend(c *cli.Context, amount float64, token string, toAddressOrENS strin } // Prompt for confirmation - if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf("Are you sure you want to send %.6f %s to %s? This action cannot be undone!", math.RoundDown(eth.WeiToEth(amountWei), 6), token, toAddressString))) { + if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf("Are you sure you want to send %.6f %s to %s? This action cannot be undone!", eth.WeiToEth(amountWei), token, toAddressString))) { fmt.Println("Cancelled.") return nil } diff --git a/stader-cli/node/status.go b/stader-cli/node/status.go index 5aa2cc932..aec995c87 100644 --- a/stader-cli/node/status.go +++ b/stader-cli/node/status.go @@ -2,13 +2,13 @@ package node import ( "fmt" + "math/big" + "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/stader-labs/stader-node/shared/utils/log" - "github.com/stader-labs/stader-node/shared/utils/math" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" - "math/big" ) func getNodeStatus(c *cli.Context) error { @@ -70,42 +70,6 @@ func getNodeStatus(c *cli.Context) error { noOfValidatorsWeCanRegister = noOfValidatorsWeCanRegisterBasedOnEthBalance } - // Account address & balances - fmt.Printf("%s=== Account and Balances ===%s\n", log.ColorGreen, log.ColorReset) - fmt.Printf( - "The node %s%s%s has a balance of %.6f ETH.\n\n", - log.ColorBlue, - status.AccountAddress, - log.ColorReset, - math.RoundDown(eth.WeiToEth(status.AccountBalances.ETH), 6)) - fmt.Printf( - "The node %s%s%s has a balance of %.6f SD.\n\n", - log.ColorBlue, - status.AccountAddress, - log.ColorReset, - math.RoundDown(eth.WeiToEth(status.AccountBalances.Sd), 18)) - - fmt.Printf( - "The node %s%s%s has a deposited %d Eth as collateral.\n\n", - log.ColorBlue, - status.AccountAddress, - log.ColorReset, - totalEthCollateral) - - fmt.Printf( - "The node %s%s%s has a deposited %.6f SD as collateral.\n\n", - log.ColorBlue, - status.AccountAddress, - log.ColorReset, - math.RoundDown(eth.WeiToEth(status.DepositedSdCollateral), 18)) - - fmt.Printf( - "The node %s%s%s can register %d more validators based on the ETH balance and the SD collateral provided.\n\n", - log.ColorBlue, - status.AccountAddress, - log.ColorReset, - noOfValidatorsWeCanRegister) - fmt.Printf("%s=== Operator Registration Details ===%s\n", log.ColorGreen, log.ColorReset) if !status.Registered { @@ -113,7 +77,6 @@ func getNodeStatus(c *cli.Context) error { return nil } - fmt.Printf("The operator is registered with Stader. Below are operator details:\n") fmt.Printf("Operator Id: %d\n\n", status.OperatorId) fmt.Printf("Operator Name: %s\n\n", status.OperatorName) fmt.Printf("Operator Address: %s\n\n", status.OperatorAddress.String()) @@ -123,42 +86,145 @@ func getNodeStatus(c *cli.Context) error { } else { fmt.Printf("Operator Status: Not Active\n\n") } - fmt.Printf("The Operator has registered a total of %d validators\n\n", len(status.ValidatorInfos)) + + fmt.Printf("The Operator has registered a total of %d validators (To view details of each validator, please use the `stader-cli validator status` command)\n\n", totalRegisteredValidators) if !status.OptedInForSocializingPool { - fmt.Printf("Operator has Opted Out for Socializing Pool\n\n") + fmt.Printf("The Operator has Opted Out for Socializing Pool\n\n") } else { - fmt.Printf("Operator has Opted In for Socializing Pool\n\n") + fmt.Printf("The Operator has Opted In for Socializing Pool\n\n") } if totalUnclaimedSocializingPoolSd.Cmp(big.NewInt(0)) > 0 { - fmt.Printf("The Operator has %.6f SD as unclaimed SD rewards. To claim SD rewards using the %sstader-cli node claim-sp-rewards%s command\n\n", math.RoundDown(eth.WeiToEth(totalUnclaimedSocializingPoolSd), 18), log.ColorGreen, log.ColorReset) + fmt.Printf("The Operator has %s as unclaimed SD rewards. To claim SD rewards using the %sstader-cli node claim-sp-rewards%s command\n\n", eth.DisplayAmountInUnits(totalUnclaimedSocializingPoolSd, "sd"), log.ColorGreen, log.ColorReset) } if totalUnclaimedSocializingPoolEth.Cmp(big.NewInt(0)) > 0 { - fmt.Printf("The Operator has %.6f ETH as unclaimed Socializing Pool EL rewards. To claim Socialized EL rewards using the %sstader-cli node claim-sp-rewards%s command\n\n", math.RoundDown(eth.WeiToEth(totalUnclaimedSocializingPoolEth), 18), log.ColorGreen, log.ColorReset) + fmt.Printf("The Operator has %s as unclaimed Socializing Pool EL rewards. To claim Socialized EL rewards using the %sstader-cli node claim-sp-rewards%s command\n\n", eth.DisplayAmountInUnits(totalUnclaimedSocializingPoolEth, "eth"), log.ColorGreen, log.ColorReset) } if status.OperatorELRewardsAddressBalance.Cmp(big.NewInt(0)) > 0 { fmt.Printf( - "The Operator has a total of %.6f ETH as EL rewards for all validators.\n"+ + "The Operator has a total of %s as EL rewards for all validators.\n"+ "These rewards are sent to the claim vault periodically by Stader.\n"+ - "Once it is sent to the claim vault, the operator can use the %sstader-cli node claim-rewards%s command to claim EL rewards to their operator reward address\n", math.RoundDown(eth.WeiToEth(status.OperatorELRewardsAddressBalance), 6), log.ColorGreen, log.ColorReset) + "Once it is sent to the claim vault, the operator can use the %sstader-cli node claim-rewards%s command to claim EL rewards to their operator reward address\n", eth.DisplayAmountInUnits(status.OperatorELRewardsAddressBalance, "eth"), log.ColorGreen, log.ColorReset) fmt.Println("If the operator wishes to claim EL rewards by themselves, follow these steps:") fmt.Printf("1. Use the %sstader-cli node send-el-rewards%s command to claim the EL rewards\n", log.ColorGreen, log.ColorReset) fmt.Printf("2. Use the %sstader-cli node claim-rewards%s command to claim the EL rewards from the claim vault to your operator reward address\n\n", log.ColorGreen, log.ColorReset) } - if status.OperatorRewardCollectorBalance.Cmp(big.NewInt(0)) > 0 { + operatorWithdrawableAmount := status.OperatorRewardCollectorBalance + if status.OperatorWithdrawableEth.Cmp(operatorWithdrawableAmount) < 0 { + operatorWithdrawableAmount = status.OperatorWithdrawableEth + } + + if operatorWithdrawableAmount.Cmp(big.NewInt(0)) > 0 { fmt.Printf( - "The Operator has aggregated total claims of %.6f ETH in the claim vault\n", - math.RoundDown(eth.WeiToEth(status.OperatorRewardCollectorBalance), 6)) + "The Operator has aggregated total claims of %s in the claim vault\n", + eth.DisplayAmountInUnits(operatorWithdrawableAmount, "eth")) fmt.Printf("To transfer the claims to your operator reward address use the %sstader-cli node claim-rewards%s command\n\n", log.ColorGreen, log.ColorReset) } - fmt.Printf("%s=== Registered Validator Details ===%s\n", log.ColorGreen, log.ColorReset) + fmt.Printf( + "The Operator can register %d more validators considering the ETH balance and SD availability in the Operator Address and Utility Pool.\n\n", + noOfValidatorsWeCanRegister) + + // Account address & balances + + fmt.Printf("%s=== Account and Balances ===%s\n", log.ColorGreen, log.ColorReset) + fmt.Printf( + "The Operator %s%s%s has a balance of %s.\n\n", + log.ColorBlue, + status.AccountAddress, + log.ColorReset, + eth.DisplayAmountInUnits(status.AccountBalances.ETH, "eth")) + fmt.Printf( + "The Operator %s%s%s has a balance of %s.\n\n", + log.ColorBlue, + status.AccountAddress, + log.ColorReset, + eth.DisplayAmountInUnits(status.AccountBalances.Sd, "sd")) + + fmt.Printf( + "The Operator has a deposited %d ETH as collateral.\n\n", + totalEthCollateral) + + // Get node SD status + sdStatusResp, err := staderClient.GetSDStatus(big.NewInt(0)) + if err != nil { + return err + } + + collateralPct := 0.0 + sdStatus := sdStatusResp.SDStatus + totalCollateral := new(big.Int).Add(sdStatus.SdCollateralCurrentAmount, sdStatus.SdUtilizedBalance) + + current := eth.WeiToEth(totalCollateral) + require := eth.WeiToEth(sdStatus.SdCollateralRequireAmount) + + if require > 0 { + collateralPct = current / require * 10 + } + + fmt.Printf( + "The Operator has a deposited %s (%.6f%s) as collateral. Below is the break-up: \n", + eth.DisplayAmountInUnits(totalCollateral, "sd"), collateralPct, "%") + + fmt.Printf( + "Self-bonded: %s \n", + eth.DisplayAmountInUnits(sdStatus.SdCollateralCurrentAmount, "sd")) + + fmt.Printf( + "Utilized from the Utility Pool: %s.\n", + eth.DisplayAmountInUnits(sdStatus.SdUtilizedBalance, "sd")) + + if totalRegisteredValidators.Cmp(big.NewInt(0)) != 0 { + fmt.Printf( + "Note: For the %d validator, the minimum SD collateral should be %s (%s) to be eligible for the SD rewards. Please ensure that the SD collateral percentage is greater than %s. The SD collateral snapshots are taken daily at a random block, and if the SD collateral value falls below the %s limit, the node operator will not earn SD rewards for that day.\n\n", + totalRegisteredValidators, + eth.DisplayAmountInUnits(sdStatus.SdCollateralRequireAmount, "sd"), + "10%", "10%", "10%") + } else { + fmt.Println("") + } + + fmt.Printf("%s=== SD utilization Details ===%s\n", log.ColorGreen, log.ColorReset) + + fmt.Printf("The Operator has utilized %s from the Utility Pool.\n\n", eth.DisplayAmountInUnits(sdStatus.SdUtilizedBalance, "sd")) + + fmt.Printf("The Operator has a current Utilization Position of %s. (including the utilization fee)\n", + eth.DisplayAmountInUnits(sdStatus.SdUtilizerLatestBalance, "sd")) + + if sdStatus.SdUtilizerLatestBalance.Cmp(big.NewInt(0)) == 0 { + fmt.Println("") + } else { + fmt.Printf("Note: For repayment of your utilized SD, please use the `stader-cli node repay-sd ` command.\n\n") + } + + maxUtilizable := new(big.Int).Sub(sdStatus.SdMaxUtilizableAmount, sdStatus.SdUtilizedBalance) + if maxUtilizable.Cmp(sdStatus.PoolAvailableSDBalance) > 0 { + maxUtilizable = sdStatus.PoolAvailableSDBalance + } + + if maxUtilizable.Sign() < 0 { + maxUtilizable = big.NewInt(0) + } + + fmt.Printf( + "The Operator can utilize upto %s more.\nNote: Each Operator can utilize a maximum of 1 ETH worth SD per validator.\n\n", + eth.DisplayAmountInUnits(maxUtilizable, "sd")) + + if sdStatus.SdUtilizedBalance.Cmp(big.NewInt(0)) != 0 { + fmt.Printf( + "The Operator has a Health Factor of %.6f. \nNote: Please ensure your Health Factor is greater than 1 to avoid liquidations.\n\n", + eth.WeiToEth(sdStatus.HealthFactor)) + } + + fmt.Printf( + "The Utility Pool currently has a balance of %s.\n\n", + eth.DisplayAmountInUnits(sdStatus.PoolAvailableSDBalance, "sd")) - fmt.Printf("To view details of each validator, please use the %sstader-cli validator status%s command\n\n", log.ColorGreen, log.ColorReset) + fmt.Printf("Current Utilization Rate %s%s.\n", sdStatus.UtilizationRate.String(), "%") return nil } diff --git a/stader-cli/node/utilize-sd.go b/stader-cli/node/utilize-sd.go new file mode 100644 index 000000000..3c7be51a9 --- /dev/null +++ b/stader-cli/node/utilize-sd.go @@ -0,0 +1,191 @@ +package node + +import ( + "errors" + "fmt" + "math/big" + + "github.com/stader-labs/stader-node/shared/services/gas" + "github.com/stader-labs/stader-node/shared/services/stader" + "github.com/stader-labs/stader-node/shared/types/api" + cliutils "github.com/stader-labs/stader-node/shared/utils/cli" + "github.com/stader-labs/stader-node/shared/utils/log" + "github.com/stader-labs/stader-node/stader-lib/utils/eth" + "github.com/stader-labs/stader-node/stader-lib/utils/sd" + "github.com/urfave/cli" +) + +func utilizeSD(c *cli.Context) error { + staderClient, err := stader.NewClientFromCtx(c) + if err != nil { + return err + } + defer staderClient.Close() + + // Check and assign the EC status + err = cliutils.CheckClientStatus(staderClient) + if err != nil { + return err + } + + // Print what network we're on + err = cliutils.PrintNetwork(staderClient) + if err != nil { + return err + } + + sdStatusResponse, err := staderClient.GetSDStatus(big.NewInt(0)) + if err != nil { + return err + } + + if sdStatusResponse.SDStatus.AlreadyLiquidated { + fmt.Printf("Your node is under the liquidation process and you can not utilize SD at the moment.") + return nil + } + + healthFactor := eth.WeiToEth(sdStatusResponse.SDStatus.HealthFactor) + if healthFactor < 1 { + fmt.Printf( + "Your node has a Health Factor of %.6f which is less than 1 and you can not utilize SD at the moment. Please repay your utilize SD and ensure your Health Factor is greater than 1 to avoid liquidation.\n\n", + healthFactor) + + fmt.Printf("Note: Please repay your utilized SD by using the following command: stader-cli sd repay --amount .\n") + + return nil + } + + if sdStatusResponse.SDStatus.SdCollateralRequireAmount.Cmp(big.NewInt(0)) == 0 { + fmt.Printf("Please add a validator to your node first before utilizing SD from the SD Utility Pool. Execute the following command to add a validator to your node: ~/bin/stader-cli validator deposit --num-validators \n") + return nil + } + + minUtility := eth.EthToWei(1) + maxUtility := GetMaxUtility(sdStatusResponse.SDStatus) + + amountWei, err := PromptChooseUtilityAmount(sdStatusResponse.SDStatus, minUtility, maxUtility) + if err != nil { + return err + } + + canNodeUtilizeSdResponse, err := staderClient.CanNodeUtilizeSd(amountWei) + if err != nil { + return err + } + + err = gas.AssignMaxFeeAndLimit(canNodeUtilizeSdResponse.GasInfo, staderClient, c.Bool("yes")) + if err != nil { + return err + } + + rate := sdStatusResponse.SDStatus.UtilizationRate + // Prompt for confirmation + if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf( + "Are you sure you want to use %s from the SD Utility Pool?.\nNote: A Utilization fee of %s%s will be applied to the utilized SD from the SD Utility Pool.", eth.DisplayAmountInUnits(amountWei, "sd"), rate.String(), "%"))) { + fmt.Println("Cancelled.") + return nil + } + + res, err := staderClient.NodeUtilizeSd(amountWei) + if err != nil { + return err + } + + cliutils.PrintTransactionHash(staderClient, res.TxHash) + + if _, err = staderClient.WaitForTransaction(res.TxHash); err != nil { + return err + } + + // Log & return + fmt.Printf("Successfully deposited %s to the collateral contract by utilizing SD from the SD Utility Pool.\n", eth.DisplayAmountInUnits(amountWei, "sd")) + + return nil +} + +func GetMinUtility(sdStatus *api.SdStatusResponse) *big.Int { + totalCollateral := new(big.Int).Add(sdStatus.SdUtilizedBalance, sdStatus.SdCollateralCurrentAmount) + + minUtility := new(big.Int).Sub(sdStatus.SdCollateralRequireAmount, totalCollateral) + + if minUtility.Cmp(big.NewInt(0)) < 0 { + minUtility = big.NewInt(0) + } + + return minUtility +} + +func GetMaxUtility(sdStatus *api.SdStatusResponse) *big.Int { + maxUtility := new(big.Int).Sub(sdStatus.SdMaxUtilizableAmount, sdStatus.SdUtilizedBalance) + + if maxUtility.Cmp(sdStatus.PoolAvailableSDBalance) > 0 { + maxUtility = sdStatus.PoolAvailableSDBalance + } + + return maxUtility +} + +func PromptChooseUtilityAmount(sdStatus *api.SdStatusResponse, minUtility, maxUtility *big.Int) (*big.Int, error) { + // 1. If the pool had enough SD + if minUtility.Cmp(sdStatus.PoolAvailableSDBalance) > 0 { + return nil, errors.New("There is not sufficient free SD in the SD Utility Pool for utilization at the moment. Please try again later when there is enough free SD in the SD Utility Pool") + } + + // 2. If user had enough Eth + if minUtility.Cmp(maxUtility) >= 0 { + return nil, errors.New("Do not had enough ETH bond to utility") + } + + // Set maxSd to pool available + if sdStatus.PoolAvailableSDBalance.Cmp(maxUtility) <= 0 { + maxUtility = sdStatus.PoolAvailableSDBalance + } + + minSd := eth.WeiToEth(minUtility) + maxSd := eth.WeiToEth(maxUtility) + + msg := fmt.Sprintf(` +%sPlease enter the amount of SD you wish to utilize from the SD Utility Pool:%s +SD Utility Pool balance: %s +Minimum utilization amount: %s +Maximum utilization amount: %s +`, log.ColorYellow, log.ColorReset, eth.DisplayAmountInUnits(sdStatus.PoolAvailableSDBalance, "sd"), eth.DisplayAmountInUnits(minUtility, "sd"), eth.DisplayAmountInUnits(maxUtility, "sd")) + + errMsg := fmt.Sprintf("%sInvalid input, please specify an amount within %f and %f SD range%s", log.ColorRed, minSd, maxSd, log.ColorReset) + + utilityAmount, err := sd.PromptChooseSDWithMaxMin(msg, errMsg, minUtility, maxUtility) + if err != nil { + return nil, err + } + + return utilityAmount, nil +} + +func PromptChooseSelfBondAmount(sdStatus *api.SdStatusResponse) (*big.Int, error) { + totalCollateral := new(big.Int).Add(sdStatus.SdCollateralCurrentAmount, sdStatus.SdUtilizedBalance) + + amountToCollateralRemain := new(big.Int).Sub(sdStatus.SdCollateralRequireAmount, totalCollateral) + + sdRewardEligibleRemain := new(big.Int).Sub(sdStatus.SdRewardEligible, totalCollateral) + + if amountToCollateralRemain.Cmp(big.NewInt(0)) < 0 { + amountToCollateralRemain = big.NewInt(0) + } + + minSd := eth.WeiToEth(amountToCollateralRemain) + maxSd := eth.WeiToEth(sdRewardEligibleRemain) + + msg := fmt.Sprintf(`Minimum bond: %s +Maximum bond: %s + +%sPlease enter the amount of SD you wish to deposit as collateral:%s`, eth.DisplayAmountInUnits(amountToCollateralRemain, "sd"), eth.DisplayAmountInUnits(sdRewardEligibleRemain, "sd"), log.ColorYellow, log.ColorReset) + + errMsg := fmt.Sprintf("Invalid input, please specify an amount within %f and %f SD range", minSd, maxSd) + + utilityAmount, err := sd.PromptChooseSDWithMaxMin(msg, errMsg, amountToCollateralRemain, sdRewardEligibleRemain) + if err != nil { + return nil, err + } + + return utilityAmount, nil +} diff --git a/stader-cli/node/withdraw-sd.go b/stader-cli/node/withdraw-sd.go index 2d9b327ed..660a0a89c 100644 --- a/stader-cli/node/withdraw-sd.go +++ b/stader-cli/node/withdraw-sd.go @@ -2,13 +2,14 @@ package node import ( "fmt" + "math/big" + "strconv" + "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" - "github.com/stader-labs/stader-node/shared/utils/math" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" - "strconv" ) func WithdrawSd(c *cli.Context) error { @@ -35,13 +36,37 @@ func WithdrawSd(c *cli.Context) error { if err != nil { return err } + + if canWithdrawSdResponse.InsufficientSdCollateral { + //TODO: show 200% in SD + fmt.Println("Not enough excess SD collateral to withdraw") + return nil + } + if canWithdrawSdResponse.InsufficientWithdrawableSd { fmt.Println("Insufficient withdrawable SD!") return nil } - if canWithdrawSdResponse.InsufficientSdCollateral { - fmt.Println("Insufficient SD collateral!") - return nil + + sdStatusResponse, err := staderClient.GetSDStatus(big.NewInt(0)) + if err != nil { + return err + } + + hasUtilizePosition := sdStatusResponse.SDStatus.SdUtilizerLatestBalance.Cmp(big.NewInt(0)) != 0 + + // Check if the withdraw request amount if greater than the Utilization Position + withdrawExcessUtilization := amountWei.Cmp(sdStatusResponse.SDStatus.SdUtilizerLatestBalance) >= 0 + if withdrawExcessUtilization { + if !cliutils.Confirm(fmt.Sprintf("You have an existing Utilization Position of %s. The excess SD collateral you are trying to withdraw will be used to repay the utilized SD and the remaining SD will be sent to your Reward Address.\n Do you wish to proceed?", eth.DisplayAmountInUnits(sdStatusResponse.SDStatus.SdUtilizerLatestBalance, "sd"))) { + fmt.Println("Cancelled.") + return nil + } + } else { + if !cliutils.Confirm(fmt.Sprintf("You have an existing Utilization Position of %s. The excess SD collateral you are trying to withdraw will be used to repay the utilized SD.\n Do you wish to proceed?", eth.DisplayAmountInUnits(sdStatusResponse.SDStatus.SdUtilizerLatestBalance, "sd"))) { + fmt.Println("Cancelled.") + return nil + } } // Assign max fees @@ -50,26 +75,40 @@ func WithdrawSd(c *cli.Context) error { return err } - // Prompt for confirmation - if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf( - "Are you sure you want to withdraw %.6f SD from the collateral contract?", math.RoundDown(eth.WeiToEth(amountWei), 6)))) { - fmt.Println("Cancelled.") - return nil - } - res, err := staderClient.WithdrawSd(amountWei) if err != nil { return err } - fmt.Printf("Withdrawing %s SD from the collateral contract.\n", amountInString) + fmt.Printf("Withdrawing %s from the collateral contract.\n", eth.DisplayAmountInUnits(amountWei, "sd")) cliutils.PrintTransactionHash(staderClient, res.TxHash) if _, err = staderClient.WaitForTransaction(res.TxHash); err != nil { return err } + remainUtilize := new(big.Int).Sub(sdStatusResponse.SDStatus.SdUtilizerLatestBalance, amountWei) + + // remain collateral is (SdUtilizerLatestBalance + SdCollateralCurrentAmount) - amountWei + remainCollateral := new(big.Int).Add(sdStatusResponse.SDStatus.SdCollateralCurrentAmount, remainUtilize) + // Log & return - fmt.Printf("Successfully withdrawn %.6f SD Collateral. \n", math.RoundDown(eth.WeiToEth(amountWei), 6)) + + // withdraw request amount lesser than the Utilization Position + + if !hasUtilizePosition { + fmt.Printf("Successfully withdrawn %s collateral. \n", eth.DisplayAmountInUnits(amountWei, "sd")) + + return nil + } + + if withdrawExcessUtilization { + // withdraw request amount greater than the Utilization Position + fmt.Printf("Repayment of %s successful using the excess SD Collateral.\n", eth.DisplayAmountInUnits(amountWei, "sd")) + fmt.Printf("The remaining %s has been sent to your Operator Reward Address\n", eth.DisplayAmountInUnits(new(big.Int).Abs(remainUtilize), "sd")) + } else { + fmt.Printf("Repayment of %s successful using the excess SD Collateral.. \n", eth.DisplayAmountInUnits(amountWei, "sd")) + fmt.Printf("Current Utilization Position: %s\nCurrent SD collateral: %s\n", eth.DisplayAmountInUnits(remainUtilize, "sd"), eth.DisplayAmountInUnits(remainCollateral, "sd")) + } return nil } diff --git a/stader-cli/validator/commands.go b/stader-cli/validator/commands.go index c07df3723..03e5146a0 100644 --- a/stader-cli/validator/commands.go +++ b/stader-cli/validator/commands.go @@ -95,7 +95,7 @@ func RegisterCommands(app *cli.App, name string, aliases []string) { }, { Name: "send-cl-rewards", - Aliases: []string{"wcr"}, + Aliases: []string{"scr"}, Usage: "Send all Consensus Layer rewards to the operator claim vault", UsageText: "stader-cli validator send-cl-rewards --validator-pub-key", Flags: []cli.Flag{ diff --git a/stader-cli/validator/deposit.go b/stader-cli/validator/deposit.go index 404729e46..7fe03a0d5 100644 --- a/stader-cli/validator/deposit.go +++ b/stader-cli/validator/deposit.go @@ -6,12 +6,12 @@ import ( "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/utils/log" - - "github.com/stader-labs/stader-node/stader-lib/utils/eth" - "github.com/urfave/cli" + "github.com/stader-labs/stader-node/stader-cli/node" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" + "github.com/stader-labs/stader-node/stader-lib/utils/eth" + "github.com/urfave/cli" ) func nodeDeposit(c *cli.Context) error { @@ -30,8 +30,7 @@ func nodeDeposit(c *cli.Context) error { numValidators := c.Uint64("num-validators") - baseAmountInEth := 4 - baseAmount := eth.EthToWei(4.0) + baseAmount := eth.EthToWei(eth.BaseAmountInEth) // Check to see if eth2 is synced syncResponse, err := staderClient.NodeSync() @@ -52,22 +51,113 @@ func nodeDeposit(c *cli.Context) error { } } - canNodeDepositResponse, err := staderClient.CanNodeDeposit(baseAmount, big.NewInt(int64(numValidators)), true) + // Get node status + status, err := staderClient.NodeStatus() + if err != nil { + return err + } + + // Get node SD status + sdStatusResp, err := staderClient.GetSDStatus(big.NewInt(int64(numValidators))) if err != nil { return err } - if canNodeDepositResponse.InsufficientBalance { - fmt.Printf("Account does not have enough balance!") + + if sdStatusResp.SDStatus.AlreadyLiquidated { + fmt.Printf("Your node is in liquidation process") return nil } - if canNodeDepositResponse.DepositPaused { - fmt.Printf("Deposit is paused") + + healthFactor := eth.WeiToEth(sdStatusResp.SDStatus.HealthFactor) + if healthFactor < 1 { + fmt.Printf( + "The Operator has a Health Factor of %.6f. \nNote: Please ensure your Health Factor is greater than 1 to avoid liquidations.\n\n", + healthFactor) + return nil } - if canNodeDepositResponse.NotEnoughSdCollateral { - fmt.Printf("Not enough SD as collateral") + + userBalance := status.AccountBalances.ETH + amountToSend := new(big.Int).Mul(eth.EthToWei(eth.BaseAmountInEth), big.NewInt(int64(numValidators))) + + if userBalance.Cmp(amountToSend) < 0 { + fmt.Printf("You don't have sufficient ETH in your Operator Address to add validators. Please deposit ETH into your Operator Address and try again to add validators to your node.") + return nil + } + + // Prompt for confirmation + if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf( + "You are about to deposit %d ETH to create %d validators.\n"+ + "%sAre you sure you want to do this? Running a validator is a long-term commitment, and this action cannot be undone!%s", + uint64(eth.BaseAmountInEth)*numValidators, numValidators, + log.ColorYellow, + log.ColorReset))) { + fmt.Println("Cancelled.") + return nil + } + + sdStatus := sdStatusResp.SDStatus + + utilityAmount := big.NewInt(0) + + if sdStatus.NotEnoughSdCollateral { + ops := []string{"Utilize SD from the SD Utility Pool", "Use your own SD (Self Bond)"} + i, _ := cliutils.Select("You do not have sufficient SD collateral to add validators. Please choose one of the following options to add SD collateral. Enter 1 or 2:", ops) + + switch i { + case 0: + minUtility := node.GetMinUtility(sdStatus) + maxUtility := node.GetMaxUtility(sdStatus) + + utilityAmount, err = node.PromptChooseUtilityAmount(sdStatus, minUtility, maxUtility) + if err != nil { + return err + } + + if !cliutils.Confirm(fmt.Sprintf("Are you sure you want to use %s from the Utility Pool? [Y/N] \nNote: A Utilization Fee of %s%s will be applied to the utilized SD from the Utility Pool. ", eth.DisplayAmountInUnits(utilityAmount, "sd"), sdStatus.UtilizationRate.String(), "%")) { + fmt.Printf("Cancelled\n") + return nil + } + case 1: + selfBondAmount, errSelfBond := node.PromptChooseSelfBondAmount(sdStatus) + if errSelfBond != nil { + return errSelfBond + } + + if status.AccountBalances.Sd.Cmp(selfBondAmount) < 0 { + fmt.Printf("You don't have sufficient SD in your Operator Address to add as collateral. Please deposit SD into your Operator Address and try again.\n") + return nil + } + + if !cliutils.Confirm(fmt.Sprintf("Are you sure you want to deposit %s as collateral?", eth.DisplayAmountInUnits(selfBondAmount, "sd"))) { + fmt.Printf("Cancelled\n") + return nil + } + + nounce := c.GlobalUint64("nonce") + errSelfBond = node.DepositSdWithAmount(staderClient, selfBondAmount, true, nounce) + + if errSelfBond != nil { + return errSelfBond + } + + default: + return nil + } + + fmt.Println("Validator creation process initiate, please wait...") + } + + canNodeDepositResponse, err := staderClient.CanNodeDeposit(baseAmount, utilityAmount, big.NewInt(int64(numValidators)), true) + if err != nil { + return err + } + + if canNodeDepositResponse.DepositPaused { + fmt.Printf("Deposit is paused") return nil } + if canNodeDepositResponse.MaxValidatorLimitReached { fmt.Printf("Max validator limit reached") return nil @@ -83,19 +173,8 @@ func nodeDeposit(c *cli.Context) error { return err } - // Prompt for confirmation - if !(c.Bool("yes") || cliutils.Confirm(fmt.Sprintf( - "You are about to deposit %d ETH to create %d validators.\n"+ - "%sARE YOU SURE YOU WANT TO DO THIS? Running a validator is a long-term commitment, and this action cannot be undone!%s", - uint64(baseAmountInEth)*numValidators, numValidators, - log.ColorYellow, - log.ColorReset))) { - fmt.Println("Cancelled.") - return nil - } - // Make deposit - response, err := staderClient.NodeDeposit(baseAmount, big.NewInt(int64(numValidators)), true) + response, err := staderClient.NodeDeposit(baseAmount, big.NewInt(int64(numValidators)), utilityAmount, true) if err != nil { return err } @@ -108,12 +187,14 @@ func nodeDeposit(c *cli.Context) error { } // Log & return - fmt.Printf("The node deposit of %d ETH was made successfully!\n", uint64(baseAmountInEth)*numValidators) - fmt.Printf("Total %d validators were created\n", numValidators) + if utilityAmount.Cmp(big.NewInt(0)) == 0 { + fmt.Printf("The node deposit of %d ETH was made successfully and total %d validators were created.\n", uint64(eth.BaseAmountInEth)*numValidators, numValidators) + } else { + fmt.Printf("The node deposit of %d ETH was made successfully and total %d validators were created by utilizing %s from the SD Utility Pool.\n", uint64(eth.BaseAmountInEth)*numValidators, numValidators, eth.DisplayAmountInUnits(utilityAmount, "sd")) + } - fmt.Println("Your validators are now in Initialized status.") - fmt.Println("Once the ETH deposits have been matched by the remaining 28ETH, it will move to Deposited status.") - fmt.Println("You can check the status of your validator with `stader-cli validator status`.") + fmt.Println("Your validators are now in an Initialized state. Once the ETH deposits have been matched by the remaining 28 ETH, it will move to the Deposited state.") + fmt.Println("You can check the status of your validator by executing the following command: `~/bin/stader-cli validator status`") return nil diff --git a/stader-cli/validator/send-cl-rewards.go b/stader-cli/validator/send-cl-rewards.go index 607ad9397..fb61bef2e 100644 --- a/stader-cli/validator/send-cl-rewards.go +++ b/stader-cli/validator/send-cl-rewards.go @@ -2,11 +2,11 @@ package validator import ( "fmt" + "github.com/stader-labs/stader-node/shared/services/gas" "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" - "github.com/stader-labs/stader-node/shared/utils/math" "github.com/stader-labs/stader-node/stader-lib/types" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" @@ -68,14 +68,14 @@ func SendClRewards(c *cli.Context, validatorPubKey types.ValidatorPubkey) error return err } - fmt.Printf("Sending %.6f CL Rewards to Claim vault\n\n", math.RoundDown(eth.WeiToEth(res.ClRewardsAmount), 6)) + fmt.Printf("Sending %s CL Rewards to Claim vault\n\n", eth.DisplayAmountInUnits(res.ClRewardsAmount, "eth")) cliutils.PrintTransactionHash(staderClient, res.TxHash) if _, err = staderClient.WaitForTransaction(res.TxHash); err != nil { return err } // Log & return - fmt.Printf("Sent %.6f CL Rewards to Claim vault\n\n", math.RoundDown(eth.WeiToEth(res.ClRewardsAmount), 6)) + fmt.Printf("Sent %s CL Rewards to Claim vault\n\n", eth.DisplayAmountInUnits(res.ClRewardsAmount, "eth")) return nil } diff --git a/stader-cli/validator/status.go b/stader-cli/validator/status.go index e93b9ed92..bb39fc9d8 100644 --- a/stader-cli/validator/status.go +++ b/stader-cli/validator/status.go @@ -2,6 +2,8 @@ package validator import ( "fmt" + "math/big" + "github.com/stader-labs/stader-node/shared/services/stader" cliutils "github.com/stader-labs/stader-node/shared/utils/cli" "github.com/stader-labs/stader-node/shared/utils/log" @@ -9,7 +11,6 @@ import ( "github.com/stader-labs/stader-node/stader-lib/types" "github.com/stader-labs/stader-node/stader-lib/utils/eth" "github.com/urfave/cli" - "math/big" ) func getValidatorStatus(c *cli.Context) error { @@ -72,7 +73,7 @@ func getValidatorStatus(c *cli.Context) error { fmt.Printf("-Validator Status: %s\n", validatorInfo.StatusToDisplay) if validatorInfo.WithdrawVaultRewardBalance.Int64() > 0 && !validatorInfo.CrossedRewardsThreshold { fmt.Printf("\n") - fmt.Printf("-Validator Consensus Layer Rewards: %.6f\n\n", math.RoundDown(eth.WeiToEth(validatorInfo.WithdrawVaultRewardBalance), 18)) + fmt.Printf("-Validator Consensus Layer Rewards: %s\n\n", eth.DisplayAmountInUnits(validatorInfo.WithdrawVaultRewardBalance, "eth")) } else if validatorInfo.CrossedRewardsThreshold { fmt.Println("If you have exited the validator, Please wait for Stader Oracles to settle your funds!") fmt.Println("If you have not exited the validator. Please reach out Stader Developers in discord for more information") diff --git a/stader-cli/wallet/export.go b/stader-cli/wallet/export.go index f2cba675e..9deae1372 100644 --- a/stader-cli/wallet/export.go +++ b/stader-cli/wallet/export.go @@ -51,7 +51,7 @@ func exportWallet(c *cli.Context) error { // Check if stdout is interactive stat, err := os.Stdout.Stat() if err != nil { - fmt.Fprintf(os.Stderr, "An error occured while determining whether or not the output is a tty: %s\n"+ + fmt.Fprintf(os.Stderr, "An error occurred while determining whether or not the output is a tty: %s\n"+ "Use \"stader-cli --secure-session wallet export\" to bypass.\n", err.Error()) os.Exit(1) } diff --git a/stader-lib/contracts/operator-rewards-collector.go b/stader-lib/contracts/operator-rewards-collector.go index d31261d57..9ca162677 100644 --- a/stader-lib/contracts/operator-rewards-collector.go +++ b/stader-lib/contracts/operator-rewards-collector.go @@ -31,7 +31,7 @@ var ( // OperatorRewardsCollectorMetaData contains all meta data concerning the OperatorRewardsCollector contract. var OperatorRewardsCollectorMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositedFor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"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\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"depositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"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\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"name\":\"InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WethTransferFailed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"DepositedFor\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"weth\",\"type\":\"address\"}],\"name\":\"UpdatedWethAddress\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"claimLiquidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"claimWithAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"depositFor\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"withdrawableInEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", } // OperatorRewardsCollectorABI is the input ABI used to generate the binding from. @@ -180,43 +180,12 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorRaw) Transact return _OperatorRewardsCollector.Contract.contract.Transact(opts, method, params...) } -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// GetBalance is a free data retrieval call binding the contract method 0xf8b2cb4f. // -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { +// Solidity: function getBalance(address operator) view returns(uint256) +func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) GetBalance(opts *bind.CallOpts, operator common.Address) (*big.Int, error) { var out []interface{} - err := _OperatorRewardsCollector.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) DEFAULTADMINROLE() ([32]byte, error) { - return _OperatorRewardsCollector.Contract.DEFAULTADMINROLE(&_OperatorRewardsCollector.CallOpts) -} - -// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. -// -// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) DEFAULTADMINROLE() ([32]byte, error) { - return _OperatorRewardsCollector.Contract.DEFAULTADMINROLE(&_OperatorRewardsCollector.CallOpts) -} - -// Balances is a free data retrieval call binding the contract method 0x27e235e3. -// -// Solidity: function balances(address ) view returns(uint256) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) Balances(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { - var out []interface{} - err := _OperatorRewardsCollector.contract.Call(opts, &out, "balances", arg0) + err := _OperatorRewardsCollector.contract.Call(opts, &out, "getBalance", operator) if err != nil { return *new(*big.Int), err @@ -228,142 +197,49 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) Balances(opts * } -// Balances is a free data retrieval call binding the contract method 0x27e235e3. -// -// Solidity: function balances(address ) view returns(uint256) -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) Balances(arg0 common.Address) (*big.Int, error) { - return _OperatorRewardsCollector.Contract.Balances(&_OperatorRewardsCollector.CallOpts, arg0) -} - -// Balances is a free data retrieval call binding the contract method 0x27e235e3. -// -// Solidity: function balances(address ) view returns(uint256) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) Balances(arg0 common.Address) (*big.Int, error) { - return _OperatorRewardsCollector.Contract.Balances(&_OperatorRewardsCollector.CallOpts, arg0) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { - var out []interface{} - err := _OperatorRewardsCollector.contract.Call(opts, &out, "getRoleAdmin", role) - - if err != nil { - return *new([32]byte), err - } - - out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) - - return out0, err - -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _OperatorRewardsCollector.Contract.GetRoleAdmin(&_OperatorRewardsCollector.CallOpts, role) -} - -// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. -// -// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { - return _OperatorRewardsCollector.Contract.GetRoleAdmin(&_OperatorRewardsCollector.CallOpts, role) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { - var out []interface{} - err := _OperatorRewardsCollector.contract.Call(opts, &out, "hasRole", role, account) - - if err != nil { - return *new(bool), err - } - - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) - - return out0, err - -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _OperatorRewardsCollector.Contract.HasRole(&_OperatorRewardsCollector.CallOpts, role, account) -} - -// HasRole is a free data retrieval call binding the contract method 0x91d14854. -// -// Solidity: function hasRole(bytes32 role, address account) view returns(bool) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { - return _OperatorRewardsCollector.Contract.HasRole(&_OperatorRewardsCollector.CallOpts, role, account) -} - -// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. -// -// Solidity: function staderConfig() view returns(address) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) StaderConfig(opts *bind.CallOpts) (common.Address, error) { - var out []interface{} - err := _OperatorRewardsCollector.contract.Call(opts, &out, "staderConfig") - - if err != nil { - return *new(common.Address), err - } - - out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) - - return out0, err - -} - -// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// GetBalance is a free data retrieval call binding the contract method 0xf8b2cb4f. // -// Solidity: function staderConfig() view returns(address) -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) StaderConfig() (common.Address, error) { - return _OperatorRewardsCollector.Contract.StaderConfig(&_OperatorRewardsCollector.CallOpts) +// Solidity: function getBalance(address operator) view returns(uint256) +func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) GetBalance(operator common.Address) (*big.Int, error) { + return _OperatorRewardsCollector.Contract.GetBalance(&_OperatorRewardsCollector.CallOpts, operator) } -// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// GetBalance is a free data retrieval call binding the contract method 0xf8b2cb4f. // -// Solidity: function staderConfig() view returns(address) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) StaderConfig() (common.Address, error) { - return _OperatorRewardsCollector.Contract.StaderConfig(&_OperatorRewardsCollector.CallOpts) +// Solidity: function getBalance(address operator) view returns(uint256) +func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) GetBalance(operator common.Address) (*big.Int, error) { + return _OperatorRewardsCollector.Contract.GetBalance(&_OperatorRewardsCollector.CallOpts, operator) } -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// WithdrawableInEth is a free data retrieval call binding the contract method 0x96198d0f. // -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { +// Solidity: function withdrawableInEth(address operator) view returns(uint256) +func (_OperatorRewardsCollector *OperatorRewardsCollectorCaller) WithdrawableInEth(opts *bind.CallOpts, operator common.Address) (*big.Int, error) { var out []interface{} - err := _OperatorRewardsCollector.contract.Call(opts, &out, "supportsInterface", interfaceId) + err := _OperatorRewardsCollector.contract.Call(opts, &out, "withdrawableInEth", operator) if err != nil { - return *new(bool), err + return *new(*big.Int), err } - out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) return out0, err } -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// WithdrawableInEth is a free data retrieval call binding the contract method 0x96198d0f. // -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _OperatorRewardsCollector.Contract.SupportsInterface(&_OperatorRewardsCollector.CallOpts, interfaceId) +// Solidity: function withdrawableInEth(address operator) view returns(uint256) +func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) WithdrawableInEth(operator common.Address) (*big.Int, error) { + return _OperatorRewardsCollector.Contract.WithdrawableInEth(&_OperatorRewardsCollector.CallOpts, operator) } -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// WithdrawableInEth is a free data retrieval call binding the contract method 0x96198d0f. // -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _OperatorRewardsCollector.Contract.SupportsInterface(&_OperatorRewardsCollector.CallOpts, interfaceId) +// Solidity: function withdrawableInEth(address operator) view returns(uint256) +func (_OperatorRewardsCollector *OperatorRewardsCollectorCallerSession) WithdrawableInEth(operator common.Address) (*big.Int, error) { + return _OperatorRewardsCollector.Contract.WithdrawableInEth(&_OperatorRewardsCollector.CallOpts, operator) } // Claim is a paid mutator transaction binding the contract method 0x4e71d92d. @@ -387,130 +263,67 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) Clai return _OperatorRewardsCollector.Contract.Claim(&_OperatorRewardsCollector.TransactOpts) } -// DepositFor is a paid mutator transaction binding the contract method 0xaa67c919. -// -// Solidity: function depositFor(address _receiver) payable returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) DepositFor(opts *bind.TransactOpts, _receiver common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.contract.Transact(opts, "depositFor", _receiver) -} - -// DepositFor is a paid mutator transaction binding the contract method 0xaa67c919. -// -// Solidity: function depositFor(address _receiver) payable returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) DepositFor(_receiver common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.DepositFor(&_OperatorRewardsCollector.TransactOpts, _receiver) -} - -// DepositFor is a paid mutator transaction binding the contract method 0xaa67c919. -// -// Solidity: function depositFor(address _receiver) payable returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) DepositFor(_receiver common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.DepositFor(&_OperatorRewardsCollector.TransactOpts, _receiver) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.contract.Transact(opts, "grantRole", role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.GrantRole(&_OperatorRewardsCollector.TransactOpts, role, account) -} - -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. -// -// Solidity: function grantRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.GrantRole(&_OperatorRewardsCollector.TransactOpts, role, account) -} - -// Initialize is a paid mutator transaction binding the contract method 0x485cc955. -// -// Solidity: function initialize(address _admin, address _staderConfig) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) Initialize(opts *bind.TransactOpts, _admin common.Address, _staderConfig common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.contract.Transact(opts, "initialize", _admin, _staderConfig) -} - -// Initialize is a paid mutator transaction binding the contract method 0x485cc955. -// -// Solidity: function initialize(address _admin, address _staderConfig) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) Initialize(_admin common.Address, _staderConfig common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.Initialize(&_OperatorRewardsCollector.TransactOpts, _admin, _staderConfig) -} - -// Initialize is a paid mutator transaction binding the contract method 0x485cc955. -// -// Solidity: function initialize(address _admin, address _staderConfig) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) Initialize(_admin common.Address, _staderConfig common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.Initialize(&_OperatorRewardsCollector.TransactOpts, _admin, _staderConfig) -} - -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// ClaimLiquidation is a paid mutator transaction binding the contract method 0x1cc1c626. // -// Solidity: function renounceRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.contract.Transact(opts, "renounceRole", role, account) +// Solidity: function claimLiquidation(address operator) returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) ClaimLiquidation(opts *bind.TransactOpts, operator common.Address) (*types.Transaction, error) { + return _OperatorRewardsCollector.contract.Transact(opts, "claimLiquidation", operator) } -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// ClaimLiquidation is a paid mutator transaction binding the contract method 0x1cc1c626. // -// Solidity: function renounceRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.RenounceRole(&_OperatorRewardsCollector.TransactOpts, role, account) +// Solidity: function claimLiquidation(address operator) returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) ClaimLiquidation(operator common.Address) (*types.Transaction, error) { + return _OperatorRewardsCollector.Contract.ClaimLiquidation(&_OperatorRewardsCollector.TransactOpts, operator) } -// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// ClaimLiquidation is a paid mutator transaction binding the contract method 0x1cc1c626. // -// Solidity: function renounceRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.RenounceRole(&_OperatorRewardsCollector.TransactOpts, role, account) +// Solidity: function claimLiquidation(address operator) returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) ClaimLiquidation(operator common.Address) (*types.Transaction, error) { + return _OperatorRewardsCollector.Contract.ClaimLiquidation(&_OperatorRewardsCollector.TransactOpts, operator) } -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// ClaimWithAmount is a paid mutator transaction binding the contract method 0xa4557a11. // -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.contract.Transact(opts, "revokeRole", role, account) +// Solidity: function claimWithAmount(uint256 _amount) returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) ClaimWithAmount(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _OperatorRewardsCollector.contract.Transact(opts, "claimWithAmount", _amount) } -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// ClaimWithAmount is a paid mutator transaction binding the contract method 0xa4557a11. // -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.RevokeRole(&_OperatorRewardsCollector.TransactOpts, role, account) +// Solidity: function claimWithAmount(uint256 _amount) returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) ClaimWithAmount(_amount *big.Int) (*types.Transaction, error) { + return _OperatorRewardsCollector.Contract.ClaimWithAmount(&_OperatorRewardsCollector.TransactOpts, _amount) } -// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// ClaimWithAmount is a paid mutator transaction binding the contract method 0xa4557a11. // -// Solidity: function revokeRole(bytes32 role, address account) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.RevokeRole(&_OperatorRewardsCollector.TransactOpts, role, account) +// Solidity: function claimWithAmount(uint256 _amount) returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) ClaimWithAmount(_amount *big.Int) (*types.Transaction, error) { + return _OperatorRewardsCollector.Contract.ClaimWithAmount(&_OperatorRewardsCollector.TransactOpts, _amount) } -// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. +// DepositFor is a paid mutator transaction binding the contract method 0xaa67c919. // -// Solidity: function updateStaderConfig(address _staderConfig) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) UpdateStaderConfig(opts *bind.TransactOpts, _staderConfig common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.contract.Transact(opts, "updateStaderConfig", _staderConfig) +// Solidity: function depositFor(address _receiver) payable returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactor) DepositFor(opts *bind.TransactOpts, _receiver common.Address) (*types.Transaction, error) { + return _OperatorRewardsCollector.contract.Transact(opts, "depositFor", _receiver) } -// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. +// DepositFor is a paid mutator transaction binding the contract method 0xaa67c919. // -// Solidity: function updateStaderConfig(address _staderConfig) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) UpdateStaderConfig(_staderConfig common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.UpdateStaderConfig(&_OperatorRewardsCollector.TransactOpts, _staderConfig) +// Solidity: function depositFor(address _receiver) payable returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorSession) DepositFor(_receiver common.Address) (*types.Transaction, error) { + return _OperatorRewardsCollector.Contract.DepositFor(&_OperatorRewardsCollector.TransactOpts, _receiver) } -// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. +// DepositFor is a paid mutator transaction binding the contract method 0xaa67c919. // -// Solidity: function updateStaderConfig(address _staderConfig) returns() -func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) UpdateStaderConfig(_staderConfig common.Address) (*types.Transaction, error) { - return _OperatorRewardsCollector.Contract.UpdateStaderConfig(&_OperatorRewardsCollector.TransactOpts, _staderConfig) +// Solidity: function depositFor(address _receiver) payable returns() +func (_OperatorRewardsCollector *OperatorRewardsCollectorTransactorSession) DepositFor(_receiver common.Address) (*types.Transaction, error) { + return _OperatorRewardsCollector.Contract.DepositFor(&_OperatorRewardsCollector.TransactOpts, _receiver) } // OperatorRewardsCollectorClaimedIterator is returned from FilterClaimed and is used to iterate over the raw logs and unpacked data for Claimed events raised by the OperatorRewardsCollector contract. @@ -812,9 +625,9 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseDeposite return event, nil } -// OperatorRewardsCollectorInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorInitializedIterator struct { - Event *OperatorRewardsCollectorInitialized // Event containing the contract specifics and raw log +// OperatorRewardsCollectorUpdatedStaderConfigIterator is returned from FilterUpdatedStaderConfig and is used to iterate over the raw logs and unpacked data for UpdatedStaderConfig events raised by the OperatorRewardsCollector contract. +type OperatorRewardsCollectorUpdatedStaderConfigIterator struct { + Event *OperatorRewardsCollectorUpdatedStaderConfig // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -828,7 +641,7 @@ type OperatorRewardsCollectorInitializedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *OperatorRewardsCollectorInitializedIterator) Next() bool { +func (it *OperatorRewardsCollectorUpdatedStaderConfigIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -837,7 +650,7 @@ func (it *OperatorRewardsCollectorInitializedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorInitialized) + it.Event = new(OperatorRewardsCollectorUpdatedStaderConfig) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -852,7 +665,7 @@ func (it *OperatorRewardsCollectorInitializedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorInitialized) + it.Event = new(OperatorRewardsCollectorUpdatedStaderConfig) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -868,41 +681,51 @@ func (it *OperatorRewardsCollectorInitializedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *OperatorRewardsCollectorInitializedIterator) Error() error { +func (it *OperatorRewardsCollectorUpdatedStaderConfigIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *OperatorRewardsCollectorInitializedIterator) Close() error { +func (it *OperatorRewardsCollectorUpdatedStaderConfigIterator) Close() error { it.sub.Unsubscribe() return nil } -// OperatorRewardsCollectorInitialized represents a Initialized event raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorInitialized struct { - Version uint8 - Raw types.Log // Blockchain specific contextual infos +// OperatorRewardsCollectorUpdatedStaderConfig represents a UpdatedStaderConfig event raised by the OperatorRewardsCollector contract. +type OperatorRewardsCollectorUpdatedStaderConfig struct { + StaderConfig common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// FilterUpdatedStaderConfig is a free log retrieval operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. // -// Solidity: event Initialized(uint8 version) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterInitialized(opts *bind.FilterOpts) (*OperatorRewardsCollectorInitializedIterator, error) { +// Solidity: event UpdatedStaderConfig(address indexed staderConfig) +func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterUpdatedStaderConfig(opts *bind.FilterOpts, staderConfig []common.Address) (*OperatorRewardsCollectorUpdatedStaderConfigIterator, error) { - logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "Initialized") + var staderConfigRule []interface{} + for _, staderConfigItem := range staderConfig { + staderConfigRule = append(staderConfigRule, staderConfigItem) + } + + logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "UpdatedStaderConfig", staderConfigRule) if err != nil { return nil, err } - return &OperatorRewardsCollectorInitializedIterator{contract: _OperatorRewardsCollector.contract, event: "Initialized", logs: logs, sub: sub}, nil + return &OperatorRewardsCollectorUpdatedStaderConfigIterator{contract: _OperatorRewardsCollector.contract, event: "UpdatedStaderConfig", logs: logs, sub: sub}, nil } -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// WatchUpdatedStaderConfig is a free log subscription operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. // -// Solidity: event Initialized(uint8 version) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorInitialized) (event.Subscription, error) { +// Solidity: event UpdatedStaderConfig(address indexed staderConfig) +func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchUpdatedStaderConfig(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorUpdatedStaderConfig, staderConfig []common.Address) (event.Subscription, error) { + + var staderConfigRule []interface{} + for _, staderConfigItem := range staderConfig { + staderConfigRule = append(staderConfigRule, staderConfigItem) + } - logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "Initialized") + logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "UpdatedStaderConfig", staderConfigRule) if err != nil { return nil, err } @@ -912,8 +735,8 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchInitiali select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(OperatorRewardsCollectorInitialized) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "Initialized", log); err != nil { + event := new(OperatorRewardsCollectorUpdatedStaderConfig) + if err := _OperatorRewardsCollector.contract.UnpackLog(event, "UpdatedStaderConfig", log); err != nil { return err } event.Raw = log @@ -934,21 +757,21 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchInitiali }), nil } -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// ParseUpdatedStaderConfig is a log parse operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. // -// Solidity: event Initialized(uint8 version) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseInitialized(log types.Log) (*OperatorRewardsCollectorInitialized, error) { - event := new(OperatorRewardsCollectorInitialized) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "Initialized", log); err != nil { +// Solidity: event UpdatedStaderConfig(address indexed staderConfig) +func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseUpdatedStaderConfig(log types.Log) (*OperatorRewardsCollectorUpdatedStaderConfig, error) { + event := new(OperatorRewardsCollectorUpdatedStaderConfig) + if err := _OperatorRewardsCollector.contract.UnpackLog(event, "UpdatedStaderConfig", log); err != nil { return nil, err } event.Raw = log return event, nil } -// OperatorRewardsCollectorRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorRoleAdminChangedIterator struct { - Event *OperatorRewardsCollectorRoleAdminChanged // Event containing the contract specifics and raw log +// OperatorRewardsCollectorUpdatedWethAddressIterator is returned from FilterUpdatedWethAddress and is used to iterate over the raw logs and unpacked data for UpdatedWethAddress events raised by the OperatorRewardsCollector contract. +type OperatorRewardsCollectorUpdatedWethAddressIterator struct { + Event *OperatorRewardsCollectorUpdatedWethAddress // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -962,7 +785,7 @@ type OperatorRewardsCollectorRoleAdminChangedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *OperatorRewardsCollectorRoleAdminChangedIterator) Next() bool { +func (it *OperatorRewardsCollectorUpdatedWethAddressIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -971,7 +794,7 @@ func (it *OperatorRewardsCollectorRoleAdminChangedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorRoleAdminChanged) + it.Event = new(OperatorRewardsCollectorUpdatedWethAddress) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -986,7 +809,7 @@ func (it *OperatorRewardsCollectorRoleAdminChangedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorRoleAdminChanged) + it.Event = new(OperatorRewardsCollectorUpdatedWethAddress) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1002,69 +825,51 @@ func (it *OperatorRewardsCollectorRoleAdminChangedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *OperatorRewardsCollectorRoleAdminChangedIterator) Error() error { +func (it *OperatorRewardsCollectorUpdatedWethAddressIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *OperatorRewardsCollectorRoleAdminChangedIterator) Close() error { +func (it *OperatorRewardsCollectorUpdatedWethAddressIterator) Close() error { it.sub.Unsubscribe() return nil } -// OperatorRewardsCollectorRoleAdminChanged represents a RoleAdminChanged event raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorRoleAdminChanged struct { - Role [32]byte - PreviousAdminRole [32]byte - NewAdminRole [32]byte - Raw types.Log // Blockchain specific contextual infos +// OperatorRewardsCollectorUpdatedWethAddress represents a UpdatedWethAddress event raised by the OperatorRewardsCollector contract. +type OperatorRewardsCollectorUpdatedWethAddress struct { + Weth common.Address + Raw types.Log // Blockchain specific contextual infos } -// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// FilterUpdatedWethAddress is a free log retrieval operation binding the contract event 0xa1de212dff029f064e368842c50f600a79a6958de54219159b77f9fa9b84e023. // -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*OperatorRewardsCollectorRoleAdminChangedIterator, error) { +// Solidity: event UpdatedWethAddress(address indexed weth) +func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterUpdatedWethAddress(opts *bind.FilterOpts, weth []common.Address) (*OperatorRewardsCollectorUpdatedWethAddressIterator, error) { - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + var wethRule []interface{} + for _, wethItem := range weth { + wethRule = append(wethRule, wethItem) } - logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "UpdatedWethAddress", wethRule) if err != nil { return nil, err } - return &OperatorRewardsCollectorRoleAdminChangedIterator{contract: _OperatorRewardsCollector.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil + return &OperatorRewardsCollectorUpdatedWethAddressIterator{contract: _OperatorRewardsCollector.contract, event: "UpdatedWethAddress", logs: logs, sub: sub}, nil } -// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// WatchUpdatedWethAddress is a free log subscription operation binding the contract event 0xa1de212dff029f064e368842c50f600a79a6958de54219159b77f9fa9b84e023. // -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { +// Solidity: event UpdatedWethAddress(address indexed weth) +func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchUpdatedWethAddress(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorUpdatedWethAddress, weth []common.Address) (event.Subscription, error) { - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var previousAdminRoleRule []interface{} - for _, previousAdminRoleItem := range previousAdminRole { - previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) - } - var newAdminRoleRule []interface{} - for _, newAdminRoleItem := range newAdminRole { - newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + var wethRule []interface{} + for _, wethItem := range weth { + wethRule = append(wethRule, wethItem) } - logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "UpdatedWethAddress", wethRule) if err != nil { return nil, err } @@ -1074,8 +879,8 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchRoleAdmi select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(OperatorRewardsCollectorRoleAdminChanged) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + event := new(OperatorRewardsCollectorUpdatedWethAddress) + if err := _OperatorRewardsCollector.contract.UnpackLog(event, "UpdatedWethAddress", log); err != nil { return err } event.Raw = log @@ -1096,480 +901,12 @@ func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchRoleAdmi }), nil } -// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. -// -// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseRoleAdminChanged(log types.Log) (*OperatorRewardsCollectorRoleAdminChanged, error) { - event := new(OperatorRewardsCollectorRoleAdminChanged) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// OperatorRewardsCollectorRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorRoleGrantedIterator struct { - Event *OperatorRewardsCollectorRoleGranted // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OperatorRewardsCollectorRoleGrantedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorRoleGranted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorRoleGranted) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *OperatorRewardsCollectorRoleGrantedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OperatorRewardsCollectorRoleGrantedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OperatorRewardsCollectorRoleGranted represents a RoleGranted event raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorRoleGranted struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*OperatorRewardsCollectorRoleGrantedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &OperatorRewardsCollectorRoleGrantedIterator{contract: _OperatorRewardsCollector.contract, event: "RoleGranted", logs: logs, sub: sub}, nil -} - -// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// ParseUpdatedWethAddress is a log parse operation binding the contract event 0xa1de212dff029f064e368842c50f600a79a6958de54219159b77f9fa9b84e023. // -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OperatorRewardsCollectorRoleGranted) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. -// -// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseRoleGranted(log types.Log) (*OperatorRewardsCollectorRoleGranted, error) { - event := new(OperatorRewardsCollectorRoleGranted) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "RoleGranted", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// OperatorRewardsCollectorRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorRoleRevokedIterator struct { - Event *OperatorRewardsCollectorRoleRevoked // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OperatorRewardsCollectorRoleRevokedIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorRoleRevoked) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorRoleRevoked) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *OperatorRewardsCollectorRoleRevokedIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OperatorRewardsCollectorRoleRevokedIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OperatorRewardsCollectorRoleRevoked represents a RoleRevoked event raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorRoleRevoked struct { - Role [32]byte - Account common.Address - Sender common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*OperatorRewardsCollectorRoleRevokedIterator, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return &OperatorRewardsCollectorRoleRevokedIterator{contract: _OperatorRewardsCollector.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil -} - -// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { - - var roleRule []interface{} - for _, roleItem := range role { - roleRule = append(roleRule, roleItem) - } - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } - var senderRule []interface{} - for _, senderItem := range sender { - senderRule = append(senderRule, senderItem) - } - - logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OperatorRewardsCollectorRoleRevoked) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. -// -// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseRoleRevoked(log types.Log) (*OperatorRewardsCollectorRoleRevoked, error) { - event := new(OperatorRewardsCollectorRoleRevoked) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "RoleRevoked", log); err != nil { - return nil, err - } - event.Raw = log - return event, nil -} - -// OperatorRewardsCollectorUpdatedStaderConfigIterator is returned from FilterUpdatedStaderConfig and is used to iterate over the raw logs and unpacked data for UpdatedStaderConfig events raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorUpdatedStaderConfigIterator struct { - Event *OperatorRewardsCollectorUpdatedStaderConfig // Event containing the contract specifics and raw log - - contract *bind.BoundContract // Generic contract to use for unpacking event data - event string // Event name to use for unpacking event data - - logs chan types.Log // Log channel receiving the found contract events - sub ethereum.Subscription // Subscription for errors, completion and termination - done bool // Whether the subscription completed delivering logs - fail error // Occurred error to stop iteration -} - -// Next advances the iterator to the subsequent event, returning whether there -// are any more events found. In case of a retrieval or parsing error, false is -// returned and Error() can be queried for the exact failure. -func (it *OperatorRewardsCollectorUpdatedStaderConfigIterator) Next() bool { - // If the iterator failed, stop iterating - if it.fail != nil { - return false - } - // If the iterator completed, deliver directly whatever's available - if it.done { - select { - case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorUpdatedStaderConfig) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - default: - return false - } - } - // Iterator still in progress, wait for either a data or an error event - select { - case log := <-it.logs: - it.Event = new(OperatorRewardsCollectorUpdatedStaderConfig) - if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { - it.fail = err - return false - } - it.Event.Raw = log - return true - - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } -} - -// Error returns any retrieval or parsing error occurred during filtering. -func (it *OperatorRewardsCollectorUpdatedStaderConfigIterator) Error() error { - return it.fail -} - -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *OperatorRewardsCollectorUpdatedStaderConfigIterator) Close() error { - it.sub.Unsubscribe() - return nil -} - -// OperatorRewardsCollectorUpdatedStaderConfig represents a UpdatedStaderConfig event raised by the OperatorRewardsCollector contract. -type OperatorRewardsCollectorUpdatedStaderConfig struct { - StaderConfig common.Address - Raw types.Log // Blockchain specific contextual infos -} - -// FilterUpdatedStaderConfig is a free log retrieval operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. -// -// Solidity: event UpdatedStaderConfig(address indexed staderConfig) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) FilterUpdatedStaderConfig(opts *bind.FilterOpts, staderConfig []common.Address) (*OperatorRewardsCollectorUpdatedStaderConfigIterator, error) { - - var staderConfigRule []interface{} - for _, staderConfigItem := range staderConfig { - staderConfigRule = append(staderConfigRule, staderConfigItem) - } - - logs, sub, err := _OperatorRewardsCollector.contract.FilterLogs(opts, "UpdatedStaderConfig", staderConfigRule) - if err != nil { - return nil, err - } - return &OperatorRewardsCollectorUpdatedStaderConfigIterator{contract: _OperatorRewardsCollector.contract, event: "UpdatedStaderConfig", logs: logs, sub: sub}, nil -} - -// WatchUpdatedStaderConfig is a free log subscription operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. -// -// Solidity: event UpdatedStaderConfig(address indexed staderConfig) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) WatchUpdatedStaderConfig(opts *bind.WatchOpts, sink chan<- *OperatorRewardsCollectorUpdatedStaderConfig, staderConfig []common.Address) (event.Subscription, error) { - - var staderConfigRule []interface{} - for _, staderConfigItem := range staderConfig { - staderConfigRule = append(staderConfigRule, staderConfigItem) - } - - logs, sub, err := _OperatorRewardsCollector.contract.WatchLogs(opts, "UpdatedStaderConfig", staderConfigRule) - if err != nil { - return nil, err - } - return event.NewSubscription(func(quit <-chan struct{}) error { - defer sub.Unsubscribe() - for { - select { - case log := <-logs: - // New log arrived, parse the event and forward to the user - event := new(OperatorRewardsCollectorUpdatedStaderConfig) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "UpdatedStaderConfig", log); err != nil { - return err - } - event.Raw = log - - select { - case sink <- event: - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - case err := <-sub.Err(): - return err - case <-quit: - return nil - } - } - }), nil -} - -// ParseUpdatedStaderConfig is a log parse operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. -// -// Solidity: event UpdatedStaderConfig(address indexed staderConfig) -func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseUpdatedStaderConfig(log types.Log) (*OperatorRewardsCollectorUpdatedStaderConfig, error) { - event := new(OperatorRewardsCollectorUpdatedStaderConfig) - if err := _OperatorRewardsCollector.contract.UnpackLog(event, "UpdatedStaderConfig", log); err != nil { +// Solidity: event UpdatedWethAddress(address indexed weth) +func (_OperatorRewardsCollector *OperatorRewardsCollectorFilterer) ParseUpdatedWethAddress(log types.Log) (*OperatorRewardsCollectorUpdatedWethAddress, error) { + event := new(OperatorRewardsCollectorUpdatedWethAddress) + if err := _OperatorRewardsCollector.contract.UnpackLog(event, "UpdatedWethAddress", log); err != nil { return nil, err } event.Raw = log diff --git a/stader-lib/contracts/permissionless-node-registry.go b/stader-lib/contracts/permissionless-node-registry.go index 05bec58bd..05464ec9e 100644 --- a/stader-lib/contracts/permissionless-node-registry.go +++ b/stader-lib/contracts/permissionless-node-registry.go @@ -43,7 +43,7 @@ type Validator struct { // PermissionlessNodeRegistryMetaData contains all meta data concerning the PermissionlessNodeRegistry contract. var PermissionlessNodeRegistryMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotExistingRewardAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotNewRewardAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotOperator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotStaderContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CooldownNotComplete\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicatePoolIDOrPoolNotAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InSufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBondEthValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKeyCount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStartAndEndIndex\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MisMatchingInputKeysSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoChangeInState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughSDCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorAlreadyOnBoardedInProtocol\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorIsDeactivate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorNotOnBoarded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PageNumberIsZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PubkeyAlreadyExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyVerifiedKeysReported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyWithdrawnKeysReported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UNEXPECTED_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"maxKeyLimitReached\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"AddedValidatorKey\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalActiveValidatorCount\",\"type\":\"uint256\"}],\"name\":\"DecreasedTotalActiveValidatorCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalActiveValidatorCount\",\"type\":\"uint256\"}],\"name\":\"IncreasedTotalActiveValidatorCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"nodeRewardAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"optInForSocializingPool\",\"type\":\"bool\"}],\"name\":\"OnboardedOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardAddress\",\"type\":\"address\"}],\"name\":\"OperatorRewardAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardAddress\",\"type\":\"address\"}],\"name\":\"RewardAddressProposed\",\"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\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferredCollateralToPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchKeyDepositLimit\",\"type\":\"uint256\"}],\"name\":\"UpdatedInputKeyCountLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maxNonTerminalKeyPerOperator\",\"type\":\"uint64\"}],\"name\":\"UpdatedMaxNonTerminalKeyPerOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextQueuedValidatorIndex\",\"type\":\"uint256\"}],\"name\":\"UpdatedNextQueuedValidatorIndex\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"operatorName\",\"type\":\"string\"}],\"name\":\"UpdatedOperatorName\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"optedForSocializingPool\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"block\",\"type\":\"uint256\"}],\"name\":\"UpdatedSocializingPoolState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"}],\"name\":\"UpdatedValidatorDepositBlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"verifiedKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"UpdatedVerifiedKeyBatchSize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawnKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"UpdatedWithdrawnKeyBatchSize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorMarkedAsFrontRunned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorMarkedReadyToDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorStatusMarkedAsInvalidSignature\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COLLATERAL_ETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FRONT_RUN_PENALTY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL_ID\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_pubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_preDepositSignature\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_depositSignature\",\"type\":\"bytes[]\"}],\"name\":\"addValidatorKeys\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_optInForSocializingPool\",\"type\":\"bool\"}],\"name\":\"changeSocializingPoolState\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operatorAddress\",\"type\":\"address\"}],\"name\":\"confirmRewardAddressChange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pageSize\",\"type\":\"uint256\"}],\"name\":\"getAllActiveValidators\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preDepositSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"depositSignature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"withdrawVaultAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawnBlock\",\"type\":\"uint256\"}],\"internalType\":\"structValidator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pageSize\",\"type\":\"uint256\"}],\"name\":\"getAllNodeELVaultAddress\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"}],\"name\":\"getOperatorRewardAddress\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"}],\"name\":\"getOperatorTotalKeys\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalKeys\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_nodeOperator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endIndex\",\"type\":\"uint256\"}],\"name\":\"getOperatorTotalNonTerminalKeys\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"}],\"name\":\"getSocializingPoolStateChangeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalActiveValidatorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalQueuedValidatorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pageSize\",\"type\":\"uint256\"}],\"name\":\"getValidatorsByOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preDepositSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"depositSignature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"withdrawVaultAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawnBlock\",\"type\":\"uint256\"}],\"internalType\":\"structValidator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"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\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"increaseTotalActiveValidatorCount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputKeyCountLimit\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operAddr\",\"type\":\"address\"}],\"name\":\"isExistingOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_pubkey\",\"type\":\"bytes\"}],\"name\":\"isExistingPubkey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_readyToDepositPubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_frontRunPubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_invalidSignaturePubkey\",\"type\":\"bytes[]\"}],\"name\":\"markValidatorReadyToDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNonTerminalKeyPerOperator\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextOperatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextQueuedValidatorIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextValidatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"nodeELRewardVaultByOperatorId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_optInForSocializingPool\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"_operatorName\",\"type\":\"string\"},{\"internalType\":\"addresspayable\",\"name\":\"_operatorRewardAddress\",\"type\":\"address\"}],\"name\":\"onboardNodeOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorIDByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"operatorStructById\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"optedForSocializingPool\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"operatorName\",\"type\":\"string\"},{\"internalType\":\"addresspayable\",\"name\":\"operatorRewardAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operatorAddress\",\"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\":\"address\",\"name\":\"_operatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRewardAddress\",\"type\":\"address\"}],\"name\":\"proposeRewardAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposedRewardAddressByOperatorId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"queuedValidators\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"socializingPoolStateChangeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalActiveValidatorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferCollateralToPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_validatorId\",\"type\":\"uint256\"}],\"name\":\"updateDepositStatusAndBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_inputKeyCountLimit\",\"type\":\"uint16\"}],\"name\":\"updateInputKeyCountLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_maxNonTerminalKeyPerOperator\",\"type\":\"uint64\"}],\"name\":\"updateMaxNonTerminalKeyPerOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextQueuedValidatorIndex\",\"type\":\"uint256\"}],\"name\":\"updateNextQueuedValidatorIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_operatorName\",\"type\":\"string\"}],\"name\":\"updateOperatorName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_verifiedKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"updateVerifiedKeysBatchSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"validatorIdByPubkey\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorIdsByOperatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validatorQueueSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorRegistry\",\"outputs\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preDepositSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"depositSignature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"withdrawVaultAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawnBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifiedKeyBatchSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_pubkeys\",\"type\":\"bytes[]\"}],\"name\":\"withdrawnValidators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotExistingRewardAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotNewRewardAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotOperator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotStaderContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CooldownNotComplete\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicatePoolIDOrPoolNotAdded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InSufficientBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBondEthValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKeyCount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidStartAndEndIndex\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MisMatchingInputKeysSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoChangeInState\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughSDCollateral\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorAlreadyOnBoardedInProtocol\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorIsDeactivate\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorNotOnBoarded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PageNumberIsZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PubkeyAlreadyExist\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyVerifiedKeysReported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TooManyWithdrawnKeysReported\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"TransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UNEXPECTED_STATUS\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"maxKeyLimitReached\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"AddedValidatorKey\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalActiveValidatorCount\",\"type\":\"uint256\"}],\"name\":\"DecreasedTotalActiveValidatorCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalActiveValidatorCount\",\"type\":\"uint256\"}],\"name\":\"IncreasedTotalActiveValidatorCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"nodeRewardAddress\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"optInForSocializingPool\",\"type\":\"bool\"}],\"name\":\"OnboardedOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardAddress\",\"type\":\"address\"}],\"name\":\"OperatorRewardAddressUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"rewardAddress\",\"type\":\"address\"}],\"name\":\"RewardAddressProposed\",\"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\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TransferredCollateralToPool\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"batchKeyDepositLimit\",\"type\":\"uint256\"}],\"name\":\"UpdatedInputKeyCountLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"maxNonTerminalKeyPerOperator\",\"type\":\"uint64\"}],\"name\":\"UpdatedMaxNonTerminalKeyPerOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextQueuedValidatorIndex\",\"type\":\"uint256\"}],\"name\":\"UpdatedNextQueuedValidatorIndex\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"nodeOperator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"operatorName\",\"type\":\"string\"}],\"name\":\"UpdatedOperatorName\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"optedForSocializingPool\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"block\",\"type\":\"uint256\"}],\"name\":\"UpdatedSocializingPoolState\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"}],\"name\":\"UpdatedValidatorDepositBlock\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"verifiedKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"UpdatedVerifiedKeyBatchSize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawnKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"UpdatedWithdrawnKeyBatchSize\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"referralId\",\"type\":\"string\"}],\"name\":\"ValidatorAddedViaReferral\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorMarkedAsFrontRunned\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorMarkedReadyToDeposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorStatusMarkedAsInvalidSignature\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"validatorId\",\"type\":\"uint256\"}],\"name\":\"ValidatorWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"COLLATERAL_ETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FRONT_RUN_PENALTY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL_ID\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_pubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_preDepositSignature\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_depositSignature\",\"type\":\"bytes[]\"}],\"name\":\"addValidatorKeys\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_referralId\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_amountOfSDToUtilize\",\"type\":\"uint256\"},{\"internalType\":\"bytes[]\",\"name\":\"_pubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_preDepositSignature\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_depositSignature\",\"type\":\"bytes[]\"}],\"name\":\"addValidatorKeysWithUtilizeSD\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_optInForSocializingPool\",\"type\":\"bool\"}],\"name\":\"changeSocializingPoolState\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operatorAddress\",\"type\":\"address\"}],\"name\":\"confirmRewardAddressChange\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pageSize\",\"type\":\"uint256\"}],\"name\":\"getAllActiveValidators\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preDepositSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"depositSignature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"withdrawVaultAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawnBlock\",\"type\":\"uint256\"}],\"internalType\":\"structValidator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_pageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pageSize\",\"type\":\"uint256\"}],\"name\":\"getAllNodeELVaultAddress\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCollateralETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"}],\"name\":\"getOperatorRewardAddress\",\"outputs\":[{\"internalType\":\"addresspayable\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"}],\"name\":\"getOperatorTotalKeys\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_totalKeys\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_nodeOperator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_startIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endIndex\",\"type\":\"uint256\"}],\"name\":\"getOperatorTotalNonTerminalKeys\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"}],\"name\":\"getSocializingPoolStateChangeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalActiveValidatorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalQueuedValidatorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_pageNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_pageSize\",\"type\":\"uint256\"}],\"name\":\"getValidatorsByOperator\",\"outputs\":[{\"components\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preDepositSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"depositSignature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"withdrawVaultAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawnBlock\",\"type\":\"uint256\"}],\"internalType\":\"structValidator[]\",\"name\":\"\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"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\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"increaseTotalActiveValidatorCount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inputKeyCountLimit\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operAddr\",\"type\":\"address\"}],\"name\":\"isExistingOperator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"_pubkey\",\"type\":\"bytes\"}],\"name\":\"isExistingPubkey\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_readyToDepositPubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_frontRunPubkey\",\"type\":\"bytes[]\"},{\"internalType\":\"bytes[]\",\"name\":\"_invalidSignaturePubkey\",\"type\":\"bytes[]\"}],\"name\":\"markValidatorReadyToDeposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNonTerminalKeyPerOperator\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextOperatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextQueuedValidatorIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextValidatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"nodeELRewardVaultByOperatorId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_optInForSocializingPool\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"_operatorName\",\"type\":\"string\"},{\"internalType\":\"addresspayable\",\"name\":\"_operatorRewardAddress\",\"type\":\"address\"}],\"name\":\"onboardNodeOperator\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"feeRecipientAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorIDByAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"operatorStructById\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"active\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"optedForSocializingPool\",\"type\":\"bool\"},{\"internalType\":\"string\",\"name\":\"operatorName\",\"type\":\"string\"},{\"internalType\":\"addresspayable\",\"name\":\"operatorRewardAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operatorAddress\",\"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\":\"address\",\"name\":\"_operatorAddress\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_newRewardAddress\",\"type\":\"address\"}],\"name\":\"proposeRewardAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposedRewardAddressByOperatorId\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"queuedValidators\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"socializingPoolStateChangeBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalActiveValidatorCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferCollateralToPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_validatorId\",\"type\":\"uint256\"}],\"name\":\"updateDepositStatusAndBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_inputKeyCountLimit\",\"type\":\"uint16\"}],\"name\":\"updateInputKeyCountLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"_maxNonTerminalKeyPerOperator\",\"type\":\"uint64\"}],\"name\":\"updateMaxNonTerminalKeyPerOperator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_nextQueuedValidatorIndex\",\"type\":\"uint256\"}],\"name\":\"updateNextQueuedValidatorIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_operatorName\",\"type\":\"string\"}],\"name\":\"updateOperatorName\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_verifiedKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"updateVerifiedKeysBatchSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"validatorIdByPubkey\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorIdsByOperatorId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"validatorQueueSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"validatorRegistry\",\"outputs\":[{\"internalType\":\"enumValidatorStatus\",\"name\":\"status\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"pubkey\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"preDepositSignature\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"depositSignature\",\"type\":\"bytes\"},{\"internalType\":\"address\",\"name\":\"withdrawVaultAddress\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"depositBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawnBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"verifiedKeyBatchSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes[]\",\"name\":\"_pubkeys\",\"type\":\"bytes[]\"}],\"name\":\"withdrawnValidators\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // PermissionlessNodeRegistryABI is the input ABI used to generate the binding from. @@ -1464,6 +1464,27 @@ func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryTransactorSession) return _PermissionlessNodeRegistry.Contract.AddValidatorKeys(&_PermissionlessNodeRegistry.TransactOpts, _pubkey, _preDepositSignature, _depositSignature) } +// AddValidatorKeysWithUtilizeSD is a paid mutator transaction binding the contract method 0x7da55a1e. +// +// Solidity: function addValidatorKeysWithUtilizeSD(string _referralId, uint256 _amountOfSDToUtilize, bytes[] _pubkey, bytes[] _preDepositSignature, bytes[] _depositSignature) payable returns() +func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryTransactor) AddValidatorKeysWithUtilizeSD(opts *bind.TransactOpts, _referralId string, _amountOfSDToUtilize *big.Int, _pubkey [][]byte, _preDepositSignature [][]byte, _depositSignature [][]byte) (*types.Transaction, error) { + return _PermissionlessNodeRegistry.contract.Transact(opts, "addValidatorKeysWithUtilizeSD", _referralId, _amountOfSDToUtilize, _pubkey, _preDepositSignature, _depositSignature) +} + +// AddValidatorKeysWithUtilizeSD is a paid mutator transaction binding the contract method 0x7da55a1e. +// +// Solidity: function addValidatorKeysWithUtilizeSD(string _referralId, uint256 _amountOfSDToUtilize, bytes[] _pubkey, bytes[] _preDepositSignature, bytes[] _depositSignature) payable returns() +func (_PermissionlessNodeRegistry *PermissionlessNodeRegistrySession) AddValidatorKeysWithUtilizeSD(_referralId string, _amountOfSDToUtilize *big.Int, _pubkey [][]byte, _preDepositSignature [][]byte, _depositSignature [][]byte) (*types.Transaction, error) { + return _PermissionlessNodeRegistry.Contract.AddValidatorKeysWithUtilizeSD(&_PermissionlessNodeRegistry.TransactOpts, _referralId, _amountOfSDToUtilize, _pubkey, _preDepositSignature, _depositSignature) +} + +// AddValidatorKeysWithUtilizeSD is a paid mutator transaction binding the contract method 0x7da55a1e. +// +// Solidity: function addValidatorKeysWithUtilizeSD(string _referralId, uint256 _amountOfSDToUtilize, bytes[] _pubkey, bytes[] _preDepositSignature, bytes[] _depositSignature) payable returns() +func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryTransactorSession) AddValidatorKeysWithUtilizeSD(_referralId string, _amountOfSDToUtilize *big.Int, _pubkey [][]byte, _preDepositSignature [][]byte, _depositSignature [][]byte) (*types.Transaction, error) { + return _PermissionlessNodeRegistry.Contract.AddValidatorKeysWithUtilizeSD(&_PermissionlessNodeRegistry.TransactOpts, _referralId, _amountOfSDToUtilize, _pubkey, _preDepositSignature, _depositSignature) +} + // ChangeSocializingPoolState is a paid mutator transaction binding the contract method 0xf90b0838. // // Solidity: function changeSocializingPoolState(bool _optInForSocializingPool) returns(address feeRecipientAddress) @@ -5014,6 +5035,141 @@ func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryFilterer) ParseUpda return event, nil } +// PermissionlessNodeRegistryValidatorAddedViaReferralIterator is returned from FilterValidatorAddedViaReferral and is used to iterate over the raw logs and unpacked data for ValidatorAddedViaReferral events raised by the PermissionlessNodeRegistry contract. +type PermissionlessNodeRegistryValidatorAddedViaReferralIterator struct { + Event *PermissionlessNodeRegistryValidatorAddedViaReferral // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *PermissionlessNodeRegistryValidatorAddedViaReferralIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(PermissionlessNodeRegistryValidatorAddedViaReferral) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(PermissionlessNodeRegistryValidatorAddedViaReferral) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *PermissionlessNodeRegistryValidatorAddedViaReferralIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *PermissionlessNodeRegistryValidatorAddedViaReferralIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// PermissionlessNodeRegistryValidatorAddedViaReferral represents a ValidatorAddedViaReferral event raised by the PermissionlessNodeRegistry contract. +type PermissionlessNodeRegistryValidatorAddedViaReferral struct { + Amount *big.Int + ReferralId string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterValidatorAddedViaReferral is a free log retrieval operation binding the contract event 0xf1d3fcd20d6cf75aba4ee663e1e3bd6eb614be29d5d9d2b5b1c58238a2da26dd. +// +// Solidity: event ValidatorAddedViaReferral(uint256 amount, string referralId) +func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryFilterer) FilterValidatorAddedViaReferral(opts *bind.FilterOpts) (*PermissionlessNodeRegistryValidatorAddedViaReferralIterator, error) { + + logs, sub, err := _PermissionlessNodeRegistry.contract.FilterLogs(opts, "ValidatorAddedViaReferral") + if err != nil { + return nil, err + } + return &PermissionlessNodeRegistryValidatorAddedViaReferralIterator{contract: _PermissionlessNodeRegistry.contract, event: "ValidatorAddedViaReferral", logs: logs, sub: sub}, nil +} + +// WatchValidatorAddedViaReferral is a free log subscription operation binding the contract event 0xf1d3fcd20d6cf75aba4ee663e1e3bd6eb614be29d5d9d2b5b1c58238a2da26dd. +// +// Solidity: event ValidatorAddedViaReferral(uint256 amount, string referralId) +func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryFilterer) WatchValidatorAddedViaReferral(opts *bind.WatchOpts, sink chan<- *PermissionlessNodeRegistryValidatorAddedViaReferral) (event.Subscription, error) { + + logs, sub, err := _PermissionlessNodeRegistry.contract.WatchLogs(opts, "ValidatorAddedViaReferral") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(PermissionlessNodeRegistryValidatorAddedViaReferral) + if err := _PermissionlessNodeRegistry.contract.UnpackLog(event, "ValidatorAddedViaReferral", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseValidatorAddedViaReferral is a log parse operation binding the contract event 0xf1d3fcd20d6cf75aba4ee663e1e3bd6eb614be29d5d9d2b5b1c58238a2da26dd. +// +// Solidity: event ValidatorAddedViaReferral(uint256 amount, string referralId) +func (_PermissionlessNodeRegistry *PermissionlessNodeRegistryFilterer) ParseValidatorAddedViaReferral(log types.Log) (*PermissionlessNodeRegistryValidatorAddedViaReferral, error) { + event := new(PermissionlessNodeRegistryValidatorAddedViaReferral) + if err := _PermissionlessNodeRegistry.contract.UnpackLog(event, "ValidatorAddedViaReferral", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // PermissionlessNodeRegistryValidatorMarkedAsFrontRunnedIterator is returned from FilterValidatorMarkedAsFrontRunned and is used to iterate over the raw logs and unpacked data for ValidatorMarkedAsFrontRunned events raised by the PermissionlessNodeRegistry contract. type PermissionlessNodeRegistryValidatorMarkedAsFrontRunnedIterator struct { Event *PermissionlessNodeRegistryValidatorMarkedAsFrontRunned // Event containing the contract specifics and raw log diff --git a/stader-lib/contracts/sd-collateral.go b/stader-lib/contracts/sd-collateral.go index 899a7c760..2708f5ccc 100644 --- a/stader-lib/contracts/sd-collateral.go +++ b/stader-lib/contracts/sd-collateral.go @@ -31,7 +31,7 @@ var ( // SdCollateralMetaData contains all meta data concerning the SdCollateral contract. var SdCollateralMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotWithdrawVault\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"operatorSDCollateral\",\"type\":\"uint256\"}],\"name\":\"InsufficientSDToWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPoolId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPoolLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoStateChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"SDDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"auction\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdSlashed\",\"type\":\"uint256\"}],\"name\":\"SDSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"SDWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"UpdatedPoolIdForOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawThreshold\",\"type\":\"uint256\"}],\"name\":\"UpdatedPoolThreshold\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ethAmount\",\"type\":\"uint256\"}],\"name\":\"convertETHToSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"convertSDToETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"depositSDAsCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_numValidator\",\"type\":\"uint256\"}],\"name\":\"getMinimumSDToBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_minSDToBond\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"getOperatorWithdrawThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"operatorWithdrawThreshold\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_numValidator\",\"type\":\"uint256\"}],\"name\":\"getRemainingSDToBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"getRewardEligibleSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardEligibleSD\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_numValidator\",\"type\":\"uint256\"}],\"name\":\"hasEnoughSDCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxApproveSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorSDBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"poolThresholdbyPoolId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"minThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawThreshold\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"units\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"}],\"name\":\"slashValidatorSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_minThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_withdrawThreshold\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_units\",\"type\":\"string\"}],\"name\":\"updatePoolThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestedSD\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotStaderContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotWithdrawVault\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"operatorSDCollateral\",\"type\":\"uint256\"}],\"name\":\"InsufficientSDToWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientSelfBondToRepay\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPoolId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidPoolLimit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoStateChange\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NonTerminalKeysNotZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"ReducedUtilizedPosition\",\"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\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"SDDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"SDRepaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"auction\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdSlashed\",\"type\":\"uint256\"}],\"name\":\"SDSlashed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"SDWithdrawn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"UpdatedPoolIdForOperator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawThreshold\",\"type\":\"uint256\"}],\"name\":\"UpdatedPoolThreshold\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"UtilizedSDDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdSlashFromUtilized\",\"type\":\"uint256\"}],\"name\":\"UtilizedSDSlashed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_ethAmount\",\"type\":\"uint256\"}],\"name\":\"convertETHToSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"convertSDToETH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"depositSDAsCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"depositSDAsCollateralOnBehalf\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"depositSDFromUtilityPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_numValidator\",\"type\":\"uint256\"}],\"name\":\"getMinimumSDToBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_minSDToBond\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"getOperatorInfo\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_operatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_validatorCount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"getOperatorWithdrawThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"operatorWithdrawThreshold\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_numValidator\",\"type\":\"uint256\"}],\"name\":\"getRemainingSDToBond\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"getRewardEligibleSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardEligibleSD\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_numValidator\",\"type\":\"uint256\"}],\"name\":\"hasEnoughSDCollateral\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxApproveSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorSDBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"operatorUtilizedSDBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"name\":\"poolThresholdbyPoolId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"minThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawThreshold\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"units\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"reduceUtilizedSDPosition\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_validatorId\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"}],\"name\":\"slashValidatorSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"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\":\"_operator\",\"type\":\"address\"}],\"name\":\"transferBackUtilizedSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"_poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"_minThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_maxThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_withdrawThreshold\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"_units\",\"type\":\"string\"}],\"name\":\"updatePoolThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestedSD\",\"type\":\"uint256\"}],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestedSD\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"}],\"name\":\"withdrawOnBehalf\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // SdCollateralABI is the input ABI used to generate the binding from. @@ -304,6 +304,56 @@ func (_SdCollateral *SdCollateralCallerSession) GetMinimumSDToBond(_poolId uint8 return _SdCollateral.Contract.GetMinimumSDToBond(&_SdCollateral.CallOpts, _poolId, _numValidator) } +// GetOperatorInfo is a free data retrieval call binding the contract method 0x27d9ab5d. +// +// Solidity: function getOperatorInfo(address _operator) view returns(uint8 _poolId, uint256 _operatorId, uint256 _validatorCount) +func (_SdCollateral *SdCollateralCaller) GetOperatorInfo(opts *bind.CallOpts, _operator common.Address) (struct { + PoolId uint8 + OperatorId *big.Int + ValidatorCount *big.Int +}, error) { + var out []interface{} + err := _SdCollateral.contract.Call(opts, &out, "getOperatorInfo", _operator) + + outstruct := new(struct { + PoolId uint8 + OperatorId *big.Int + ValidatorCount *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.PoolId = *abi.ConvertType(out[0], new(uint8)).(*uint8) + outstruct.OperatorId = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.ValidatorCount = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x27d9ab5d. +// +// Solidity: function getOperatorInfo(address _operator) view returns(uint8 _poolId, uint256 _operatorId, uint256 _validatorCount) +func (_SdCollateral *SdCollateralSession) GetOperatorInfo(_operator common.Address) (struct { + PoolId uint8 + OperatorId *big.Int + ValidatorCount *big.Int +}, error) { + return _SdCollateral.Contract.GetOperatorInfo(&_SdCollateral.CallOpts, _operator) +} + +// GetOperatorInfo is a free data retrieval call binding the contract method 0x27d9ab5d. +// +// Solidity: function getOperatorInfo(address _operator) view returns(uint8 _poolId, uint256 _operatorId, uint256 _validatorCount) +func (_SdCollateral *SdCollateralCallerSession) GetOperatorInfo(_operator common.Address) (struct { + PoolId uint8 + OperatorId *big.Int + ValidatorCount *big.Int +}, error) { + return _SdCollateral.Contract.GetOperatorInfo(&_SdCollateral.CallOpts, _operator) +} + // GetOperatorWithdrawThreshold is a free data retrieval call binding the contract method 0x9871a30a. // // Solidity: function getOperatorWithdrawThreshold(address _operator) view returns(uint256 operatorWithdrawThreshold) @@ -521,6 +571,37 @@ func (_SdCollateral *SdCollateralCallerSession) OperatorSDBalance(arg0 common.Ad return _SdCollateral.Contract.OperatorSDBalance(&_SdCollateral.CallOpts, arg0) } +// OperatorUtilizedSDBalance is a free data retrieval call binding the contract method 0xb11a3a9b. +// +// Solidity: function operatorUtilizedSDBalance(address ) view returns(uint256) +func (_SdCollateral *SdCollateralCaller) OperatorUtilizedSDBalance(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _SdCollateral.contract.Call(opts, &out, "operatorUtilizedSDBalance", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// OperatorUtilizedSDBalance is a free data retrieval call binding the contract method 0xb11a3a9b. +// +// Solidity: function operatorUtilizedSDBalance(address ) view returns(uint256) +func (_SdCollateral *SdCollateralSession) OperatorUtilizedSDBalance(arg0 common.Address) (*big.Int, error) { + return _SdCollateral.Contract.OperatorUtilizedSDBalance(&_SdCollateral.CallOpts, arg0) +} + +// OperatorUtilizedSDBalance is a free data retrieval call binding the contract method 0xb11a3a9b. +// +// Solidity: function operatorUtilizedSDBalance(address ) view returns(uint256) +func (_SdCollateral *SdCollateralCallerSession) OperatorUtilizedSDBalance(arg0 common.Address) (*big.Int, error) { + return _SdCollateral.Contract.OperatorUtilizedSDBalance(&_SdCollateral.CallOpts, arg0) +} + // PoolThresholdbyPoolId is a free data retrieval call binding the contract method 0x8a9b3738. // // Solidity: function poolThresholdbyPoolId(uint8 ) view returns(uint256 minThreshold, uint256 maxThreshold, uint256 withdrawThreshold, string units) @@ -659,6 +740,48 @@ func (_SdCollateral *SdCollateralTransactorSession) DepositSDAsCollateral(_sdAmo return _SdCollateral.Contract.DepositSDAsCollateral(&_SdCollateral.TransactOpts, _sdAmount) } +// DepositSDAsCollateralOnBehalf is a paid mutator transaction binding the contract method 0xc35d0016. +// +// Solidity: function depositSDAsCollateralOnBehalf(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralTransactor) DepositSDAsCollateralOnBehalf(opts *bind.TransactOpts, _operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.contract.Transact(opts, "depositSDAsCollateralOnBehalf", _operator, _sdAmount) +} + +// DepositSDAsCollateralOnBehalf is a paid mutator transaction binding the contract method 0xc35d0016. +// +// Solidity: function depositSDAsCollateralOnBehalf(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralSession) DepositSDAsCollateralOnBehalf(_operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.Contract.DepositSDAsCollateralOnBehalf(&_SdCollateral.TransactOpts, _operator, _sdAmount) +} + +// DepositSDAsCollateralOnBehalf is a paid mutator transaction binding the contract method 0xc35d0016. +// +// Solidity: function depositSDAsCollateralOnBehalf(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralTransactorSession) DepositSDAsCollateralOnBehalf(_operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.Contract.DepositSDAsCollateralOnBehalf(&_SdCollateral.TransactOpts, _operator, _sdAmount) +} + +// DepositSDFromUtilityPool is a paid mutator transaction binding the contract method 0xc85e8dde. +// +// Solidity: function depositSDFromUtilityPool(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralTransactor) DepositSDFromUtilityPool(opts *bind.TransactOpts, _operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.contract.Transact(opts, "depositSDFromUtilityPool", _operator, _sdAmount) +} + +// DepositSDFromUtilityPool is a paid mutator transaction binding the contract method 0xc85e8dde. +// +// Solidity: function depositSDFromUtilityPool(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralSession) DepositSDFromUtilityPool(_operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.Contract.DepositSDFromUtilityPool(&_SdCollateral.TransactOpts, _operator, _sdAmount) +} + +// DepositSDFromUtilityPool is a paid mutator transaction binding the contract method 0xc85e8dde. +// +// Solidity: function depositSDFromUtilityPool(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralTransactorSession) DepositSDFromUtilityPool(_operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.Contract.DepositSDFromUtilityPool(&_SdCollateral.TransactOpts, _operator, _sdAmount) +} + // GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. // // Solidity: function grantRole(bytes32 role, address account) returns() @@ -722,6 +845,27 @@ func (_SdCollateral *SdCollateralTransactorSession) MaxApproveSD() (*types.Trans return _SdCollateral.Contract.MaxApproveSD(&_SdCollateral.TransactOpts) } +// ReduceUtilizedSDPosition is a paid mutator transaction binding the contract method 0x956b95e7. +// +// Solidity: function reduceUtilizedSDPosition(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralTransactor) ReduceUtilizedSDPosition(opts *bind.TransactOpts, _operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.contract.Transact(opts, "reduceUtilizedSDPosition", _operator, _sdAmount) +} + +// ReduceUtilizedSDPosition is a paid mutator transaction binding the contract method 0x956b95e7. +// +// Solidity: function reduceUtilizedSDPosition(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralSession) ReduceUtilizedSDPosition(_operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.Contract.ReduceUtilizedSDPosition(&_SdCollateral.TransactOpts, _operator, _sdAmount) +} + +// ReduceUtilizedSDPosition is a paid mutator transaction binding the contract method 0x956b95e7. +// +// Solidity: function reduceUtilizedSDPosition(address _operator, uint256 _sdAmount) returns() +func (_SdCollateral *SdCollateralTransactorSession) ReduceUtilizedSDPosition(_operator common.Address, _sdAmount *big.Int) (*types.Transaction, error) { + return _SdCollateral.Contract.ReduceUtilizedSDPosition(&_SdCollateral.TransactOpts, _operator, _sdAmount) +} + // RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. // // Solidity: function renounceRole(bytes32 role, address account) returns() @@ -785,6 +929,27 @@ func (_SdCollateral *SdCollateralTransactorSession) SlashValidatorSD(_validatorI return _SdCollateral.Contract.SlashValidatorSD(&_SdCollateral.TransactOpts, _validatorId, _poolId) } +// TransferBackUtilizedSD is a paid mutator transaction binding the contract method 0xf4f27bbe. +// +// Solidity: function transferBackUtilizedSD(address _operator) returns() +func (_SdCollateral *SdCollateralTransactor) TransferBackUtilizedSD(opts *bind.TransactOpts, _operator common.Address) (*types.Transaction, error) { + return _SdCollateral.contract.Transact(opts, "transferBackUtilizedSD", _operator) +} + +// TransferBackUtilizedSD is a paid mutator transaction binding the contract method 0xf4f27bbe. +// +// Solidity: function transferBackUtilizedSD(address _operator) returns() +func (_SdCollateral *SdCollateralSession) TransferBackUtilizedSD(_operator common.Address) (*types.Transaction, error) { + return _SdCollateral.Contract.TransferBackUtilizedSD(&_SdCollateral.TransactOpts, _operator) +} + +// TransferBackUtilizedSD is a paid mutator transaction binding the contract method 0xf4f27bbe. +// +// Solidity: function transferBackUtilizedSD(address _operator) returns() +func (_SdCollateral *SdCollateralTransactorSession) TransferBackUtilizedSD(_operator common.Address) (*types.Transaction, error) { + return _SdCollateral.Contract.TransferBackUtilizedSD(&_SdCollateral.TransactOpts, _operator) +} + // UpdatePoolThreshold is a paid mutator transaction binding the contract method 0xe0412f0e. // // Solidity: function updatePoolThreshold(uint8 _poolId, uint256 _minThreshold, uint256 _maxThreshold, uint256 _withdrawThreshold, string _units) returns() @@ -848,6 +1013,27 @@ func (_SdCollateral *SdCollateralTransactorSession) Withdraw(_requestedSD *big.I return _SdCollateral.Contract.Withdraw(&_SdCollateral.TransactOpts, _requestedSD) } +// WithdrawOnBehalf is a paid mutator transaction binding the contract method 0x53e9bf1d. +// +// Solidity: function withdrawOnBehalf(uint256 _requestedSD, address _operator) returns() +func (_SdCollateral *SdCollateralTransactor) WithdrawOnBehalf(opts *bind.TransactOpts, _requestedSD *big.Int, _operator common.Address) (*types.Transaction, error) { + return _SdCollateral.contract.Transact(opts, "withdrawOnBehalf", _requestedSD, _operator) +} + +// WithdrawOnBehalf is a paid mutator transaction binding the contract method 0x53e9bf1d. +// +// Solidity: function withdrawOnBehalf(uint256 _requestedSD, address _operator) returns() +func (_SdCollateral *SdCollateralSession) WithdrawOnBehalf(_requestedSD *big.Int, _operator common.Address) (*types.Transaction, error) { + return _SdCollateral.Contract.WithdrawOnBehalf(&_SdCollateral.TransactOpts, _requestedSD, _operator) +} + +// WithdrawOnBehalf is a paid mutator transaction binding the contract method 0x53e9bf1d. +// +// Solidity: function withdrawOnBehalf(uint256 _requestedSD, address _operator) returns() +func (_SdCollateral *SdCollateralTransactorSession) WithdrawOnBehalf(_requestedSD *big.Int, _operator common.Address) (*types.Transaction, error) { + return _SdCollateral.Contract.WithdrawOnBehalf(&_SdCollateral.TransactOpts, _requestedSD, _operator) +} + // SdCollateralInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SdCollateral contract. type SdCollateralInitializedIterator struct { Event *SdCollateralInitialized // Event containing the contract specifics and raw log @@ -982,6 +1168,151 @@ func (_SdCollateral *SdCollateralFilterer) ParseInitialized(log types.Log) (*SdC return event, nil } +// SdCollateralReducedUtilizedPositionIterator is returned from FilterReducedUtilizedPosition and is used to iterate over the raw logs and unpacked data for ReducedUtilizedPosition events raised by the SdCollateral contract. +type SdCollateralReducedUtilizedPositionIterator struct { + Event *SdCollateralReducedUtilizedPosition // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SdCollateralReducedUtilizedPositionIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SdCollateralReducedUtilizedPosition) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SdCollateralReducedUtilizedPosition) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SdCollateralReducedUtilizedPositionIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SdCollateralReducedUtilizedPositionIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SdCollateralReducedUtilizedPosition represents a ReducedUtilizedPosition event raised by the SdCollateral contract. +type SdCollateralReducedUtilizedPosition struct { + Operator common.Address + SdAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterReducedUtilizedPosition is a free log retrieval operation binding the contract event 0x3819b1ebb313cb71368635e9c11bf524c47e692fbb7e68d46885341aa0d9fdeb. +// +// Solidity: event ReducedUtilizedPosition(address indexed operator, uint256 sdAmount) +func (_SdCollateral *SdCollateralFilterer) FilterReducedUtilizedPosition(opts *bind.FilterOpts, operator []common.Address) (*SdCollateralReducedUtilizedPositionIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _SdCollateral.contract.FilterLogs(opts, "ReducedUtilizedPosition", operatorRule) + if err != nil { + return nil, err + } + return &SdCollateralReducedUtilizedPositionIterator{contract: _SdCollateral.contract, event: "ReducedUtilizedPosition", logs: logs, sub: sub}, nil +} + +// WatchReducedUtilizedPosition is a free log subscription operation binding the contract event 0x3819b1ebb313cb71368635e9c11bf524c47e692fbb7e68d46885341aa0d9fdeb. +// +// Solidity: event ReducedUtilizedPosition(address indexed operator, uint256 sdAmount) +func (_SdCollateral *SdCollateralFilterer) WatchReducedUtilizedPosition(opts *bind.WatchOpts, sink chan<- *SdCollateralReducedUtilizedPosition, operator []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _SdCollateral.contract.WatchLogs(opts, "ReducedUtilizedPosition", operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SdCollateralReducedUtilizedPosition) + if err := _SdCollateral.contract.UnpackLog(event, "ReducedUtilizedPosition", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseReducedUtilizedPosition is a log parse operation binding the contract event 0x3819b1ebb313cb71368635e9c11bf524c47e692fbb7e68d46885341aa0d9fdeb. +// +// Solidity: event ReducedUtilizedPosition(address indexed operator, uint256 sdAmount) +func (_SdCollateral *SdCollateralFilterer) ParseReducedUtilizedPosition(log types.Log) (*SdCollateralReducedUtilizedPosition, error) { + event := new(SdCollateralReducedUtilizedPosition) + if err := _SdCollateral.contract.UnpackLog(event, "ReducedUtilizedPosition", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + // SdCollateralRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the SdCollateral contract. type SdCollateralRoleAdminChangedIterator struct { Event *SdCollateralRoleAdminChanged // Event containing the contract specifics and raw log @@ -1613,9 +1944,9 @@ func (_SdCollateral *SdCollateralFilterer) ParseSDDeposited(log types.Log) (*SdC return event, nil } -// SdCollateralSDSlashedIterator is returned from FilterSDSlashed and is used to iterate over the raw logs and unpacked data for SDSlashed events raised by the SdCollateral contract. -type SdCollateralSDSlashedIterator struct { - Event *SdCollateralSDSlashed // Event containing the contract specifics and raw log +// SdCollateralSDRepaidIterator is returned from FilterSDRepaid and is used to iterate over the raw logs and unpacked data for SDRepaid events raised by the SdCollateral contract. +type SdCollateralSDRepaidIterator struct { + Event *SdCollateralSDRepaid // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data event string // Event name to use for unpacking event data @@ -1629,7 +1960,7 @@ type SdCollateralSDSlashedIterator struct { // Next advances the iterator to the subsequent event, returning whether there // are any more events found. In case of a retrieval or parsing error, false is // returned and Error() can be queried for the exact failure. -func (it *SdCollateralSDSlashedIterator) Next() bool { +func (it *SdCollateralSDRepaidIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -1638,7 +1969,7 @@ func (it *SdCollateralSDSlashedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SdCollateralSDSlashed) + it.Event = new(SdCollateralSDRepaid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1653,7 +1984,7 @@ func (it *SdCollateralSDSlashedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SdCollateralSDSlashed) + it.Event = new(SdCollateralSDRepaid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -1669,61 +2000,42 @@ func (it *SdCollateralSDSlashedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SdCollateralSDSlashedIterator) Error() error { +func (it *SdCollateralSDRepaidIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SdCollateralSDSlashedIterator) Close() error { +func (it *SdCollateralSDRepaidIterator) Close() error { it.sub.Unsubscribe() return nil } -// SdCollateralSDSlashed represents a SDSlashed event raised by the SdCollateral contract. -type SdCollateralSDSlashed struct { - Operator common.Address - Auction common.Address - SdSlashed *big.Int - Raw types.Log // Blockchain specific contextual infos +// SdCollateralSDRepaid represents a SDRepaid event raised by the SdCollateral contract. +type SdCollateralSDRepaid struct { + Operator common.Address + RepayAmount *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterSDSlashed is a free log retrieval operation binding the contract event 0xe4a6f5b1a676a94b2af7a506093c172e23d46a5bea6f2d783d4d32c9047800f4. +// FilterSDRepaid is a free log retrieval operation binding the contract event 0x78403a1d3d348f0cc8bb6e4a35d395cb9da1458aecf5bf1f147c6df1e20749b0. // -// Solidity: event SDSlashed(address indexed operator, address indexed auction, uint256 sdSlashed) -func (_SdCollateral *SdCollateralFilterer) FilterSDSlashed(opts *bind.FilterOpts, operator []common.Address, auction []common.Address) (*SdCollateralSDSlashedIterator, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var auctionRule []interface{} - for _, auctionItem := range auction { - auctionRule = append(auctionRule, auctionItem) - } +// Solidity: event SDRepaid(address operator, uint256 repayAmount) +func (_SdCollateral *SdCollateralFilterer) FilterSDRepaid(opts *bind.FilterOpts) (*SdCollateralSDRepaidIterator, error) { - logs, sub, err := _SdCollateral.contract.FilterLogs(opts, "SDSlashed", operatorRule, auctionRule) + logs, sub, err := _SdCollateral.contract.FilterLogs(opts, "SDRepaid") if err != nil { return nil, err } - return &SdCollateralSDSlashedIterator{contract: _SdCollateral.contract, event: "SDSlashed", logs: logs, sub: sub}, nil + return &SdCollateralSDRepaidIterator{contract: _SdCollateral.contract, event: "SDRepaid", logs: logs, sub: sub}, nil } -// WatchSDSlashed is a free log subscription operation binding the contract event 0xe4a6f5b1a676a94b2af7a506093c172e23d46a5bea6f2d783d4d32c9047800f4. +// WatchSDRepaid is a free log subscription operation binding the contract event 0x78403a1d3d348f0cc8bb6e4a35d395cb9da1458aecf5bf1f147c6df1e20749b0. // -// Solidity: event SDSlashed(address indexed operator, address indexed auction, uint256 sdSlashed) -func (_SdCollateral *SdCollateralFilterer) WatchSDSlashed(opts *bind.WatchOpts, sink chan<- *SdCollateralSDSlashed, operator []common.Address, auction []common.Address) (event.Subscription, error) { - - var operatorRule []interface{} - for _, operatorItem := range operator { - operatorRule = append(operatorRule, operatorItem) - } - var auctionRule []interface{} - for _, auctionItem := range auction { - auctionRule = append(auctionRule, auctionItem) - } +// Solidity: event SDRepaid(address operator, uint256 repayAmount) +func (_SdCollateral *SdCollateralFilterer) WatchSDRepaid(opts *bind.WatchOpts, sink chan<- *SdCollateralSDRepaid) (event.Subscription, error) { - logs, sub, err := _SdCollateral.contract.WatchLogs(opts, "SDSlashed", operatorRule, auctionRule) + logs, sub, err := _SdCollateral.contract.WatchLogs(opts, "SDRepaid") if err != nil { return nil, err } @@ -1733,8 +2045,8 @@ func (_SdCollateral *SdCollateralFilterer) WatchSDSlashed(opts *bind.WatchOpts, select { case log := <-logs: // New log arrived, parse the event and forward to the user - event := new(SdCollateralSDSlashed) - if err := _SdCollateral.contract.UnpackLog(event, "SDSlashed", log); err != nil { + event := new(SdCollateralSDRepaid) + if err := _SdCollateral.contract.UnpackLog(event, "SDRepaid", log); err != nil { return err } event.Raw = log @@ -1755,20 +2067,174 @@ func (_SdCollateral *SdCollateralFilterer) WatchSDSlashed(opts *bind.WatchOpts, }), nil } -// ParseSDSlashed is a log parse operation binding the contract event 0xe4a6f5b1a676a94b2af7a506093c172e23d46a5bea6f2d783d4d32c9047800f4. +// ParseSDRepaid is a log parse operation binding the contract event 0x78403a1d3d348f0cc8bb6e4a35d395cb9da1458aecf5bf1f147c6df1e20749b0. // -// Solidity: event SDSlashed(address indexed operator, address indexed auction, uint256 sdSlashed) -func (_SdCollateral *SdCollateralFilterer) ParseSDSlashed(log types.Log) (*SdCollateralSDSlashed, error) { - event := new(SdCollateralSDSlashed) - if err := _SdCollateral.contract.UnpackLog(event, "SDSlashed", log); err != nil { +// Solidity: event SDRepaid(address operator, uint256 repayAmount) +func (_SdCollateral *SdCollateralFilterer) ParseSDRepaid(log types.Log) (*SdCollateralSDRepaid, error) { + event := new(SdCollateralSDRepaid) + if err := _SdCollateral.contract.UnpackLog(event, "SDRepaid", log); err != nil { return nil, err } event.Raw = log return event, nil } -// SdCollateralSDWithdrawnIterator is returned from FilterSDWithdrawn and is used to iterate over the raw logs and unpacked data for SDWithdrawn events raised by the SdCollateral contract. -type SdCollateralSDWithdrawnIterator struct { +// SdCollateralSDSlashedIterator is returned from FilterSDSlashed and is used to iterate over the raw logs and unpacked data for SDSlashed events raised by the SdCollateral contract. +type SdCollateralSDSlashedIterator struct { + Event *SdCollateralSDSlashed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SdCollateralSDSlashedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SdCollateralSDSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SdCollateralSDSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SdCollateralSDSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SdCollateralSDSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SdCollateralSDSlashed represents a SDSlashed event raised by the SdCollateral contract. +type SdCollateralSDSlashed struct { + Operator common.Address + Auction common.Address + SdSlashed *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSDSlashed is a free log retrieval operation binding the contract event 0xe4a6f5b1a676a94b2af7a506093c172e23d46a5bea6f2d783d4d32c9047800f4. +// +// Solidity: event SDSlashed(address indexed operator, address indexed auction, uint256 sdSlashed) +func (_SdCollateral *SdCollateralFilterer) FilterSDSlashed(opts *bind.FilterOpts, operator []common.Address, auction []common.Address) (*SdCollateralSDSlashedIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var auctionRule []interface{} + for _, auctionItem := range auction { + auctionRule = append(auctionRule, auctionItem) + } + + logs, sub, err := _SdCollateral.contract.FilterLogs(opts, "SDSlashed", operatorRule, auctionRule) + if err != nil { + return nil, err + } + return &SdCollateralSDSlashedIterator{contract: _SdCollateral.contract, event: "SDSlashed", logs: logs, sub: sub}, nil +} + +// WatchSDSlashed is a free log subscription operation binding the contract event 0xe4a6f5b1a676a94b2af7a506093c172e23d46a5bea6f2d783d4d32c9047800f4. +// +// Solidity: event SDSlashed(address indexed operator, address indexed auction, uint256 sdSlashed) +func (_SdCollateral *SdCollateralFilterer) WatchSDSlashed(opts *bind.WatchOpts, sink chan<- *SdCollateralSDSlashed, operator []common.Address, auction []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + var auctionRule []interface{} + for _, auctionItem := range auction { + auctionRule = append(auctionRule, auctionItem) + } + + logs, sub, err := _SdCollateral.contract.WatchLogs(opts, "SDSlashed", operatorRule, auctionRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SdCollateralSDSlashed) + if err := _SdCollateral.contract.UnpackLog(event, "SDSlashed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSDSlashed is a log parse operation binding the contract event 0xe4a6f5b1a676a94b2af7a506093c172e23d46a5bea6f2d783d4d32c9047800f4. +// +// Solidity: event SDSlashed(address indexed operator, address indexed auction, uint256 sdSlashed) +func (_SdCollateral *SdCollateralFilterer) ParseSDSlashed(log types.Log) (*SdCollateralSDSlashed, error) { + event := new(SdCollateralSDSlashed) + if err := _SdCollateral.contract.UnpackLog(event, "SDSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SdCollateralSDWithdrawnIterator is returned from FilterSDWithdrawn and is used to iterate over the raw logs and unpacked data for SDWithdrawn events raised by the SdCollateral contract. +type SdCollateralSDWithdrawnIterator struct { Event *SdCollateralSDWithdrawn // Event containing the contract specifics and raw log contract *bind.BoundContract // Generic contract to use for unpacking event data @@ -2326,3 +2792,283 @@ func (_SdCollateral *SdCollateralFilterer) ParseUpdatedStaderConfig(log types.Lo event.Raw = log return event, nil } + +// SdCollateralUtilizedSDDepositedIterator is returned from FilterUtilizedSDDeposited and is used to iterate over the raw logs and unpacked data for UtilizedSDDeposited events raised by the SdCollateral contract. +type SdCollateralUtilizedSDDepositedIterator struct { + Event *SdCollateralUtilizedSDDeposited // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SdCollateralUtilizedSDDepositedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SdCollateralUtilizedSDDeposited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SdCollateralUtilizedSDDeposited) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SdCollateralUtilizedSDDepositedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SdCollateralUtilizedSDDepositedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SdCollateralUtilizedSDDeposited represents a UtilizedSDDeposited event raised by the SdCollateral contract. +type SdCollateralUtilizedSDDeposited struct { + Operator common.Address + SdAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUtilizedSDDeposited is a free log retrieval operation binding the contract event 0x48ad8145b270d3b23a3a4e232b1e7900f334a73d223ef71986cefe090631b652. +// +// Solidity: event UtilizedSDDeposited(address indexed operator, uint256 sdAmount) +func (_SdCollateral *SdCollateralFilterer) FilterUtilizedSDDeposited(opts *bind.FilterOpts, operator []common.Address) (*SdCollateralUtilizedSDDepositedIterator, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _SdCollateral.contract.FilterLogs(opts, "UtilizedSDDeposited", operatorRule) + if err != nil { + return nil, err + } + return &SdCollateralUtilizedSDDepositedIterator{contract: _SdCollateral.contract, event: "UtilizedSDDeposited", logs: logs, sub: sub}, nil +} + +// WatchUtilizedSDDeposited is a free log subscription operation binding the contract event 0x48ad8145b270d3b23a3a4e232b1e7900f334a73d223ef71986cefe090631b652. +// +// Solidity: event UtilizedSDDeposited(address indexed operator, uint256 sdAmount) +func (_SdCollateral *SdCollateralFilterer) WatchUtilizedSDDeposited(opts *bind.WatchOpts, sink chan<- *SdCollateralUtilizedSDDeposited, operator []common.Address) (event.Subscription, error) { + + var operatorRule []interface{} + for _, operatorItem := range operator { + operatorRule = append(operatorRule, operatorItem) + } + + logs, sub, err := _SdCollateral.contract.WatchLogs(opts, "UtilizedSDDeposited", operatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SdCollateralUtilizedSDDeposited) + if err := _SdCollateral.contract.UnpackLog(event, "UtilizedSDDeposited", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUtilizedSDDeposited is a log parse operation binding the contract event 0x48ad8145b270d3b23a3a4e232b1e7900f334a73d223ef71986cefe090631b652. +// +// Solidity: event UtilizedSDDeposited(address indexed operator, uint256 sdAmount) +func (_SdCollateral *SdCollateralFilterer) ParseUtilizedSDDeposited(log types.Log) (*SdCollateralUtilizedSDDeposited, error) { + event := new(SdCollateralUtilizedSDDeposited) + if err := _SdCollateral.contract.UnpackLog(event, "UtilizedSDDeposited", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SdCollateralUtilizedSDSlashedIterator is returned from FilterUtilizedSDSlashed and is used to iterate over the raw logs and unpacked data for UtilizedSDSlashed events raised by the SdCollateral contract. +type SdCollateralUtilizedSDSlashedIterator struct { + Event *SdCollateralUtilizedSDSlashed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SdCollateralUtilizedSDSlashedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SdCollateralUtilizedSDSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SdCollateralUtilizedSDSlashed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SdCollateralUtilizedSDSlashedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SdCollateralUtilizedSDSlashedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SdCollateralUtilizedSDSlashed represents a UtilizedSDSlashed event raised by the SdCollateral contract. +type SdCollateralUtilizedSDSlashed struct { + Operator common.Address + SdSlashFromUtilized *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUtilizedSDSlashed is a free log retrieval operation binding the contract event 0x9433ba4f4ec373196c2daafa9177256a3da6b568048401763164b2d5a724fca1. +// +// Solidity: event UtilizedSDSlashed(address operator, uint256 sdSlashFromUtilized) +func (_SdCollateral *SdCollateralFilterer) FilterUtilizedSDSlashed(opts *bind.FilterOpts) (*SdCollateralUtilizedSDSlashedIterator, error) { + + logs, sub, err := _SdCollateral.contract.FilterLogs(opts, "UtilizedSDSlashed") + if err != nil { + return nil, err + } + return &SdCollateralUtilizedSDSlashedIterator{contract: _SdCollateral.contract, event: "UtilizedSDSlashed", logs: logs, sub: sub}, nil +} + +// WatchUtilizedSDSlashed is a free log subscription operation binding the contract event 0x9433ba4f4ec373196c2daafa9177256a3da6b568048401763164b2d5a724fca1. +// +// Solidity: event UtilizedSDSlashed(address operator, uint256 sdSlashFromUtilized) +func (_SdCollateral *SdCollateralFilterer) WatchUtilizedSDSlashed(opts *bind.WatchOpts, sink chan<- *SdCollateralUtilizedSDSlashed) (event.Subscription, error) { + + logs, sub, err := _SdCollateral.contract.WatchLogs(opts, "UtilizedSDSlashed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SdCollateralUtilizedSDSlashed) + if err := _SdCollateral.contract.UnpackLog(event, "UtilizedSDSlashed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUtilizedSDSlashed is a log parse operation binding the contract event 0x9433ba4f4ec373196c2daafa9177256a3da6b568048401763164b2d5a724fca1. +// +// Solidity: event UtilizedSDSlashed(address operator, uint256 sdSlashFromUtilized) +func (_SdCollateral *SdCollateralFilterer) ParseUtilizedSDSlashed(log types.Log) (*SdCollateralUtilizedSDSlashed, error) { + event := new(SdCollateralUtilizedSDSlashed) + if err := _SdCollateral.contract.UnpackLog(event, "UtilizedSDSlashed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/stader-lib/contracts/sd-utility.go b/stader-lib/contracts/sd-utility.go new file mode 100644 index 000000000..09dfa06b2 --- /dev/null +++ b/stader-lib/contracts/sd-utility.go @@ -0,0 +1,6448 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package contracts + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// OperatorLiquidation is an auto generated low-level Go binding around an user-defined struct. +type OperatorLiquidation struct { + TotalAmountInEth *big.Int + TotalBonusInEth *big.Int + TotalFeeInEth *big.Int + IsRepaid bool + IsClaimed bool + Liquidator common.Address +} + +// UserData is an auto generated low-level Go binding around an user-defined struct. +type UserData struct { + TotalInterestSD *big.Int + TotalCollateralInEth *big.Int + HealthFactor *big.Int + LockedEth *big.Int +} + +// SDUtilityPoolMetaData contains all meta data concerning the SDUtilityPool contract. +var SDUtilityPoolMetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyLiquidated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotAuthorizedToRedeem\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotStaderContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotFindRequestId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientPoolBalance\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmountOfWithdraw\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInput\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidWithdrawAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaxLimitOnWithdrawRequestCountReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotClaimable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotLiquidatable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotLiquidator\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OperatorUtilizedSDBalanceNonZero\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"RequestIdNotFinalized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDUtilizeLimitReached\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnHealthyPosition\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"feeAccumulated\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalProtocolFee\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalUtilizedSD\",\"type\":\"uint256\"}],\"name\":\"AccruedFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"utilizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdInterest\",\"type\":\"uint256\"}],\"name\":\"ClearedUtilizerInterest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"CompleteLiquidation\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdXToMint\",\"type\":\"uint256\"}],\"name\":\"Delegated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextRequestIdToFinalize\",\"type\":\"uint256\"}],\"name\":\"FinalizedWithdrawRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalLiquidationAmountInEth\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidationBonusInEth\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidationFeeInEth\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"}],\"name\":\"LiquidationCall\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"protocolFeeFactor\",\"type\":\"uint256\"}],\"name\":\"ProtocolFeeFactorUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdXAmount\",\"type\":\"uint256\"}],\"name\":\"Redeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"utilizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"Repaid\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"utilizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilizedSDAmount\",\"type\":\"uint256\"}],\"name\":\"RepaidUtilizedSDBalance\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdToTransfer\",\"type\":\"uint256\"}],\"name\":\"RequestRedeemed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidationThreshold\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidationBonusPercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"liquidationFeePercent\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ltv\",\"type\":\"uint256\"}],\"name\":\"RiskConfigUpdated\",\"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\":false,\"internalType\":\"address\",\"name\":\"utilizer\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilizeAmount\",\"type\":\"uint256\"}],\"name\":\"SDUtilized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"conservativeEthPerKey\",\"type\":\"uint256\"}],\"name\":\"UpdatedConservativeEthPerKey\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"finalizationBatchLimit\",\"type\":\"uint256\"}],\"name\":\"UpdatedFinalizationBatchLimit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxETHWorthOfSDPerValidator\",\"type\":\"uint256\"}],\"name\":\"UpdatedMaxETHWorthOfSDPerValidator\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"count\",\"type\":\"uint256\"}],\"name\":\"UpdatedMaxNonRedeemedDelegatorRequestCount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"minBlockDelayToFinalizeRequest\",\"type\":\"uint256\"}],\"name\":\"UpdatedMinBlockDelayToFinalizeRequest\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"utilizationRatePerBlock\",\"type\":\"uint256\"}],\"name\":\"UtilizationRatePerBlockUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"nextRequestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdAmountToWithdraw\",\"type\":\"uint256\"}],\"name\":\"WithdrawRequestReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawnProtocolFee\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DECIMAL\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_PROTOCOL_FEE\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_UTILIZATION_RATE_PER_BLOCK\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_SD_DELEGATE_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_SD_WITHDRAW_LIMIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accrualBlockNumber\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accrueFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"accumulatedProtocolFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cTokenTotalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_utilizer\",\"type\":\"address\"}],\"name\":\"clearUtilizerInterest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"completeLiquidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"conservativeEthPerKey\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"delegate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegatorCTokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"delegatorWithdrawRequestedCTokenCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"delegatorWithdrawRequests\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amountOfCToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sdExpected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"sdFinalized\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"requestBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeRateCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"exchangeRateStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizationBatchLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"finalizeDelegatorWithdrawalRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDelegationRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegator\",\"type\":\"address\"}],\"name\":\"getDelegatorLatestSDBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLatestExchangeRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLiquidationThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getOperatorLiquidation\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalAmountInEth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBonusInEth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeeInEth\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isRepaid\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isClaimed\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"}],\"internalType\":\"structOperatorLiquidation\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"getOperatorTotalEth\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolAvailableSDBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_delegator\",\"type\":\"address\"}],\"name\":\"getRequestIdsByDelegator\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getUserData\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalInterestSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalCollateralInEth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"healthFactor\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"lockedEth\",\"type\":\"uint256\"}],\"internalType\":\"structUserData\",\"name\":\"\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_utilizer\",\"type\":\"address\"}],\"name\":\"getUtilizerLatestBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"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\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"liquidationCall\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"liquidationIndexByOperator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"liquidations\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalAmountInEth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalBonusInEth\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalFeeInEth\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isRepaid\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isClaimed\",\"type\":\"bool\"},{\"internalType\":\"address\",\"name\":\"liquidator\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxApproveSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxETHWorthOfSDPerValidator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxNonRedeemedDelegatorRequestCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"minBlockDelayToFinalizeRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextRequestId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"nextRequestIdToFinalize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":[],\"name\":\"poolUtilization\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"protocolFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feePaid\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"repayFullAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feePaid\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"utilizer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repayOnBehalf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"repaidAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feePaid\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_utilizer\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"repayUtilizedSDBalance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"requestIdsByDelegatorAddress\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_cTokenAmount\",\"type\":\"uint256\"}],\"name\":\"requestWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_sdAmount\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawWithSDAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"riskConfig\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationBonusPercent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationFeePercent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ltv\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sdRequestedForWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sdReservedForClaim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalUtilizedSD\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newEthPerKey\",\"type\":\"uint256\"}],\"name\":\"updateConservativeEthPerKey\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_finalizationBatchLimit\",\"type\":\"uint256\"}],\"name\":\"updateFinalizationBatchLimit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxETHWorthOfSDPerValidator\",\"type\":\"uint256\"}],\"name\":\"updateMaxETHWorthOfSDPerValidator\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_count\",\"type\":\"uint256\"}],\"name\":\"updateMaxNonRedeemedDelegatorRequestCount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minBlockDelayToFinalizeRequest\",\"type\":\"uint256\"}],\"name\":\"updateMinBlockDelayToFinalizeRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_protocolFee\",\"type\":\"uint256\"}],\"name\":\"updateProtocolFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"liquidationThreshold\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationBonusPercent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"liquidationFeePercent\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"ltv\",\"type\":\"uint256\"}],\"name\":\"updateRiskConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_utilizationRatePerBlock\",\"type\":\"uint256\"}],\"name\":\"updateUtilizationRatePerBlock\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"utilizationRatePerBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"utilizeAmount\",\"type\":\"uint256\"}],\"name\":\"utilize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"utilizeIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"utilizeAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"nonTerminalKeyCount\",\"type\":\"uint256\"}],\"name\":\"utilizeWhileAddingKeys\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"utilizerBalanceCurrent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"utilizerBalanceStored\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"utilizerData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"principal\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"utilizeIndex\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawProtocolFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", +} + +// SDUtilityPoolABI is the input ABI used to generate the binding from. +// Deprecated: Use SDUtilityPoolMetaData.ABI instead. +var SDUtilityPoolABI = SDUtilityPoolMetaData.ABI + +// SDUtilityPool is an auto generated Go binding around an Ethereum contract. +type SDUtilityPool struct { + SDUtilityPoolCaller // Read-only binding to the contract + SDUtilityPoolTransactor // Write-only binding to the contract + SDUtilityPoolFilterer // Log filterer for contract events +} + +// SDUtilityPoolCaller is an auto generated read-only Go binding around an Ethereum contract. +type SDUtilityPoolCaller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SDUtilityPoolTransactor is an auto generated write-only Go binding around an Ethereum contract. +type SDUtilityPoolTransactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SDUtilityPoolFilterer is an auto generated log filtering Go binding around an Ethereum contract events. +type SDUtilityPoolFilterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// SDUtilityPoolSession is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type SDUtilityPoolSession struct { + Contract *SDUtilityPool // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SDUtilityPoolCallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type SDUtilityPoolCallerSession struct { + Contract *SDUtilityPoolCaller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// SDUtilityPoolTransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type SDUtilityPoolTransactorSession struct { + Contract *SDUtilityPoolTransactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// SDUtilityPoolRaw is an auto generated low-level Go binding around an Ethereum contract. +type SDUtilityPoolRaw struct { + Contract *SDUtilityPool // Generic contract binding to access the raw methods on +} + +// SDUtilityPoolCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type SDUtilityPoolCallerRaw struct { + Contract *SDUtilityPoolCaller // Generic read-only contract binding to access the raw methods on +} + +// SDUtilityPoolTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type SDUtilityPoolTransactorRaw struct { + Contract *SDUtilityPoolTransactor // Generic write-only contract binding to access the raw methods on +} + +// NewSDUtilityPool creates a new instance of SDUtilityPool, bound to a specific deployed contract. +func NewSDUtilityPool(address common.Address, backend bind.ContractBackend) (*SDUtilityPool, error) { + contract, err := bindSDUtilityPool(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &SDUtilityPool{SDUtilityPoolCaller: SDUtilityPoolCaller{contract: contract}, SDUtilityPoolTransactor: SDUtilityPoolTransactor{contract: contract}, SDUtilityPoolFilterer: SDUtilityPoolFilterer{contract: contract}}, nil +} + +// NewSDUtilityPoolCaller creates a new read-only instance of SDUtilityPool, bound to a specific deployed contract. +func NewSDUtilityPoolCaller(address common.Address, caller bind.ContractCaller) (*SDUtilityPoolCaller, error) { + contract, err := bindSDUtilityPool(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &SDUtilityPoolCaller{contract: contract}, nil +} + +// NewSDUtilityPoolTransactor creates a new write-only instance of SDUtilityPool, bound to a specific deployed contract. +func NewSDUtilityPoolTransactor(address common.Address, transactor bind.ContractTransactor) (*SDUtilityPoolTransactor, error) { + contract, err := bindSDUtilityPool(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &SDUtilityPoolTransactor{contract: contract}, nil +} + +// NewSDUtilityPoolFilterer creates a new log filterer instance of SDUtilityPool, bound to a specific deployed contract. +func NewSDUtilityPoolFilterer(address common.Address, filterer bind.ContractFilterer) (*SDUtilityPoolFilterer, error) { + contract, err := bindSDUtilityPool(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &SDUtilityPoolFilterer{contract: contract}, nil +} + +// bindSDUtilityPool binds a generic wrapper to an already deployed contract. +func bindSDUtilityPool(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := SDUtilityPoolMetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SDUtilityPool *SDUtilityPoolRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SDUtilityPool.Contract.SDUtilityPoolCaller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SDUtilityPool *SDUtilityPoolRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.Contract.SDUtilityPoolTransactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SDUtilityPool *SDUtilityPoolRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SDUtilityPool.Contract.SDUtilityPoolTransactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_SDUtilityPool *SDUtilityPoolCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _SDUtilityPool.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_SDUtilityPool *SDUtilityPoolTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_SDUtilityPool *SDUtilityPoolTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _SDUtilityPool.Contract.contract.Transact(opts, method, params...) +} + +// DECIMAL is a free data retrieval call binding the contract method 0x6ab55fd9. +// +// Solidity: function DECIMAL() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) DECIMAL(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "DECIMAL") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DECIMAL is a free data retrieval call binding the contract method 0x6ab55fd9. +// +// Solidity: function DECIMAL() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) DECIMAL() (*big.Int, error) { + return _SDUtilityPool.Contract.DECIMAL(&_SDUtilityPool.CallOpts) +} + +// DECIMAL is a free data retrieval call binding the contract method 0x6ab55fd9. +// +// Solidity: function DECIMAL() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) DECIMAL() (*big.Int, error) { + return _SDUtilityPool.Contract.DECIMAL(&_SDUtilityPool.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_SDUtilityPool *SDUtilityPoolCaller) DEFAULTADMINROLE(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "DEFAULT_ADMIN_ROLE") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_SDUtilityPool *SDUtilityPoolSession) DEFAULTADMINROLE() ([32]byte, error) { + return _SDUtilityPool.Contract.DEFAULTADMINROLE(&_SDUtilityPool.CallOpts) +} + +// DEFAULTADMINROLE is a free data retrieval call binding the contract method 0xa217fddf. +// +// Solidity: function DEFAULT_ADMIN_ROLE() view returns(bytes32) +func (_SDUtilityPool *SDUtilityPoolCallerSession) DEFAULTADMINROLE() ([32]byte, error) { + return _SDUtilityPool.Contract.DEFAULTADMINROLE(&_SDUtilityPool.CallOpts) +} + +// MAXPROTOCOLFEE is a free data retrieval call binding the contract method 0xb8ca3b83. +// +// Solidity: function MAX_PROTOCOL_FEE() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MAXPROTOCOLFEE(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "MAX_PROTOCOL_FEE") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MAXPROTOCOLFEE is a free data retrieval call binding the contract method 0xb8ca3b83. +// +// Solidity: function MAX_PROTOCOL_FEE() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MAXPROTOCOLFEE() (*big.Int, error) { + return _SDUtilityPool.Contract.MAXPROTOCOLFEE(&_SDUtilityPool.CallOpts) +} + +// MAXPROTOCOLFEE is a free data retrieval call binding the contract method 0xb8ca3b83. +// +// Solidity: function MAX_PROTOCOL_FEE() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MAXPROTOCOLFEE() (*big.Int, error) { + return _SDUtilityPool.Contract.MAXPROTOCOLFEE(&_SDUtilityPool.CallOpts) +} + +// MAXUTILIZATIONRATEPERBLOCK is a free data retrieval call binding the contract method 0x4e7878ee. +// +// Solidity: function MAX_UTILIZATION_RATE_PER_BLOCK() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MAXUTILIZATIONRATEPERBLOCK(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "MAX_UTILIZATION_RATE_PER_BLOCK") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MAXUTILIZATIONRATEPERBLOCK is a free data retrieval call binding the contract method 0x4e7878ee. +// +// Solidity: function MAX_UTILIZATION_RATE_PER_BLOCK() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MAXUTILIZATIONRATEPERBLOCK() (*big.Int, error) { + return _SDUtilityPool.Contract.MAXUTILIZATIONRATEPERBLOCK(&_SDUtilityPool.CallOpts) +} + +// MAXUTILIZATIONRATEPERBLOCK is a free data retrieval call binding the contract method 0x4e7878ee. +// +// Solidity: function MAX_UTILIZATION_RATE_PER_BLOCK() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MAXUTILIZATIONRATEPERBLOCK() (*big.Int, error) { + return _SDUtilityPool.Contract.MAXUTILIZATIONRATEPERBLOCK(&_SDUtilityPool.CallOpts) +} + +// MINSDDELEGATELIMIT is a free data retrieval call binding the contract method 0xb4c1273b. +// +// Solidity: function MIN_SD_DELEGATE_LIMIT() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MINSDDELEGATELIMIT(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "MIN_SD_DELEGATE_LIMIT") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINSDDELEGATELIMIT is a free data retrieval call binding the contract method 0xb4c1273b. +// +// Solidity: function MIN_SD_DELEGATE_LIMIT() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MINSDDELEGATELIMIT() (*big.Int, error) { + return _SDUtilityPool.Contract.MINSDDELEGATELIMIT(&_SDUtilityPool.CallOpts) +} + +// MINSDDELEGATELIMIT is a free data retrieval call binding the contract method 0xb4c1273b. +// +// Solidity: function MIN_SD_DELEGATE_LIMIT() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MINSDDELEGATELIMIT() (*big.Int, error) { + return _SDUtilityPool.Contract.MINSDDELEGATELIMIT(&_SDUtilityPool.CallOpts) +} + +// MINSDWITHDRAWLIMIT is a free data retrieval call binding the contract method 0x531810bc. +// +// Solidity: function MIN_SD_WITHDRAW_LIMIT() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MINSDWITHDRAWLIMIT(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "MIN_SD_WITHDRAW_LIMIT") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MINSDWITHDRAWLIMIT is a free data retrieval call binding the contract method 0x531810bc. +// +// Solidity: function MIN_SD_WITHDRAW_LIMIT() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MINSDWITHDRAWLIMIT() (*big.Int, error) { + return _SDUtilityPool.Contract.MINSDWITHDRAWLIMIT(&_SDUtilityPool.CallOpts) +} + +// MINSDWITHDRAWLIMIT is a free data retrieval call binding the contract method 0x531810bc. +// +// Solidity: function MIN_SD_WITHDRAW_LIMIT() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MINSDWITHDRAWLIMIT() (*big.Int, error) { + return _SDUtilityPool.Contract.MINSDWITHDRAWLIMIT(&_SDUtilityPool.CallOpts) +} + +// AccrualBlockNumber is a free data retrieval call binding the contract method 0x6c540baf. +// +// Solidity: function accrualBlockNumber() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) AccrualBlockNumber(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "accrualBlockNumber") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AccrualBlockNumber is a free data retrieval call binding the contract method 0x6c540baf. +// +// Solidity: function accrualBlockNumber() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) AccrualBlockNumber() (*big.Int, error) { + return _SDUtilityPool.Contract.AccrualBlockNumber(&_SDUtilityPool.CallOpts) +} + +// AccrualBlockNumber is a free data retrieval call binding the contract method 0x6c540baf. +// +// Solidity: function accrualBlockNumber() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) AccrualBlockNumber() (*big.Int, error) { + return _SDUtilityPool.Contract.AccrualBlockNumber(&_SDUtilityPool.CallOpts) +} + +// AccumulatedProtocolFee is a free data retrieval call binding the contract method 0xa544a62c. +// +// Solidity: function accumulatedProtocolFee() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) AccumulatedProtocolFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "accumulatedProtocolFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// AccumulatedProtocolFee is a free data retrieval call binding the contract method 0xa544a62c. +// +// Solidity: function accumulatedProtocolFee() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) AccumulatedProtocolFee() (*big.Int, error) { + return _SDUtilityPool.Contract.AccumulatedProtocolFee(&_SDUtilityPool.CallOpts) +} + +// AccumulatedProtocolFee is a free data retrieval call binding the contract method 0xa544a62c. +// +// Solidity: function accumulatedProtocolFee() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) AccumulatedProtocolFee() (*big.Int, error) { + return _SDUtilityPool.Contract.AccumulatedProtocolFee(&_SDUtilityPool.CallOpts) +} + +// CTokenTotalSupply is a free data retrieval call binding the contract method 0x37a4adf7. +// +// Solidity: function cTokenTotalSupply() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) CTokenTotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "cTokenTotalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// CTokenTotalSupply is a free data retrieval call binding the contract method 0x37a4adf7. +// +// Solidity: function cTokenTotalSupply() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) CTokenTotalSupply() (*big.Int, error) { + return _SDUtilityPool.Contract.CTokenTotalSupply(&_SDUtilityPool.CallOpts) +} + +// CTokenTotalSupply is a free data retrieval call binding the contract method 0x37a4adf7. +// +// Solidity: function cTokenTotalSupply() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) CTokenTotalSupply() (*big.Int, error) { + return _SDUtilityPool.Contract.CTokenTotalSupply(&_SDUtilityPool.CallOpts) +} + +// ConservativeEthPerKey is a free data retrieval call binding the contract method 0x232d70c3. +// +// Solidity: function conservativeEthPerKey() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) ConservativeEthPerKey(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "conservativeEthPerKey") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ConservativeEthPerKey is a free data retrieval call binding the contract method 0x232d70c3. +// +// Solidity: function conservativeEthPerKey() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) ConservativeEthPerKey() (*big.Int, error) { + return _SDUtilityPool.Contract.ConservativeEthPerKey(&_SDUtilityPool.CallOpts) +} + +// ConservativeEthPerKey is a free data retrieval call binding the contract method 0x232d70c3. +// +// Solidity: function conservativeEthPerKey() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) ConservativeEthPerKey() (*big.Int, error) { + return _SDUtilityPool.Contract.ConservativeEthPerKey(&_SDUtilityPool.CallOpts) +} + +// DelegatorCTokenBalance is a free data retrieval call binding the contract method 0xabf9db02. +// +// Solidity: function delegatorCTokenBalance(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) DelegatorCTokenBalance(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "delegatorCTokenBalance", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DelegatorCTokenBalance is a free data retrieval call binding the contract method 0xabf9db02. +// +// Solidity: function delegatorCTokenBalance(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) DelegatorCTokenBalance(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.DelegatorCTokenBalance(&_SDUtilityPool.CallOpts, arg0) +} + +// DelegatorCTokenBalance is a free data retrieval call binding the contract method 0xabf9db02. +// +// Solidity: function delegatorCTokenBalance(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) DelegatorCTokenBalance(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.DelegatorCTokenBalance(&_SDUtilityPool.CallOpts, arg0) +} + +// DelegatorWithdrawRequestedCTokenCount is a free data retrieval call binding the contract method 0x4f8f7a37. +// +// Solidity: function delegatorWithdrawRequestedCTokenCount(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) DelegatorWithdrawRequestedCTokenCount(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "delegatorWithdrawRequestedCTokenCount", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// DelegatorWithdrawRequestedCTokenCount is a free data retrieval call binding the contract method 0x4f8f7a37. +// +// Solidity: function delegatorWithdrawRequestedCTokenCount(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) DelegatorWithdrawRequestedCTokenCount(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.DelegatorWithdrawRequestedCTokenCount(&_SDUtilityPool.CallOpts, arg0) +} + +// DelegatorWithdrawRequestedCTokenCount is a free data retrieval call binding the contract method 0x4f8f7a37. +// +// Solidity: function delegatorWithdrawRequestedCTokenCount(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) DelegatorWithdrawRequestedCTokenCount(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.DelegatorWithdrawRequestedCTokenCount(&_SDUtilityPool.CallOpts, arg0) +} + +// DelegatorWithdrawRequests is a free data retrieval call binding the contract method 0xe41b55d9. +// +// Solidity: function delegatorWithdrawRequests(uint256 ) view returns(address owner, uint256 amountOfCToken, uint256 sdExpected, uint256 sdFinalized, uint256 requestBlock) +func (_SDUtilityPool *SDUtilityPoolCaller) DelegatorWithdrawRequests(opts *bind.CallOpts, arg0 *big.Int) (struct { + Owner common.Address + AmountOfCToken *big.Int + SdExpected *big.Int + SdFinalized *big.Int + RequestBlock *big.Int +}, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "delegatorWithdrawRequests", arg0) + + outstruct := new(struct { + Owner common.Address + AmountOfCToken *big.Int + SdExpected *big.Int + SdFinalized *big.Int + RequestBlock *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Owner = *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + outstruct.AmountOfCToken = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.SdExpected = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.SdFinalized = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.RequestBlock = *abi.ConvertType(out[4], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// DelegatorWithdrawRequests is a free data retrieval call binding the contract method 0xe41b55d9. +// +// Solidity: function delegatorWithdrawRequests(uint256 ) view returns(address owner, uint256 amountOfCToken, uint256 sdExpected, uint256 sdFinalized, uint256 requestBlock) +func (_SDUtilityPool *SDUtilityPoolSession) DelegatorWithdrawRequests(arg0 *big.Int) (struct { + Owner common.Address + AmountOfCToken *big.Int + SdExpected *big.Int + SdFinalized *big.Int + RequestBlock *big.Int +}, error) { + return _SDUtilityPool.Contract.DelegatorWithdrawRequests(&_SDUtilityPool.CallOpts, arg0) +} + +// DelegatorWithdrawRequests is a free data retrieval call binding the contract method 0xe41b55d9. +// +// Solidity: function delegatorWithdrawRequests(uint256 ) view returns(address owner, uint256 amountOfCToken, uint256 sdExpected, uint256 sdFinalized, uint256 requestBlock) +func (_SDUtilityPool *SDUtilityPoolCallerSession) DelegatorWithdrawRequests(arg0 *big.Int) (struct { + Owner common.Address + AmountOfCToken *big.Int + SdExpected *big.Int + SdFinalized *big.Int + RequestBlock *big.Int +}, error) { + return _SDUtilityPool.Contract.DelegatorWithdrawRequests(&_SDUtilityPool.CallOpts, arg0) +} + +// ExchangeRateStored is a free data retrieval call binding the contract method 0x182df0f5. +// +// Solidity: function exchangeRateStored() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) ExchangeRateStored(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "exchangeRateStored") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ExchangeRateStored is a free data retrieval call binding the contract method 0x182df0f5. +// +// Solidity: function exchangeRateStored() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) ExchangeRateStored() (*big.Int, error) { + return _SDUtilityPool.Contract.ExchangeRateStored(&_SDUtilityPool.CallOpts) +} + +// ExchangeRateStored is a free data retrieval call binding the contract method 0x182df0f5. +// +// Solidity: function exchangeRateStored() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) ExchangeRateStored() (*big.Int, error) { + return _SDUtilityPool.Contract.ExchangeRateStored(&_SDUtilityPool.CallOpts) +} + +// FinalizationBatchLimit is a free data retrieval call binding the contract method 0x6f2bd0b2. +// +// Solidity: function finalizationBatchLimit() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) FinalizationBatchLimit(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "finalizationBatchLimit") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// FinalizationBatchLimit is a free data retrieval call binding the contract method 0x6f2bd0b2. +// +// Solidity: function finalizationBatchLimit() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) FinalizationBatchLimit() (*big.Int, error) { + return _SDUtilityPool.Contract.FinalizationBatchLimit(&_SDUtilityPool.CallOpts) +} + +// FinalizationBatchLimit is a free data retrieval call binding the contract method 0x6f2bd0b2. +// +// Solidity: function finalizationBatchLimit() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) FinalizationBatchLimit() (*big.Int, error) { + return _SDUtilityPool.Contract.FinalizationBatchLimit(&_SDUtilityPool.CallOpts) +} + +// GetDelegationRatePerBlock is a free data retrieval call binding the contract method 0x6d00679c. +// +// Solidity: function getDelegationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetDelegationRatePerBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getDelegationRatePerBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetDelegationRatePerBlock is a free data retrieval call binding the contract method 0x6d00679c. +// +// Solidity: function getDelegationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetDelegationRatePerBlock() (*big.Int, error) { + return _SDUtilityPool.Contract.GetDelegationRatePerBlock(&_SDUtilityPool.CallOpts) +} + +// GetDelegationRatePerBlock is a free data retrieval call binding the contract method 0x6d00679c. +// +// Solidity: function getDelegationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetDelegationRatePerBlock() (*big.Int, error) { + return _SDUtilityPool.Contract.GetDelegationRatePerBlock(&_SDUtilityPool.CallOpts) +} + +// GetDelegatorLatestSDBalance is a free data retrieval call binding the contract method 0x22291528. +// +// Solidity: function getDelegatorLatestSDBalance(address _delegator) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetDelegatorLatestSDBalance(opts *bind.CallOpts, _delegator common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getDelegatorLatestSDBalance", _delegator) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetDelegatorLatestSDBalance is a free data retrieval call binding the contract method 0x22291528. +// +// Solidity: function getDelegatorLatestSDBalance(address _delegator) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetDelegatorLatestSDBalance(_delegator common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.GetDelegatorLatestSDBalance(&_SDUtilityPool.CallOpts, _delegator) +} + +// GetDelegatorLatestSDBalance is a free data retrieval call binding the contract method 0x22291528. +// +// Solidity: function getDelegatorLatestSDBalance(address _delegator) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetDelegatorLatestSDBalance(_delegator common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.GetDelegatorLatestSDBalance(&_SDUtilityPool.CallOpts, _delegator) +} + +// GetLatestExchangeRate is a free data retrieval call binding the contract method 0x34d093f6. +// +// Solidity: function getLatestExchangeRate() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetLatestExchangeRate(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getLatestExchangeRate") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetLatestExchangeRate is a free data retrieval call binding the contract method 0x34d093f6. +// +// Solidity: function getLatestExchangeRate() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetLatestExchangeRate() (*big.Int, error) { + return _SDUtilityPool.Contract.GetLatestExchangeRate(&_SDUtilityPool.CallOpts) +} + +// GetLatestExchangeRate is a free data retrieval call binding the contract method 0x34d093f6. +// +// Solidity: function getLatestExchangeRate() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetLatestExchangeRate() (*big.Int, error) { + return _SDUtilityPool.Contract.GetLatestExchangeRate(&_SDUtilityPool.CallOpts) +} + +// GetLiquidationThreshold is a free data retrieval call binding the contract method 0x4ae9b8bc. +// +// Solidity: function getLiquidationThreshold() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetLiquidationThreshold(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getLiquidationThreshold") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetLiquidationThreshold is a free data retrieval call binding the contract method 0x4ae9b8bc. +// +// Solidity: function getLiquidationThreshold() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetLiquidationThreshold() (*big.Int, error) { + return _SDUtilityPool.Contract.GetLiquidationThreshold(&_SDUtilityPool.CallOpts) +} + +// GetLiquidationThreshold is a free data retrieval call binding the contract method 0x4ae9b8bc. +// +// Solidity: function getLiquidationThreshold() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetLiquidationThreshold() (*big.Int, error) { + return _SDUtilityPool.Contract.GetLiquidationThreshold(&_SDUtilityPool.CallOpts) +} + +// GetOperatorLiquidation is a free data retrieval call binding the contract method 0x12372ffe. +// +// Solidity: function getOperatorLiquidation(address account) view returns((uint256,uint256,uint256,bool,bool,address)) +func (_SDUtilityPool *SDUtilityPoolCaller) GetOperatorLiquidation(opts *bind.CallOpts, account common.Address) (OperatorLiquidation, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getOperatorLiquidation", account) + + if err != nil { + return *new(OperatorLiquidation), err + } + + out0 := *abi.ConvertType(out[0], new(OperatorLiquidation)).(*OperatorLiquidation) + + return out0, err + +} + +// GetOperatorLiquidation is a free data retrieval call binding the contract method 0x12372ffe. +// +// Solidity: function getOperatorLiquidation(address account) view returns((uint256,uint256,uint256,bool,bool,address)) +func (_SDUtilityPool *SDUtilityPoolSession) GetOperatorLiquidation(account common.Address) (OperatorLiquidation, error) { + return _SDUtilityPool.Contract.GetOperatorLiquidation(&_SDUtilityPool.CallOpts, account) +} + +// GetOperatorLiquidation is a free data retrieval call binding the contract method 0x12372ffe. +// +// Solidity: function getOperatorLiquidation(address account) view returns((uint256,uint256,uint256,bool,bool,address)) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetOperatorLiquidation(account common.Address) (OperatorLiquidation, error) { + return _SDUtilityPool.Contract.GetOperatorLiquidation(&_SDUtilityPool.CallOpts, account) +} + +// GetOperatorTotalEth is a free data retrieval call binding the contract method 0x2170c14c. +// +// Solidity: function getOperatorTotalEth(address operator) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetOperatorTotalEth(opts *bind.CallOpts, operator common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getOperatorTotalEth", operator) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetOperatorTotalEth is a free data retrieval call binding the contract method 0x2170c14c. +// +// Solidity: function getOperatorTotalEth(address operator) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetOperatorTotalEth(operator common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.GetOperatorTotalEth(&_SDUtilityPool.CallOpts, operator) +} + +// GetOperatorTotalEth is a free data retrieval call binding the contract method 0x2170c14c. +// +// Solidity: function getOperatorTotalEth(address operator) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetOperatorTotalEth(operator common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.GetOperatorTotalEth(&_SDUtilityPool.CallOpts, operator) +} + +// GetPoolAvailableSDBalance is a free data retrieval call binding the contract method 0xda695857. +// +// Solidity: function getPoolAvailableSDBalance() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetPoolAvailableSDBalance(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getPoolAvailableSDBalance") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetPoolAvailableSDBalance is a free data retrieval call binding the contract method 0xda695857. +// +// Solidity: function getPoolAvailableSDBalance() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetPoolAvailableSDBalance() (*big.Int, error) { + return _SDUtilityPool.Contract.GetPoolAvailableSDBalance(&_SDUtilityPool.CallOpts) +} + +// GetPoolAvailableSDBalance is a free data retrieval call binding the contract method 0xda695857. +// +// Solidity: function getPoolAvailableSDBalance() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetPoolAvailableSDBalance() (*big.Int, error) { + return _SDUtilityPool.Contract.GetPoolAvailableSDBalance(&_SDUtilityPool.CallOpts) +} + +// GetRequestIdsByDelegator is a free data retrieval call binding the contract method 0x99775f40. +// +// Solidity: function getRequestIdsByDelegator(address _delegator) view returns(uint256[]) +func (_SDUtilityPool *SDUtilityPoolCaller) GetRequestIdsByDelegator(opts *bind.CallOpts, _delegator common.Address) ([]*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getRequestIdsByDelegator", _delegator) + + if err != nil { + return *new([]*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) + + return out0, err + +} + +// GetRequestIdsByDelegator is a free data retrieval call binding the contract method 0x99775f40. +// +// Solidity: function getRequestIdsByDelegator(address _delegator) view returns(uint256[]) +func (_SDUtilityPool *SDUtilityPoolSession) GetRequestIdsByDelegator(_delegator common.Address) ([]*big.Int, error) { + return _SDUtilityPool.Contract.GetRequestIdsByDelegator(&_SDUtilityPool.CallOpts, _delegator) +} + +// GetRequestIdsByDelegator is a free data retrieval call binding the contract method 0x99775f40. +// +// Solidity: function getRequestIdsByDelegator(address _delegator) view returns(uint256[]) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetRequestIdsByDelegator(_delegator common.Address) ([]*big.Int, error) { + return _SDUtilityPool.Contract.GetRequestIdsByDelegator(&_SDUtilityPool.CallOpts, _delegator) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_SDUtilityPool *SDUtilityPoolCaller) GetRoleAdmin(opts *bind.CallOpts, role [32]byte) ([32]byte, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getRoleAdmin", role) + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_SDUtilityPool *SDUtilityPoolSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _SDUtilityPool.Contract.GetRoleAdmin(&_SDUtilityPool.CallOpts, role) +} + +// GetRoleAdmin is a free data retrieval call binding the contract method 0x248a9ca3. +// +// Solidity: function getRoleAdmin(bytes32 role) view returns(bytes32) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetRoleAdmin(role [32]byte) ([32]byte, error) { + return _SDUtilityPool.Contract.GetRoleAdmin(&_SDUtilityPool.CallOpts, role) +} + +// GetUserData is a free data retrieval call binding the contract method 0xffc9896b. +// +// Solidity: function getUserData(address account) view returns((uint256,uint256,uint256,uint256)) +func (_SDUtilityPool *SDUtilityPoolCaller) GetUserData(opts *bind.CallOpts, account common.Address) (UserData, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getUserData", account) + + if err != nil { + return *new(UserData), err + } + + out0 := *abi.ConvertType(out[0], new(UserData)).(*UserData) + + return out0, err + +} + +// GetUserData is a free data retrieval call binding the contract method 0xffc9896b. +// +// Solidity: function getUserData(address account) view returns((uint256,uint256,uint256,uint256)) +func (_SDUtilityPool *SDUtilityPoolSession) GetUserData(account common.Address) (UserData, error) { + return _SDUtilityPool.Contract.GetUserData(&_SDUtilityPool.CallOpts, account) +} + +// GetUserData is a free data retrieval call binding the contract method 0xffc9896b. +// +// Solidity: function getUserData(address account) view returns((uint256,uint256,uint256,uint256)) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetUserData(account common.Address) (UserData, error) { + return _SDUtilityPool.Contract.GetUserData(&_SDUtilityPool.CallOpts, account) +} + +// GetUtilizerLatestBalance is a free data retrieval call binding the contract method 0x36978412. +// +// Solidity: function getUtilizerLatestBalance(address _utilizer) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) GetUtilizerLatestBalance(opts *bind.CallOpts, _utilizer common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "getUtilizerLatestBalance", _utilizer) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// GetUtilizerLatestBalance is a free data retrieval call binding the contract method 0x36978412. +// +// Solidity: function getUtilizerLatestBalance(address _utilizer) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) GetUtilizerLatestBalance(_utilizer common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.GetUtilizerLatestBalance(&_SDUtilityPool.CallOpts, _utilizer) +} + +// GetUtilizerLatestBalance is a free data retrieval call binding the contract method 0x36978412. +// +// Solidity: function getUtilizerLatestBalance(address _utilizer) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetUtilizerLatestBalance(_utilizer common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.GetUtilizerLatestBalance(&_SDUtilityPool.CallOpts, _utilizer) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_SDUtilityPool *SDUtilityPoolCaller) HasRole(opts *bind.CallOpts, role [32]byte, account common.Address) (bool, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "hasRole", role, account) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_SDUtilityPool *SDUtilityPoolSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _SDUtilityPool.Contract.HasRole(&_SDUtilityPool.CallOpts, role, account) +} + +// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// +// Solidity: function hasRole(bytes32 role, address account) view returns(bool) +func (_SDUtilityPool *SDUtilityPoolCallerSession) HasRole(role [32]byte, account common.Address) (bool, error) { + return _SDUtilityPool.Contract.HasRole(&_SDUtilityPool.CallOpts, role, account) +} + +// LiquidationIndexByOperator is a free data retrieval call binding the contract method 0x673ab3fa. +// +// Solidity: function liquidationIndexByOperator(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) LiquidationIndexByOperator(opts *bind.CallOpts, arg0 common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "liquidationIndexByOperator", arg0) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// LiquidationIndexByOperator is a free data retrieval call binding the contract method 0x673ab3fa. +// +// Solidity: function liquidationIndexByOperator(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) LiquidationIndexByOperator(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.LiquidationIndexByOperator(&_SDUtilityPool.CallOpts, arg0) +} + +// LiquidationIndexByOperator is a free data retrieval call binding the contract method 0x673ab3fa. +// +// Solidity: function liquidationIndexByOperator(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) LiquidationIndexByOperator(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.LiquidationIndexByOperator(&_SDUtilityPool.CallOpts, arg0) +} + +// Liquidations is a free data retrieval call binding the contract method 0xa66c84f4. +// +// Solidity: function liquidations(uint256 ) view returns(uint256 totalAmountInEth, uint256 totalBonusInEth, uint256 totalFeeInEth, bool isRepaid, bool isClaimed, address liquidator) +func (_SDUtilityPool *SDUtilityPoolCaller) Liquidations(opts *bind.CallOpts, arg0 *big.Int) (struct { + TotalAmountInEth *big.Int + TotalBonusInEth *big.Int + TotalFeeInEth *big.Int + IsRepaid bool + IsClaimed bool + Liquidator common.Address +}, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "liquidations", arg0) + + outstruct := new(struct { + TotalAmountInEth *big.Int + TotalBonusInEth *big.Int + TotalFeeInEth *big.Int + IsRepaid bool + IsClaimed bool + Liquidator common.Address + }) + if err != nil { + return *outstruct, err + } + + outstruct.TotalAmountInEth = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.TotalBonusInEth = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.TotalFeeInEth = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.IsRepaid = *abi.ConvertType(out[3], new(bool)).(*bool) + outstruct.IsClaimed = *abi.ConvertType(out[4], new(bool)).(*bool) + outstruct.Liquidator = *abi.ConvertType(out[5], new(common.Address)).(*common.Address) + + return *outstruct, err + +} + +// Liquidations is a free data retrieval call binding the contract method 0xa66c84f4. +// +// Solidity: function liquidations(uint256 ) view returns(uint256 totalAmountInEth, uint256 totalBonusInEth, uint256 totalFeeInEth, bool isRepaid, bool isClaimed, address liquidator) +func (_SDUtilityPool *SDUtilityPoolSession) Liquidations(arg0 *big.Int) (struct { + TotalAmountInEth *big.Int + TotalBonusInEth *big.Int + TotalFeeInEth *big.Int + IsRepaid bool + IsClaimed bool + Liquidator common.Address +}, error) { + return _SDUtilityPool.Contract.Liquidations(&_SDUtilityPool.CallOpts, arg0) +} + +// Liquidations is a free data retrieval call binding the contract method 0xa66c84f4. +// +// Solidity: function liquidations(uint256 ) view returns(uint256 totalAmountInEth, uint256 totalBonusInEth, uint256 totalFeeInEth, bool isRepaid, bool isClaimed, address liquidator) +func (_SDUtilityPool *SDUtilityPoolCallerSession) Liquidations(arg0 *big.Int) (struct { + TotalAmountInEth *big.Int + TotalBonusInEth *big.Int + TotalFeeInEth *big.Int + IsRepaid bool + IsClaimed bool + Liquidator common.Address +}, error) { + return _SDUtilityPool.Contract.Liquidations(&_SDUtilityPool.CallOpts, arg0) +} + +// MaxETHWorthOfSDPerValidator is a free data retrieval call binding the contract method 0x2807c313. +// +// Solidity: function maxETHWorthOfSDPerValidator() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MaxETHWorthOfSDPerValidator(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "maxETHWorthOfSDPerValidator") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxETHWorthOfSDPerValidator is a free data retrieval call binding the contract method 0x2807c313. +// +// Solidity: function maxETHWorthOfSDPerValidator() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MaxETHWorthOfSDPerValidator() (*big.Int, error) { + return _SDUtilityPool.Contract.MaxETHWorthOfSDPerValidator(&_SDUtilityPool.CallOpts) +} + +// MaxETHWorthOfSDPerValidator is a free data retrieval call binding the contract method 0x2807c313. +// +// Solidity: function maxETHWorthOfSDPerValidator() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MaxETHWorthOfSDPerValidator() (*big.Int, error) { + return _SDUtilityPool.Contract.MaxETHWorthOfSDPerValidator(&_SDUtilityPool.CallOpts) +} + +// MaxNonRedeemedDelegatorRequestCount is a free data retrieval call binding the contract method 0xc083f3e6. +// +// Solidity: function maxNonRedeemedDelegatorRequestCount() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MaxNonRedeemedDelegatorRequestCount(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "maxNonRedeemedDelegatorRequestCount") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MaxNonRedeemedDelegatorRequestCount is a free data retrieval call binding the contract method 0xc083f3e6. +// +// Solidity: function maxNonRedeemedDelegatorRequestCount() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MaxNonRedeemedDelegatorRequestCount() (*big.Int, error) { + return _SDUtilityPool.Contract.MaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.CallOpts) +} + +// MaxNonRedeemedDelegatorRequestCount is a free data retrieval call binding the contract method 0xc083f3e6. +// +// Solidity: function maxNonRedeemedDelegatorRequestCount() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MaxNonRedeemedDelegatorRequestCount() (*big.Int, error) { + return _SDUtilityPool.Contract.MaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.CallOpts) +} + +// MinBlockDelayToFinalizeRequest is a free data retrieval call binding the contract method 0xbc1428f6. +// +// Solidity: function minBlockDelayToFinalizeRequest() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) MinBlockDelayToFinalizeRequest(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "minBlockDelayToFinalizeRequest") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// MinBlockDelayToFinalizeRequest is a free data retrieval call binding the contract method 0xbc1428f6. +// +// Solidity: function minBlockDelayToFinalizeRequest() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) MinBlockDelayToFinalizeRequest() (*big.Int, error) { + return _SDUtilityPool.Contract.MinBlockDelayToFinalizeRequest(&_SDUtilityPool.CallOpts) +} + +// MinBlockDelayToFinalizeRequest is a free data retrieval call binding the contract method 0xbc1428f6. +// +// Solidity: function minBlockDelayToFinalizeRequest() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) MinBlockDelayToFinalizeRequest() (*big.Int, error) { + return _SDUtilityPool.Contract.MinBlockDelayToFinalizeRequest(&_SDUtilityPool.CallOpts) +} + +// NextRequestId is a free data retrieval call binding the contract method 0x6a84a985. +// +// Solidity: function nextRequestId() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) NextRequestId(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "nextRequestId") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextRequestId is a free data retrieval call binding the contract method 0x6a84a985. +// +// Solidity: function nextRequestId() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) NextRequestId() (*big.Int, error) { + return _SDUtilityPool.Contract.NextRequestId(&_SDUtilityPool.CallOpts) +} + +// NextRequestId is a free data retrieval call binding the contract method 0x6a84a985. +// +// Solidity: function nextRequestId() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) NextRequestId() (*big.Int, error) { + return _SDUtilityPool.Contract.NextRequestId(&_SDUtilityPool.CallOpts) +} + +// NextRequestIdToFinalize is a free data retrieval call binding the contract method 0xbbb84362. +// +// Solidity: function nextRequestIdToFinalize() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) NextRequestIdToFinalize(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "nextRequestIdToFinalize") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// NextRequestIdToFinalize is a free data retrieval call binding the contract method 0xbbb84362. +// +// Solidity: function nextRequestIdToFinalize() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) NextRequestIdToFinalize() (*big.Int, error) { + return _SDUtilityPool.Contract.NextRequestIdToFinalize(&_SDUtilityPool.CallOpts) +} + +// NextRequestIdToFinalize is a free data retrieval call binding the contract method 0xbbb84362. +// +// Solidity: function nextRequestIdToFinalize() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) NextRequestIdToFinalize() (*big.Int, error) { + return _SDUtilityPool.Contract.NextRequestIdToFinalize(&_SDUtilityPool.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_SDUtilityPool *SDUtilityPoolCaller) Paused(opts *bind.CallOpts) (bool, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "paused") + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_SDUtilityPool *SDUtilityPoolSession) Paused() (bool, error) { + return _SDUtilityPool.Contract.Paused(&_SDUtilityPool.CallOpts) +} + +// Paused is a free data retrieval call binding the contract method 0x5c975abb. +// +// Solidity: function paused() view returns(bool) +func (_SDUtilityPool *SDUtilityPoolCallerSession) Paused() (bool, error) { + return _SDUtilityPool.Contract.Paused(&_SDUtilityPool.CallOpts) +} + +// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. +// +// Solidity: function poolUtilization() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) PoolUtilization(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "poolUtilization") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. +// +// Solidity: function poolUtilization() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) PoolUtilization() (*big.Int, error) { + return _SDUtilityPool.Contract.PoolUtilization(&_SDUtilityPool.CallOpts) +} + +// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. +// +// Solidity: function poolUtilization() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) PoolUtilization() (*big.Int, error) { + return _SDUtilityPool.Contract.PoolUtilization(&_SDUtilityPool.CallOpts) +} + +// ProtocolFee is a free data retrieval call binding the contract method 0xb0e21e8a. +// +// Solidity: function protocolFee() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) ProtocolFee(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "protocolFee") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// ProtocolFee is a free data retrieval call binding the contract method 0xb0e21e8a. +// +// Solidity: function protocolFee() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) ProtocolFee() (*big.Int, error) { + return _SDUtilityPool.Contract.ProtocolFee(&_SDUtilityPool.CallOpts) +} + +// ProtocolFee is a free data retrieval call binding the contract method 0xb0e21e8a. +// +// Solidity: function protocolFee() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) ProtocolFee() (*big.Int, error) { + return _SDUtilityPool.Contract.ProtocolFee(&_SDUtilityPool.CallOpts) +} + +// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. +// +// Solidity: function requestIdsByDelegatorAddress(address , uint256 ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) RequestIdsByDelegatorAddress(opts *bind.CallOpts, arg0 common.Address, arg1 *big.Int) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "requestIdsByDelegatorAddress", arg0, arg1) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. +// +// Solidity: function requestIdsByDelegatorAddress(address , uint256 ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) RequestIdsByDelegatorAddress(arg0 common.Address, arg1 *big.Int) (*big.Int, error) { + return _SDUtilityPool.Contract.RequestIdsByDelegatorAddress(&_SDUtilityPool.CallOpts, arg0, arg1) +} + +// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. +// +// Solidity: function requestIdsByDelegatorAddress(address , uint256 ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) RequestIdsByDelegatorAddress(arg0 common.Address, arg1 *big.Int) (*big.Int, error) { + return _SDUtilityPool.Contract.RequestIdsByDelegatorAddress(&_SDUtilityPool.CallOpts, arg0, arg1) +} + +// RiskConfig is a free data retrieval call binding the contract method 0x7c90a6ca. +// +// Solidity: function riskConfig() view returns(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) +func (_SDUtilityPool *SDUtilityPoolCaller) RiskConfig(opts *bind.CallOpts) (struct { + LiquidationThreshold *big.Int + LiquidationBonusPercent *big.Int + LiquidationFeePercent *big.Int + Ltv *big.Int +}, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "riskConfig") + + outstruct := new(struct { + LiquidationThreshold *big.Int + LiquidationBonusPercent *big.Int + LiquidationFeePercent *big.Int + Ltv *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.LiquidationThreshold = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.LiquidationBonusPercent = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + outstruct.LiquidationFeePercent = *abi.ConvertType(out[2], new(*big.Int)).(**big.Int) + outstruct.Ltv = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// RiskConfig is a free data retrieval call binding the contract method 0x7c90a6ca. +// +// Solidity: function riskConfig() view returns(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) +func (_SDUtilityPool *SDUtilityPoolSession) RiskConfig() (struct { + LiquidationThreshold *big.Int + LiquidationBonusPercent *big.Int + LiquidationFeePercent *big.Int + Ltv *big.Int +}, error) { + return _SDUtilityPool.Contract.RiskConfig(&_SDUtilityPool.CallOpts) +} + +// RiskConfig is a free data retrieval call binding the contract method 0x7c90a6ca. +// +// Solidity: function riskConfig() view returns(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) +func (_SDUtilityPool *SDUtilityPoolCallerSession) RiskConfig() (struct { + LiquidationThreshold *big.Int + LiquidationBonusPercent *big.Int + LiquidationFeePercent *big.Int + Ltv *big.Int +}, error) { + return _SDUtilityPool.Contract.RiskConfig(&_SDUtilityPool.CallOpts) +} + +// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. +// +// Solidity: function sdRequestedForWithdraw() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) SdRequestedForWithdraw(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "sdRequestedForWithdraw") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. +// +// Solidity: function sdRequestedForWithdraw() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) SdRequestedForWithdraw() (*big.Int, error) { + return _SDUtilityPool.Contract.SdRequestedForWithdraw(&_SDUtilityPool.CallOpts) +} + +// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. +// +// Solidity: function sdRequestedForWithdraw() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) SdRequestedForWithdraw() (*big.Int, error) { + return _SDUtilityPool.Contract.SdRequestedForWithdraw(&_SDUtilityPool.CallOpts) +} + +// SdReservedForClaim is a free data retrieval call binding the contract method 0x2b886941. +// +// Solidity: function sdReservedForClaim() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) SdReservedForClaim(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "sdReservedForClaim") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// SdReservedForClaim is a free data retrieval call binding the contract method 0x2b886941. +// +// Solidity: function sdReservedForClaim() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) SdReservedForClaim() (*big.Int, error) { + return _SDUtilityPool.Contract.SdReservedForClaim(&_SDUtilityPool.CallOpts) +} + +// SdReservedForClaim is a free data retrieval call binding the contract method 0x2b886941. +// +// Solidity: function sdReservedForClaim() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) SdReservedForClaim() (*big.Int, error) { + return _SDUtilityPool.Contract.SdReservedForClaim(&_SDUtilityPool.CallOpts) +} + +// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// +// Solidity: function staderConfig() view returns(address) +func (_SDUtilityPool *SDUtilityPoolCaller) StaderConfig(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "staderConfig") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// +// Solidity: function staderConfig() view returns(address) +func (_SDUtilityPool *SDUtilityPoolSession) StaderConfig() (common.Address, error) { + return _SDUtilityPool.Contract.StaderConfig(&_SDUtilityPool.CallOpts) +} + +// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// +// Solidity: function staderConfig() view returns(address) +func (_SDUtilityPool *SDUtilityPoolCallerSession) StaderConfig() (common.Address, error) { + return _SDUtilityPool.Contract.StaderConfig(&_SDUtilityPool.CallOpts) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_SDUtilityPool *SDUtilityPoolCaller) SupportsInterface(opts *bind.CallOpts, interfaceId [4]byte) (bool, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "supportsInterface", interfaceId) + + if err != nil { + return *new(bool), err + } + + out0 := *abi.ConvertType(out[0], new(bool)).(*bool) + + return out0, err + +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_SDUtilityPool *SDUtilityPoolSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _SDUtilityPool.Contract.SupportsInterface(&_SDUtilityPool.CallOpts, interfaceId) +} + +// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// +// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) +func (_SDUtilityPool *SDUtilityPoolCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { + return _SDUtilityPool.Contract.SupportsInterface(&_SDUtilityPool.CallOpts, interfaceId) +} + +// TotalUtilizedSD is a free data retrieval call binding the contract method 0x8763a328. +// +// Solidity: function totalUtilizedSD() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) TotalUtilizedSD(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "totalUtilizedSD") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalUtilizedSD is a free data retrieval call binding the contract method 0x8763a328. +// +// Solidity: function totalUtilizedSD() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) TotalUtilizedSD() (*big.Int, error) { + return _SDUtilityPool.Contract.TotalUtilizedSD(&_SDUtilityPool.CallOpts) +} + +// TotalUtilizedSD is a free data retrieval call binding the contract method 0x8763a328. +// +// Solidity: function totalUtilizedSD() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) TotalUtilizedSD() (*big.Int, error) { + return _SDUtilityPool.Contract.TotalUtilizedSD(&_SDUtilityPool.CallOpts) +} + +// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. +// +// Solidity: function utilizationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) UtilizationRatePerBlock(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "utilizationRatePerBlock") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. +// +// Solidity: function utilizationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) UtilizationRatePerBlock() (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizationRatePerBlock(&_SDUtilityPool.CallOpts) +} + +// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. +// +// Solidity: function utilizationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizationRatePerBlock() (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizationRatePerBlock(&_SDUtilityPool.CallOpts) +} + +// UtilizeIndex is a free data retrieval call binding the contract method 0x634c48c7. +// +// Solidity: function utilizeIndex() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) UtilizeIndex(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "utilizeIndex") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// UtilizeIndex is a free data retrieval call binding the contract method 0x634c48c7. +// +// Solidity: function utilizeIndex() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) UtilizeIndex() (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizeIndex(&_SDUtilityPool.CallOpts) +} + +// UtilizeIndex is a free data retrieval call binding the contract method 0x634c48c7. +// +// Solidity: function utilizeIndex() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizeIndex() (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizeIndex(&_SDUtilityPool.CallOpts) +} + +// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. +// +// Solidity: function utilizerBalanceStored(address account) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCaller) UtilizerBalanceStored(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "utilizerBalanceStored", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. +// +// Solidity: function utilizerBalanceStored(address account) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) UtilizerBalanceStored(account common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizerBalanceStored(&_SDUtilityPool.CallOpts, account) +} + +// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. +// +// Solidity: function utilizerBalanceStored(address account) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizerBalanceStored(account common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizerBalanceStored(&_SDUtilityPool.CallOpts, account) +} + +// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. +// +// Solidity: function utilizerData(address ) view returns(uint256 principal, uint256 utilizeIndex) +func (_SDUtilityPool *SDUtilityPoolCaller) UtilizerData(opts *bind.CallOpts, arg0 common.Address) (struct { + Principal *big.Int + UtilizeIndex *big.Int +}, error) { + var out []interface{} + err := _SDUtilityPool.contract.Call(opts, &out, "utilizerData", arg0) + + outstruct := new(struct { + Principal *big.Int + UtilizeIndex *big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Principal = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.UtilizeIndex = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) + + return *outstruct, err + +} + +// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. +// +// Solidity: function utilizerData(address ) view returns(uint256 principal, uint256 utilizeIndex) +func (_SDUtilityPool *SDUtilityPoolSession) UtilizerData(arg0 common.Address) (struct { + Principal *big.Int + UtilizeIndex *big.Int +}, error) { + return _SDUtilityPool.Contract.UtilizerData(&_SDUtilityPool.CallOpts, arg0) +} + +// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. +// +// Solidity: function utilizerData(address ) view returns(uint256 principal, uint256 utilizeIndex) +func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizerData(arg0 common.Address) (struct { + Principal *big.Int + UtilizeIndex *big.Int +}, error) { + return _SDUtilityPool.Contract.UtilizerData(&_SDUtilityPool.CallOpts, arg0) +} + +// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. +// +// Solidity: function accrueFee() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) AccrueFee(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "accrueFee") +} + +// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. +// +// Solidity: function accrueFee() returns() +func (_SDUtilityPool *SDUtilityPoolSession) AccrueFee() (*types.Transaction, error) { + return _SDUtilityPool.Contract.AccrueFee(&_SDUtilityPool.TransactOpts) +} + +// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. +// +// Solidity: function accrueFee() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) AccrueFee() (*types.Transaction, error) { + return _SDUtilityPool.Contract.AccrueFee(&_SDUtilityPool.TransactOpts) +} + +// Claim is a paid mutator transaction binding the contract method 0x379607f5. +// +// Solidity: function claim(uint256 _requestId) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) Claim(opts *bind.TransactOpts, _requestId *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "claim", _requestId) +} + +// Claim is a paid mutator transaction binding the contract method 0x379607f5. +// +// Solidity: function claim(uint256 _requestId) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Claim(_requestId *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Claim(&_SDUtilityPool.TransactOpts, _requestId) +} + +// Claim is a paid mutator transaction binding the contract method 0x379607f5. +// +// Solidity: function claim(uint256 _requestId) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Claim(_requestId *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Claim(&_SDUtilityPool.TransactOpts, _requestId) +} + +// ClearUtilizerInterest is a paid mutator transaction binding the contract method 0x606f0945. +// +// Solidity: function clearUtilizerInterest(address _utilizer) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) ClearUtilizerInterest(opts *bind.TransactOpts, _utilizer common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "clearUtilizerInterest", _utilizer) +} + +// ClearUtilizerInterest is a paid mutator transaction binding the contract method 0x606f0945. +// +// Solidity: function clearUtilizerInterest(address _utilizer) returns() +func (_SDUtilityPool *SDUtilityPoolSession) ClearUtilizerInterest(_utilizer common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.ClearUtilizerInterest(&_SDUtilityPool.TransactOpts, _utilizer) +} + +// ClearUtilizerInterest is a paid mutator transaction binding the contract method 0x606f0945. +// +// Solidity: function clearUtilizerInterest(address _utilizer) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) ClearUtilizerInterest(_utilizer common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.ClearUtilizerInterest(&_SDUtilityPool.TransactOpts, _utilizer) +} + +// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. +// +// Solidity: function completeLiquidation(address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) CompleteLiquidation(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "completeLiquidation", account) +} + +// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. +// +// Solidity: function completeLiquidation(address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) CompleteLiquidation(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.CompleteLiquidation(&_SDUtilityPool.TransactOpts, account) +} + +// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. +// +// Solidity: function completeLiquidation(address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) CompleteLiquidation(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.CompleteLiquidation(&_SDUtilityPool.TransactOpts, account) +} + +// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. +// +// Solidity: function delegate(uint256 sdAmount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) Delegate(opts *bind.TransactOpts, sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "delegate", sdAmount) +} + +// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. +// +// Solidity: function delegate(uint256 sdAmount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Delegate(sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Delegate(&_SDUtilityPool.TransactOpts, sdAmount) +} + +// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. +// +// Solidity: function delegate(uint256 sdAmount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Delegate(sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Delegate(&_SDUtilityPool.TransactOpts, sdAmount) +} + +// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. +// +// Solidity: function exchangeRateCurrent() returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) ExchangeRateCurrent(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "exchangeRateCurrent") +} + +// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. +// +// Solidity: function exchangeRateCurrent() returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) ExchangeRateCurrent() (*types.Transaction, error) { + return _SDUtilityPool.Contract.ExchangeRateCurrent(&_SDUtilityPool.TransactOpts) +} + +// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. +// +// Solidity: function exchangeRateCurrent() returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) ExchangeRateCurrent() (*types.Transaction, error) { + return _SDUtilityPool.Contract.ExchangeRateCurrent(&_SDUtilityPool.TransactOpts) +} + +// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. +// +// Solidity: function finalizeDelegatorWithdrawalRequest() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) FinalizeDelegatorWithdrawalRequest(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "finalizeDelegatorWithdrawalRequest") +} + +// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. +// +// Solidity: function finalizeDelegatorWithdrawalRequest() returns() +func (_SDUtilityPool *SDUtilityPoolSession) FinalizeDelegatorWithdrawalRequest() (*types.Transaction, error) { + return _SDUtilityPool.Contract.FinalizeDelegatorWithdrawalRequest(&_SDUtilityPool.TransactOpts) +} + +// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. +// +// Solidity: function finalizeDelegatorWithdrawalRequest() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) FinalizeDelegatorWithdrawalRequest() (*types.Transaction, error) { + return _SDUtilityPool.Contract.FinalizeDelegatorWithdrawalRequest(&_SDUtilityPool.TransactOpts) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) GrantRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "grantRole", role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.GrantRole(&_SDUtilityPool.TransactOpts, role, account) +} + +// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// +// Solidity: function grantRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) GrantRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.GrantRole(&_SDUtilityPool.TransactOpts, role, account) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _admin, address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) Initialize(opts *bind.TransactOpts, _admin common.Address, _staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "initialize", _admin, _staderConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _admin, address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Initialize(_admin common.Address, _staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Initialize(&_SDUtilityPool.TransactOpts, _admin, _staderConfig) +} + +// Initialize is a paid mutator transaction binding the contract method 0x485cc955. +// +// Solidity: function initialize(address _admin, address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Initialize(_admin common.Address, _staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Initialize(&_SDUtilityPool.TransactOpts, _admin, _staderConfig) +} + +// LiquidationCall is a paid mutator transaction binding the contract method 0xd2ac4a3d. +// +// Solidity: function liquidationCall(address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) LiquidationCall(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "liquidationCall", account) +} + +// LiquidationCall is a paid mutator transaction binding the contract method 0xd2ac4a3d. +// +// Solidity: function liquidationCall(address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) LiquidationCall(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.LiquidationCall(&_SDUtilityPool.TransactOpts, account) +} + +// LiquidationCall is a paid mutator transaction binding the contract method 0xd2ac4a3d. +// +// Solidity: function liquidationCall(address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) LiquidationCall(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.LiquidationCall(&_SDUtilityPool.TransactOpts, account) +} + +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. +// +// Solidity: function maxApproveSD() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) MaxApproveSD(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "maxApproveSD") +} + +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. +// +// Solidity: function maxApproveSD() returns() +func (_SDUtilityPool *SDUtilityPoolSession) MaxApproveSD() (*types.Transaction, error) { + return _SDUtilityPool.Contract.MaxApproveSD(&_SDUtilityPool.TransactOpts) +} + +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. +// +// Solidity: function maxApproveSD() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) MaxApproveSD() (*types.Transaction, error) { + return _SDUtilityPool.Contract.MaxApproveSD(&_SDUtilityPool.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) Pause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "pause") +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_SDUtilityPool *SDUtilityPoolSession) Pause() (*types.Transaction, error) { + return _SDUtilityPool.Contract.Pause(&_SDUtilityPool.TransactOpts) +} + +// Pause is a paid mutator transaction binding the contract method 0x8456cb59. +// +// Solidity: function pause() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Pause() (*types.Transaction, error) { + return _SDUtilityPool.Contract.Pause(&_SDUtilityPool.TransactOpts) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) RenounceRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "renounceRole", role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RenounceRole(&_SDUtilityPool.TransactOpts, role, account) +} + +// RenounceRole is a paid mutator transaction binding the contract method 0x36568abe. +// +// Solidity: function renounceRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RenounceRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RenounceRole(&_SDUtilityPool.TransactOpts, role, account) +} + +// Repay is a paid mutator transaction binding the contract method 0x371fd8e6. +// +// Solidity: function repay(uint256 repayAmount) returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolTransactor) Repay(opts *bind.TransactOpts, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "repay", repayAmount) +} + +// Repay is a paid mutator transaction binding the contract method 0x371fd8e6. +// +// Solidity: function repay(uint256 repayAmount) returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolSession) Repay(repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Repay(&_SDUtilityPool.TransactOpts, repayAmount) +} + +// Repay is a paid mutator transaction binding the contract method 0x371fd8e6. +// +// Solidity: function repay(uint256 repayAmount) returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Repay(repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Repay(&_SDUtilityPool.TransactOpts, repayAmount) +} + +// RepayFullAmount is a paid mutator transaction binding the contract method 0x20552a6e. +// +// Solidity: function repayFullAmount() returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolTransactor) RepayFullAmount(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "repayFullAmount") +} + +// RepayFullAmount is a paid mutator transaction binding the contract method 0x20552a6e. +// +// Solidity: function repayFullAmount() returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolSession) RepayFullAmount() (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayFullAmount(&_SDUtilityPool.TransactOpts) +} + +// RepayFullAmount is a paid mutator transaction binding the contract method 0x20552a6e. +// +// Solidity: function repayFullAmount() returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RepayFullAmount() (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayFullAmount(&_SDUtilityPool.TransactOpts) +} + +// RepayOnBehalf is a paid mutator transaction binding the contract method 0x9f689e0b. +// +// Solidity: function repayOnBehalf(address utilizer, uint256 repayAmount) returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolTransactor) RepayOnBehalf(opts *bind.TransactOpts, utilizer common.Address, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "repayOnBehalf", utilizer, repayAmount) +} + +// RepayOnBehalf is a paid mutator transaction binding the contract method 0x9f689e0b. +// +// Solidity: function repayOnBehalf(address utilizer, uint256 repayAmount) returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolSession) RepayOnBehalf(utilizer common.Address, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayOnBehalf(&_SDUtilityPool.TransactOpts, utilizer, repayAmount) +} + +// RepayOnBehalf is a paid mutator transaction binding the contract method 0x9f689e0b. +// +// Solidity: function repayOnBehalf(address utilizer, uint256 repayAmount) returns(uint256 repaidAmount, uint256 feePaid) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RepayOnBehalf(utilizer common.Address, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayOnBehalf(&_SDUtilityPool.TransactOpts, utilizer, repayAmount) +} + +// RepayUtilizedSDBalance is a paid mutator transaction binding the contract method 0x019f0aa9. +// +// Solidity: function repayUtilizedSDBalance(address _utilizer, uint256 amount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) RepayUtilizedSDBalance(opts *bind.TransactOpts, _utilizer common.Address, amount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "repayUtilizedSDBalance", _utilizer, amount) +} + +// RepayUtilizedSDBalance is a paid mutator transaction binding the contract method 0x019f0aa9. +// +// Solidity: function repayUtilizedSDBalance(address _utilizer, uint256 amount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) RepayUtilizedSDBalance(_utilizer common.Address, amount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayUtilizedSDBalance(&_SDUtilityPool.TransactOpts, _utilizer, amount) +} + +// RepayUtilizedSDBalance is a paid mutator transaction binding the contract method 0x019f0aa9. +// +// Solidity: function repayUtilizedSDBalance(address _utilizer, uint256 amount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RepayUtilizedSDBalance(_utilizer common.Address, amount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayUtilizedSDBalance(&_SDUtilityPool.TransactOpts, _utilizer, amount) +} + +// RequestWithdraw is a paid mutator transaction binding the contract method 0x745400c9. +// +// Solidity: function requestWithdraw(uint256 _cTokenAmount) returns(uint256 _requestId) +func (_SDUtilityPool *SDUtilityPoolTransactor) RequestWithdraw(opts *bind.TransactOpts, _cTokenAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "requestWithdraw", _cTokenAmount) +} + +// RequestWithdraw is a paid mutator transaction binding the contract method 0x745400c9. +// +// Solidity: function requestWithdraw(uint256 _cTokenAmount) returns(uint256 _requestId) +func (_SDUtilityPool *SDUtilityPoolSession) RequestWithdraw(_cTokenAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdraw(&_SDUtilityPool.TransactOpts, _cTokenAmount) +} + +// RequestWithdraw is a paid mutator transaction binding the contract method 0x745400c9. +// +// Solidity: function requestWithdraw(uint256 _cTokenAmount) returns(uint256 _requestId) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RequestWithdraw(_cTokenAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdraw(&_SDUtilityPool.TransactOpts, _cTokenAmount) +} + +// RequestWithdrawWithSDAmount is a paid mutator transaction binding the contract method 0xc51cd1cc. +// +// Solidity: function requestWithdrawWithSDAmount(uint256 _sdAmount) returns(uint256 _requestId) +func (_SDUtilityPool *SDUtilityPoolTransactor) RequestWithdrawWithSDAmount(opts *bind.TransactOpts, _sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "requestWithdrawWithSDAmount", _sdAmount) +} + +// RequestWithdrawWithSDAmount is a paid mutator transaction binding the contract method 0xc51cd1cc. +// +// Solidity: function requestWithdrawWithSDAmount(uint256 _sdAmount) returns(uint256 _requestId) +func (_SDUtilityPool *SDUtilityPoolSession) RequestWithdrawWithSDAmount(_sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdrawWithSDAmount(&_SDUtilityPool.TransactOpts, _sdAmount) +} + +// RequestWithdrawWithSDAmount is a paid mutator transaction binding the contract method 0xc51cd1cc. +// +// Solidity: function requestWithdrawWithSDAmount(uint256 _sdAmount) returns(uint256 _requestId) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RequestWithdrawWithSDAmount(_sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdrawWithSDAmount(&_SDUtilityPool.TransactOpts, _sdAmount) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) RevokeRole(opts *bind.TransactOpts, role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "revokeRole", role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RevokeRole(&_SDUtilityPool.TransactOpts, role, account) +} + +// RevokeRole is a paid mutator transaction binding the contract method 0xd547741f. +// +// Solidity: function revokeRole(bytes32 role, address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RevokeRole(role [32]byte, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RevokeRole(&_SDUtilityPool.TransactOpts, role, account) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) Unpause(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "unpause") +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SDUtilityPool *SDUtilityPoolSession) Unpause() (*types.Transaction, error) { + return _SDUtilityPool.Contract.Unpause(&_SDUtilityPool.TransactOpts) +} + +// Unpause is a paid mutator transaction binding the contract method 0x3f4ba83a. +// +// Solidity: function unpause() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Unpause() (*types.Transaction, error) { + return _SDUtilityPool.Contract.Unpause(&_SDUtilityPool.TransactOpts) +} + +// UpdateConservativeEthPerKey is a paid mutator transaction binding the contract method 0x1c557f05. +// +// Solidity: function updateConservativeEthPerKey(uint256 _newEthPerKey) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateConservativeEthPerKey(opts *bind.TransactOpts, _newEthPerKey *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateConservativeEthPerKey", _newEthPerKey) +} + +// UpdateConservativeEthPerKey is a paid mutator transaction binding the contract method 0x1c557f05. +// +// Solidity: function updateConservativeEthPerKey(uint256 _newEthPerKey) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateConservativeEthPerKey(_newEthPerKey *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateConservativeEthPerKey(&_SDUtilityPool.TransactOpts, _newEthPerKey) +} + +// UpdateConservativeEthPerKey is a paid mutator transaction binding the contract method 0x1c557f05. +// +// Solidity: function updateConservativeEthPerKey(uint256 _newEthPerKey) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateConservativeEthPerKey(_newEthPerKey *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateConservativeEthPerKey(&_SDUtilityPool.TransactOpts, _newEthPerKey) +} + +// UpdateFinalizationBatchLimit is a paid mutator transaction binding the contract method 0x267fca73. +// +// Solidity: function updateFinalizationBatchLimit(uint256 _finalizationBatchLimit) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateFinalizationBatchLimit(opts *bind.TransactOpts, _finalizationBatchLimit *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateFinalizationBatchLimit", _finalizationBatchLimit) +} + +// UpdateFinalizationBatchLimit is a paid mutator transaction binding the contract method 0x267fca73. +// +// Solidity: function updateFinalizationBatchLimit(uint256 _finalizationBatchLimit) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateFinalizationBatchLimit(_finalizationBatchLimit *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateFinalizationBatchLimit(&_SDUtilityPool.TransactOpts, _finalizationBatchLimit) +} + +// UpdateFinalizationBatchLimit is a paid mutator transaction binding the contract method 0x267fca73. +// +// Solidity: function updateFinalizationBatchLimit(uint256 _finalizationBatchLimit) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateFinalizationBatchLimit(_finalizationBatchLimit *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateFinalizationBatchLimit(&_SDUtilityPool.TransactOpts, _finalizationBatchLimit) +} + +// UpdateMaxETHWorthOfSDPerValidator is a paid mutator transaction binding the contract method 0x5393618e. +// +// Solidity: function updateMaxETHWorthOfSDPerValidator(uint256 _maxETHWorthOfSDPerValidator) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateMaxETHWorthOfSDPerValidator(opts *bind.TransactOpts, _maxETHWorthOfSDPerValidator *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateMaxETHWorthOfSDPerValidator", _maxETHWorthOfSDPerValidator) +} + +// UpdateMaxETHWorthOfSDPerValidator is a paid mutator transaction binding the contract method 0x5393618e. +// +// Solidity: function updateMaxETHWorthOfSDPerValidator(uint256 _maxETHWorthOfSDPerValidator) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateMaxETHWorthOfSDPerValidator(_maxETHWorthOfSDPerValidator *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxETHWorthOfSDPerValidator(&_SDUtilityPool.TransactOpts, _maxETHWorthOfSDPerValidator) +} + +// UpdateMaxETHWorthOfSDPerValidator is a paid mutator transaction binding the contract method 0x5393618e. +// +// Solidity: function updateMaxETHWorthOfSDPerValidator(uint256 _maxETHWorthOfSDPerValidator) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateMaxETHWorthOfSDPerValidator(_maxETHWorthOfSDPerValidator *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxETHWorthOfSDPerValidator(&_SDUtilityPool.TransactOpts, _maxETHWorthOfSDPerValidator) +} + +// UpdateMaxNonRedeemedDelegatorRequestCount is a paid mutator transaction binding the contract method 0xee63e5f9. +// +// Solidity: function updateMaxNonRedeemedDelegatorRequestCount(uint256 _count) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateMaxNonRedeemedDelegatorRequestCount(opts *bind.TransactOpts, _count *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateMaxNonRedeemedDelegatorRequestCount", _count) +} + +// UpdateMaxNonRedeemedDelegatorRequestCount is a paid mutator transaction binding the contract method 0xee63e5f9. +// +// Solidity: function updateMaxNonRedeemedDelegatorRequestCount(uint256 _count) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateMaxNonRedeemedDelegatorRequestCount(_count *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.TransactOpts, _count) +} + +// UpdateMaxNonRedeemedDelegatorRequestCount is a paid mutator transaction binding the contract method 0xee63e5f9. +// +// Solidity: function updateMaxNonRedeemedDelegatorRequestCount(uint256 _count) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateMaxNonRedeemedDelegatorRequestCount(_count *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.TransactOpts, _count) +} + +// UpdateMinBlockDelayToFinalizeRequest is a paid mutator transaction binding the contract method 0x4a2965af. +// +// Solidity: function updateMinBlockDelayToFinalizeRequest(uint256 _minBlockDelayToFinalizeRequest) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateMinBlockDelayToFinalizeRequest(opts *bind.TransactOpts, _minBlockDelayToFinalizeRequest *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateMinBlockDelayToFinalizeRequest", _minBlockDelayToFinalizeRequest) +} + +// UpdateMinBlockDelayToFinalizeRequest is a paid mutator transaction binding the contract method 0x4a2965af. +// +// Solidity: function updateMinBlockDelayToFinalizeRequest(uint256 _minBlockDelayToFinalizeRequest) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateMinBlockDelayToFinalizeRequest(_minBlockDelayToFinalizeRequest *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMinBlockDelayToFinalizeRequest(&_SDUtilityPool.TransactOpts, _minBlockDelayToFinalizeRequest) +} + +// UpdateMinBlockDelayToFinalizeRequest is a paid mutator transaction binding the contract method 0x4a2965af. +// +// Solidity: function updateMinBlockDelayToFinalizeRequest(uint256 _minBlockDelayToFinalizeRequest) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateMinBlockDelayToFinalizeRequest(_minBlockDelayToFinalizeRequest *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMinBlockDelayToFinalizeRequest(&_SDUtilityPool.TransactOpts, _minBlockDelayToFinalizeRequest) +} + +// UpdateProtocolFee is a paid mutator transaction binding the contract method 0x4256dd78. +// +// Solidity: function updateProtocolFee(uint256 _protocolFee) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateProtocolFee(opts *bind.TransactOpts, _protocolFee *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateProtocolFee", _protocolFee) +} + +// UpdateProtocolFee is a paid mutator transaction binding the contract method 0x4256dd78. +// +// Solidity: function updateProtocolFee(uint256 _protocolFee) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateProtocolFee(_protocolFee *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateProtocolFee(&_SDUtilityPool.TransactOpts, _protocolFee) +} + +// UpdateProtocolFee is a paid mutator transaction binding the contract method 0x4256dd78. +// +// Solidity: function updateProtocolFee(uint256 _protocolFee) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateProtocolFee(_protocolFee *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateProtocolFee(&_SDUtilityPool.TransactOpts, _protocolFee) +} + +// UpdateRiskConfig is a paid mutator transaction binding the contract method 0x62569a51. +// +// Solidity: function updateRiskConfig(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateRiskConfig(opts *bind.TransactOpts, liquidationThreshold *big.Int, liquidationBonusPercent *big.Int, liquidationFeePercent *big.Int, ltv *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateRiskConfig", liquidationThreshold, liquidationBonusPercent, liquidationFeePercent, ltv) +} + +// UpdateRiskConfig is a paid mutator transaction binding the contract method 0x62569a51. +// +// Solidity: function updateRiskConfig(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateRiskConfig(liquidationThreshold *big.Int, liquidationBonusPercent *big.Int, liquidationFeePercent *big.Int, ltv *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateRiskConfig(&_SDUtilityPool.TransactOpts, liquidationThreshold, liquidationBonusPercent, liquidationFeePercent, ltv) +} + +// UpdateRiskConfig is a paid mutator transaction binding the contract method 0x62569a51. +// +// Solidity: function updateRiskConfig(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateRiskConfig(liquidationThreshold *big.Int, liquidationBonusPercent *big.Int, liquidationFeePercent *big.Int, ltv *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateRiskConfig(&_SDUtilityPool.TransactOpts, liquidationThreshold, liquidationBonusPercent, liquidationFeePercent, ltv) +} + +// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. +// +// Solidity: function updateStaderConfig(address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateStaderConfig(opts *bind.TransactOpts, _staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateStaderConfig", _staderConfig) +} + +// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. +// +// Solidity: function updateStaderConfig(address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateStaderConfig(_staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateStaderConfig(&_SDUtilityPool.TransactOpts, _staderConfig) +} + +// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. +// +// Solidity: function updateStaderConfig(address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateStaderConfig(_staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateStaderConfig(&_SDUtilityPool.TransactOpts, _staderConfig) +} + +// UpdateUtilizationRatePerBlock is a paid mutator transaction binding the contract method 0xcb2d89dd. +// +// Solidity: function updateUtilizationRatePerBlock(uint256 _utilizationRatePerBlock) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UpdateUtilizationRatePerBlock(opts *bind.TransactOpts, _utilizationRatePerBlock *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "updateUtilizationRatePerBlock", _utilizationRatePerBlock) +} + +// UpdateUtilizationRatePerBlock is a paid mutator transaction binding the contract method 0xcb2d89dd. +// +// Solidity: function updateUtilizationRatePerBlock(uint256 _utilizationRatePerBlock) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateUtilizationRatePerBlock(_utilizationRatePerBlock *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateUtilizationRatePerBlock(&_SDUtilityPool.TransactOpts, _utilizationRatePerBlock) +} + +// UpdateUtilizationRatePerBlock is a paid mutator transaction binding the contract method 0xcb2d89dd. +// +// Solidity: function updateUtilizationRatePerBlock(uint256 _utilizationRatePerBlock) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateUtilizationRatePerBlock(_utilizationRatePerBlock *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateUtilizationRatePerBlock(&_SDUtilityPool.TransactOpts, _utilizationRatePerBlock) +} + +// Utilize is a paid mutator transaction binding the contract method 0xec29c551. +// +// Solidity: function utilize(uint256 utilizeAmount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) Utilize(opts *bind.TransactOpts, utilizeAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "utilize", utilizeAmount) +} + +// Utilize is a paid mutator transaction binding the contract method 0xec29c551. +// +// Solidity: function utilize(uint256 utilizeAmount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Utilize(utilizeAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Utilize(&_SDUtilityPool.TransactOpts, utilizeAmount) +} + +// Utilize is a paid mutator transaction binding the contract method 0xec29c551. +// +// Solidity: function utilize(uint256 utilizeAmount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Utilize(utilizeAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Utilize(&_SDUtilityPool.TransactOpts, utilizeAmount) +} + +// UtilizeWhileAddingKeys is a paid mutator transaction binding the contract method 0x23c4ac1a. +// +// Solidity: function utilizeWhileAddingKeys(address operator, uint256 utilizeAmount, uint256 nonTerminalKeyCount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) UtilizeWhileAddingKeys(opts *bind.TransactOpts, operator common.Address, utilizeAmount *big.Int, nonTerminalKeyCount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "utilizeWhileAddingKeys", operator, utilizeAmount, nonTerminalKeyCount) +} + +// UtilizeWhileAddingKeys is a paid mutator transaction binding the contract method 0x23c4ac1a. +// +// Solidity: function utilizeWhileAddingKeys(address operator, uint256 utilizeAmount, uint256 nonTerminalKeyCount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UtilizeWhileAddingKeys(operator common.Address, utilizeAmount *big.Int, nonTerminalKeyCount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UtilizeWhileAddingKeys(&_SDUtilityPool.TransactOpts, operator, utilizeAmount, nonTerminalKeyCount) +} + +// UtilizeWhileAddingKeys is a paid mutator transaction binding the contract method 0x23c4ac1a. +// +// Solidity: function utilizeWhileAddingKeys(address operator, uint256 utilizeAmount, uint256 nonTerminalKeyCount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UtilizeWhileAddingKeys(operator common.Address, utilizeAmount *big.Int, nonTerminalKeyCount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UtilizeWhileAddingKeys(&_SDUtilityPool.TransactOpts, operator, utilizeAmount, nonTerminalKeyCount) +} + +// UtilizerBalanceCurrent is a paid mutator transaction binding the contract method 0xe65efbe4. +// +// Solidity: function utilizerBalanceCurrent(address account) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) UtilizerBalanceCurrent(opts *bind.TransactOpts, account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "utilizerBalanceCurrent", account) +} + +// UtilizerBalanceCurrent is a paid mutator transaction binding the contract method 0xe65efbe4. +// +// Solidity: function utilizerBalanceCurrent(address account) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) UtilizerBalanceCurrent(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UtilizerBalanceCurrent(&_SDUtilityPool.TransactOpts, account) +} + +// UtilizerBalanceCurrent is a paid mutator transaction binding the contract method 0xe65efbe4. +// +// Solidity: function utilizerBalanceCurrent(address account) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UtilizerBalanceCurrent(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UtilizerBalanceCurrent(&_SDUtilityPool.TransactOpts, account) +} + +// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x424cd833. +// +// Solidity: function withdrawProtocolFee(uint256 _amount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) WithdrawProtocolFee(opts *bind.TransactOpts, _amount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "withdrawProtocolFee", _amount) +} + +// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x424cd833. +// +// Solidity: function withdrawProtocolFee(uint256 _amount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) WithdrawProtocolFee(_amount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.WithdrawProtocolFee(&_SDUtilityPool.TransactOpts, _amount) +} + +// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x424cd833. +// +// Solidity: function withdrawProtocolFee(uint256 _amount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) WithdrawProtocolFee(_amount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.WithdrawProtocolFee(&_SDUtilityPool.TransactOpts, _amount) +} + +// SDUtilityPoolAccruedFeesIterator is returned from FilterAccruedFees and is used to iterate over the raw logs and unpacked data for AccruedFees events raised by the SDUtilityPool contract. +type SDUtilityPoolAccruedFeesIterator struct { + Event *SDUtilityPoolAccruedFees // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolAccruedFeesIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolAccruedFees) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolAccruedFees) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolAccruedFeesIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolAccruedFeesIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolAccruedFees represents a AccruedFees event raised by the SDUtilityPool contract. +type SDUtilityPoolAccruedFees struct { + FeeAccumulated *big.Int + TotalProtocolFee *big.Int + TotalUtilizedSD *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAccruedFees is a free log retrieval operation binding the contract event 0x7119249986febcaf2eaa8565a4a5f37df51951d3933512847e77ad489aff89a5. +// +// Solidity: event AccruedFees(uint256 feeAccumulated, uint256 totalProtocolFee, uint256 totalUtilizedSD) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterAccruedFees(opts *bind.FilterOpts) (*SDUtilityPoolAccruedFeesIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "AccruedFees") + if err != nil { + return nil, err + } + return &SDUtilityPoolAccruedFeesIterator{contract: _SDUtilityPool.contract, event: "AccruedFees", logs: logs, sub: sub}, nil +} + +// WatchAccruedFees is a free log subscription operation binding the contract event 0x7119249986febcaf2eaa8565a4a5f37df51951d3933512847e77ad489aff89a5. +// +// Solidity: event AccruedFees(uint256 feeAccumulated, uint256 totalProtocolFee, uint256 totalUtilizedSD) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchAccruedFees(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolAccruedFees) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "AccruedFees") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolAccruedFees) + if err := _SDUtilityPool.contract.UnpackLog(event, "AccruedFees", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseAccruedFees is a log parse operation binding the contract event 0x7119249986febcaf2eaa8565a4a5f37df51951d3933512847e77ad489aff89a5. +// +// Solidity: event AccruedFees(uint256 feeAccumulated, uint256 totalProtocolFee, uint256 totalUtilizedSD) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseAccruedFees(log types.Log) (*SDUtilityPoolAccruedFees, error) { + event := new(SDUtilityPoolAccruedFees) + if err := _SDUtilityPool.contract.UnpackLog(event, "AccruedFees", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolClearedUtilizerInterestIterator is returned from FilterClearedUtilizerInterest and is used to iterate over the raw logs and unpacked data for ClearedUtilizerInterest events raised by the SDUtilityPool contract. +type SDUtilityPoolClearedUtilizerInterestIterator struct { + Event *SDUtilityPoolClearedUtilizerInterest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolClearedUtilizerInterestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolClearedUtilizerInterest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolClearedUtilizerInterest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolClearedUtilizerInterestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolClearedUtilizerInterestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolClearedUtilizerInterest represents a ClearedUtilizerInterest event raised by the SDUtilityPool contract. +type SDUtilityPoolClearedUtilizerInterest struct { + Utilizer common.Address + SdInterest *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterClearedUtilizerInterest is a free log retrieval operation binding the contract event 0xe4e48d484ff3673a949d4949c3d1959419699d892dcdd4640d67f72b6d48cf24. +// +// Solidity: event ClearedUtilizerInterest(address indexed utilizer, uint256 sdInterest) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterClearedUtilizerInterest(opts *bind.FilterOpts, utilizer []common.Address) (*SDUtilityPoolClearedUtilizerInterestIterator, error) { + + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "ClearedUtilizerInterest", utilizerRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolClearedUtilizerInterestIterator{contract: _SDUtilityPool.contract, event: "ClearedUtilizerInterest", logs: logs, sub: sub}, nil +} + +// WatchClearedUtilizerInterest is a free log subscription operation binding the contract event 0xe4e48d484ff3673a949d4949c3d1959419699d892dcdd4640d67f72b6d48cf24. +// +// Solidity: event ClearedUtilizerInterest(address indexed utilizer, uint256 sdInterest) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchClearedUtilizerInterest(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolClearedUtilizerInterest, utilizer []common.Address) (event.Subscription, error) { + + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "ClearedUtilizerInterest", utilizerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolClearedUtilizerInterest) + if err := _SDUtilityPool.contract.UnpackLog(event, "ClearedUtilizerInterest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseClearedUtilizerInterest is a log parse operation binding the contract event 0xe4e48d484ff3673a949d4949c3d1959419699d892dcdd4640d67f72b6d48cf24. +// +// Solidity: event ClearedUtilizerInterest(address indexed utilizer, uint256 sdInterest) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseClearedUtilizerInterest(log types.Log) (*SDUtilityPoolClearedUtilizerInterest, error) { + event := new(SDUtilityPoolClearedUtilizerInterest) + if err := _SDUtilityPool.contract.UnpackLog(event, "ClearedUtilizerInterest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolCompleteLiquidationIterator is returned from FilterCompleteLiquidation and is used to iterate over the raw logs and unpacked data for CompleteLiquidation events raised by the SDUtilityPool contract. +type SDUtilityPoolCompleteLiquidationIterator struct { + Event *SDUtilityPoolCompleteLiquidation // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolCompleteLiquidationIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolCompleteLiquidation) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolCompleteLiquidation) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolCompleteLiquidationIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolCompleteLiquidationIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolCompleteLiquidation represents a CompleteLiquidation event raised by the SDUtilityPool contract. +type SDUtilityPoolCompleteLiquidation struct { + Index *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterCompleteLiquidation is a free log retrieval operation binding the contract event 0x2f0c36e8e230af6ceee7ecc30319e10800731fef4913c80afcf23f84b148df5d. +// +// Solidity: event CompleteLiquidation(uint256 indexed index) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterCompleteLiquidation(opts *bind.FilterOpts, index []*big.Int) (*SDUtilityPoolCompleteLiquidationIterator, error) { + + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "CompleteLiquidation", indexRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolCompleteLiquidationIterator{contract: _SDUtilityPool.contract, event: "CompleteLiquidation", logs: logs, sub: sub}, nil +} + +// WatchCompleteLiquidation is a free log subscription operation binding the contract event 0x2f0c36e8e230af6ceee7ecc30319e10800731fef4913c80afcf23f84b148df5d. +// +// Solidity: event CompleteLiquidation(uint256 indexed index) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchCompleteLiquidation(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolCompleteLiquidation, index []*big.Int) (event.Subscription, error) { + + var indexRule []interface{} + for _, indexItem := range index { + indexRule = append(indexRule, indexItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "CompleteLiquidation", indexRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolCompleteLiquidation) + if err := _SDUtilityPool.contract.UnpackLog(event, "CompleteLiquidation", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseCompleteLiquidation is a log parse operation binding the contract event 0x2f0c36e8e230af6ceee7ecc30319e10800731fef4913c80afcf23f84b148df5d. +// +// Solidity: event CompleteLiquidation(uint256 indexed index) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseCompleteLiquidation(log types.Log) (*SDUtilityPoolCompleteLiquidation, error) { + event := new(SDUtilityPoolCompleteLiquidation) + if err := _SDUtilityPool.contract.UnpackLog(event, "CompleteLiquidation", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolDelegatedIterator is returned from FilterDelegated and is used to iterate over the raw logs and unpacked data for Delegated events raised by the SDUtilityPool contract. +type SDUtilityPoolDelegatedIterator struct { + Event *SDUtilityPoolDelegated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolDelegatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolDelegated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolDelegated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolDelegatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolDelegatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolDelegated represents a Delegated event raised by the SDUtilityPool contract. +type SDUtilityPoolDelegated struct { + Delegator common.Address + SdAmount *big.Int + SdXToMint *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterDelegated is a free log retrieval operation binding the contract event 0x9a8f44850296624dadfd9c246d17e47171d35727a181bd090aa14bbbe00238bb. +// +// Solidity: event Delegated(address indexed delegator, uint256 sdAmount, uint256 sdXToMint) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterDelegated(opts *bind.FilterOpts, delegator []common.Address) (*SDUtilityPoolDelegatedIterator, error) { + + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Delegated", delegatorRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolDelegatedIterator{contract: _SDUtilityPool.contract, event: "Delegated", logs: logs, sub: sub}, nil +} + +// WatchDelegated is a free log subscription operation binding the contract event 0x9a8f44850296624dadfd9c246d17e47171d35727a181bd090aa14bbbe00238bb. +// +// Solidity: event Delegated(address indexed delegator, uint256 sdAmount, uint256 sdXToMint) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchDelegated(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolDelegated, delegator []common.Address) (event.Subscription, error) { + + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Delegated", delegatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolDelegated) + if err := _SDUtilityPool.contract.UnpackLog(event, "Delegated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseDelegated is a log parse operation binding the contract event 0x9a8f44850296624dadfd9c246d17e47171d35727a181bd090aa14bbbe00238bb. +// +// Solidity: event Delegated(address indexed delegator, uint256 sdAmount, uint256 sdXToMint) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseDelegated(log types.Log) (*SDUtilityPoolDelegated, error) { + event := new(SDUtilityPoolDelegated) + if err := _SDUtilityPool.contract.UnpackLog(event, "Delegated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolFinalizedWithdrawRequestIterator is returned from FilterFinalizedWithdrawRequest and is used to iterate over the raw logs and unpacked data for FinalizedWithdrawRequest events raised by the SDUtilityPool contract. +type SDUtilityPoolFinalizedWithdrawRequestIterator struct { + Event *SDUtilityPoolFinalizedWithdrawRequest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolFinalizedWithdrawRequestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolFinalizedWithdrawRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolFinalizedWithdrawRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolFinalizedWithdrawRequestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolFinalizedWithdrawRequestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolFinalizedWithdrawRequest represents a FinalizedWithdrawRequest event raised by the SDUtilityPool contract. +type SDUtilityPoolFinalizedWithdrawRequest struct { + NextRequestIdToFinalize *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterFinalizedWithdrawRequest is a free log retrieval operation binding the contract event 0x12a00f5e4c3614409f2dd90dc5be91b9b64ef89bac58a5b034ec0094376dbd37. +// +// Solidity: event FinalizedWithdrawRequest(uint256 nextRequestIdToFinalize) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterFinalizedWithdrawRequest(opts *bind.FilterOpts) (*SDUtilityPoolFinalizedWithdrawRequestIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "FinalizedWithdrawRequest") + if err != nil { + return nil, err + } + return &SDUtilityPoolFinalizedWithdrawRequestIterator{contract: _SDUtilityPool.contract, event: "FinalizedWithdrawRequest", logs: logs, sub: sub}, nil +} + +// WatchFinalizedWithdrawRequest is a free log subscription operation binding the contract event 0x12a00f5e4c3614409f2dd90dc5be91b9b64ef89bac58a5b034ec0094376dbd37. +// +// Solidity: event FinalizedWithdrawRequest(uint256 nextRequestIdToFinalize) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchFinalizedWithdrawRequest(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolFinalizedWithdrawRequest) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "FinalizedWithdrawRequest") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolFinalizedWithdrawRequest) + if err := _SDUtilityPool.contract.UnpackLog(event, "FinalizedWithdrawRequest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseFinalizedWithdrawRequest is a log parse operation binding the contract event 0x12a00f5e4c3614409f2dd90dc5be91b9b64ef89bac58a5b034ec0094376dbd37. +// +// Solidity: event FinalizedWithdrawRequest(uint256 nextRequestIdToFinalize) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseFinalizedWithdrawRequest(log types.Log) (*SDUtilityPoolFinalizedWithdrawRequest, error) { + event := new(SDUtilityPoolFinalizedWithdrawRequest) + if err := _SDUtilityPool.contract.UnpackLog(event, "FinalizedWithdrawRequest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolInitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the SDUtilityPool contract. +type SDUtilityPoolInitializedIterator struct { + Event *SDUtilityPoolInitialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolInitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolInitialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolInitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolInitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolInitialized represents a Initialized event raised by the SDUtilityPool contract. +type SDUtilityPoolInitialized struct { + Version uint8 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterInitialized(opts *bind.FilterOpts) (*SDUtilityPoolInitializedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &SDUtilityPoolInitializedIterator{contract: _SDUtilityPool.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolInitialized) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolInitialized) + if err := _SDUtilityPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// +// Solidity: event Initialized(uint8 version) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseInitialized(log types.Log) (*SDUtilityPoolInitialized, error) { + event := new(SDUtilityPoolInitialized) + if err := _SDUtilityPool.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolLiquidationCallIterator is returned from FilterLiquidationCall and is used to iterate over the raw logs and unpacked data for LiquidationCall events raised by the SDUtilityPool contract. +type SDUtilityPoolLiquidationCallIterator struct { + Event *SDUtilityPoolLiquidationCall // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolLiquidationCallIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolLiquidationCall) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolLiquidationCall) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolLiquidationCallIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolLiquidationCallIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolLiquidationCall represents a LiquidationCall event raised by the SDUtilityPool contract. +type SDUtilityPoolLiquidationCall struct { + Account common.Address + TotalLiquidationAmountInEth *big.Int + LiquidationBonusInEth *big.Int + LiquidationFeeInEth *big.Int + Liquidator common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterLiquidationCall is a free log retrieval operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. +// +// Solidity: event LiquidationCall(address indexed account, uint256 totalLiquidationAmountInEth, uint256 liquidationBonusInEth, uint256 liquidationFeeInEth, address indexed liquidator) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterLiquidationCall(opts *bind.FilterOpts, account []common.Address, liquidator []common.Address) (*SDUtilityPoolLiquidationCallIterator, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + var liquidatorRule []interface{} + for _, liquidatorItem := range liquidator { + liquidatorRule = append(liquidatorRule, liquidatorItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "LiquidationCall", accountRule, liquidatorRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolLiquidationCallIterator{contract: _SDUtilityPool.contract, event: "LiquidationCall", logs: logs, sub: sub}, nil +} + +// WatchLiquidationCall is a free log subscription operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. +// +// Solidity: event LiquidationCall(address indexed account, uint256 totalLiquidationAmountInEth, uint256 liquidationBonusInEth, uint256 liquidationFeeInEth, address indexed liquidator) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchLiquidationCall(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolLiquidationCall, account []common.Address, liquidator []common.Address) (event.Subscription, error) { + + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + + var liquidatorRule []interface{} + for _, liquidatorItem := range liquidator { + liquidatorRule = append(liquidatorRule, liquidatorItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "LiquidationCall", accountRule, liquidatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolLiquidationCall) + if err := _SDUtilityPool.contract.UnpackLog(event, "LiquidationCall", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseLiquidationCall is a log parse operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. +// +// Solidity: event LiquidationCall(address indexed account, uint256 totalLiquidationAmountInEth, uint256 liquidationBonusInEth, uint256 liquidationFeeInEth, address indexed liquidator) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseLiquidationCall(log types.Log) (*SDUtilityPoolLiquidationCall, error) { + event := new(SDUtilityPoolLiquidationCall) + if err := _SDUtilityPool.contract.UnpackLog(event, "LiquidationCall", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolPausedIterator is returned from FilterPaused and is used to iterate over the raw logs and unpacked data for Paused events raised by the SDUtilityPool contract. +type SDUtilityPoolPausedIterator struct { + Event *SDUtilityPoolPaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolPausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolPaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolPausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolPausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolPaused represents a Paused event raised by the SDUtilityPool contract. +type SDUtilityPoolPaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterPaused(opts *bind.FilterOpts) (*SDUtilityPoolPausedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Paused") + if err != nil { + return nil, err + } + return &SDUtilityPoolPausedIterator{contract: _SDUtilityPool.contract, event: "Paused", logs: logs, sub: sub}, nil +} + +// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolPaused) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Paused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolPaused) + if err := _SDUtilityPool.contract.UnpackLog(event, "Paused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// +// Solidity: event Paused(address account) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParsePaused(log types.Log) (*SDUtilityPoolPaused, error) { + event := new(SDUtilityPoolPaused) + if err := _SDUtilityPool.contract.UnpackLog(event, "Paused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolProtocolFeeFactorUpdatedIterator is returned from FilterProtocolFeeFactorUpdated and is used to iterate over the raw logs and unpacked data for ProtocolFeeFactorUpdated events raised by the SDUtilityPool contract. +type SDUtilityPoolProtocolFeeFactorUpdatedIterator struct { + Event *SDUtilityPoolProtocolFeeFactorUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolProtocolFeeFactorUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolProtocolFeeFactorUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolProtocolFeeFactorUpdated represents a ProtocolFeeFactorUpdated event raised by the SDUtilityPool contract. +type SDUtilityPoolProtocolFeeFactorUpdated struct { + ProtocolFeeFactor *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterProtocolFeeFactorUpdated is a free log retrieval operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. +// +// Solidity: event ProtocolFeeFactorUpdated(uint256 protocolFeeFactor) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterProtocolFeeFactorUpdated(opts *bind.FilterOpts) (*SDUtilityPoolProtocolFeeFactorUpdatedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "ProtocolFeeFactorUpdated") + if err != nil { + return nil, err + } + return &SDUtilityPoolProtocolFeeFactorUpdatedIterator{contract: _SDUtilityPool.contract, event: "ProtocolFeeFactorUpdated", logs: logs, sub: sub}, nil +} + +// WatchProtocolFeeFactorUpdated is a free log subscription operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. +// +// Solidity: event ProtocolFeeFactorUpdated(uint256 protocolFeeFactor) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchProtocolFeeFactorUpdated(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolProtocolFeeFactorUpdated) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "ProtocolFeeFactorUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolProtocolFeeFactorUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "ProtocolFeeFactorUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseProtocolFeeFactorUpdated is a log parse operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. +// +// Solidity: event ProtocolFeeFactorUpdated(uint256 protocolFeeFactor) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseProtocolFeeFactorUpdated(log types.Log) (*SDUtilityPoolProtocolFeeFactorUpdated, error) { + event := new(SDUtilityPoolProtocolFeeFactorUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "ProtocolFeeFactorUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRedeemedIterator is returned from FilterRedeemed and is used to iterate over the raw logs and unpacked data for Redeemed events raised by the SDUtilityPool contract. +type SDUtilityPoolRedeemedIterator struct { + Event *SDUtilityPoolRedeemed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRedeemedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRedeemed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRedeemed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRedeemedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRedeemedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRedeemed represents a Redeemed event raised by the SDUtilityPool contract. +type SDUtilityPoolRedeemed struct { + Delegator common.Address + SdAmount *big.Int + SdXAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRedeemed is a free log retrieval operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. +// +// Solidity: event Redeemed(address indexed delegator, uint256 sdAmount, uint256 sdXAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRedeemed(opts *bind.FilterOpts, delegator []common.Address) (*SDUtilityPoolRedeemedIterator, error) { + + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Redeemed", delegatorRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolRedeemedIterator{contract: _SDUtilityPool.contract, event: "Redeemed", logs: logs, sub: sub}, nil +} + +// WatchRedeemed is a free log subscription operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. +// +// Solidity: event Redeemed(address indexed delegator, uint256 sdAmount, uint256 sdXAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRedeemed(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRedeemed, delegator []common.Address) (event.Subscription, error) { + + var delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Redeemed", delegatorRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRedeemed) + if err := _SDUtilityPool.contract.UnpackLog(event, "Redeemed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRedeemed is a log parse operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. +// +// Solidity: event Redeemed(address indexed delegator, uint256 sdAmount, uint256 sdXAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRedeemed(log types.Log) (*SDUtilityPoolRedeemed, error) { + event := new(SDUtilityPoolRedeemed) + if err := _SDUtilityPool.contract.UnpackLog(event, "Redeemed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRepaidIterator is returned from FilterRepaid and is used to iterate over the raw logs and unpacked data for Repaid events raised by the SDUtilityPool contract. +type SDUtilityPoolRepaidIterator struct { + Event *SDUtilityPoolRepaid // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRepaidIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRepaid) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRepaid) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRepaidIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRepaidIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRepaid represents a Repaid event raised by the SDUtilityPool contract. +type SDUtilityPoolRepaid struct { + Utilizer common.Address + RepayAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRepaid is a free log retrieval operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. +// +// Solidity: event Repaid(address indexed utilizer, uint256 repayAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRepaid(opts *bind.FilterOpts, utilizer []common.Address) (*SDUtilityPoolRepaidIterator, error) { + + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Repaid", utilizerRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolRepaidIterator{contract: _SDUtilityPool.contract, event: "Repaid", logs: logs, sub: sub}, nil +} + +// WatchRepaid is a free log subscription operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. +// +// Solidity: event Repaid(address indexed utilizer, uint256 repayAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRepaid(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRepaid, utilizer []common.Address) (event.Subscription, error) { + + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Repaid", utilizerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRepaid) + if err := _SDUtilityPool.contract.UnpackLog(event, "Repaid", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRepaid is a log parse operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. +// +// Solidity: event Repaid(address indexed utilizer, uint256 repayAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRepaid(log types.Log) (*SDUtilityPoolRepaid, error) { + event := new(SDUtilityPoolRepaid) + if err := _SDUtilityPool.contract.UnpackLog(event, "Repaid", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRepaidUtilizedSDBalanceIterator is returned from FilterRepaidUtilizedSDBalance and is used to iterate over the raw logs and unpacked data for RepaidUtilizedSDBalance events raised by the SDUtilityPool contract. +type SDUtilityPoolRepaidUtilizedSDBalanceIterator struct { + Event *SDUtilityPoolRepaidUtilizedSDBalance // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRepaidUtilizedSDBalanceIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRepaidUtilizedSDBalance) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRepaidUtilizedSDBalance) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRepaidUtilizedSDBalanceIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRepaidUtilizedSDBalanceIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRepaidUtilizedSDBalance represents a RepaidUtilizedSDBalance event raised by the SDUtilityPool contract. +type SDUtilityPoolRepaidUtilizedSDBalance struct { + Utilizer common.Address + UtilizedSDAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRepaidUtilizedSDBalance is a free log retrieval operation binding the contract event 0x37057a3afa8d7c32b75c4534845b8e937e76c0f9cf30fbe71122af20c33646dd. +// +// Solidity: event RepaidUtilizedSDBalance(address indexed utilizer, uint256 utilizedSDAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRepaidUtilizedSDBalance(opts *bind.FilterOpts, utilizer []common.Address) (*SDUtilityPoolRepaidUtilizedSDBalanceIterator, error) { + + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RepaidUtilizedSDBalance", utilizerRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolRepaidUtilizedSDBalanceIterator{contract: _SDUtilityPool.contract, event: "RepaidUtilizedSDBalance", logs: logs, sub: sub}, nil +} + +// WatchRepaidUtilizedSDBalance is a free log subscription operation binding the contract event 0x37057a3afa8d7c32b75c4534845b8e937e76c0f9cf30fbe71122af20c33646dd. +// +// Solidity: event RepaidUtilizedSDBalance(address indexed utilizer, uint256 utilizedSDAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRepaidUtilizedSDBalance(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRepaidUtilizedSDBalance, utilizer []common.Address) (event.Subscription, error) { + + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RepaidUtilizedSDBalance", utilizerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRepaidUtilizedSDBalance) + if err := _SDUtilityPool.contract.UnpackLog(event, "RepaidUtilizedSDBalance", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRepaidUtilizedSDBalance is a log parse operation binding the contract event 0x37057a3afa8d7c32b75c4534845b8e937e76c0f9cf30fbe71122af20c33646dd. +// +// Solidity: event RepaidUtilizedSDBalance(address indexed utilizer, uint256 utilizedSDAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRepaidUtilizedSDBalance(log types.Log) (*SDUtilityPoolRepaidUtilizedSDBalance, error) { + event := new(SDUtilityPoolRepaidUtilizedSDBalance) + if err := _SDUtilityPool.contract.UnpackLog(event, "RepaidUtilizedSDBalance", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRequestRedeemedIterator is returned from FilterRequestRedeemed and is used to iterate over the raw logs and unpacked data for RequestRedeemed events raised by the SDUtilityPool contract. +type SDUtilityPoolRequestRedeemedIterator struct { + Event *SDUtilityPoolRequestRedeemed // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRequestRedeemedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRequestRedeemed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRequestRedeemed) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRequestRedeemedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRequestRedeemedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRequestRedeemed represents a RequestRedeemed event raised by the SDUtilityPool contract. +type SDUtilityPoolRequestRedeemed struct { + Caller common.Address + SdToTransfer *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRequestRedeemed is a free log retrieval operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. +// +// Solidity: event RequestRedeemed(address caller, uint256 sdToTransfer) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRequestRedeemed(opts *bind.FilterOpts) (*SDUtilityPoolRequestRedeemedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RequestRedeemed") + if err != nil { + return nil, err + } + return &SDUtilityPoolRequestRedeemedIterator{contract: _SDUtilityPool.contract, event: "RequestRedeemed", logs: logs, sub: sub}, nil +} + +// WatchRequestRedeemed is a free log subscription operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. +// +// Solidity: event RequestRedeemed(address caller, uint256 sdToTransfer) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRequestRedeemed(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRequestRedeemed) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RequestRedeemed") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRequestRedeemed) + if err := _SDUtilityPool.contract.UnpackLog(event, "RequestRedeemed", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRequestRedeemed is a log parse operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. +// +// Solidity: event RequestRedeemed(address caller, uint256 sdToTransfer) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRequestRedeemed(log types.Log) (*SDUtilityPoolRequestRedeemed, error) { + event := new(SDUtilityPoolRequestRedeemed) + if err := _SDUtilityPool.contract.UnpackLog(event, "RequestRedeemed", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRiskConfigUpdatedIterator is returned from FilterRiskConfigUpdated and is used to iterate over the raw logs and unpacked data for RiskConfigUpdated events raised by the SDUtilityPool contract. +type SDUtilityPoolRiskConfigUpdatedIterator struct { + Event *SDUtilityPoolRiskConfigUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRiskConfigUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRiskConfigUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRiskConfigUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRiskConfigUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRiskConfigUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRiskConfigUpdated represents a RiskConfigUpdated event raised by the SDUtilityPool contract. +type SDUtilityPoolRiskConfigUpdated struct { + LiquidationThreshold *big.Int + LiquidationBonusPercent *big.Int + LiquidationFeePercent *big.Int + Ltv *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRiskConfigUpdated is a free log retrieval operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. +// +// Solidity: event RiskConfigUpdated(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRiskConfigUpdated(opts *bind.FilterOpts) (*SDUtilityPoolRiskConfigUpdatedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RiskConfigUpdated") + if err != nil { + return nil, err + } + return &SDUtilityPoolRiskConfigUpdatedIterator{contract: _SDUtilityPool.contract, event: "RiskConfigUpdated", logs: logs, sub: sub}, nil +} + +// WatchRiskConfigUpdated is a free log subscription operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. +// +// Solidity: event RiskConfigUpdated(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRiskConfigUpdated(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRiskConfigUpdated) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RiskConfigUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRiskConfigUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "RiskConfigUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRiskConfigUpdated is a log parse operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. +// +// Solidity: event RiskConfigUpdated(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRiskConfigUpdated(log types.Log) (*SDUtilityPoolRiskConfigUpdated, error) { + event := new(SDUtilityPoolRiskConfigUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "RiskConfigUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRoleAdminChangedIterator is returned from FilterRoleAdminChanged and is used to iterate over the raw logs and unpacked data for RoleAdminChanged events raised by the SDUtilityPool contract. +type SDUtilityPoolRoleAdminChangedIterator struct { + Event *SDUtilityPoolRoleAdminChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRoleAdminChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRoleAdminChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRoleAdminChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRoleAdminChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRoleAdminChanged represents a RoleAdminChanged event raised by the SDUtilityPool contract. +type SDUtilityPoolRoleAdminChanged struct { + Role [32]byte + PreviousAdminRole [32]byte + NewAdminRole [32]byte + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRoleAdminChanged(opts *bind.FilterOpts, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (*SDUtilityPoolRoleAdminChangedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolRoleAdminChangedIterator{contract: _SDUtilityPool.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil +} + +// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleAdminChanged(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRoleAdminChanged, role [][32]byte, previousAdminRole [][32]byte, newAdminRole [][32]byte) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var previousAdminRoleRule []interface{} + for _, previousAdminRoleItem := range previousAdminRole { + previousAdminRoleRule = append(previousAdminRoleRule, previousAdminRoleItem) + } + var newAdminRoleRule []interface{} + for _, newAdminRoleItem := range newAdminRole { + newAdminRoleRule = append(newAdminRoleRule, newAdminRoleItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRoleAdminChanged) + if err := _SDUtilityPool.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// +// Solidity: event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRoleAdminChanged(log types.Log) (*SDUtilityPoolRoleAdminChanged, error) { + event := new(SDUtilityPoolRoleAdminChanged) + if err := _SDUtilityPool.contract.UnpackLog(event, "RoleAdminChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRoleGrantedIterator is returned from FilterRoleGranted and is used to iterate over the raw logs and unpacked data for RoleGranted events raised by the SDUtilityPool contract. +type SDUtilityPoolRoleGrantedIterator struct { + Event *SDUtilityPoolRoleGranted // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRoleGrantedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRoleGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRoleGranted) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRoleGrantedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRoleGrantedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRoleGranted represents a RoleGranted event raised by the SDUtilityPool contract. +type SDUtilityPoolRoleGranted struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRoleGranted(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*SDUtilityPoolRoleGrantedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolRoleGrantedIterator{contract: _SDUtilityPool.contract, event: "RoleGranted", logs: logs, sub: sub}, nil +} + +// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleGranted(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRoleGranted, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRoleGranted) + if err := _SDUtilityPool.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// +// Solidity: event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRoleGranted(log types.Log) (*SDUtilityPoolRoleGranted, error) { + event := new(SDUtilityPoolRoleGranted) + if err := _SDUtilityPool.contract.UnpackLog(event, "RoleGranted", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolRoleRevokedIterator is returned from FilterRoleRevoked and is used to iterate over the raw logs and unpacked data for RoleRevoked events raised by the SDUtilityPool contract. +type SDUtilityPoolRoleRevokedIterator struct { + Event *SDUtilityPoolRoleRevoked // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolRoleRevokedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRoleRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolRoleRevoked) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolRoleRevokedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolRoleRevokedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolRoleRevoked represents a RoleRevoked event raised by the SDUtilityPool contract. +type SDUtilityPoolRoleRevoked struct { + Role [32]byte + Account common.Address + Sender common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRoleRevoked(opts *bind.FilterOpts, role [][32]byte, account []common.Address, sender []common.Address) (*SDUtilityPoolRoleRevokedIterator, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolRoleRevokedIterator{contract: _SDUtilityPool.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil +} + +// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleRevoked(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRoleRevoked, role [][32]byte, account []common.Address, sender []common.Address) (event.Subscription, error) { + + var roleRule []interface{} + for _, roleItem := range role { + roleRule = append(roleRule, roleItem) + } + var accountRule []interface{} + for _, accountItem := range account { + accountRule = append(accountRule, accountItem) + } + var senderRule []interface{} + for _, senderItem := range sender { + senderRule = append(senderRule, senderItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolRoleRevoked) + if err := _SDUtilityPool.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// +// Solidity: event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseRoleRevoked(log types.Log) (*SDUtilityPoolRoleRevoked, error) { + event := new(SDUtilityPoolRoleRevoked) + if err := _SDUtilityPool.contract.UnpackLog(event, "RoleRevoked", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolSDUtilizedIterator is returned from FilterSDUtilized and is used to iterate over the raw logs and unpacked data for SDUtilized events raised by the SDUtilityPool contract. +type SDUtilityPoolSDUtilizedIterator struct { + Event *SDUtilityPoolSDUtilized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolSDUtilizedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolSDUtilized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolSDUtilized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolSDUtilizedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolSDUtilizedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolSDUtilized represents a SDUtilized event raised by the SDUtilityPool contract. +type SDUtilityPoolSDUtilized struct { + Utilizer common.Address + UtilizeAmount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterSDUtilized is a free log retrieval operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. +// +// Solidity: event SDUtilized(address utilizer, uint256 utilizeAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterSDUtilized(opts *bind.FilterOpts) (*SDUtilityPoolSDUtilizedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "SDUtilized") + if err != nil { + return nil, err + } + return &SDUtilityPoolSDUtilizedIterator{contract: _SDUtilityPool.contract, event: "SDUtilized", logs: logs, sub: sub}, nil +} + +// WatchSDUtilized is a free log subscription operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. +// +// Solidity: event SDUtilized(address utilizer, uint256 utilizeAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchSDUtilized(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolSDUtilized) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "SDUtilized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolSDUtilized) + if err := _SDUtilityPool.contract.UnpackLog(event, "SDUtilized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseSDUtilized is a log parse operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. +// +// Solidity: event SDUtilized(address utilizer, uint256 utilizeAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseSDUtilized(log types.Log) (*SDUtilityPoolSDUtilized, error) { + event := new(SDUtilityPoolSDUtilized) + if err := _SDUtilityPool.contract.UnpackLog(event, "SDUtilized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUnpausedIterator is returned from FilterUnpaused and is used to iterate over the raw logs and unpacked data for Unpaused events raised by the SDUtilityPool contract. +type SDUtilityPoolUnpausedIterator struct { + Event *SDUtilityPoolUnpaused // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUnpausedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUnpaused) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUnpausedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUnpausedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUnpaused represents a Unpaused event raised by the SDUtilityPool contract. +type SDUtilityPoolUnpaused struct { + Account common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUnpaused(opts *bind.FilterOpts) (*SDUtilityPoolUnpausedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return &SDUtilityPoolUnpausedIterator{contract: _SDUtilityPool.contract, event: "Unpaused", logs: logs, sub: sub}, nil +} + +// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUnpaused) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Unpaused") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUnpaused) + if err := _SDUtilityPool.contract.UnpackLog(event, "Unpaused", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// +// Solidity: event Unpaused(address account) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUnpaused(log types.Log) (*SDUtilityPoolUnpaused, error) { + event := new(SDUtilityPoolUnpaused) + if err := _SDUtilityPool.contract.UnpackLog(event, "Unpaused", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUpdatedConservativeEthPerKeyIterator is returned from FilterUpdatedConservativeEthPerKey and is used to iterate over the raw logs and unpacked data for UpdatedConservativeEthPerKey events raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedConservativeEthPerKeyIterator struct { + Event *SDUtilityPoolUpdatedConservativeEthPerKey // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUpdatedConservativeEthPerKeyIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedConservativeEthPerKey) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedConservativeEthPerKey) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUpdatedConservativeEthPerKeyIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUpdatedConservativeEthPerKeyIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUpdatedConservativeEthPerKey represents a UpdatedConservativeEthPerKey event raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedConservativeEthPerKey struct { + ConservativeEthPerKey *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedConservativeEthPerKey is a free log retrieval operation binding the contract event 0x475227c841ac4234d6b624ffe157a80f62c0b4d66161f98684c2fc2ad79bdf52. +// +// Solidity: event UpdatedConservativeEthPerKey(uint256 conservativeEthPerKey) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUpdatedConservativeEthPerKey(opts *bind.FilterOpts) (*SDUtilityPoolUpdatedConservativeEthPerKeyIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UpdatedConservativeEthPerKey") + if err != nil { + return nil, err + } + return &SDUtilityPoolUpdatedConservativeEthPerKeyIterator{contract: _SDUtilityPool.contract, event: "UpdatedConservativeEthPerKey", logs: logs, sub: sub}, nil +} + +// WatchUpdatedConservativeEthPerKey is a free log subscription operation binding the contract event 0x475227c841ac4234d6b624ffe157a80f62c0b4d66161f98684c2fc2ad79bdf52. +// +// Solidity: event UpdatedConservativeEthPerKey(uint256 conservativeEthPerKey) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUpdatedConservativeEthPerKey(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUpdatedConservativeEthPerKey) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UpdatedConservativeEthPerKey") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUpdatedConservativeEthPerKey) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedConservativeEthPerKey", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdatedConservativeEthPerKey is a log parse operation binding the contract event 0x475227c841ac4234d6b624ffe157a80f62c0b4d66161f98684c2fc2ad79bdf52. +// +// Solidity: event UpdatedConservativeEthPerKey(uint256 conservativeEthPerKey) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUpdatedConservativeEthPerKey(log types.Log) (*SDUtilityPoolUpdatedConservativeEthPerKey, error) { + event := new(SDUtilityPoolUpdatedConservativeEthPerKey) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedConservativeEthPerKey", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUpdatedFinalizationBatchLimitIterator is returned from FilterUpdatedFinalizationBatchLimit and is used to iterate over the raw logs and unpacked data for UpdatedFinalizationBatchLimit events raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedFinalizationBatchLimitIterator struct { + Event *SDUtilityPoolUpdatedFinalizationBatchLimit // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUpdatedFinalizationBatchLimitIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedFinalizationBatchLimit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedFinalizationBatchLimit) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUpdatedFinalizationBatchLimitIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUpdatedFinalizationBatchLimitIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUpdatedFinalizationBatchLimit represents a UpdatedFinalizationBatchLimit event raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedFinalizationBatchLimit struct { + FinalizationBatchLimit *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedFinalizationBatchLimit is a free log retrieval operation binding the contract event 0x7ffbe87ac4b7820fd4ca4ac8c7c7820cc79c7cdd9631ac083c06bb833be63587. +// +// Solidity: event UpdatedFinalizationBatchLimit(uint256 finalizationBatchLimit) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUpdatedFinalizationBatchLimit(opts *bind.FilterOpts) (*SDUtilityPoolUpdatedFinalizationBatchLimitIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UpdatedFinalizationBatchLimit") + if err != nil { + return nil, err + } + return &SDUtilityPoolUpdatedFinalizationBatchLimitIterator{contract: _SDUtilityPool.contract, event: "UpdatedFinalizationBatchLimit", logs: logs, sub: sub}, nil +} + +// WatchUpdatedFinalizationBatchLimit is a free log subscription operation binding the contract event 0x7ffbe87ac4b7820fd4ca4ac8c7c7820cc79c7cdd9631ac083c06bb833be63587. +// +// Solidity: event UpdatedFinalizationBatchLimit(uint256 finalizationBatchLimit) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUpdatedFinalizationBatchLimit(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUpdatedFinalizationBatchLimit) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UpdatedFinalizationBatchLimit") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUpdatedFinalizationBatchLimit) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedFinalizationBatchLimit", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdatedFinalizationBatchLimit is a log parse operation binding the contract event 0x7ffbe87ac4b7820fd4ca4ac8c7c7820cc79c7cdd9631ac083c06bb833be63587. +// +// Solidity: event UpdatedFinalizationBatchLimit(uint256 finalizationBatchLimit) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUpdatedFinalizationBatchLimit(log types.Log) (*SDUtilityPoolUpdatedFinalizationBatchLimit, error) { + event := new(SDUtilityPoolUpdatedFinalizationBatchLimit) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedFinalizationBatchLimit", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator is returned from FilterUpdatedMaxETHWorthOfSDPerValidator and is used to iterate over the raw logs and unpacked data for UpdatedMaxETHWorthOfSDPerValidator events raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator struct { + Event *SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator represents a UpdatedMaxETHWorthOfSDPerValidator event raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator struct { + MaxETHWorthOfSDPerValidator *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedMaxETHWorthOfSDPerValidator is a free log retrieval operation binding the contract event 0x9491876f555a700a2938143a5a27937708ab194a6f8d94cd7eb8eefae92f34f5. +// +// Solidity: event UpdatedMaxETHWorthOfSDPerValidator(uint256 maxETHWorthOfSDPerValidator) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUpdatedMaxETHWorthOfSDPerValidator(opts *bind.FilterOpts) (*SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UpdatedMaxETHWorthOfSDPerValidator") + if err != nil { + return nil, err + } + return &SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidatorIterator{contract: _SDUtilityPool.contract, event: "UpdatedMaxETHWorthOfSDPerValidator", logs: logs, sub: sub}, nil +} + +// WatchUpdatedMaxETHWorthOfSDPerValidator is a free log subscription operation binding the contract event 0x9491876f555a700a2938143a5a27937708ab194a6f8d94cd7eb8eefae92f34f5. +// +// Solidity: event UpdatedMaxETHWorthOfSDPerValidator(uint256 maxETHWorthOfSDPerValidator) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUpdatedMaxETHWorthOfSDPerValidator(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UpdatedMaxETHWorthOfSDPerValidator") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedMaxETHWorthOfSDPerValidator", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdatedMaxETHWorthOfSDPerValidator is a log parse operation binding the contract event 0x9491876f555a700a2938143a5a27937708ab194a6f8d94cd7eb8eefae92f34f5. +// +// Solidity: event UpdatedMaxETHWorthOfSDPerValidator(uint256 maxETHWorthOfSDPerValidator) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUpdatedMaxETHWorthOfSDPerValidator(log types.Log) (*SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator, error) { + event := new(SDUtilityPoolUpdatedMaxETHWorthOfSDPerValidator) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedMaxETHWorthOfSDPerValidator", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator is returned from FilterUpdatedMaxNonRedeemedDelegatorRequestCount and is used to iterate over the raw logs and unpacked data for UpdatedMaxNonRedeemedDelegatorRequestCount events raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator struct { + Event *SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount represents a UpdatedMaxNonRedeemedDelegatorRequestCount event raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount struct { + Count *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedMaxNonRedeemedDelegatorRequestCount is a free log retrieval operation binding the contract event 0x620864df809b46dfaffcfb35289f5efd1abd7c309562a0bdb89ee19903b2ed10. +// +// Solidity: event UpdatedMaxNonRedeemedDelegatorRequestCount(uint256 count) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUpdatedMaxNonRedeemedDelegatorRequestCount(opts *bind.FilterOpts) (*SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UpdatedMaxNonRedeemedDelegatorRequestCount") + if err != nil { + return nil, err + } + return &SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCountIterator{contract: _SDUtilityPool.contract, event: "UpdatedMaxNonRedeemedDelegatorRequestCount", logs: logs, sub: sub}, nil +} + +// WatchUpdatedMaxNonRedeemedDelegatorRequestCount is a free log subscription operation binding the contract event 0x620864df809b46dfaffcfb35289f5efd1abd7c309562a0bdb89ee19903b2ed10. +// +// Solidity: event UpdatedMaxNonRedeemedDelegatorRequestCount(uint256 count) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUpdatedMaxNonRedeemedDelegatorRequestCount(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UpdatedMaxNonRedeemedDelegatorRequestCount") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedMaxNonRedeemedDelegatorRequestCount", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdatedMaxNonRedeemedDelegatorRequestCount is a log parse operation binding the contract event 0x620864df809b46dfaffcfb35289f5efd1abd7c309562a0bdb89ee19903b2ed10. +// +// Solidity: event UpdatedMaxNonRedeemedDelegatorRequestCount(uint256 count) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUpdatedMaxNonRedeemedDelegatorRequestCount(log types.Log) (*SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount, error) { + event := new(SDUtilityPoolUpdatedMaxNonRedeemedDelegatorRequestCount) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedMaxNonRedeemedDelegatorRequestCount", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator is returned from FilterUpdatedMinBlockDelayToFinalizeRequest and is used to iterate over the raw logs and unpacked data for UpdatedMinBlockDelayToFinalizeRequest events raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator struct { + Event *SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest represents a UpdatedMinBlockDelayToFinalizeRequest event raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest struct { + MinBlockDelayToFinalizeRequest *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedMinBlockDelayToFinalizeRequest is a free log retrieval operation binding the contract event 0xaa3bf534da453100a74c0c499340ebed87ce7f16483706a8b1e5ca11b9982789. +// +// Solidity: event UpdatedMinBlockDelayToFinalizeRequest(uint256 minBlockDelayToFinalizeRequest) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUpdatedMinBlockDelayToFinalizeRequest(opts *bind.FilterOpts) (*SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UpdatedMinBlockDelayToFinalizeRequest") + if err != nil { + return nil, err + } + return &SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequestIterator{contract: _SDUtilityPool.contract, event: "UpdatedMinBlockDelayToFinalizeRequest", logs: logs, sub: sub}, nil +} + +// WatchUpdatedMinBlockDelayToFinalizeRequest is a free log subscription operation binding the contract event 0xaa3bf534da453100a74c0c499340ebed87ce7f16483706a8b1e5ca11b9982789. +// +// Solidity: event UpdatedMinBlockDelayToFinalizeRequest(uint256 minBlockDelayToFinalizeRequest) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUpdatedMinBlockDelayToFinalizeRequest(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UpdatedMinBlockDelayToFinalizeRequest") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedMinBlockDelayToFinalizeRequest", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdatedMinBlockDelayToFinalizeRequest is a log parse operation binding the contract event 0xaa3bf534da453100a74c0c499340ebed87ce7f16483706a8b1e5ca11b9982789. +// +// Solidity: event UpdatedMinBlockDelayToFinalizeRequest(uint256 minBlockDelayToFinalizeRequest) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUpdatedMinBlockDelayToFinalizeRequest(log types.Log) (*SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest, error) { + event := new(SDUtilityPoolUpdatedMinBlockDelayToFinalizeRequest) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedMinBlockDelayToFinalizeRequest", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUpdatedStaderConfigIterator is returned from FilterUpdatedStaderConfig and is used to iterate over the raw logs and unpacked data for UpdatedStaderConfig events raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedStaderConfigIterator struct { + Event *SDUtilityPoolUpdatedStaderConfig // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUpdatedStaderConfigIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedStaderConfig) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUpdatedStaderConfig) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUpdatedStaderConfigIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUpdatedStaderConfigIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUpdatedStaderConfig represents a UpdatedStaderConfig event raised by the SDUtilityPool contract. +type SDUtilityPoolUpdatedStaderConfig struct { + StaderConfig common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpdatedStaderConfig is a free log retrieval operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. +// +// Solidity: event UpdatedStaderConfig(address indexed _staderConfig) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUpdatedStaderConfig(opts *bind.FilterOpts, _staderConfig []common.Address) (*SDUtilityPoolUpdatedStaderConfigIterator, error) { + + var _staderConfigRule []interface{} + for _, _staderConfigItem := range _staderConfig { + _staderConfigRule = append(_staderConfigRule, _staderConfigItem) + } + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UpdatedStaderConfig", _staderConfigRule) + if err != nil { + return nil, err + } + return &SDUtilityPoolUpdatedStaderConfigIterator{contract: _SDUtilityPool.contract, event: "UpdatedStaderConfig", logs: logs, sub: sub}, nil +} + +// WatchUpdatedStaderConfig is a free log subscription operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. +// +// Solidity: event UpdatedStaderConfig(address indexed _staderConfig) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUpdatedStaderConfig(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUpdatedStaderConfig, _staderConfig []common.Address) (event.Subscription, error) { + + var _staderConfigRule []interface{} + for _, _staderConfigItem := range _staderConfig { + _staderConfigRule = append(_staderConfigRule, _staderConfigItem) + } + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UpdatedStaderConfig", _staderConfigRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUpdatedStaderConfig) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedStaderConfig", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpdatedStaderConfig is a log parse operation binding the contract event 0xdb2219043d7b197cb235f1af0cf6d782d77dee3de19e3f4fb6d39aae633b4485. +// +// Solidity: event UpdatedStaderConfig(address indexed _staderConfig) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUpdatedStaderConfig(log types.Log) (*SDUtilityPoolUpdatedStaderConfig, error) { + event := new(SDUtilityPoolUpdatedStaderConfig) + if err := _SDUtilityPool.contract.UnpackLog(event, "UpdatedStaderConfig", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolUtilizationRatePerBlockUpdatedIterator is returned from FilterUtilizationRatePerBlockUpdated and is used to iterate over the raw logs and unpacked data for UtilizationRatePerBlockUpdated events raised by the SDUtilityPool contract. +type SDUtilityPoolUtilizationRatePerBlockUpdatedIterator struct { + Event *SDUtilityPoolUtilizationRatePerBlockUpdated // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolUtilizationRatePerBlockUpdatedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUtilizationRatePerBlockUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolUtilizationRatePerBlockUpdated) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolUtilizationRatePerBlockUpdatedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolUtilizationRatePerBlockUpdatedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolUtilizationRatePerBlockUpdated represents a UtilizationRatePerBlockUpdated event raised by the SDUtilityPool contract. +type SDUtilityPoolUtilizationRatePerBlockUpdated struct { + UtilizationRatePerBlock *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUtilizationRatePerBlockUpdated is a free log retrieval operation binding the contract event 0x3d9659ac5decde6b265b661cde27cd4a357992c35cfa014eb789ad7cbe89ff8b. +// +// Solidity: event UtilizationRatePerBlockUpdated(uint256 utilizationRatePerBlock) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUtilizationRatePerBlockUpdated(opts *bind.FilterOpts) (*SDUtilityPoolUtilizationRatePerBlockUpdatedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "UtilizationRatePerBlockUpdated") + if err != nil { + return nil, err + } + return &SDUtilityPoolUtilizationRatePerBlockUpdatedIterator{contract: _SDUtilityPool.contract, event: "UtilizationRatePerBlockUpdated", logs: logs, sub: sub}, nil +} + +// WatchUtilizationRatePerBlockUpdated is a free log subscription operation binding the contract event 0x3d9659ac5decde6b265b661cde27cd4a357992c35cfa014eb789ad7cbe89ff8b. +// +// Solidity: event UtilizationRatePerBlockUpdated(uint256 utilizationRatePerBlock) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUtilizationRatePerBlockUpdated(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUtilizationRatePerBlockUpdated) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "UtilizationRatePerBlockUpdated") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolUtilizationRatePerBlockUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "UtilizationRatePerBlockUpdated", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUtilizationRatePerBlockUpdated is a log parse operation binding the contract event 0x3d9659ac5decde6b265b661cde27cd4a357992c35cfa014eb789ad7cbe89ff8b. +// +// Solidity: event UtilizationRatePerBlockUpdated(uint256 utilizationRatePerBlock) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseUtilizationRatePerBlockUpdated(log types.Log) (*SDUtilityPoolUtilizationRatePerBlockUpdated, error) { + event := new(SDUtilityPoolUtilizationRatePerBlockUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "UtilizationRatePerBlockUpdated", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolWithdrawRequestReceivedIterator is returned from FilterWithdrawRequestReceived and is used to iterate over the raw logs and unpacked data for WithdrawRequestReceived events raised by the SDUtilityPool contract. +type SDUtilityPoolWithdrawRequestReceivedIterator struct { + Event *SDUtilityPoolWithdrawRequestReceived // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolWithdrawRequestReceivedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolWithdrawRequestReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolWithdrawRequestReceived) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolWithdrawRequestReceivedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolWithdrawRequestReceivedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolWithdrawRequestReceived represents a WithdrawRequestReceived event raised by the SDUtilityPool contract. +type SDUtilityPoolWithdrawRequestReceived struct { + Caller common.Address + NextRequestId *big.Int + SdAmountToWithdraw *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawRequestReceived is a free log retrieval operation binding the contract event 0x0edfc24f4f80277416f78f699d4733f7bb58fd6fb8838e2b1033162cee5fd7aa. +// +// Solidity: event WithdrawRequestReceived(address caller, uint256 nextRequestId, uint256 sdAmountToWithdraw) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterWithdrawRequestReceived(opts *bind.FilterOpts) (*SDUtilityPoolWithdrawRequestReceivedIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "WithdrawRequestReceived") + if err != nil { + return nil, err + } + return &SDUtilityPoolWithdrawRequestReceivedIterator{contract: _SDUtilityPool.contract, event: "WithdrawRequestReceived", logs: logs, sub: sub}, nil +} + +// WatchWithdrawRequestReceived is a free log subscription operation binding the contract event 0x0edfc24f4f80277416f78f699d4733f7bb58fd6fb8838e2b1033162cee5fd7aa. +// +// Solidity: event WithdrawRequestReceived(address caller, uint256 nextRequestId, uint256 sdAmountToWithdraw) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchWithdrawRequestReceived(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolWithdrawRequestReceived) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "WithdrawRequestReceived") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolWithdrawRequestReceived) + if err := _SDUtilityPool.contract.UnpackLog(event, "WithdrawRequestReceived", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawRequestReceived is a log parse operation binding the contract event 0x0edfc24f4f80277416f78f699d4733f7bb58fd6fb8838e2b1033162cee5fd7aa. +// +// Solidity: event WithdrawRequestReceived(address caller, uint256 nextRequestId, uint256 sdAmountToWithdraw) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseWithdrawRequestReceived(log types.Log) (*SDUtilityPoolWithdrawRequestReceived, error) { + event := new(SDUtilityPoolWithdrawRequestReceived) + if err := _SDUtilityPool.contract.UnpackLog(event, "WithdrawRequestReceived", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// SDUtilityPoolWithdrawnProtocolFeeIterator is returned from FilterWithdrawnProtocolFee and is used to iterate over the raw logs and unpacked data for WithdrawnProtocolFee events raised by the SDUtilityPool contract. +type SDUtilityPoolWithdrawnProtocolFeeIterator struct { + Event *SDUtilityPoolWithdrawnProtocolFee // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *SDUtilityPoolWithdrawnProtocolFeeIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolWithdrawnProtocolFee) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(SDUtilityPoolWithdrawnProtocolFee) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *SDUtilityPoolWithdrawnProtocolFeeIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *SDUtilityPoolWithdrawnProtocolFeeIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// SDUtilityPoolWithdrawnProtocolFee represents a WithdrawnProtocolFee event raised by the SDUtilityPool contract. +type SDUtilityPoolWithdrawnProtocolFee struct { + Amount *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWithdrawnProtocolFee is a free log retrieval operation binding the contract event 0xa32a67c2a472d948ee4cdcce3fdf2df7a9a99b762c69858f0651b1b22067efdf. +// +// Solidity: event WithdrawnProtocolFee(uint256 amount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterWithdrawnProtocolFee(opts *bind.FilterOpts) (*SDUtilityPoolWithdrawnProtocolFeeIterator, error) { + + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "WithdrawnProtocolFee") + if err != nil { + return nil, err + } + return &SDUtilityPoolWithdrawnProtocolFeeIterator{contract: _SDUtilityPool.contract, event: "WithdrawnProtocolFee", logs: logs, sub: sub}, nil +} + +// WatchWithdrawnProtocolFee is a free log subscription operation binding the contract event 0xa32a67c2a472d948ee4cdcce3fdf2df7a9a99b762c69858f0651b1b22067efdf. +// +// Solidity: event WithdrawnProtocolFee(uint256 amount) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchWithdrawnProtocolFee(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolWithdrawnProtocolFee) (event.Subscription, error) { + + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "WithdrawnProtocolFee") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(SDUtilityPoolWithdrawnProtocolFee) + if err := _SDUtilityPool.contract.UnpackLog(event, "WithdrawnProtocolFee", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseWithdrawnProtocolFee is a log parse operation binding the contract event 0xa32a67c2a472d948ee4cdcce3fdf2df7a9a99b762c69858f0651b1b22067efdf. +// +// Solidity: event WithdrawnProtocolFee(uint256 amount) +func (_SDUtilityPool *SDUtilityPoolFilterer) ParseWithdrawnProtocolFee(log types.Log) (*SDUtilityPoolWithdrawnProtocolFee, error) { + event := new(SDUtilityPoolWithdrawnProtocolFee) + if err := _SDUtilityPool.contract.UnpackLog(event, "WithdrawnProtocolFee", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/stader-lib/contracts/socializing-pool.go b/stader-lib/contracts/socializing-pool.go index b0c619251..eeb9d6f46 100644 --- a/stader-lib/contracts/socializing-pool.go +++ b/stader-lib/contracts/socializing-pool.go @@ -43,7 +43,7 @@ type RewardsData struct { // SocializingPoolMetaData contains all meta data concerning the SocializingPool contract. var SocializingPoolMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotStaderContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ETHTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FutureCycleIndex\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientETHRewards\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientSDRewards\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCycleIndex\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cycle\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"cycle\",\"type\":\"uint256\"}],\"name\":\"RewardAlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardAlreadyHandled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ETHReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdRewards\",\"type\":\"uint256\"}],\"name\":\"OperatorRewardsClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalETHRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSDRewards\",\"type\":\"uint256\"}],\"name\":\"OperatorRewardsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"}],\"name\":\"ProtocolETHRewardsTransferred\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderOperatorRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedStaderOperatorRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderValidatorRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedStaderValidatorRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"}],\"name\":\"UserETHRewardsTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_index\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amountSD\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amountETH\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_merkleProof\",\"type\":\"bytes32[][]\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimedRewards\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentRewardsIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getRewardCycleDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"currentIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentStartBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentEndBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"reportingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"operatorETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"operatorSDRewards\",\"type\":\"uint256\"}],\"internalType\":\"structRewardsData\",\"name\":\"_rewardsData\",\"type\":\"tuple\"}],\"name\":\"handleRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"handledRewards\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":[],\"name\":\"initialBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastReportedRewardsData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reportingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"operatorETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"operatorSDRewards\",\"type\":\"uint256\"}],\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardsDataMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reportingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"operatorETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"operatorSDRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalOperatorETHRewardsRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalOperatorSDRewardsRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountETH\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"_merkleProof\",\"type\":\"bytes32[]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"CallerNotManager\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotStaderContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ETHTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FutureCycleIndex\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientETHRewards\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientSDRewards\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCycleIndex\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"cycle\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"cycle\",\"type\":\"uint256\"}],\"name\":\"RewardAlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"RewardAlreadyHandled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"ETHReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdRewards\",\"type\":\"uint256\"}],\"name\":\"OperatorRewardsClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalETHRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"sdRewards\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"totalSDRewards\",\"type\":\"uint256\"}],\"name\":\"OperatorRewardsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"}],\"name\":\"ProtocolETHRewardsTransferred\",\"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\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderConfig\",\"type\":\"address\"}],\"name\":\"UpdatedStaderConfig\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderOperatorRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedStaderOperatorRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"staderValidatorRegistry\",\"type\":\"address\"}],\"name\":\"UpdatedStaderValidatorRegistry\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethRewards\",\"type\":\"uint256\"}],\"name\":\"UserETHRewardsTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_index\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amountSD\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amountETH\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_merkleProof\",\"type\":\"bytes32[][]\"}],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_index\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amountSD\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amountETH\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes32[][]\",\"name\":\"_merkleProof\",\"type\":\"bytes32[][]\"}],\"name\":\"claimAndDepositSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"claimedRewards\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentRewardsIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"}],\"name\":\"getRewardCycleDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"_startBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_endBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardDetails\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"currentIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentStartBlock\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"currentEndBlock\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"reportingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"operatorETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"operatorSDRewards\",\"type\":\"uint256\"}],\"internalType\":\"structRewardsData\",\"name\":\"_rewardsData\",\"type\":\"tuple\"}],\"name\":\"handleRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"handledRewards\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"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\":[],\"name\":\"initialBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastReportedRewardsData\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reportingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"operatorETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"operatorSDRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxApproveSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"rewardsDataMap\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"reportingBlockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"},{\"internalType\":\"uint8\",\"name\":\"poolId\",\"type\":\"uint8\"},{\"internalType\":\"uint256\",\"name\":\"operatorETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"userETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"protocolETHRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"operatorSDRewards\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"staderConfig\",\"outputs\":[{\"internalType\":\"contractIStaderConfig\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalOperatorETHRewardsRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalOperatorSDRewardsRemaining\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderConfig\",\"type\":\"address\"}],\"name\":\"updateStaderConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_index\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amountSD\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_amountETH\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"_merkleProof\",\"type\":\"bytes32[]\"}],\"name\":\"verifyProof\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", } // SocializingPoolABI is the input ABI used to generate the binding from. @@ -861,6 +861,27 @@ func (_SocializingPool *SocializingPoolTransactorSession) Claim(_index []*big.In return _SocializingPool.Contract.Claim(&_SocializingPool.TransactOpts, _index, _amountSD, _amountETH, _merkleProof) } +// ClaimAndDepositSD is a paid mutator transaction binding the contract method 0x9cf5df42. +// +// Solidity: function claimAndDepositSD(uint256[] _index, uint256[] _amountSD, uint256[] _amountETH, bytes32[][] _merkleProof) returns() +func (_SocializingPool *SocializingPoolTransactor) ClaimAndDepositSD(opts *bind.TransactOpts, _index []*big.Int, _amountSD []*big.Int, _amountETH []*big.Int, _merkleProof [][][32]byte) (*types.Transaction, error) { + return _SocializingPool.contract.Transact(opts, "claimAndDepositSD", _index, _amountSD, _amountETH, _merkleProof) +} + +// ClaimAndDepositSD is a paid mutator transaction binding the contract method 0x9cf5df42. +// +// Solidity: function claimAndDepositSD(uint256[] _index, uint256[] _amountSD, uint256[] _amountETH, bytes32[][] _merkleProof) returns() +func (_SocializingPool *SocializingPoolSession) ClaimAndDepositSD(_index []*big.Int, _amountSD []*big.Int, _amountETH []*big.Int, _merkleProof [][][32]byte) (*types.Transaction, error) { + return _SocializingPool.Contract.ClaimAndDepositSD(&_SocializingPool.TransactOpts, _index, _amountSD, _amountETH, _merkleProof) +} + +// ClaimAndDepositSD is a paid mutator transaction binding the contract method 0x9cf5df42. +// +// Solidity: function claimAndDepositSD(uint256[] _index, uint256[] _amountSD, uint256[] _amountETH, bytes32[][] _merkleProof) returns() +func (_SocializingPool *SocializingPoolTransactorSession) ClaimAndDepositSD(_index []*big.Int, _amountSD []*big.Int, _amountETH []*big.Int, _merkleProof [][][32]byte) (*types.Transaction, error) { + return _SocializingPool.Contract.ClaimAndDepositSD(&_SocializingPool.TransactOpts, _index, _amountSD, _amountETH, _merkleProof) +} + // GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. // // Solidity: function grantRole(bytes32 role, address account) returns() @@ -924,6 +945,27 @@ func (_SocializingPool *SocializingPoolTransactorSession) Initialize(_admin comm return _SocializingPool.Contract.Initialize(&_SocializingPool.TransactOpts, _admin, _staderConfig) } +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. +// +// Solidity: function maxApproveSD() returns() +func (_SocializingPool *SocializingPoolTransactor) MaxApproveSD(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SocializingPool.contract.Transact(opts, "maxApproveSD") +} + +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. +// +// Solidity: function maxApproveSD() returns() +func (_SocializingPool *SocializingPoolSession) MaxApproveSD() (*types.Transaction, error) { + return _SocializingPool.Contract.MaxApproveSD(&_SocializingPool.TransactOpts) +} + +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. +// +// Solidity: function maxApproveSD() returns() +func (_SocializingPool *SocializingPoolTransactorSession) MaxApproveSD() (*types.Transaction, error) { + return _SocializingPool.Contract.MaxApproveSD(&_SocializingPool.TransactOpts) +} + // Pause is a paid mutator transaction binding the contract method 0x8456cb59. // // Solidity: function pause() returns() diff --git a/stader-lib/contracts/stader-config.go b/stader-lib/contracts/stader-config.go index 3f746740b..30488a2ed 100644 --- a/stader-lib/contracts/stader-config.go +++ b/stader-lib/contracts/stader-config.go @@ -31,7 +31,7 @@ var ( // StaderConfigMetaData contains all meta data concerning the StaderConfig contract. var StaderConfigMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidLimits\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMaxDepositValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMaxWithdrawValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMinDepositValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMinWithdrawValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"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\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetAccount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SetConstant\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SetVariable\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUCTION_CONTRACT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DECIMALS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETHX_SUPPLY_POR_FEED\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETH_BALANCE_POR_FEED\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETH_DEPOSIT_CONTRACT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETH_PER_NODE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETHx\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FULL_DEPOSIT_SIZE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MANAGER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_DEPOSIT_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WITHDRAW_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_BLOCK_DELAY_TO_FINALIZE_WITHDRAW_REQUEST\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_DEPOSIT_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_WITHDRAW_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODE_EL_REWARD_VAULT_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_MAX_NAME_LENGTH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_REWARD_COLLECTOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PENALTY_CONTRACT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONED_NODE_REGISTRY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONED_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONED_SOCIALIZING_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONLESS_NODE_REGISTRY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONLESS_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONLESS_SOCIALIZING_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL_SELECTOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL_UTILS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRE_DEPOSIT_SIZE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REWARD_THRESHOLD\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SD\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SD_COLLATERAL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOCIALIZING_POOL_CYCLE_DURATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOCIALIZING_POOL_OPT_IN_COOLING_PERIOD\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STADER_INSURANCE_FUND\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STADER_ORACLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STADER_TREASURY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STAKE_POOL_MANAGER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOTAL_FEE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USER_WITHDRAW_MANAGER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VALIDATOR_WITHDRAWAL_VAULT_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VAULT_FACTORY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWN_KEYS_BATCH_SIZE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuctionContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHBalancePORFeedProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHDepositContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHXSupplyPORFeedProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHxToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullDepositSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxDepositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxWithdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinBlockDelayToFinalizeWithdrawRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinDepositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinWithdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeELRewardVaultImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperatorMaxNameLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperatorRewardsCollector\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPenaltyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionedNodeRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionedPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionedSocializingPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionlessNodeRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionlessPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionlessSocializingPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolSelector\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolUtils\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPreDepositSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSDCollateral\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSocializingPoolCycleDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSocializingPoolOptInCoolingPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderInsuranceFund\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakePoolManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakedEthPerNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUserWithdrawManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidatorWithdrawalVaultImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVaultFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawnKeyBatchSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"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\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ethDepositContract\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"onlyManagerRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"onlyOperatorRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"onlyStaderContract\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"updateAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_auctionContract\",\"type\":\"address\"}],\"name\":\"updateAuctionContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethBalanceProxy\",\"type\":\"address\"}],\"name\":\"updateETHBalancePORFeedProxy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethXSupplyProxy\",\"type\":\"address\"}],\"name\":\"updateETHXSupplyPORFeedProxy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethX\",\"type\":\"address\"}],\"name\":\"updateETHxToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDepositAmount\",\"type\":\"uint256\"}],\"name\":\"updateMaxDepositAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxWithdrawAmount\",\"type\":\"uint256\"}],\"name\":\"updateMaxWithdrawAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minBlockDelay\",\"type\":\"uint256\"}],\"name\":\"updateMinBlockDelayToFinalizeWithdrawRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDepositAmount\",\"type\":\"uint256\"}],\"name\":\"updateMinDepositAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minWithdrawAmount\",\"type\":\"uint256\"}],\"name\":\"updateMinWithdrawAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_nodeELRewardVaultImpl\",\"type\":\"address\"}],\"name\":\"updateNodeELRewardImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operatorRewardsCollector\",\"type\":\"address\"}],\"name\":\"updateOperatorRewardsCollector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_penaltyContract\",\"type\":\"address\"}],\"name\":\"updatePenaltyContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionedNodeRegistry\",\"type\":\"address\"}],\"name\":\"updatePermissionedNodeRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionedPool\",\"type\":\"address\"}],\"name\":\"updatePermissionedPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionedSocializePool\",\"type\":\"address\"}],\"name\":\"updatePermissionedSocializingPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionlessNodeRegistry\",\"type\":\"address\"}],\"name\":\"updatePermissionlessNodeRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionlessPool\",\"type\":\"address\"}],\"name\":\"updatePermissionlessPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionlessSocializePool\",\"type\":\"address\"}],\"name\":\"updatePermissionlessSocializingPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolSelector\",\"type\":\"address\"}],\"name\":\"updatePoolSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolUtils\",\"type\":\"address\"}],\"name\":\"updatePoolUtils\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardsThreshold\",\"type\":\"uint256\"}],\"name\":\"updateRewardsThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sdCollateral\",\"type\":\"address\"}],\"name\":\"updateSDCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_socializingPoolCycleDuration\",\"type\":\"uint256\"}],\"name\":\"updateSocializingPoolCycleDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_SocializePoolOptInCoolingPeriod\",\"type\":\"uint256\"}],\"name\":\"updateSocializingPoolOptInCoolingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderInsuranceFund\",\"type\":\"address\"}],\"name\":\"updateStaderInsuranceFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderOracle\",\"type\":\"address\"}],\"name\":\"updateStaderOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderToken\",\"type\":\"address\"}],\"name\":\"updateStaderToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderTreasury\",\"type\":\"address\"}],\"name\":\"updateStaderTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stakePoolManager\",\"type\":\"address\"}],\"name\":\"updateStakePoolManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_userWithdrawManager\",\"type\":\"address\"}],\"name\":\"updateUserWithdrawManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validatorWithdrawalVaultImpl\",\"type\":\"address\"}],\"name\":\"updateValidatorWithdrawalVaultImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vaultFactory\",\"type\":\"address\"}],\"name\":\"updateVaultFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawnKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"updateWithdrawnKeysBatchSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"IndenticalValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidLimits\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMaxDepositValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMaxWithdrawValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMinDepositValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidMinWithdrawValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddress\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"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\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetAccount\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SetConstant\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetContract\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"SetToken\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"key\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SetVariable\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"ADMIN\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"AUCTION_CONTRACT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DECIMALS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETHX_SUPPLY_POR_FEED\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETH_BALANCE_POR_FEED\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETH_DEPOSIT_CONTRACT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETH_PER_NODE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ETHx\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"FULL_DEPOSIT_SIZE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MANAGER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_DEPOSIT_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MAX_WITHDRAW_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_BLOCK_DELAY_TO_FINALIZE_WITHDRAW_REQUEST\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_DEPOSIT_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MIN_WITHDRAW_AMOUNT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"NODE_EL_REWARD_VAULT_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_MAX_NAME_LENGTH\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"OPERATOR_REWARD_COLLECTOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PENALTY_CONTRACT\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONED_NODE_REGISTRY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONED_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONED_SOCIALIZING_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONLESS_NODE_REGISTRY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONLESS_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PERMISSIONLESS_SOCIALIZING_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL_SELECTOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"POOL_UTILS\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"PRE_DEPOSIT_SIZE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REWARD_THRESHOLD\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SD\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SD_COLLATERAL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SD_INCENTIVE_CONTROLLER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SD_UTILITY_POOL\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOCIALIZING_POOL_CYCLE_DURATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"SOCIALIZING_POOL_OPT_IN_COOLING_PERIOD\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STADER_INSURANCE_FUND\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STADER_ORACLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STADER_TREASURY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"STAKE_POOL_MANAGER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"TOTAL_FEE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"USER_WITHDRAW_MANAGER\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VALIDATOR_WITHDRAWAL_VAULT_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"VAULT_FACTORY\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WITHDRAWN_KEYS_BATCH_SIZE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAdmin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAuctionContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getDecimals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHBalancePORFeedProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHDepositContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHXSupplyPORFeedProxy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getETHxToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getFullDepositSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxDepositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMaxWithdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinBlockDelayToFinalizeWithdrawRequest\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinDepositAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinWithdrawAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNodeELRewardVaultImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperatorMaxNameLength\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getOperatorRewardsCollector\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPenaltyContract\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionedNodeRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionedPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionedSocializingPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionlessNodeRegistry\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionlessPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPermissionlessSocializingPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolSelector\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPoolUtils\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getPreDepositSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRewardsThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSDCollateral\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSDIncentiveController\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSDUtilityPool\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSocializingPoolCycleDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getSocializingPoolOptInCoolingPeriod\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderInsuranceFund\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderOracle\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStaderTreasury\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakePoolManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakedEthPerNode\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getUserWithdrawManager\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getValidatorWithdrawalVaultImplementation\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVaultFactory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getWithdrawnKeyBatchSize\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"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\":\"_admin\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_ethDepositContract\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"onlyManagerRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"onlyOperatorRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_contractName\",\"type\":\"bytes32\"}],\"name\":\"onlyStaderContract\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"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\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_admin\",\"type\":\"address\"}],\"name\":\"updateAdmin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_auctionContract\",\"type\":\"address\"}],\"name\":\"updateAuctionContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethBalanceProxy\",\"type\":\"address\"}],\"name\":\"updateETHBalancePORFeedProxy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethXSupplyProxy\",\"type\":\"address\"}],\"name\":\"updateETHXSupplyPORFeedProxy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ethX\",\"type\":\"address\"}],\"name\":\"updateETHxToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxDepositAmount\",\"type\":\"uint256\"}],\"name\":\"updateMaxDepositAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxWithdrawAmount\",\"type\":\"uint256\"}],\"name\":\"updateMaxWithdrawAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minBlockDelay\",\"type\":\"uint256\"}],\"name\":\"updateMinBlockDelayToFinalizeWithdrawRequest\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minDepositAmount\",\"type\":\"uint256\"}],\"name\":\"updateMinDepositAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_minWithdrawAmount\",\"type\":\"uint256\"}],\"name\":\"updateMinWithdrawAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_nodeELRewardVaultImpl\",\"type\":\"address\"}],\"name\":\"updateNodeELRewardImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_operatorRewardsCollector\",\"type\":\"address\"}],\"name\":\"updateOperatorRewardsCollector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_penaltyContract\",\"type\":\"address\"}],\"name\":\"updatePenaltyContract\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionedNodeRegistry\",\"type\":\"address\"}],\"name\":\"updatePermissionedNodeRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionedPool\",\"type\":\"address\"}],\"name\":\"updatePermissionedPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionedSocializePool\",\"type\":\"address\"}],\"name\":\"updatePermissionedSocializingPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionlessNodeRegistry\",\"type\":\"address\"}],\"name\":\"updatePermissionlessNodeRegistry\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionlessPool\",\"type\":\"address\"}],\"name\":\"updatePermissionlessPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_permissionlessSocializePool\",\"type\":\"address\"}],\"name\":\"updatePermissionlessSocializingPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolSelector\",\"type\":\"address\"}],\"name\":\"updatePoolSelector\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_poolUtils\",\"type\":\"address\"}],\"name\":\"updatePoolUtils\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_rewardsThreshold\",\"type\":\"uint256\"}],\"name\":\"updateRewardsThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sdCollateral\",\"type\":\"address\"}],\"name\":\"updateSDCollateral\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sdIncentiveController\",\"type\":\"address\"}],\"name\":\"updateSDIncentiveController\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_utilityPool\",\"type\":\"address\"}],\"name\":\"updateSDUtilityPool\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_socializingPoolCycleDuration\",\"type\":\"uint256\"}],\"name\":\"updateSocializingPoolCycleDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_SocializePoolOptInCoolingPeriod\",\"type\":\"uint256\"}],\"name\":\"updateSocializingPoolOptInCoolingPeriod\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderInsuranceFund\",\"type\":\"address\"}],\"name\":\"updateStaderInsuranceFund\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderOracle\",\"type\":\"address\"}],\"name\":\"updateStaderOracle\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderToken\",\"type\":\"address\"}],\"name\":\"updateStaderToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_staderTreasury\",\"type\":\"address\"}],\"name\":\"updateStaderTreasury\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_stakePoolManager\",\"type\":\"address\"}],\"name\":\"updateStakePoolManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_userWithdrawManager\",\"type\":\"address\"}],\"name\":\"updateUserWithdrawManager\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_validatorWithdrawalVaultImpl\",\"type\":\"address\"}],\"name\":\"updateValidatorWithdrawalVaultImplementation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_vaultFactory\",\"type\":\"address\"}],\"name\":\"updateVaultFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_withdrawnKeysBatchSize\",\"type\":\"uint256\"}],\"name\":\"updateWithdrawnKeysBatchSize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", } // StaderConfigABI is the input ABI used to generate the binding from. @@ -1203,6 +1203,68 @@ func (_StaderConfig *StaderConfigCallerSession) SDCOLLATERAL() ([32]byte, error) return _StaderConfig.Contract.SDCOLLATERAL(&_StaderConfig.CallOpts) } +// SDINCENTIVECONTROLLER is a free data retrieval call binding the contract method 0xa7919400. +// +// Solidity: function SD_INCENTIVE_CONTROLLER() view returns(bytes32) +func (_StaderConfig *StaderConfigCaller) SDINCENTIVECONTROLLER(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _StaderConfig.contract.Call(opts, &out, "SD_INCENTIVE_CONTROLLER") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// SDINCENTIVECONTROLLER is a free data retrieval call binding the contract method 0xa7919400. +// +// Solidity: function SD_INCENTIVE_CONTROLLER() view returns(bytes32) +func (_StaderConfig *StaderConfigSession) SDINCENTIVECONTROLLER() ([32]byte, error) { + return _StaderConfig.Contract.SDINCENTIVECONTROLLER(&_StaderConfig.CallOpts) +} + +// SDINCENTIVECONTROLLER is a free data retrieval call binding the contract method 0xa7919400. +// +// Solidity: function SD_INCENTIVE_CONTROLLER() view returns(bytes32) +func (_StaderConfig *StaderConfigCallerSession) SDINCENTIVECONTROLLER() ([32]byte, error) { + return _StaderConfig.Contract.SDINCENTIVECONTROLLER(&_StaderConfig.CallOpts) +} + +// SDUTILITYPOOL is a free data retrieval call binding the contract method 0xc58b4a92. +// +// Solidity: function SD_UTILITY_POOL() view returns(bytes32) +func (_StaderConfig *StaderConfigCaller) SDUTILITYPOOL(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _StaderConfig.contract.Call(opts, &out, "SD_UTILITY_POOL") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// SDUTILITYPOOL is a free data retrieval call binding the contract method 0xc58b4a92. +// +// Solidity: function SD_UTILITY_POOL() view returns(bytes32) +func (_StaderConfig *StaderConfigSession) SDUTILITYPOOL() ([32]byte, error) { + return _StaderConfig.Contract.SDUTILITYPOOL(&_StaderConfig.CallOpts) +} + +// SDUTILITYPOOL is a free data retrieval call binding the contract method 0xc58b4a92. +// +// Solidity: function SD_UTILITY_POOL() view returns(bytes32) +func (_StaderConfig *StaderConfigCallerSession) SDUTILITYPOOL() ([32]byte, error) { + return _StaderConfig.Contract.SDUTILITYPOOL(&_StaderConfig.CallOpts) +} + // SOCIALIZINGPOOLCYCLEDURATION is a free data retrieval call binding the contract method 0xbedcb34c. // // Solidity: function SOCIALIZING_POOL_CYCLE_DURATION() view returns(bytes32) @@ -2443,6 +2505,68 @@ func (_StaderConfig *StaderConfigCallerSession) GetSDCollateral() (common.Addres return _StaderConfig.Contract.GetSDCollateral(&_StaderConfig.CallOpts) } +// GetSDIncentiveController is a free data retrieval call binding the contract method 0xa9fe1b33. +// +// Solidity: function getSDIncentiveController() view returns(address) +func (_StaderConfig *StaderConfigCaller) GetSDIncentiveController(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _StaderConfig.contract.Call(opts, &out, "getSDIncentiveController") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetSDIncentiveController is a free data retrieval call binding the contract method 0xa9fe1b33. +// +// Solidity: function getSDIncentiveController() view returns(address) +func (_StaderConfig *StaderConfigSession) GetSDIncentiveController() (common.Address, error) { + return _StaderConfig.Contract.GetSDIncentiveController(&_StaderConfig.CallOpts) +} + +// GetSDIncentiveController is a free data retrieval call binding the contract method 0xa9fe1b33. +// +// Solidity: function getSDIncentiveController() view returns(address) +func (_StaderConfig *StaderConfigCallerSession) GetSDIncentiveController() (common.Address, error) { + return _StaderConfig.Contract.GetSDIncentiveController(&_StaderConfig.CallOpts) +} + +// GetSDUtilityPool is a free data retrieval call binding the contract method 0xf0056918. +// +// Solidity: function getSDUtilityPool() view returns(address) +func (_StaderConfig *StaderConfigCaller) GetSDUtilityPool(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _StaderConfig.contract.Call(opts, &out, "getSDUtilityPool") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// GetSDUtilityPool is a free data retrieval call binding the contract method 0xf0056918. +// +// Solidity: function getSDUtilityPool() view returns(address) +func (_StaderConfig *StaderConfigSession) GetSDUtilityPool() (common.Address, error) { + return _StaderConfig.Contract.GetSDUtilityPool(&_StaderConfig.CallOpts) +} + +// GetSDUtilityPool is a free data retrieval call binding the contract method 0xf0056918. +// +// Solidity: function getSDUtilityPool() view returns(address) +func (_StaderConfig *StaderConfigCallerSession) GetSDUtilityPool() (common.Address, error) { + return _StaderConfig.Contract.GetSDUtilityPool(&_StaderConfig.CallOpts) +} + // GetSocializingPoolCycleDuration is a free data retrieval call binding the contract method 0x1ca197a5. // // Solidity: function getSocializingPoolCycleDuration() view returns(uint256) @@ -3568,6 +3692,48 @@ func (_StaderConfig *StaderConfigTransactorSession) UpdateSDCollateral(_sdCollat return _StaderConfig.Contract.UpdateSDCollateral(&_StaderConfig.TransactOpts, _sdCollateral) } +// UpdateSDIncentiveController is a paid mutator transaction binding the contract method 0x7b5c8e60. +// +// Solidity: function updateSDIncentiveController(address _sdIncentiveController) returns() +func (_StaderConfig *StaderConfigTransactor) UpdateSDIncentiveController(opts *bind.TransactOpts, _sdIncentiveController common.Address) (*types.Transaction, error) { + return _StaderConfig.contract.Transact(opts, "updateSDIncentiveController", _sdIncentiveController) +} + +// UpdateSDIncentiveController is a paid mutator transaction binding the contract method 0x7b5c8e60. +// +// Solidity: function updateSDIncentiveController(address _sdIncentiveController) returns() +func (_StaderConfig *StaderConfigSession) UpdateSDIncentiveController(_sdIncentiveController common.Address) (*types.Transaction, error) { + return _StaderConfig.Contract.UpdateSDIncentiveController(&_StaderConfig.TransactOpts, _sdIncentiveController) +} + +// UpdateSDIncentiveController is a paid mutator transaction binding the contract method 0x7b5c8e60. +// +// Solidity: function updateSDIncentiveController(address _sdIncentiveController) returns() +func (_StaderConfig *StaderConfigTransactorSession) UpdateSDIncentiveController(_sdIncentiveController common.Address) (*types.Transaction, error) { + return _StaderConfig.Contract.UpdateSDIncentiveController(&_StaderConfig.TransactOpts, _sdIncentiveController) +} + +// UpdateSDUtilityPool is a paid mutator transaction binding the contract method 0x9c34e411. +// +// Solidity: function updateSDUtilityPool(address _utilityPool) returns() +func (_StaderConfig *StaderConfigTransactor) UpdateSDUtilityPool(opts *bind.TransactOpts, _utilityPool common.Address) (*types.Transaction, error) { + return _StaderConfig.contract.Transact(opts, "updateSDUtilityPool", _utilityPool) +} + +// UpdateSDUtilityPool is a paid mutator transaction binding the contract method 0x9c34e411. +// +// Solidity: function updateSDUtilityPool(address _utilityPool) returns() +func (_StaderConfig *StaderConfigSession) UpdateSDUtilityPool(_utilityPool common.Address) (*types.Transaction, error) { + return _StaderConfig.Contract.UpdateSDUtilityPool(&_StaderConfig.TransactOpts, _utilityPool) +} + +// UpdateSDUtilityPool is a paid mutator transaction binding the contract method 0x9c34e411. +// +// Solidity: function updateSDUtilityPool(address _utilityPool) returns() +func (_StaderConfig *StaderConfigTransactorSession) UpdateSDUtilityPool(_utilityPool common.Address) (*types.Transaction, error) { + return _StaderConfig.Contract.UpdateSDUtilityPool(&_StaderConfig.TransactOpts, _utilityPool) +} + // UpdateSocializingPoolCycleDuration is a paid mutator transaction binding the contract method 0x6870bb2b. // // Solidity: function updateSocializingPoolCycleDuration(uint256 _socializingPoolCycleDuration) returns() diff --git a/stader-lib/node/operator.go b/stader-lib/node/operator.go index a73673cdf..5d095ec44 100644 --- a/stader-lib/node/operator.go +++ b/stader-lib/node/operator.go @@ -38,6 +38,19 @@ func ClaimOperatorRewards(orc *stader.OperatorRewardsCollectorContractManager, o return tx, nil } +func ClaimOperatorRewardsWithAmount(orc *stader.OperatorRewardsCollectorContractManager, amount *big.Int, opts *bind.TransactOpts) (*types.Transaction, error) { + tx, err := orc.OperatorRewardsCollector.ClaimWithAmount(opts, amount) + if err != nil { + return nil, fmt.Errorf("Could not claim operator rewards: %w", err) + } + + return tx, nil +} + +func EstimateClaimOperatorRewardsWithAmount(orc *stader.OperatorRewardsCollectorContractManager, operatorAddress common.Address, amount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error) { + return orc.OperatorRewardsCollectorContract.GetTransactionGasInfo(opts, "claimFor", operatorAddress, amount) +} + func EstimateChangeSocializingPoolState(pnr *stader.PermissionlessNodeRegistryContractManager, socializeEl bool, opts *bind.TransactOpts) (stader.GasInfo, error) { return pnr.PermissionlessNodeRegistryContract.GetTransactionGasInfo(opts, "changeSocializingPoolState", socializeEl) } @@ -107,6 +120,15 @@ func GetOperatorId(pnr *stader.PermissionlessNodeRegistryContractManager, nodeAd return operatorId, nil } +func WithdrawableInEth(orc *stader.OperatorRewardsCollectorContractManager, nodeAddress common.Address, opts *bind.CallOpts) (*big.Int, error) { + withdrawableInEth, err := orc.OperatorRewardsCollector.WithdrawableInEth(opts, nodeAddress) + if err != nil { + return nil, err + } + + return withdrawableInEth, nil +} + func GetOperatorInfo(pnr *stader.PermissionlessNodeRegistryContractManager, operatorId *big.Int, opts *bind.CallOpts) (types2.OperatorInfo, error) { operatorInfo, err := pnr.PermissionlessNodeRegistry.OperatorStructById(opts, operatorId) if err != nil { @@ -130,7 +152,7 @@ func GetNextOperatorId(pnr *stader.PermissionlessNodeRegistryContractManager, op } func GetOperatorRewardsCollectorBalance(orc *stader.OperatorRewardsCollectorContractManager, operatorRewardAddress common.Address, opts *bind.CallOpts) (*big.Int, error) { - return orc.OperatorRewardsCollector.Balances(opts, operatorRewardAddress) + return orc.OperatorRewardsCollector.GetBalance(opts, operatorRewardAddress) } func GetValidatorInfosByOperator(pnr *stader.PermissionlessNodeRegistryContractManager, operatorAddress common.Address, pageNumber *big.Int, pageSize *big.Int, opts *bind.CallOpts) ([]contracts.Validator, error) { diff --git a/stader-lib/node/validator.go b/stader-lib/node/validator.go index 0547ffe12..0969ecc5f 100644 --- a/stader-lib/node/validator.go +++ b/stader-lib/node/validator.go @@ -2,9 +2,10 @@ package node import ( "fmt" + "math/big" + "github.com/stader-labs/stader-node/stader-lib/contracts" types2 "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" @@ -12,14 +13,37 @@ import ( "github.com/stader-labs/stader-node/stader-lib/stader" ) -func EstimateAddValidatorKeys(pnr *stader.PermissionlessNodeRegistryContractManager, pubKeys [][]byte, preDepositSignatures [][]byte, depositSignatures [][]byte, opts *bind.TransactOpts) (stader.GasInfo, error) { - return pnr.PermissionlessNodeRegistryContract.GetTransactionGasInfo(opts, "addValidatorKeys", pubKeys, preDepositSignatures, depositSignatures) -} - -func AddValidatorKeys(pnr *stader.PermissionlessNodeRegistryContractManager, pubKeys [][]byte, preDepositSignatures [][]byte, depositSignatures [][]byte, opts *bind.TransactOpts) (*types.Transaction, error) { - tx, err := pnr.PermissionlessNodeRegistry.AddValidatorKeys(opts, pubKeys, preDepositSignatures, depositSignatures) +func EstimateAddValidatorKeys( + pnr *stader.PermissionlessNodeRegistryContractManager, + utilityAmount *big.Int, + pubKeys [][]byte, + preDepositSignatures [][]byte, + depositSignatures [][]byte, + referralID string, + opts *bind.TransactOpts, +) (stader.GasInfo, error) { + return pnr.PermissionlessNodeRegistryContract.GetTransactionGasInfo( + opts, + "addValidatorKeysWithUtilizeSD", + referralID, + utilityAmount, + pubKeys, + preDepositSignatures, + depositSignatures, + ) +} + +func AddValidatorKeysWithAmount( + pnr *stader.PermissionlessNodeRegistryContractManager, + pubKeys [][]byte, + preDepositSignatures [][]byte, + depositSignatures [][]byte, + utilityAmount *big.Int, + referralID string, + opts *bind.TransactOpts) (*types.Transaction, error) { + tx, err := pnr.PermissionlessNodeRegistry.AddValidatorKeysWithUtilizeSD(opts, referralID, utilityAmount, pubKeys, preDepositSignatures, depositSignatures) if err != nil { - return nil, fmt.Errorf("could not add validator keys: %w", err) + return nil, fmt.Errorf("could not add validator keys with utilize: %w", err) } return tx, nil diff --git a/stader-lib/sd-collateral/sd-deposit.go b/stader-lib/sd-collateral/sd-deposit.go index 5932a45e3..dd0d8c326 100644 --- a/stader-lib/sd-collateral/sd-deposit.go +++ b/stader-lib/sd-collateral/sd-deposit.go @@ -2,12 +2,13 @@ package sd_collateral import ( "fmt" + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stader-labs/stader-node/stader-lib/stader" types2 "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" ) func EstimateDepositSdAsCollateral(sdc *stader.SdCollateralContractManager, amount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error) { @@ -45,6 +46,41 @@ func GetOperatorSdBalance(sdc *stader.SdCollateralContractManager, operatorAddre return balance, err } +func GetOperatorUtilizedSDBalance(sdc *stader.SdCollateralContractManager, operatorAddress common.Address, opts *bind.CallOpts) (*big.Int, error) { + balance, err := sdc.SdCollateral.OperatorUtilizedSDBalance(opts, operatorAddress) + if err != nil { + return nil, err + } + + return balance, err +} + +func MinimumSDToBond(sdc *stader.SdCollateralContractManager, poolID uint8, numValidators *big.Int, opts *bind.CallOpts) (*big.Int, error) { + minimumSDToBond, err := sdc.SdCollateral.GetMinimumSDToBond(opts, poolID, numValidators) + if err != nil { + return nil, err + } + + return minimumSDToBond, nil +} + +func RewardEligibleSD(sdc *stader.SdCollateralContractManager, poolID uint8, numValidators *big.Int, opts *bind.CallOpts) (*big.Int, error) { + poolThreshold, err := sdc.SdCollateral.PoolThresholdbyPoolId(opts, poolID) + if err != nil { + return nil, err + } + + maxThreshold := poolThreshold.MaxThreshold + ethAmount := new(big.Int).Mul(maxThreshold, numValidators) + + sdAmount, err := sdc.SdCollateral.ConvertETHToSD(opts, ethAmount) + if err != nil { + return nil, err + } + + return sdAmount, nil +} + func HasEnoughSdCollateral(sdc *stader.SdCollateralContractManager, operatorAddress common.Address, poolType uint8, numValidators *big.Int, opts *bind.CallOpts) (bool, error) { hasEnoughSdCollateral, err := sdc.SdCollateral.HasEnoughSDCollateral(opts, operatorAddress, poolType, numValidators) if err != nil { diff --git a/stader-lib/sdutility/sd-utility.go b/stader-lib/sdutility/sd-utility.go new file mode 100644 index 000000000..8eb178ee9 --- /dev/null +++ b/stader-lib/sdutility/sd-utility.go @@ -0,0 +1,155 @@ +package sdutility + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stader-labs/stader-node/stader-lib/contracts" + "github.com/stader-labs/stader-node/stader-lib/stader" +) + +func GetUtilizerLatestBalance(sp *stader.SDUtilityPoolContractManager, address common.Address, opts *bind.CallOpts) (*big.Int, error) { + return sp.SDUtilityPool.GetUtilizerLatestBalance(opts, address) +} + +func GetPoolAvailableSDBalance(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Int, error) { + accumulatedProtocolFee, err := GetAccumulatedProtocolFee(sp, opts) + if err != nil { + return nil, err + } + + sdRequestedForWithdraw, err := GetSdRequestedForWithdraw(sp, opts) + if err != nil { + return nil, err + } + + utilityPoolBalance, err := GetUtilityPoolBalance(sp, opts) + if err != nil { + return nil, err + } + + utilityPoolBalanceMinusSdForWithdraw := big.NewInt(0).Sub(utilityPoolBalance, sdRequestedForWithdraw) + if utilityPoolBalanceMinusSdForWithdraw.Cmp(big.NewInt(0)) < 0 { + return big.NewInt(0), nil + } + + availableSdBalance := big.NewInt(0).Sub(utilityPoolBalanceMinusSdForWithdraw, accumulatedProtocolFee) + if availableSdBalance.Cmp(big.NewInt(0)) < 0 { + return big.NewInt(0), nil + } + + return availableSdBalance, nil +} + +func GetUtilityPoolBalance(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Int, error) { + return sp.SDUtilityPool.GetPoolAvailableSDBalance(opts) +} + +func GetAccumulatedProtocolFee(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Int, error) { + return sp.SDUtilityPool.AccumulatedProtocolFee(opts) +} + +func GetSdRequestedForWithdraw(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Int, error) { + return sp.SDUtilityPool.SdRequestedForWithdraw(opts) +} + +// Estimate the gas of Utilize +func EstimateUtilize(sp *stader.SDUtilityPoolContractManager, utilityAmount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error) { + return sp.SDUtilityPoolContract.GetTransactionGasInfo(opts, "utilize", utilityAmount) +} + +func Utilize(sp *stader.SDUtilityPoolContractManager, utilityAmount *big.Int, opts *bind.TransactOpts) (*types.Transaction, error) { + return sp.SDUtilityPool.Utilize(opts, utilityAmount) +} + +func EstimateRepay(sp *stader.SDUtilityPoolContractManager, utilityAmount *big.Int, opts *bind.TransactOpts) (stader.GasInfo, error) { + return sp.SDUtilityPoolContract.GetTransactionGasInfo(opts, "repay", utilityAmount) +} + +func EstimateRepayFullAmount(sp *stader.SDUtilityPoolContractManager, opts *bind.TransactOpts) (stader.GasInfo, error) { + return sp.SDUtilityPoolContract.GetTransactionGasInfo(opts, "repayFullAmount") +} + +func Repay(sp *stader.SDUtilityPoolContractManager, utilityAmount *big.Int, opts *bind.TransactOpts) (*types.Transaction, error) { + return sp.SDUtilityPool.Repay(opts, utilityAmount) +} + +func RepayFullAmount(sp *stader.SDUtilityPoolContractManager, opts *bind.TransactOpts) (*types.Transaction, error) { + return sp.SDUtilityPool.RepayFullAmount(opts) +} + +func SDMaxUtilizableAmount(sp *stader.SDUtilityPoolContractManager, + sdc *stader.SdCollateralContractManager, numValidators *big.Int, opts *bind.CallOpts) (*big.Int, error) { + maxThreshold, err := sp.SDUtilityPool.MaxETHWorthOfSDPerValidator(opts) + if err != nil { + return nil, err + } + + ethAmount := new(big.Int).Mul(maxThreshold, numValidators) + + sdAmount, err := sdc.SdCollateral.ConvertETHToSD(opts, ethAmount) + if err != nil { + return nil, err + } + + return sdAmount, nil +} + +func GetUtilizationRatePercent(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Float, error) { + utilizationRatePerBlockInWei, err := sp.SDUtilityPool.UtilizationRatePerBlock(opts) + if err != nil { + return nil, err + } + + utilizationRatePerYear := new(big.Int).Mul(utilizationRatePerBlockInWei, big.NewInt(2628000)) // 2628000 block per year + + utilizationRatePerYearF := new(big.Float).SetInt(utilizationRatePerYear) + + utilizationRateInPercent := new(big.Float).Quo(utilizationRatePerYearF, big.NewFloat(1e16)) + + return utilizationRateInPercent, nil +} + +func GetUserData(sp *stader.SDUtilityPoolContractManager, address common.Address, opts *bind.CallOpts) (*contracts.UserData, error) { + userData, err := sp.SDUtilityPool.GetUserData(opts, address) + if err != nil { + return nil, err + } + + return &userData, nil +} + +func AlreadyLiquidated(sp *stader.SDUtilityPoolContractManager, address common.Address) (bool, error) { + liquidationIndex, err := LiquidationIndexByOperator(sp, address, nil) + if err != nil { + return false, err + } + + isAlreadyLiquidated := liquidationIndex.Cmp(big.NewInt(0)) != 0 + + return isAlreadyLiquidated, nil +} + +func LiquidationIndexByOperator(sp *stader.SDUtilityPoolContractManager, address common.Address, opts *bind.CallOpts) (*big.Int, error) { + return sp.SDUtilityPool.LiquidationIndexByOperator(opts, address) +} + +func GetTotalTVL(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Int, error) { + supply, err := sp.SDUtilityPool.CTokenTotalSupply(opts) + if err != nil { + return nil, err + } + + er, err := sp.SDUtilityPool.GetLatestExchangeRate(opts) + if err != nil { + return nil, err + } + + return new(big.Int).Sub(supply, er), nil +} + +func GetTotalUtilized(sp *stader.SDUtilityPoolContractManager, opts *bind.CallOpts) (*big.Int, error) { + return sp.SDUtilityPool.TotalUtilizedSD(opts) +} diff --git a/stader-lib/socializing-pool/rewards.go b/stader-lib/socializing-pool/rewards.go index f3573d6c1..38d706909 100644 --- a/stader-lib/socializing-pool/rewards.go +++ b/stader-lib/socializing-pool/rewards.go @@ -1,12 +1,13 @@ package socializing_pool import ( + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/stader-labs/stader-node/stader-lib/stader" types2 "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" ) func EstimateClaimRewards(sp *stader.SocializingPoolContractManager, index []*big.Int, amountSd []*big.Int, amountEth []*big.Int, merkleProof [][][32]byte, opts *bind.TransactOpts) (stader.GasInfo, error) { @@ -22,6 +23,19 @@ func ClaimRewards(sp *stader.SocializingPoolContractManager, index []*big.Int, a return tx, nil } +func EstimateClaimRewardsAndDepositSD(sp *stader.SocializingPoolContractManager, index, amountSd, amountEth []*big.Int, merkleProof [][][32]byte, opts *bind.TransactOpts) (stader.GasInfo, error) { + return sp.SocializingPoolContract.GetTransactionGasInfo(opts, "claimAndDepositSD", index, amountSd, amountEth, merkleProof) +} + +func ClaimRewardsAndDepositSD(sp *stader.SocializingPoolContractManager, index, amountSd, amountEth []*big.Int, merkleProof [][][32]byte, opts *bind.TransactOpts) (*types.Transaction, error) { + tx, err := sp.SocializingPool.ClaimAndDepositSD(opts, index, amountSd, amountEth, merkleProof) + if err != nil { + return nil, err + } + + return tx, nil +} + func GetRewardDetails(sp *stader.SocializingPoolContractManager, opts *bind.CallOpts) (types2.RewardCycleDetails, error) { return sp.SocializingPool.GetRewardDetails(opts) } diff --git a/stader-lib/stader-config/stader-config.go b/stader-lib/stader-config/stader-config.go index 0f8264480..13c7af5f4 100644 --- a/stader-lib/stader-config/stader-config.go +++ b/stader-lib/stader-config/stader-config.go @@ -1,10 +1,11 @@ package stader_config import ( + "math/big" + "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/stader-lib/stader" - "math/big" ) func GetRewardsThreshold(sdConfig *stader.StaderConfigContractManager, opts *bind.CallOpts) (*big.Int, error) { @@ -70,3 +71,7 @@ func GetSdCollateralAddress(sdConfig *stader.StaderConfigContractManager, opts * func GetOperatorRewardsCollectorAddress(sdConfig *stader.StaderConfigContractManager, opts *bind.CallOpts) (common.Address, error) { return sdConfig.StaderConfig.GetOperatorRewardsCollector(opts) } + +func GetSDUtilityPoolAddress(sdConfig *stader.StaderConfigContractManager, opts *bind.CallOpts) (common.Address, error) { + return sdConfig.StaderConfig.GetSDUtilityPool(opts) +} diff --git a/stader-lib/stader/stader.go b/stader-lib/stader/stader.go index 80e1d65dd..a0b80a1bc 100644 --- a/stader-lib/stader/stader.go +++ b/stader-lib/stader/stader.go @@ -1,11 +1,12 @@ package stader import ( + "strings" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/stader-lib/contracts" - "strings" ) type Erc20TokenContractManager struct { @@ -450,3 +451,34 @@ func NewOperatorRewardsCollector(client ExecutionClient, operatorRewardsCollecto }, nil } + +type SDUtilityPoolContractManager struct { + Client ExecutionClient + SDUtilityPool *contracts.SDUtilityPool + SDUtilityPoolContract *Contract +} + +func NewSDUtilityPool(client ExecutionClient, sdUtilizeAddress common.Address) (*SDUtilityPoolContractManager, error) { + sdUtilizeFactory, err := contracts.NewSDUtilityPool(sdUtilizeAddress, client) + if err != nil { + return nil, err + } + + sdUtilizeAbi, err := abi.JSON(strings.NewReader(contracts.SDUtilityPoolMetaData.ABI)) + if err != nil { + return nil, err + } + + sdUtilizeContract := &Contract{ + Contract: bind.NewBoundContract(sdUtilizeAddress, sdUtilizeAbi, client, client, client), + Address: &sdUtilizeAddress, + ABI: &sdUtilizeAbi, + Client: client, + } + + return &SDUtilityPoolContractManager{ + Client: client, + SDUtilityPool: sdUtilizeFactory, + SDUtilityPoolContract: sdUtilizeContract, + }, nil +} diff --git a/stader-lib/utils/eth/units.go b/stader-lib/utils/eth/units.go index ea824370b..3f6a15c38 100644 --- a/stader-lib/utils/eth/units.go +++ b/stader-lib/utils/eth/units.go @@ -26,10 +26,35 @@ import ( // Conversion factors const ( - WeiPerEth float64 = 1e18 - WeiPerGwei float64 = 1e9 + WeiPerEth float64 = 1e18 + WeiPerGwei float64 = 1e9 + Decimal = 18 + BaseAmountInEth = 4 + Threshold = 1e12 ) +func DisplayAmountInUnits(wei *big.Int, denom string) string { + gweiDenom := " gwei" + if denom == "sd" { + gweiDenom = " gwei SD" + } + + regDenom := " ETH" + if denom == "sd" { + regDenom = " SD" + } + + if wei == nil { + return "" + } + + if wei.Cmp(big.NewInt(Threshold)) < 0 && wei.Cmp(big.NewInt(0)) != 0 { + return strconv.FormatFloat(WeiToGwei(wei), 'f', 6, 64) + gweiDenom + } + + return strconv.FormatFloat(WeiToEth(wei), 'f', 6, 64) + regDenom +} + // Convert wei to eth func WeiToEth(wei *big.Int) float64 { var weiFloat big.Float diff --git a/stader-lib/utils/sd/sd.go b/stader-lib/utils/sd/sd.go new file mode 100644 index 000000000..2c2d7b1b8 --- /dev/null +++ b/stader-lib/utils/sd/sd.go @@ -0,0 +1,54 @@ +package sd + +import ( + "fmt" + "math/big" + "strconv" + + cliutils "github.com/stader-labs/stader-node/shared/utils/cli" + "github.com/stader-labs/stader-node/stader-lib/utils/eth" +) + +const ( + SDFloatStringEqualityThreshold = 0.1 +) + +var SDWeiEqualityThreshold = eth.EthToWei(SDFloatStringEqualityThreshold) + +func WeiAlmostEqual(lhs, rhs *big.Int) bool { + diversity := new(big.Int).Sub(lhs, rhs) + + return diversity.CmpAbs(SDWeiEqualityThreshold) <= 0 +} + +func PromptChooseSDWithMaxMin(msg, errMsg string, min, max *big.Int) (*big.Int, error) { + var utilityAmountWei *big.Int + + var errParse error + + for { + s := cliutils.Prompt( + msg, + `^[0-9]\d*(\.\d+)?$`, + errMsg) + + var utilityAmountFloat float64 + utilityAmountFloat, errParse = strconv.ParseFloat(s, 64) + + if errParse != nil { + fmt.Println(errMsg) + continue + } + + utilityAmountWei = eth.EthToWei(utilityAmountFloat) + + if utilityAmountWei.Cmp(min) < 0 || utilityAmountWei.Cmp(max) > 0 || utilityAmountWei.Cmp(big.NewInt(0)) == 0 { + fmt.Println(errMsg) + continue + } + + break + } + + return utilityAmountWei, errParse +} diff --git a/stader/api/node/claim-rewards.go b/stader/api/node/claim-rewards.go index df3350ea9..5df3f01ab 100644 --- a/stader/api/node/claim-rewards.go +++ b/stader/api/node/claim-rewards.go @@ -1,11 +1,12 @@ package node import ( + "math/big" + "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" "github.com/stader-labs/stader-node/stader-lib/node" "github.com/urfave/cli" - "math/big" ) func CanClaimRewards(c *cli.Context) (*api.CanClaimRewards, error) { @@ -34,7 +35,21 @@ func CanClaimRewards(c *cli.Context) (*api.CanClaimRewards, error) { if err != nil { return nil, err } - if operatorClaimVaultBalance.Cmp(big.NewInt(0)) == 0 { + + withdrawableInEth, err := node.WithdrawableInEth(orc, nodeAccount.Address, nil) + if err != nil { + return nil, err + } + + totalWithdrawableEth := operatorClaimVaultBalance + if operatorClaimVaultBalance.Cmp(withdrawableInEth) > 0 { + totalWithdrawableEth = withdrawableInEth + } + + response.WithdrawableInEth = totalWithdrawableEth + response.ClaimsBalance = operatorClaimVaultBalance + + if totalWithdrawableEth.Cmp(big.NewInt(0)) == 0 { response.NoRewards = true return &response, nil } @@ -77,21 +92,27 @@ func ClaimRewards(c *cli.Context) (*api.ClaimRewards, error) { response := api.ClaimRewards{} - nodeAddress, err := w.GetNodeAccount() + nodeAccount, err := w.GetNodeAccount() if err != nil { return nil, err } - operatorId, err := node.GetOperatorId(pnr, nodeAddress.Address, nil) + operatorID, err := node.GetOperatorId(pnr, nodeAccount.Address, nil) if err != nil { return nil, err } - operatorInfo, err := node.GetOperatorInfo(pnr, operatorId, nil) + + operatorInfo, err := node.GetOperatorInfo(pnr, operatorID, nil) if err != nil { return nil, err } - operatorRewardsBalance, err := node.GetOperatorRewardsCollectorBalance(orc, nodeAddress.Address, nil) + operatorRewardsBalance, err := node.GetOperatorRewardsCollectorBalance(orc, nodeAccount.Address, nil) + if err != nil { + return nil, err + } + + withdrawableInEth, err := node.WithdrawableInEth(orc, nodeAccount.Address, nil) if err != nil { return nil, err } @@ -104,12 +125,18 @@ func ClaimRewards(c *cli.Context) (*api.ClaimRewards, error) { return nil, err } + totalWithdrawableEth := operatorRewardsBalance + if operatorRewardsBalance.Cmp(withdrawableInEth) > 0 { + totalWithdrawableEth = withdrawableInEth + } + // estimate gas tx, err := node.ClaimOperatorRewards(orc, opts) if err != nil { return nil, err } + response.RewardsClaimed = totalWithdrawableEth response.TxHash = tx.Hash() return &response, nil diff --git a/stader/api/node/claim-sp-rewards.go b/stader/api/node/claim-sp-rewards.go index 66c07a06e..ec91e9433 100644 --- a/stader/api/node/claim-sp-rewards.go +++ b/stader/api/node/claim-sp-rewards.go @@ -1,13 +1,16 @@ package node import ( + "math/big" + + "github.com/ethereum/go-ethereum/core/types" "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" "github.com/stader-labs/stader-node/shared/utils/eth1" string_utils "github.com/stader-labs/stader-node/shared/utils/string-utils" socializing_pool "github.com/stader-labs/stader-node/stader-lib/socializing-pool" + "github.com/stader-labs/stader-node/stader-lib/stader" "github.com/urfave/cli" - "math/big" ) func GetCyclesDetailedInfo(c *cli.Context, stringifiedCycles string) (*api.CyclesDetailedInfo, error) { @@ -136,7 +139,7 @@ func canClaimSpRewards(c *cli.Context) (*api.CanClaimSpRewardsResponse, error) { return &response, nil } -func estimateSpRewardsGas(c *cli.Context, stringifiedCycles string) (*api.EstimateClaimSpRewardsGasResponse, error) { +func estimateSpRewardsGas(c *cli.Context, stringifiedCycles string, depositSd bool) (*api.EstimateClaimSpRewardsGasResponse, error) { sp, err := services.GetSocializingPoolContract(c) if err != nil { return nil, err @@ -166,9 +169,17 @@ func estimateSpRewardsGas(c *cli.Context, stringifiedCycles string) (*api.Estima return nil, err } - gasInfo, err := socializing_pool.EstimateClaimRewards(sp, cycles, amountSd, amountEth, merkleProofs, opts) - if err != nil { - return nil, err + var gasInfo stader.GasInfo + if depositSd { + gasInfo, err = socializing_pool.EstimateClaimRewardsAndDepositSD(sp, cycles, amountSd, amountEth, merkleProofs, opts) + if err != nil { + return nil, err + } + } else { + gasInfo, err = socializing_pool.EstimateClaimRewards(sp, cycles, amountSd, amountEth, merkleProofs, opts) + if err != nil { + return nil, err + } } response.GasInfo = gasInfo @@ -176,7 +187,7 @@ func estimateSpRewardsGas(c *cli.Context, stringifiedCycles string) (*api.Estima return &response, nil } -func claimSpRewards(c *cli.Context, stringifiedCycles string) (*api.ClaimSpRewardsResponse, error) { +func claimSpRewards(c *cli.Context, stringifiedCycles string, depositSd bool) (*api.ClaimSpRewardsResponse, error) { sp, err := services.GetSocializingPoolContract(c) if err != nil { return nil, err @@ -207,9 +218,18 @@ func claimSpRewards(c *cli.Context, stringifiedCycles string) (*api.ClaimSpRewar return nil, err } - tx, err := socializing_pool.ClaimRewards(sp, cycles, amountSd, amountEth, merkleProofs, opts) - if err != nil { - return nil, err + tx := &types.Transaction{} + + if depositSd { + tx, err = socializing_pool.ClaimRewardsAndDepositSD(sp, cycles, amountSd, amountEth, merkleProofs, opts) + if err != nil { + return nil, err + } + } else { + tx, err = socializing_pool.ClaimRewards(sp, cycles, amountSd, amountEth, merkleProofs, opts) + if err != nil { + return nil, err + } } response.TxHash = tx.Hash() diff --git a/stader/api/node/commands.go b/stader/api/node/commands.go index cf6acb0b8..da4183348 100644 --- a/stader/api/node/commands.go +++ b/stader/api/node/commands.go @@ -95,6 +95,9 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { } socializeMev, err := cliutils.ValidateBool("socialize-mev", c.Args().Get(2)) + if err != nil { + return err + } // Run api.PrintResponse(canRegisterNode(c, operatorName, operatorRewardAddress, socializeMev)) @@ -122,6 +125,9 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { } socializeMev, err := cliutils.ValidateBool("socialize-mev", c.Args().Get(2)) + if err != nil { + return err + } // Run api.PrintResponse(registerNode(c, operatorName, operatorRewardAddress, socializeMev)) @@ -132,6 +138,7 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { { Name: "can-node-deposit-sd", + Aliases: []string{"cds"}, Usage: "Check whether the node can stake SD", UsageText: "stader-cli api node can-node-deposit-sd amount", Action: func(c *cli.Context) error { @@ -152,25 +159,78 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { }, }, { - Name: "deposit-sd-approve-sd", - Aliases: []string{"k1"}, - Usage: "Approve SD for staking against the node", - UsageText: "stader-cli api node deposit-sd-approve-sd amount", + Name: "utilize-sd", + Usage: "Utilize SD", + UsageText: "stader-cli api node utilize-sd amount", Action: func(c *cli.Context) error { + // Validate args + if err := cliutils.ValidateArgCount(c, 1); err != nil { + return err + } + amountWei, err := cliutils.ValidatePositiveWeiAmount("utilize amount", c.Args().Get(0)) + if err != nil { + return err + } + // Run + api.PrintResponse(utilitySd(c, amountWei)) + return nil + }, + }, + { + Name: "can-utilize-sd", + Usage: "Utilize SD", + UsageText: "stader-cli api node can-utilize-sd amount", + Action: func(c *cli.Context) error { // Validate args if err := cliutils.ValidateArgCount(c, 1); err != nil { return err } - amountWei, err := cliutils.ValidatePositiveWeiAmount("stake amount", c.Args().Get(0)) + amountWei, err := cliutils.ValidatePositiveWeiAmount("can utilize amount", c.Args().Get(0)) + if err != nil { + return err + } + // Run + api.PrintResponse(canUtilitySd(c, amountWei)) + return nil + }, + }, + { + Name: "repay-sd", + Usage: "Utilize SD", + UsageText: "stader-cli api node repay-sd amount", + Action: func(c *cli.Context) error { + // Validate args + if err := cliutils.ValidateArgCount(c, 1); err != nil { + return err + } + amountWei, err := cliutils.ValidatePositiveWeiAmount("repay amount", c.Args().Get(0)) if err != nil { return err } // Run - api.PrintResponse(approveSd(c, amountWei)) + api.PrintResponse(repaySD(c, amountWei)) return nil + }, + }, + { + Name: "can-repay-sd", + Usage: "Can repay SD", + UsageText: "stader-cli api node can-repay-sd amount", + Action: func(c *cli.Context) error { + // Validate args + if err := cliutils.ValidateArgCount(c, 1); err != nil { + return err + } + amountWei, err := cliutils.ValidatePositiveWeiAmount("can repay amount", c.Args().Get(0)) + if err != nil { + return err + } + // Run + api.PrintResponse(canRepaySD(c, amountWei)) + return nil }, }, { @@ -179,7 +239,6 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { Usage: "Deposit SD against the node, waiting for approval tx-hash to be included in a block first", UsageText: "stader-cli api node wait-and-deposit-sd amount tx-hash", Action: func(c *cli.Context) error { - // Validate args if err := cliutils.ValidateArgCount(c, 2); err != nil { return err @@ -200,39 +259,70 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { }, }, { - Name: "get-deposit-sd-approval-gas", + Name: "sd-approve-sd", + Aliases: []string{"k1"}, + Usage: "Approve SD for staking against the node", + UsageText: "stader-cli api node deposit-sd-approve-sd amount contract-address", + Action: func(c *cli.Context) error { + // Validate args + if err := cliutils.ValidateArgCount(c, 2); err != nil { + return err + } + amountWei, err := cliutils.ValidatePositiveWeiAmount("stake amount", c.Args().Get(0)) + if err != nil { + return err + } + contractAddress, err := cliutils.ValidateAddress("contract-address", c.Args().Get(1)) + if err != nil { + return err + } + + // Run + api.PrintResponse(approveSd(c, amountWei, contractAddress)) + return nil + }, + }, + { + Name: "get-sd-approval-gas", Usage: "Estimate the gas cost of new SD interaction approval", - UsageText: "stader-cli api node get-deposit-sd-approval-gas", + UsageText: "stader-cli api node get-deposit-sd-approval-gas contract-address", Action: func(c *cli.Context) error { // Validate args - if err := cliutils.ValidateArgCount(c, 1); err != nil { + if err := cliutils.ValidateArgCount(c, 2); err != nil { return err } amountWei, err := cliutils.ValidatePositiveWeiAmount("approve amount", c.Args().Get(0)) if err != nil { return err } - + contractAddress, err := cliutils.ValidateAddress("contract-address", c.Args().Get(1)) + if err != nil { + return err + } // Run - api.PrintResponse(getDepositSdApprovalGas(c, amountWei)) + api.PrintResponse(getSdApprovalGas(c, amountWei, contractAddress)) return nil }, }, { - Name: "deposit-sd-allowance", + Name: "sd-allowance", Usage: "Get the node's SD allowance for the collateral contract", - UsageText: "stader-cli api node deposit-sd-allowance", + UsageText: "stader-cli api node deposit-sd-allowance contract-address", Action: func(c *cli.Context) error { // Validate args - if err := cliutils.ValidateArgCount(c, 0); err != nil { + if err := cliutils.ValidateArgCount(c, 1); err != nil { + return err + } + contractAddress, err := cliutils.ValidateAddress("contract-address", c.Args().Get(0)) + if err != nil { return err } // Run - api.PrintResponse(allowanceSd(c)) + api.PrintResponse(allowanceSd(c, contractAddress)) return nil }, @@ -594,18 +684,21 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { { Name: "claim-sp-rewards", Usage: "Claim the SP rewards", - UsageText: "stader-cli api node claim-sp-rewards cycles", + UsageText: "stader-cli api node claim-sp-rewards cycles deposit-sd", Action: func(c *cli.Context) error { // Validate args - if err := cliutils.ValidateArgCount(c, 1); err != nil { + if err := cliutils.ValidateArgCount(c, 2); err != nil { return err } cycles := c.Args().Get(0) - //fmt.Printf("cycles is %s\n", cycles) + depositSd, err := cliutils.ValidateBool("deposit-sd", c.Args().Get(1)) + if err != nil { + return err + } // Run - api.PrintResponse(claimSpRewards(c, cycles)) + api.PrintResponse(claimSpRewards(c, cycles, depositSd)) return nil }, @@ -617,13 +710,17 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { Action: func(c *cli.Context) error { // Validate args - if err := cliutils.ValidateArgCount(c, 1); err != nil { + if err := cliutils.ValidateArgCount(c, 2); err != nil { return err } cycles := c.Args().Get(0) + depositSd, err := cliutils.ValidateBool("deposit-sd", c.Args().Get(1)) + if err != nil { + return err + } // Run - api.PrintResponse(estimateSpRewardsGas(c, cycles)) + api.PrintResponse(estimateSpRewardsGas(c, cycles, depositSd)) return nil }, @@ -707,7 +804,27 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { // Run api.PrintResponse(SetRewardAddress(c, operatorRewardAddress)) return nil + }, + }, + { + Name: "get-sd-status", + Usage: "Get SD Status", + Aliases: []string{"gsd"}, + UsageText: "stader-cli api node get-sd-status num-validators", + Action: func(c *cli.Context) error { + // Validate args + if err := cliutils.ValidateArgCount(c, 1); err != nil { + return err + } + numValidators, err := cliutils.ValidateBigInt("num-validators", c.Args().Get(0)) + if err != nil { + return err + } + + // Run + api.PrintResponse(getSDStatus(c, numValidators)) + return nil }, }, }, diff --git a/stader/api/node/deposit-sd.go b/stader/api/node/deposit-sd.go index d0386e8c0..b031dad68 100644 --- a/stader/api/node/deposit-sd.go +++ b/stader/api/node/deposit-sd.go @@ -2,9 +2,10 @@ package node import ( "fmt" - "github.com/stader-labs/stader-node/stader-lib/sd-collateral" "math/big" + sd_collateral "github.com/stader-labs/stader-node/stader-lib/sd-collateral" + "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/stader-lib/tokens" "github.com/stader-labs/stader-node/stader-lib/utils" @@ -68,7 +69,7 @@ func canNodeDepositSd(c *cli.Context, amountWei *big.Int) (*api.CanNodeDepositSd } -func getDepositSdApprovalGas(c *cli.Context, amountWei *big.Int) (*api.NodeDepositSdApproveGasResponse, error) { +func getSdApprovalGas(c *cli.Context, amountWei *big.Int, contractAddress common.Address) (*api.SdApproveGasResponse, error) { // Get services if err := services.RequireNodeWallet(c); err != nil { return nil, err @@ -81,20 +82,17 @@ func getDepositSdApprovalGas(c *cli.Context, amountWei *big.Int) (*api.NodeDepos if err != nil { return nil, err } - sdc, err := services.GetSdCollateralContract(c) - if err != nil { - return nil, err - } // Response - response := api.NodeDepositSdApproveGasResponse{} + response := api.SdApproveGasResponse{} // Get gas estimates opts, err := w.GetNodeAccountTransactor() if err != nil { return nil, err } - gasInfo, err := tokens.EstimateApproveGas(sdt, *sdc.SdCollateralContract.Address, amountWei, opts) + + gasInfo, err := tokens.EstimateApproveGas(sdt, contractAddress, amountWei, opts) if err != nil { return nil, err } @@ -102,8 +100,7 @@ func getDepositSdApprovalGas(c *cli.Context, amountWei *big.Int) (*api.NodeDepos return &response, nil } -func allowanceSd(c *cli.Context) (*api.NodeDepositSdAllowanceResponse, error) { - +func allowanceSd(c *cli.Context, contractAddress common.Address) (*api.SdAllowanceResponse, error) { // Get services if err := services.RequireNodeRegistered(c); err != nil { return nil, err @@ -116,13 +113,9 @@ func allowanceSd(c *cli.Context) (*api.NodeDepositSdAllowanceResponse, error) { if err != nil { return nil, err } - sdc, err := services.GetSdCollateralContract(c) - if err != nil { - return nil, err - } // Response - response := api.NodeDepositSdAllowanceResponse{} + response := api.SdAllowanceResponse{} // Get node account account, err := w.GetNodeAccount() @@ -130,7 +123,7 @@ func allowanceSd(c *cli.Context) (*api.NodeDepositSdAllowanceResponse, error) { return nil, err } - allowance, err := tokens.Allowance(sdt, account.Address, *sdc.SdCollateralContract.Address, nil) + allowance, err := tokens.Allowance(sdt, account.Address, contractAddress, nil) if err != nil { return nil, err } @@ -140,8 +133,7 @@ func allowanceSd(c *cli.Context) (*api.NodeDepositSdAllowanceResponse, error) { return &response, nil } -func approveSd(c *cli.Context, amountWei *big.Int) (*api.NodeDepositSdApproveResponse, error) { - +func approveSd(c *cli.Context, amountWei *big.Int, contractAddress common.Address) (*api.SdApproveResponse, error) { // Get services if err := services.RequireNodeRegistered(c); err != nil { return nil, err @@ -154,22 +146,21 @@ func approveSd(c *cli.Context, amountWei *big.Int) (*api.NodeDepositSdApproveRes if err != nil { return nil, err } - sdc, err := services.GetSdCollateralContract(c) - if err != nil { - return nil, err - } + // Response - response := api.NodeDepositSdApproveResponse{} + response := api.SdApproveResponse{} opts, err := w.GetNodeAccountTransactor() if err != nil { return nil, err } + err = eth1.CheckForNonceOverride(c, opts) if err != nil { return nil, fmt.Errorf("Error checking for nonce override: %w", err) } - hash, err := tokens.Approve(sdt, *sdc.SdCollateralContract.Address, amountWei, opts) + + hash, err := tokens.Approve(sdt, contractAddress, amountWei, opts) if err != nil { return nil, err } diff --git a/stader/api/node/get-contracts-info.go b/stader/api/node/get-contracts-info.go index 8414b53b6..b694faaca 100644 --- a/stader/api/node/get-contracts-info.go +++ b/stader/api/node/get-contracts-info.go @@ -18,6 +18,7 @@ func getContractsInfo(c *cli.Context) (*api.ContractsInfoResponse, error) { if err != nil { return nil, fmt.Errorf("Error getting configuration: %w", err) } + response.Network = uint64(config.StaderNode.GetChainID()) response.EncryptionKey = config.StaderNode.GetPresignEncryptionKey() @@ -34,6 +35,7 @@ func getContractsInfo(c *cli.Context) (*api.ContractsInfoResponse, error) { response.BeaconNetwork = eth2DepositContract.ChainID response.BeaconDepositContract = eth2DepositContract.Address + response.SdCollateralContract, err = services.GetSdCollateralAddress(c) if err != nil { return nil, err @@ -44,35 +46,47 @@ func getContractsInfo(c *cli.Context) (*api.ContractsInfoResponse, error) { if err != nil { return nil, err } + response.SdToken, err = services.GetSdTokenAddress(c) if err != nil { return nil, err } + response.PermissionlessNodeRegistry, err = services.GetPermissionlessNodeRegistryAddress(c) if err != nil { return nil, err } + response.VaultFactory, err = services.GetVaultFactoryAddress(c) if err != nil { return nil, err } + response.SocializingPoolContract, err = services.GetSocializingPoolAddress(c) if err != nil { return nil, err } + response.PermisionlessPool, err = services.GetPermissionlessPoolAddress(c) if err != nil { return nil, err } + response.StaderOracle, err = services.GetStaderOracleAddress(c) if err != nil { return nil, err } + response.StakePoolManager, err = services.GetStakePoolManagerAddress(c) if err != nil { return nil, err } + response.SdUtilityContract, err = services.GetSdUtilityAddress(c) + if err != nil { + return nil, err + } + // Return response return &response, nil diff --git a/stader/api/node/repay-sd.go b/stader/api/node/repay-sd.go new file mode 100644 index 000000000..15ebc3840 --- /dev/null +++ b/stader/api/node/repay-sd.go @@ -0,0 +1,106 @@ +package node + +import ( + "math/big" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/core/types" + "github.com/stader-labs/stader-node/stader-lib/sdutility" + "github.com/stader-labs/stader-node/stader-lib/stader" + + "github.com/urfave/cli" + + "github.com/stader-labs/stader-node/shared/services" + "github.com/stader-labs/stader-node/shared/types/api" +) + +func canRepaySD(c *cli.Context, amountWei *big.Int) (*api.CanRepaySDResponse, error) { + // Get services + if err := services.RequireNodeWallet(c); err != nil { + return nil, err + } + + w, err := services.GetWallet(c) + if err != nil { + return nil, err + } + + // Response + response := api.CanRepaySDResponse{} + + sdu, err := services.GetSdUtilityContract(c) + if err != nil { + return nil, err + } + + isAmountMaxUint256 := amountWei.Cmp(abi.MaxUint256) == 0 + + // Get gas estimates + opts, err := w.GetNodeAccountTransactor() + if err != nil { + return nil, err + } + + var gasInfo stader.GasInfo + + if isAmountMaxUint256 { + gasInfo, err = sdutility.EstimateRepayFullAmount(sdu, opts) + if err != nil { + return nil, err + } + } else { + gasInfo, err = sdutility.EstimateRepay(sdu, amountWei, opts) + if err != nil { + return nil, err + } + } + + response.GasInfo = gasInfo + + return &response, nil +} + +func repaySD(c *cli.Context, amountWei *big.Int) (*api.NodeRepaySDResponse, error) { + // Get services + if err := services.RequireNodeWallet(c); err != nil { + return nil, err + } + + w, err := services.GetWallet(c) + if err != nil { + return nil, err + } + + sdu, err := services.GetSdUtilityContract(c) + if err != nil { + return nil, err + } + + // Get gas estimates + opts, err := w.GetNodeAccountTransactor() + if err != nil { + return nil, err + } + + isAmountMaxUint256 := amountWei.Cmp(abi.MaxUint256) == 0 + + // Response + response := api.NodeRepaySDResponse{} + + var tx *types.Transaction + if isAmountMaxUint256 { + tx, err = sdutility.RepayFullAmount(sdu, opts) + if err != nil { + return nil, err + } + } else { + tx, err = sdutility.Repay(sdu, amountWei, opts) + if err != nil { + return nil, err + } + } + + response.TxHash = tx.Hash() + + return &response, nil +} diff --git a/stader/api/node/sd-status.go b/stader/api/node/sd-status.go new file mode 100644 index 000000000..697862e8e --- /dev/null +++ b/stader/api/node/sd-status.go @@ -0,0 +1,80 @@ +package node + +import ( + "math/big" + + "github.com/stader-labs/stader-node/stader-lib/node" + sd_collateral "github.com/stader-labs/stader-node/stader-lib/sd-collateral" + "github.com/stader-labs/stader-node/stader/api/validator" + + "github.com/urfave/cli" + + "github.com/stader-labs/stader-node/shared/services" + "github.com/stader-labs/stader-node/shared/types/api" +) + +func getSDStatus(c *cli.Context, numValidators *big.Int) (*api.GetSdStatusResponse, error) { + sdc, err := services.GetSdCollateralContract(c) + if err != nil { + return nil, err + } + + sdt, err := services.GetSdTokenContract(c) + if err != nil { + return nil, err + } + + sdu, err := services.GetSdUtilityContract(c) + if err != nil { + return nil, err + } + + w, err := services.GetWallet(c) + if err != nil { + return nil, err + } + + // Get node account + nodeAccount, err := w.GetNodeAccount() + if err != nil { + return nil, err + } + + prn, err := services.GetPermissionlessNodeRegistry(c) + if err != nil { + return nil, err + } + + operatorID, err := node.GetOperatorId(prn, nodeAccount.Address, nil) + if err != nil { + return nil, err + } + + totalValidatorKeys, err := node.GetTotalValidatorKeys(prn, operatorID, nil) + if err != nil { + return nil, err + } + + totalValidatorNonTerminalKeys, err := node.GetTotalNonTerminalValidatorKeys(prn, nodeAccount.Address, totalValidatorKeys, nil) + if err != nil { + return nil, err + } + + numValidatorsPostAdd := new(big.Int).Add(numValidators, big.NewInt(int64(totalValidatorNonTerminalKeys))) + + sdStatus, err := validator.GetSDStatus(sdc, sdu, sdt, nodeAccount.Address, numValidatorsPostAdd) + if err != nil { + return nil, err + } + + hasEnoughSdCollateral, err := sd_collateral.HasEnoughSdCollateral(sdc, nodeAccount.Address, 1, numValidatorsPostAdd, nil) + if err != nil { + return nil, err + } + + sdStatus.NotEnoughSdCollateral = !hasEnoughSdCollateral + + return &api.GetSdStatusResponse{ + SDStatus: sdStatus, + }, nil +} diff --git a/stader/api/node/status.go b/stader/api/node/status.go index aaebd495e..7b48dff08 100644 --- a/stader/api/node/status.go +++ b/stader/api/node/status.go @@ -1,14 +1,15 @@ package node import ( + "math/big" + "time" + stader_backend "github.com/stader-labs/stader-node/shared/types/stader-backend" "github.com/stader-labs/stader-node/shared/utils/eth1" pool_utils "github.com/stader-labs/stader-node/stader-lib/pool-utils" socializing_pool "github.com/stader-labs/stader-node/stader-lib/socializing-pool" stader_config "github.com/stader-labs/stader-node/stader-lib/stader-config" "github.com/stader-labs/stader-node/stader-lib/types" - "math/big" - "time" "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" @@ -113,7 +114,6 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { // Response response := api.NodeStatusResponse{} - //fmt.Printf("Getting node account...\n") nodeAccount, err := w.GetNodeAccount() if err != nil { return nil, err @@ -121,12 +121,10 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { response.AccountAddress = nodeAccount.Address - //fmt.Printf("Getting node account balances...\n") accountEthBalance, err := tokens.GetEthBalance(pnr.Client, nodeAccount.Address, nil) if err != nil { return nil, err } - //fmt.Printf("Getting node account SD balance...\n") accountSdBalance, err := tokens.BalanceOf(sdt, nodeAccount.Address, nil) if err != nil { return nil, err @@ -135,19 +133,16 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { response.AccountBalances.ETH = accountEthBalance response.AccountBalances.Sd = accountSdBalance - //fmt.Printf("Getting socializing pool address...\n") socializingPoolAddress, err := stader_config.GetSocializingPoolContractAddress(sdcfg, nil) if err != nil { return nil, err } response.SocializingPoolAddress = socializingPoolAddress - //fmt.Printf("Getting operator id...\n") operatorId, err := node.GetOperatorId(pnr, nodeAccount.Address, nil) if err != nil { return nil, err } - //fmt.Printf("Getting operator info...\n") operatorRegistry, err := node.GetOperatorInfo(pnr, operatorId, nil) if err != nil { return nil, err @@ -162,18 +157,15 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { response.OperatorRewardAddress = operatorRegistry.OperatorRewardAddress response.OptedInForSocializingPool = operatorRegistry.OptedForSocializingPool - //fmt.Printf("Getting operator node el reward balance\n") // non socializing pool fee recepient operatorElRewardAddress, err := node.GetNodeElRewardAddress(pnr, 1, operatorId, nil) if err != nil { return nil, err } - //fmt.Printf("Getting operator node el reward balance\n") elRewardAddressBalance, err := tokens.GetEthBalance(pnr.Client, operatorElRewardAddress, nil) if err != nil { return nil, err } - //fmt.Printf("Getting operator node el reward share\n") operatorElRewards, err := pool_utils.CalculateRewardShare(putils, 1, elRewardAddressBalance, nil) if err != nil { return nil, err @@ -187,14 +179,19 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { } response.OperatorRewardCollectorBalance = operatorRewardCollectorBalance - //fmt.Printf("Getting operator reward address balance\n") + operatorWithdrawableEth, err := node.WithdrawableInEth(orc, nodeAccount.Address, nil) + if err != nil { + return nil, err + } + + response.OperatorWithdrawableEth = operatorWithdrawableEth + operatorReward, err := tokens.GetEthBalance(pnr.Client, operatorRegistry.OperatorRewardAddress, nil) if err != nil { return nil, err } response.OperatorRewardInETH = operatorReward - //fmt.Printf("getting operator sd collateral balance\n") // get operator deposited sd collateral operatorSdCollateral, err := sd_collateral.GetOperatorSdBalance(sdc, nodeAccount.Address, nil) if err != nil { @@ -202,7 +199,6 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { } response.DepositedSdCollateral = operatorSdCollateral - //fmt.Printf("getting operator sd collateral worth validators\n") // total registerable validators totalSdWorthValidators, err := sd_collateral.GetMaxValidatorSpawnable(sdc, operatorSdCollateral, 1, nil) if err != nil { @@ -210,7 +206,6 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { } response.SdCollateralWorthValidators = totalSdWorthValidators - //fmt.Printf("Getting reward details\n") rewardCycleDetails, err := socializing_pool.GetRewardDetails(sp, nil) if err != nil { return nil, err @@ -219,18 +214,15 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { socializingPoolStartTimestamp := time.Now() response.SocializingPoolStartTime = socializingPoolStartTimestamp - //fmt.Printf("Get total validator keys\n") totalValidatorKeys, err := node.GetTotalValidatorKeys(pnr, operatorId, nil) if err != nil { return nil, err } - //fmt.Printf("Get total non terminal validator keys\n") totalNonTerminalValidatorKeys, err := node.GetTotalNonTerminalValidatorKeys(pnr, nodeAccount.Address, totalValidatorKeys, nil) if err != nil { return nil, err } - //fmt.Printf("Total non terminal validators %d\n", totalNonTerminalValidatorKeys) response.TotalNonTerminalValidators = big.NewInt(int64(totalNonTerminalValidatorKeys)) @@ -313,7 +305,6 @@ func getStatus(c *cli.Context) (*api.NodeStatusResponse, error) { response.ValidatorInfos = validatorInfoArray response.TotalValidatorClRewards = totalValidatorClRewards - //fmt.Printf("Getting operator claimed and unclaimed socializing pool merkles\n") claimedMerkles, unclaimedMerkles, err := GetClaimedAndUnclaimedSocializingPoolMerkles(c) if err != nil { return nil, err diff --git a/stader/api/node/utility-sd.go b/stader/api/node/utility-sd.go new file mode 100644 index 000000000..7fcd192f4 --- /dev/null +++ b/stader/api/node/utility-sd.go @@ -0,0 +1,108 @@ +package node + +import ( + "math/big" + + "github.com/stader-labs/stader-node/stader-lib/node" + "github.com/urfave/cli" + + "github.com/stader-labs/stader-node/shared/services" + "github.com/stader-labs/stader-node/shared/types/api" + "github.com/stader-labs/stader-node/stader-lib/sdutility" +) + +func canUtilitySd(c *cli.Context, amountWei *big.Int) (*api.CanUtilitySDResponse, error) { + if err := services.RequireNodeWallet(c); err != nil { + return nil, err + } + + w, err := services.GetWallet(c) + if err != nil { + return nil, err + } + + nodeAccount, err := w.GetNodeAccount() + if err != nil { + return nil, err + } + + prn, err := services.GetPermissionlessNodeRegistry(c) + if err != nil { + return nil, err + } + + // Response + response := api.CanUtilitySDResponse{} + + sdu, err := services.GetSdUtilityContract(c) + if err != nil { + return nil, err + } + + operatorID, err := node.GetOperatorId(prn, nodeAccount.Address, nil) + if err != nil { + return nil, err + } + + totalValidatorKeys, err := node.GetTotalValidatorKeys(prn, operatorID, nil) + if err != nil { + return nil, err + } + + totalValidatorNonTerminalKeys, err := node.GetTotalNonTerminalValidatorKeys(prn, nodeAccount.Address, totalValidatorKeys, nil) + if err != nil { + return nil, err + } + + response.NonTerminalValidators = totalValidatorNonTerminalKeys + + // Get gas estimates + opts, err := w.GetNodeAccountTransactor() + if err != nil { + return nil, err + } + + gasInfo, err := sdutility.EstimateUtilize(sdu, amountWei, opts) + if err != nil { + return nil, err + } + + response.GasInfo = gasInfo + + return &response, nil +} + +func utilitySd(c *cli.Context, amountWei *big.Int) (*api.NodeUtilitySDResponse, error) { + // Get services + if err := services.RequireNodeWallet(c); err != nil { + return nil, err + } + + w, err := services.GetWallet(c) + if err != nil { + return nil, err + } + + sdu, err := services.GetSdUtilityContract(c) + if err != nil { + return nil, err + } + + // Get gas estimates + opts, err := w.GetNodeAccountTransactor() + if err != nil { + return nil, err + } + + // Response + response := api.NodeUtilitySDResponse{} + + tx, err := sdutility.Utilize(sdu, amountWei, opts) + if err != nil { + return nil, err + } + + response.TxHash = tx.Hash() + + return &response, nil +} diff --git a/stader/api/node/withdraw-sd.go b/stader/api/node/withdraw-sd.go index 1d0ffc44b..49edc39bf 100644 --- a/stader/api/node/withdraw-sd.go +++ b/stader/api/node/withdraw-sd.go @@ -2,13 +2,14 @@ package node import ( "fmt" + "math/big" + "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" "github.com/stader-labs/stader-node/shared/utils/eth1" "github.com/stader-labs/stader-node/stader-lib/node" sd_collateral "github.com/stader-labs/stader-node/stader-lib/sd-collateral" "github.com/urfave/cli" - "math/big" ) func canWithdrawSd(c *cli.Context, amountWei *big.Int) (*api.CanWithdrawSdResponse, error) { @@ -40,6 +41,7 @@ func canWithdrawSd(c *cli.Context, amountWei *big.Int) (*api.CanWithdrawSdRespon if err != nil { return nil, err } + operatorId, err := node.GetOperatorId(pnr, nodeAccount.Address, nil) if err != nil { return nil, err @@ -71,12 +73,19 @@ func canWithdrawSd(c *cli.Context, amountWei *big.Int) (*api.CanWithdrawSdRespon thresholdSdRequiredToWithdraw := withdrawThresholdInSd.Add(withdrawThresholdInSd, amountWei) - if operatorSdCollateral.Cmp(thresholdSdRequiredToWithdraw) < 0 { + utilizedBalance, err := sd_collateral.GetOperatorUtilizedSDBalance(sdc, nodeAccount.Address, nil) + if err != nil { + return nil, err + } + + totalOperatorSdCollateral := big.NewInt(0).Add(operatorSdCollateral, utilizedBalance) + + if totalOperatorSdCollateral.Cmp(thresholdSdRequiredToWithdraw) < 0 { response.InsufficientSdCollateral = true return &response, nil } - if operatorSdCollateral.Cmp(amountWei) < 0 { + if totalOperatorSdCollateral.Cmp(amountWei) < 0 { response.InsufficientWithdrawableSd = true return &response, nil } diff --git a/stader/api/validator/commands.go b/stader/api/validator/commands.go index 12ad10676..cacfa0cad 100644 --- a/stader/api/validator/commands.go +++ b/stader/api/validator/commands.go @@ -37,30 +37,34 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { { Name: "can-deposit", Usage: "Check whether the node can make a deposit to create a validator", - UsageText: "stader-cli api validator can-deposit amount salt num-validators reload-keys", + UsageText: "stader-cli api validator can-deposit amount num-validators reload-keys", Action: func(c *cli.Context) error { - //// Validate args // Validate args - if err := cliutils.ValidateArgCount(c, 3); err != nil { + if err := cliutils.ValidateArgCount(c, 4); err != nil { return err } - amountWei, err := cliutils.ValidateWeiAmount("deposit amount", c.Args().Get(0)) + baseAmountWei, err := cliutils.ValidateWeiAmount("deposit amount", c.Args().Get(0)) if err != nil { return err } - numValidators, err := cliutils.ValidateBigInt("num-validators", c.Args().Get(1)) + utilityAmountWei, err := cliutils.ValidateWeiAmount("utility amount", c.Args().Get(1)) if err != nil { return err } - reloadKeys, err := cliutils.ValidateBool("reload-keys", c.Args().Get(2)) + numValidators, err := cliutils.ValidateBigInt("num-validators", c.Args().Get(2)) if err != nil { return err } - api.PrintResponse(canNodeDeposit(c, amountWei, numValidators, reloadKeys)) + reloadKeys, err := cliutils.ValidateBool("reload-keys", c.Args().Get(3)) + if err != nil { + return err + } + + api.PrintResponse(canNodeDeposit(c, baseAmountWei, utilityAmountWei, numValidators, reloadKeys)) return nil @@ -70,30 +74,35 @@ func RegisterSubcommands(command *cli.Command, name string, aliases []string) { Name: "deposit", Aliases: []string{"d"}, Usage: "Make a deposit and create a validator", - UsageText: "stader-cli api validator deposit amount num-validators reload-keys", + UsageText: "stader-cli api validator deposit-amount utility-amount num-validators reload-keys", Action: func(c *cli.Context) error { // Validate args - if err := cliutils.ValidateArgCount(c, 3); err != nil { + if err := cliutils.ValidateArgCount(c, 4); err != nil { return err } - amountWei, err := cliutils.ValidateWeiAmount("deposit amount", c.Args().Get(0)) + baseAmountWei, err := cliutils.ValidateWeiAmount("deposit amount", c.Args().Get(0)) + if err != nil { + return err + } + + utilityAmountWei, err := cliutils.ValidateWeiAmount("utility amount", c.Args().Get(1)) if err != nil { return err } - numValidators, err := cliutils.ValidateBigInt("num-validators", c.Args().Get(1)) + numValidators, err := cliutils.ValidateBigInt("num-validators", c.Args().Get(2)) if err != nil { return err } - reloadKeys, err := cliutils.ValidateBool("reload-keys", c.Args().Get(2)) + reloadKeys, err := cliutils.ValidateBool("reload-keys", c.Args().Get(3)) if err != nil { return err } // Run - response, err := nodeDeposit(c, amountWei, numValidators, reloadKeys) + response, err := nodeDeposit(c, baseAmountWei, utilityAmountWei, numValidators, reloadKeys) api.PrintResponse(response, err) return nil diff --git a/stader/api/validator/deposit.go b/stader/api/validator/deposit.go index 3143a3f9b..bad76ea18 100644 --- a/stader/api/validator/deposit.go +++ b/stader/api/validator/deposit.go @@ -2,13 +2,17 @@ package validator import ( "fmt" + "math/big" + + "github.com/ethereum/go-ethereum/common" "github.com/stader-labs/stader-node/stader-lib/node" sd_collateral "github.com/stader-labs/stader-node/stader-lib/sd-collateral" + "github.com/stader-labs/stader-node/stader-lib/sdutility" + "github.com/stader-labs/stader-node/stader-lib/stader" "github.com/stader-labs/stader-node/stader-lib/tokens" stadertypes "github.com/stader-labs/stader-node/stader-lib/types" "github.com/urfave/cli" _ "golang.org/x/sync/errgroup" - "math/big" "github.com/stader-labs/stader-node/shared/services" "github.com/stader-labs/stader-node/shared/types/api" @@ -16,7 +20,97 @@ import ( "github.com/stader-labs/stader-node/shared/utils/validator" ) -func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, reloadKeys bool) (*api.CanNodeDepositResponse, error) { +const ( + MinToUtilizeRatioNum = 5 + MinToUtilizeRatioDenom = 2 +) + +func GetSDStatus( + sdc *stader.SdCollateralContractManager, + sdu *stader.SDUtilityPoolContractManager, + sdt *stader.Erc20TokenContractManager, + operatorAddress common.Address, + totalValidatorsPostAddition *big.Int, +) (*api.SdStatusResponse, error) { + sdUtilityLatestBalance, err := sdutility.GetUtilizerLatestBalance(sdu, operatorAddress, nil) + if err != nil { + return nil, err + } + + userData, err := sdutility.GetUserData(sdu, operatorAddress, nil) + if err != nil { + return nil, err + } + + poolAvailableSDBalance, err := sdutility.GetPoolAvailableSDBalance(sdu, nil) + if err != nil { + return nil, err + } + + utilizationRate, err := sdutility.GetUtilizationRatePercent(sdu, nil) + if err != nil { + return nil, err + } + + minimumSDToBond, err := sd_collateral.MinimumSDToBond(sdc, 1, totalValidatorsPostAddition, nil) + if err != nil { + return nil, err + } + + sdCollateralCurrentAmount, err := sd_collateral.GetOperatorSdBalance(sdc, operatorAddress, nil) + if err != nil { + return nil, err + } + + sdUtilizedBalance, err := sd_collateral.GetOperatorUtilizedSDBalance(sdc, operatorAddress, nil) + if err != nil { + return nil, err + } + + rewardEligibleSD, err := sd_collateral.RewardEligibleSD(sdc, 1, totalValidatorsPostAddition, nil) + if err != nil { + return nil, err + } + + // Check Sd balance + sdBalance, err := sdt.Erc20Token.BalanceOf(nil, operatorAddress) + if err != nil { + return nil, err + } + + sdMaxUtilizableAmount, err := sdutility.SDMaxUtilizableAmount(sdu, sdc, totalValidatorsPostAddition, nil) + if err != nil { + return nil, err + } + + hasEnoughSdCollateral, err := sd_collateral.HasEnoughSdCollateral(sdc, operatorAddress, 1, totalValidatorsPostAddition, nil) + if err != nil { + return nil, err + } + + alreadyLiquidated, err := sdutility.AlreadyLiquidated(sdu, operatorAddress) + if err != nil { + return nil, err + } + + return &api.SdStatusResponse{ + NotEnoughSdCollateral: !hasEnoughSdCollateral, + SdUtilizerLatestBalance: sdUtilityLatestBalance, + SdBalance: sdBalance, + SdCollateralCurrentAmount: sdCollateralCurrentAmount, + SdCollateralRequireAmount: minimumSDToBond, + SdMaxUtilizableAmount: sdMaxUtilizableAmount, + UtilizationRate: utilizationRate, + SdUtilizedBalance: sdUtilizedBalance, + PoolAvailableSDBalance: poolAvailableSDBalance, + SdRewardEligible: rewardEligibleSD, + HealthFactor: userData.HealthFactor, + AccumulatedInterest: userData.TotalInterestSD, + AlreadyLiquidated: alreadyLiquidated, + }, nil +} + +func canNodeDeposit(c *cli.Context, baseAmountWei, utilityAmountWei, numValidators *big.Int, _ bool) (*api.CanNodeDepositResponse, error) { if err := services.RequireNodeWallet(c); err != nil { return nil, err } @@ -38,10 +132,7 @@ func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, if err != nil { return nil, err } - sdc, err := services.GetSdCollateralContract(c) - if err != nil { - return nil, err - } + bc, err := services.GetBeaconClient(c) if err != nil { return nil, err @@ -59,7 +150,7 @@ func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, return nil, err } - amountToSend := amountWei.Mul(amountWei, numValidators) + amountToSend := baseAmountWei.Mul(baseAmountWei, numValidators) opts, err := w.GetNodeAccountTransactor() if err != nil { @@ -76,6 +167,7 @@ func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, } if userBalance.Cmp(amountToSend) < 0 { canNodeDepositResponse.InsufficientBalance = true + return &canNodeDepositResponse, nil } isPermissionlessNodeRegistryPaused, err := node.IsPermissionlessNodeRegistryPaused(prn, nil) @@ -107,15 +199,6 @@ func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, totalValidatorsPostAddition := totalValidatorNonTerminalKeys + numValidators.Uint64() - hasEnoughSdCollateral, err := sd_collateral.HasEnoughSdCollateral(sdc, nodeAccount.Address, 1, big.NewInt(int64(totalValidatorsPostAddition)), nil) - if err != nil { - return nil, err - } - if !hasEnoughSdCollateral { - canNodeDepositResponse.NotEnoughSdCollateral = true - return &canNodeDepositResponse, nil - } - inputKeyLimitCount, err := node.GetInputKeyLimitCount(prn, nil) if err != nil { return nil, err @@ -193,7 +276,15 @@ func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, return nil, fmt.Errorf("error checking for nonce override: %w", err) } - gasInfo, err := node.EstimateAddValidatorKeys(prn, pubKeys, preDepositSignatures, depositSignatures, opts) + gasInfo, err := node.EstimateAddValidatorKeys( + prn, + utilityAmountWei, + pubKeys, + preDepositSignatures, + depositSignatures, + "stader_labs", + opts, + ) if err != nil { return nil, err } @@ -204,8 +295,7 @@ func canNodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, return &canNodeDepositResponse, nil } -func nodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, reloadKeys bool) (*api.NodeDepositResponse, error) { - +func nodeDeposit(c *cli.Context, baseAmountWei, utilityAmountWei, numValidators *big.Int, reloadKeys bool) (*api.NodeDepositResponse, error) { cfg, err := services.GetConfig(c) if err != nil { return nil, err @@ -263,7 +353,7 @@ func nodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, rel preDepositSignatures := make([][]byte, numValidators.Int64()) depositSignatures := make([][]byte, numValidators.Int64()) - amountToSend := amountWei.Mul(amountWei, numValidators) + amountToSend := baseAmountWei.Mul(baseAmountWei, numValidators) opts.Value = amountToSend validatorKeyCount, err := node.GetTotalValidatorKeys(prn, operatorId, nil) @@ -345,7 +435,14 @@ func nodeDeposit(c *cli.Context, amountWei *big.Int, numValidators *big.Int, rel return nil, fmt.Errorf("error checking for nonce override: %w", err) } - tx, err := node.AddValidatorKeys(prn, pubKeys, preDepositSignatures, depositSignatures, opts) + tx, err := node.AddValidatorKeysWithAmount(prn, + pubKeys, + preDepositSignatures, + depositSignatures, + utilityAmountWei, + // TODO - this is a placeholder for now + "stader_labs", + opts) if err != nil { return nil, err } diff --git a/stader/guardian/collector/constants.go b/stader/guardian/collector/constants.go index be3403dae..43d1b9f5b 100644 --- a/stader/guardian/collector/constants.go +++ b/stader/guardian/collector/constants.go @@ -29,6 +29,15 @@ const UnclaimedSocializingPoolELRewards = "unclaimed_socializing_pool_el_rewards const UnclaimedSocializingPoolSdRewards = "unclaimed_socializing_pool_sd_rewards" const UnclaimedCLRewards = "unclaimed_cl_rewards" const NextRewardCycleTime = "next_reward_cycle_time" +const SDUtilized = "sd_utilized" +const SDUtilizedInterest = "sd_utilized_interest" +const SdCollateralPct = "sd_collateral_pct" +const LockedEth = "eth_locked" +const HeathFactor = "heath_factor" +const TotalSDUtilizationPosition = "sd_utility_position" +const TotalSDSelfBonded = "total_sd_self_bonded" +const LiquidationStatus = "liquidation_status" +const ClaimVaultBalance = "claim_vault_balance" // Node Health => stader_node_health+ key const NodeSub = "node_health" diff --git a/stader/guardian/collector/network-collector.go b/stader/guardian/collector/network-collector.go index 52bf8f12b..1401f310f 100644 --- a/stader/guardian/collector/network-collector.go +++ b/stader/guardian/collector/network-collector.go @@ -59,6 +59,14 @@ type NetworkCollector struct { // The min amount of sd value that can be staked to get rewards MinEthThreshold *prometheus.Desc + // The utilize amount + fee + SdUtilityPoolBalance *prometheus.Desc + + // Total amount of outstanding SD utilized + TotalSDUtilized *prometheus.Desc + + TotalValueLocledSDUtilization *prometheus.Desc + // The beacon client bc beacon.Client @@ -139,6 +147,18 @@ func NewNetworkCollector(bc beacon.Client, ec stader.ExecutionClient, nodeAddres "The maximum amount of sd value that can be staked to get rewards", nil, nil, ), + SdUtilityPoolBalance: prometheus.NewDesc(prometheus.BuildFQName(namespace, subsystem, "sd_utility_pool_balance"), + "The current balance of the SD utility pool", + nil, nil, + ), + TotalSDUtilized: prometheus.NewDesc(prometheus.BuildFQName(namespace, subsystem, "total_outstanding_sd_utilized"), + "The total the SD utilized in network", + nil, nil, + ), + TotalValueLocledSDUtilization: prometheus.NewDesc(prometheus.BuildFQName(namespace, subsystem, "sd_utilization_tvl"), + "The total value locked for SD utilization in network", + nil, nil, + ), bc: bc, ec: ec, nodeAddress: nodeAddress, @@ -164,6 +184,9 @@ func (collector *NetworkCollector) Describe(channel chan<- *prometheus.Desc) { channel <- collector.CollateralRatioInSd channel <- collector.MinEthThreshold channel <- collector.MaxEthThreshold + channel <- collector.SdUtilityPoolBalance + channel <- collector.TotalSDUtilized + channel <- collector.TotalValueLocledSDUtilization } // Collect the latest metric values and pass them to Prometheus @@ -203,6 +226,11 @@ func (collector *NetworkCollector) Collect(channel chan<- prometheus.Metric) { collector.MinEthThreshold, prometheus.GaugeValue, state.StaderNetworkDetails.MinEthThreshold) channel <- prometheus.MustNewConstMetric( collector.MaxEthThreshold, prometheus.GaugeValue, state.StaderNetworkDetails.MaxEthThreshold) + channel <- prometheus.MustNewConstMetric(collector.SdUtilityPoolBalance, prometheus.GaugeValue, state.StaderNetworkDetails.SdUtilityPoolBalance) + + channel <- prometheus.MustNewConstMetric(collector.TotalSDUtilized, prometheus.GaugeValue, state.StaderNetworkDetails.TotalSDUtilized) + + channel <- prometheus.MustNewConstMetric(collector.TotalValueLocledSDUtilization, prometheus.GaugeValue, state.StaderNetworkDetails.SDUtilizationTVL) } // Log error messages diff --git a/stader/guardian/collector/operator-collector.go b/stader/guardian/collector/operator-collector.go index b06638e97..e83e2be37 100644 --- a/stader/guardian/collector/operator-collector.go +++ b/stader/guardian/collector/operator-collector.go @@ -33,6 +33,19 @@ type OperatorCollector struct { TotalSdCollateral *prometheus.Desc TotalSdCollateralInEth *prometheus.Desc TotalEthColateral *prometheus.Desc + TotalSDUtilizationPosition *prometheus.Desc + TotalSDSelfBond *prometheus.Desc + TotalSDUtilized *prometheus.Desc + TotalSDUtilizedInterest *prometheus.Desc + SdCollateralPct *prometheus.Desc + LockedEth *prometheus.Desc + HealthFactor *prometheus.Desc + LiquidationStatus *prometheus.Desc + ClaimVaultBalance *prometheus.Desc + + SDUtilizationPosition *prometheus.Desc + + SDSelfBond *prometheus.Desc // The beacon client bc beacon.Client @@ -112,6 +125,32 @@ func NewOperatorCollector( prometheus.BuildFQName(namespace, OperatorSub, SdCollateralInEth), "", nil, nil), TotalEthColateral: prometheus.NewDesc( prometheus.BuildFQName(namespace, OperatorSub, EthCollateral), "", nil, nil), + TotalSDUtilized: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, SDUtilized), "", nil, nil), + TotalSDUtilizedInterest: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, SDUtilizedInterest), "", nil, nil), + SdCollateralPct: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, SdCollateralPct), "", nil, nil), + LockedEth: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, LockedEth), "", nil, nil), + HealthFactor: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, HeathFactor), "", nil, nil), + TotalSDUtilizationPosition: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, TotalSDUtilizationPosition), "", nil, nil), + TotalSDSelfBond: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, TotalSDSelfBonded), "", nil, nil), + LiquidationStatus: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, LiquidationStatus), "", nil, nil), + ClaimVaultBalance: prometheus.NewDesc( + prometheus.BuildFQName(namespace, OperatorSub, ClaimVaultBalance), "", nil, nil), + SDUtilizationPosition: prometheus.NewDesc(prometheus.BuildFQName(namespace, OperatorSub, "sd_utility_position"), + "The current balance of the SD utility pool", + nil, nil, + ), + SDSelfBond: prometheus.NewDesc(prometheus.BuildFQName(namespace, OperatorSub, "sd_self_bond"), + "The current balance of the SD utility pool", + nil, nil, + ), bc: bc, ec: ec, nodeAddress: nodeAddress, @@ -142,6 +181,17 @@ func (collector *OperatorCollector) Describe(channel chan<- *prometheus.Desc) { channel <- collector.TotalSdCollateral channel <- collector.TotalSdCollateralInEth channel <- collector.TotalEthColateral + channel <- collector.TotalSDUtilized + channel <- collector.TotalSDUtilizedInterest + channel <- collector.SdCollateralPct + channel <- collector.LockedEth + channel <- collector.HealthFactor + channel <- collector.TotalSDUtilizationPosition + channel <- collector.TotalSDSelfBond + channel <- collector.LiquidationStatus + channel <- collector.ClaimVaultBalance + channel <- collector.SDUtilizationPosition + channel <- collector.SDSelfBond } // Collect the latest metric values and pass them to Prometheus @@ -169,7 +219,17 @@ func (collector *OperatorCollector) Collect(channel chan<- prometheus.Metric) { channel <- prometheus.MustNewConstMetric(collector.TotalSdCollateral, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorStakedSd) channel <- prometheus.MustNewConstMetric(collector.TotalSdCollateralInEth, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorStakedSdInEth) channel <- prometheus.MustNewConstMetric(collector.TotalEthColateral, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorEthCollateral) - + channel <- prometheus.MustNewConstMetric(collector.TotalSDUtilized, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorSDUtilized) + channel <- prometheus.MustNewConstMetric(collector.TotalSDUtilizedInterest, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorSDInterest) + channel <- prometheus.MustNewConstMetric(collector.SdCollateralPct, prometheus.GaugeValue, state.StaderNetworkDetails.SdCollateralPct) + channel <- prometheus.MustNewConstMetric(collector.LockedEth, prometheus.GaugeValue, state.StaderNetworkDetails.LockedEth) + channel <- prometheus.MustNewConstMetric(collector.HealthFactor, prometheus.GaugeValue, state.StaderNetworkDetails.HealthFactor) + channel <- prometheus.MustNewConstMetric(collector.TotalSDUtilizationPosition, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorSDUtilizationPosition) + channel <- prometheus.MustNewConstMetric(collector.TotalSDSelfBond, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorSDSelfBond) + channel <- prometheus.MustNewConstMetric(collector.LiquidationStatus, prometheus.GaugeValue, state.StaderNetworkDetails.LiquidationStatus) + channel <- prometheus.MustNewConstMetric(collector.ClaimVaultBalance, prometheus.GaugeValue, state.StaderNetworkDetails.ClaimVaultBalance) + channel <- prometheus.MustNewConstMetric(collector.SDUtilizationPosition, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorSDUtilizationPosition) + channel <- prometheus.MustNewConstMetric(collector.SDSelfBond, prometheus.GaugeValue, state.StaderNetworkDetails.OperatorSDSelfBond) } // Log error messages diff --git a/stader/guardian/collector/state-locker.go b/stader/guardian/collector/state-locker.go index 4ca54f637..dd690bb18 100644 --- a/stader/guardian/collector/state-locker.go +++ b/stader/guardian/collector/state-locker.go @@ -1,10 +1,11 @@ package collector import ( - "github.com/stader-labs/stader-node/stader-lib/contracts" "math/big" "sync" + "github.com/stader-labs/stader-node/stader-lib/contracts" + "github.com/stader-labs/stader-node/shared/services/beacon" "github.com/stader-labs/stader-node/shared/services/state" "github.com/stader-labs/stader-node/stader-lib/types" @@ -53,10 +54,20 @@ func NewMetricsCacheContainer() *MetricsCacheContainer { CurrentStartBlock: big.NewInt(0), CurrentEndBlock: big.NewInt(0), }, - ValidatorStatusMap: make(map[types.ValidatorPubkey]beacon.ValidatorStatus), - ValidatorInfoMap: make(map[types.ValidatorPubkey]contracts.Validator), - CollateralRatio: 0, - CollateralRatioInSd: 0, + ValidatorStatusMap: make(map[types.ValidatorPubkey]beacon.ValidatorStatus), + ValidatorInfoMap: make(map[types.ValidatorPubkey]contracts.Validator), + CollateralRatio: 0, + CollateralRatioInSd: 0, + OperatorSDUtilized: 0, + OperatorSDInterest: 0, + OperatorSDUtilizationPosition: 0, + SdUtilityPoolBalance: 0, + OperatorSDSelfBond: 0, + SdCollateralPct: 0, + LockedEth: 0, + HealthFactor: 0, + LiquidationStatus: 0, + StaderQueuedValidators: big.NewInt(0), }, }, } diff --git a/stader/node/node.go b/stader/node/node.go index aeba383ef..bd6de7cd9 100644 --- a/stader/node/node.go +++ b/stader/node/node.go @@ -471,7 +471,7 @@ func run(c *cli.Context) error { if response.Success { infoLog.Println("Successfully sent the NodeDiversity message") } else { - errorLog.Println("Failed to send the NodeDiversity message with err: %s\n", response.Error) + errorLog.Printf("Failed to send the NodeDiversity message with err: %s\n", response.Error) } infoLog.Println("Done checking node diversity metrics") @@ -540,7 +540,6 @@ func makeNodeDiversityMessage( return nil, err } - //fmt.Printf("Get total non terminal validator keys\n") totalNonTerminalValidatorKeys, err := node.GetTotalNonTerminalValidatorKeys(pnr, nodeAccount.Address, totalValidatorKeys, nil) if err != nil { return nil, err diff --git a/update-abis.sh b/update-abis.sh index 97ddfc262..55bb86554 100755 --- a/update-abis.sh +++ b/update-abis.sh @@ -15,6 +15,7 @@ abigen --abi ./../../abis/Penalty.abi.json --pkg contracts --type PenaltyTracker abigen --abi ./../../abis/NodeElRewardVault.abi.json --pkg contracts --type NodeElRewardVault --out node-el-reward-vault.go; abigen --abi ./../../abis/OperatorRewardsCollector.abi.json --pkg contracts --type OperatorRewardsCollector --out operator-rewards-collector.go; abigen --abi ./../../abis/SdCollateral.abi.json --pkg contracts --type SdCollateral --out sd-collateral.go; +abigen --abi ./../../abis/SDUtilityPool.abi.json --pkg contracts --type SDUtilityPool --out sd-utility.go; cd ../..;