From a588f9c0c5fc56751af84dc9347f27b76ac88298 Mon Sep 17 00:00:00 2001 From: batphonghan Date: Wed, 17 Jan 2024 20:50:21 +0700 Subject: [PATCH] WIP: c8dc8b70 Update maxUtilizable --- abis/SDUtilityPool.abi.json | 655 +----- shared/types/api/node.go | 1 + stader-cli/node/utilize-sd.go | 14 + stader-cli/validator/deposit.go | 14 + stader-lib/contracts/sd-utility.go | 3381 +++++++--------------------- stader-lib/sdutility/sd-utility.go | 11 + stader/api/validator/deposit.go | 6 + 7 files changed, 875 insertions(+), 3207 deletions(-) diff --git a/abis/SDUtilityPool.abi.json b/abis/SDUtilityPool.abi.json index 5cd338445..44f0e5c78 100644 --- a/abis/SDUtilityPool.abi.json +++ b/abis/SDUtilityPool.abi.json @@ -1,14 +1,4 @@ [ - { - "inputs": [], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "AccrualBlockNumberNotLatest", - "type": "error" - }, { "inputs": [], "name": "AlreadyClaimed", @@ -24,16 +14,6 @@ "name": "CallerNotAuthorizedToRedeem", "type": "error" }, - { - "inputs": [], - "name": "CallerNotManager", - "type": "error" - }, - { - "inputs": [], - "name": "CallerNotStaderContract", - "type": "error" - }, { "inputs": [], "name": "CannotFindRequestId", @@ -102,7 +82,7 @@ }, { "inputs": [], - "name": "ZeroAddress", + "name": "UnHealthyPosition", "type": "error" }, { @@ -181,19 +161,6 @@ "name": "FinalizedWithdrawRequest", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "uint8", - "name": "version", - "type": "uint8" - } - ], - "name": "Initialized", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -231,19 +198,6 @@ "name": "LiquidationCall", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Paused", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -351,81 +305,6 @@ "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": [ @@ -445,19 +324,6 @@ "name": "SDUtilized", "type": "event" }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "Unpaused", - "type": "event" - }, { "anonymous": false, "inputs": [ @@ -587,71 +453,6 @@ "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": "accrualBlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "accrueFee", @@ -689,7 +490,7 @@ "inputs": [ { "internalType": "uint256", - "name": "_requestId", + "name": "requestId", "type": "uint256" } ], @@ -711,19 +512,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "conservativeEthPerKey", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -840,19 +628,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "finalizationBatchLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "finalizeDelegatorWithdrawalRequest", @@ -922,7 +697,7 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], @@ -969,25 +744,6 @@ "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", @@ -1005,7 +761,7 @@ "inputs": [ { "internalType": "address", - "name": "_delegator", + "name": "_owner", "type": "address" } ], @@ -1020,25 +776,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - } - ], - "name": "getRoleAdmin", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { @@ -1058,7 +795,7 @@ }, { "internalType": "uint256", - "name": "totalCollateralInSD", + "name": "totalCollateralInEth", "type": "uint256" }, { @@ -1101,208 +838,51 @@ }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", "name": "account", "type": "address" } ], - "name": "grantRole", + "name": "liquidationCall", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ - { - "internalType": "bytes32", - "name": "role", - "type": "bytes32" - }, { "internalType": "address", - "name": "account", + "name": "", "type": "address" } ], - "name": "hasRole", + "name": "liquidationIndexByOperator", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_admin", - "type": "address" - }, - { - "internalType": "address", - "name": "_staderConfig", - "type": "address" - } - ], - "name": "initialize", + "inputs": [], + "name": "maxApproveSD", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "maxETHWorthOfSDPerValidator", + "outputs": [ { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "liquidationCall", - "outputs": [], - "stateMutability": "nonpayable", - "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" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], "stateMutability": "view", @@ -1321,37 +901,6 @@ "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": [ { @@ -1364,12 +913,12 @@ "outputs": [ { "internalType": "uint256", - "name": "repaidAmount", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "feePaid", + "name": "", "type": "uint256" } ], @@ -1393,12 +942,12 @@ "outputs": [ { "internalType": "uint256", - "name": "repaidAmount", + "name": "", "type": "uint256" }, { "internalType": "uint256", - "name": "feePaid", + "name": "", "type": "uint256" } ], @@ -1433,7 +982,7 @@ "inputs": [ { "internalType": "uint256", - "name": "_cTokenAmount", + "name": "cTokenAmount", "type": "uint256" } ], @@ -1441,7 +990,7 @@ "outputs": [ { "internalType": "uint256", - "name": "_requestId", + "name": "", "type": "uint256" } ], @@ -1452,7 +1001,7 @@ "inputs": [ { "internalType": "uint256", - "name": "_sdAmount", + "name": "sdAmount", "type": "uint256" } ], @@ -1460,59 +1009,13 @@ "outputs": [ { "internalType": "uint256", - "name": "_requestId", + "name": "", "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", @@ -1526,71 +1029,6 @@ "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": [ { @@ -1669,34 +1107,6 @@ "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": [ { @@ -1749,19 +1159,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "utilizeIndex", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [ { diff --git a/shared/types/api/node.go b/shared/types/api/node.go index 357172086..50f72ff29 100644 --- a/shared/types/api/node.go +++ b/shared/types/api/node.go @@ -459,6 +459,7 @@ type SdStatusResponse struct { HealthFactor *big.Int `json:"healthFactor"` AccumulatedInterest *big.Int `json:"accumulatedInterest"` NotEnoughSdCollateral bool `json:"notEnoughSdCollateral"` + AlreadyLiquidated bool `json:"alreadyLiquidated"` } type NodeRepayExcessSDResponse struct { diff --git a/stader-cli/node/utilize-sd.go b/stader-cli/node/utilize-sd.go index 6f0798cb5..2940b008d 100644 --- a/stader-cli/node/utilize-sd.go +++ b/stader-cli/node/utilize-sd.go @@ -39,6 +39,20 @@ func utilizeSD(c *cli.Context) error { return err } + if sdStatusResponse.SDStatus.AlreadyLiquidated { + fmt.Printf("Your node is in liquidation process") + return nil + } + + healthFactor := eth.WeiToEth(sdStatusResponse.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 sdStatusResponse.SDStatus.SdCollateralRequireAmount.Cmp(big.NewInt(0)) == 0 { fmt.Printf("Please add a validator to your node first before utilizing SD from a Utility Pool. Execute the following command to add a validator to your node: stader-cli validator deposit --num-validators \n") return nil diff --git a/stader-cli/validator/deposit.go b/stader-cli/validator/deposit.go index b8e01571c..e5b9152f8 100644 --- a/stader-cli/validator/deposit.go +++ b/stader-cli/validator/deposit.go @@ -63,6 +63,20 @@ func nodeDeposit(c *cli.Context) error { return err } + if sdStatusResp.SDStatus.AlreadyLiquidated { + fmt.Printf("Your node is in liquidation process") + return nil + } + + 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 + } + userBalance := status.AccountBalances.ETH amountToSend := new(big.Int).Mul(eth.EthToWei(eth.BaseAmountInEth), big.NewInt(int64(numValidators))) diff --git a/stader-lib/contracts/sd-utility.go b/stader-lib/contracts/sd-utility.go index 825e21849..589d03fc9 100644 --- a/stader-lib/contracts/sd-utility.go +++ b/stader-lib/contracts/sd-utility.go @@ -41,15 +41,15 @@ type OperatorLiquidation struct { // UserData is an auto generated low-level Go binding around an user-defined struct. type UserData struct { - TotalInterestSD *big.Int - TotalCollateralInSD *big.Int - HealthFactor *big.Int - LockedEth *big.Int + 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\":\"AccrualBlockNumberNotLatest\",\"type\":\"error\"},{\"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\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"}],\"name\":\"RequestIdNotFinalized\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDTransferFailed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"SDUtilizeLimitReached\",\"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\":\"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\":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\":\"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\":\"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\":\"totalCollateralInSD\",\"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\":\"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\":[{\"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\":\"\",\"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\"}]", + ABI: "[{\"inputs\":[],\"name\":\"AlreadyClaimed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"AlreadyLiquidated\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CallerNotAuthorizedToRedeem\",\"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\":[{\"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\"},{\"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\":\"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\":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\":\"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\":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\":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\":\"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\":\"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\":\"account\",\"type\":\"address\"}],\"name\":\"completeLiquidation\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"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\":\"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\":\"\",\"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\":[],\"name\":\"getPoolAvailableSDBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"getRequestIdsByDelegator\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"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\":\"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\":[],\"name\":\"maxApproveSD\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxETHWorthOfSDPerValidator\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"poolUtilization\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"repayAmount\",\"type\":\"uint256\"}],\"name\":\"repay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"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\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"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\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"sdAmount\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawWithSDAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"sdRequestedForWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"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\":\"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\":[{\"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. @@ -198,161 +198,6 @@ func (_SDUtilityPool *SDUtilityPoolTransactorRaw) Transact(opts *bind.TransactOp 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) -} - -// 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) @@ -415,37 +260,6 @@ func (_SDUtilityPool *SDUtilityPoolCallerSession) CTokenTotalSupply() (*big.Int, 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) @@ -599,37 +413,6 @@ func (_SDUtilityPool *SDUtilityPoolCallerSession) ExchangeRateStored() (*big.Int 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) @@ -756,10 +539,10 @@ func (_SDUtilityPool *SDUtilityPoolCallerSession) GetLiquidationThreshold() (*bi // 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) { +// Solidity: function getOperatorLiquidation(address ) view returns((uint256,uint256,uint256,bool,bool,address)) +func (_SDUtilityPool *SDUtilityPoolCaller) GetOperatorLiquidation(opts *bind.CallOpts, arg0 common.Address) (OperatorLiquidation, error) { var out []interface{} - err := _SDUtilityPool.contract.Call(opts, &out, "getOperatorLiquidation", account) + err := _SDUtilityPool.contract.Call(opts, &out, "getOperatorLiquidation", arg0) if err != nil { return *new(OperatorLiquidation), err @@ -773,47 +556,16 @@ func (_SDUtilityPool *SDUtilityPoolCaller) GetOperatorLiquidation(opts *bind.Cal // 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) +// Solidity: function getOperatorLiquidation(address ) view returns((uint256,uint256,uint256,bool,bool,address)) +func (_SDUtilityPool *SDUtilityPoolSession) GetOperatorLiquidation(arg0 common.Address) (OperatorLiquidation, error) { + return _SDUtilityPool.Contract.GetOperatorLiquidation(&_SDUtilityPool.CallOpts, arg0) } // 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) +// Solidity: function getOperatorLiquidation(address ) view returns((uint256,uint256,uint256,bool,bool,address)) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetOperatorLiquidation(arg0 common.Address) (OperatorLiquidation, error) { + return _SDUtilityPool.Contract.GetOperatorLiquidation(&_SDUtilityPool.CallOpts, arg0) } // GetPoolAvailableSDBalance is a free data retrieval call binding the contract method 0xda695857. @@ -849,10 +601,10 @@ func (_SDUtilityPool *SDUtilityPoolCallerSession) GetPoolAvailableSDBalance() (* // 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) { +// Solidity: function getRequestIdsByDelegator(address _owner) view returns(uint256[]) +func (_SDUtilityPool *SDUtilityPoolCaller) GetRequestIdsByDelegator(opts *bind.CallOpts, _owner common.Address) ([]*big.Int, error) { var out []interface{} - err := _SDUtilityPool.contract.Call(opts, &out, "getRequestIdsByDelegator", _delegator) + err := _SDUtilityPool.contract.Call(opts, &out, "getRequestIdsByDelegator", _owner) if err != nil { return *new([]*big.Int), err @@ -866,47 +618,16 @@ func (_SDUtilityPool *SDUtilityPoolCaller) GetRequestIdsByDelegator(opts *bind.C // 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) +// Solidity: function getRequestIdsByDelegator(address _owner) view returns(uint256[]) +func (_SDUtilityPool *SDUtilityPoolSession) GetRequestIdsByDelegator(_owner common.Address) ([]*big.Int, error) { + return _SDUtilityPool.Contract.GetRequestIdsByDelegator(&_SDUtilityPool.CallOpts, _owner) } // 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) +// Solidity: function getRequestIdsByDelegator(address _owner) view returns(uint256[]) +func (_SDUtilityPool *SDUtilityPoolCallerSession) GetRequestIdsByDelegator(_owner common.Address) ([]*big.Int, error) { + return _SDUtilityPool.Contract.GetRequestIdsByDelegator(&_SDUtilityPool.CallOpts, _owner) } // GetUserData is a free data retrieval call binding the contract method 0xffc9896b. @@ -971,100 +692,35 @@ func (_SDUtilityPool *SDUtilityPoolCallerSession) GetUtilizerLatestBalance(_util return _SDUtilityPool.Contract.GetUtilizerLatestBalance(&_SDUtilityPool.CallOpts, _utilizer) } -// HasRole is a free data retrieval call binding the contract method 0x91d14854. +// LiquidationIndexByOperator is a free data retrieval call binding the contract method 0x673ab3fa. // -// 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) { +// 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, "hasRole", role, account) + err := _SDUtilityPool.contract.Call(opts, &out, "liquidationIndexByOperator", arg0) 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 } -// 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) -} - -// 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. +// LiquidationIndexByOperator is a free data retrieval call binding the contract method 0x673ab3fa. // -// 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) +// Solidity: function liquidationIndexByOperator(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) 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. +// LiquidationIndexByOperator is a free data retrieval call binding the contract method 0x673ab3fa. // -// 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) +// Solidity: function liquidationIndexByOperator(address ) view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) LiquidationIndexByOperator(arg0 common.Address) (*big.Int, error) { + return _SDUtilityPool.Contract.LiquidationIndexByOperator(&_SDUtilityPool.CallOpts, arg0) } // MaxETHWorthOfSDPerValidator is a free data retrieval call binding the contract method 0x2807c313. @@ -1098,12 +754,12 @@ func (_SDUtilityPool *SDUtilityPoolCallerSession) MaxETHWorthOfSDPerValidator() return _SDUtilityPool.Contract.MaxETHWorthOfSDPerValidator(&_SDUtilityPool.CallOpts) } -// MaxNonRedeemedDelegatorRequestCount is a free data retrieval call binding the contract method 0xc083f3e6. +// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. // -// Solidity: function maxNonRedeemedDelegatorRequestCount() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCaller) MaxNonRedeemedDelegatorRequestCount(opts *bind.CallOpts) (*big.Int, error) { +// 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, "maxNonRedeemedDelegatorRequestCount") + err := _SDUtilityPool.contract.Call(opts, &out, "poolUtilization") if err != nil { return *new(*big.Int), err @@ -1115,26 +771,26 @@ func (_SDUtilityPool *SDUtilityPoolCaller) MaxNonRedeemedDelegatorRequestCount(o } -// MaxNonRedeemedDelegatorRequestCount is a free data retrieval call binding the contract method 0xc083f3e6. +// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. // -// Solidity: function maxNonRedeemedDelegatorRequestCount() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) MaxNonRedeemedDelegatorRequestCount() (*big.Int, error) { - return _SDUtilityPool.Contract.MaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.CallOpts) +// Solidity: function poolUtilization() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) PoolUtilization() (*big.Int, error) { + return _SDUtilityPool.Contract.PoolUtilization(&_SDUtilityPool.CallOpts) } -// MaxNonRedeemedDelegatorRequestCount is a free data retrieval call binding the contract method 0xc083f3e6. +// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. // -// Solidity: function maxNonRedeemedDelegatorRequestCount() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) MaxNonRedeemedDelegatorRequestCount() (*big.Int, error) { - return _SDUtilityPool.Contract.MaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.CallOpts) +// Solidity: function poolUtilization() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) PoolUtilization() (*big.Int, error) { + return _SDUtilityPool.Contract.PoolUtilization(&_SDUtilityPool.CallOpts) } -// MinBlockDelayToFinalizeRequest is a free data retrieval call binding the contract method 0xbc1428f6. +// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. // -// Solidity: function minBlockDelayToFinalizeRequest() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCaller) MinBlockDelayToFinalizeRequest(opts *bind.CallOpts) (*big.Int, error) { +// 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, "minBlockDelayToFinalizeRequest") + err := _SDUtilityPool.contract.Call(opts, &out, "requestIdsByDelegatorAddress", arg0, arg1) if err != nil { return *new(*big.Int), err @@ -1146,26 +802,26 @@ func (_SDUtilityPool *SDUtilityPoolCaller) MinBlockDelayToFinalizeRequest(opts * } -// MinBlockDelayToFinalizeRequest is a free data retrieval call binding the contract method 0xbc1428f6. +// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. // -// Solidity: function minBlockDelayToFinalizeRequest() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) MinBlockDelayToFinalizeRequest() (*big.Int, error) { - return _SDUtilityPool.Contract.MinBlockDelayToFinalizeRequest(&_SDUtilityPool.CallOpts) +// 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) } -// MinBlockDelayToFinalizeRequest is a free data retrieval call binding the contract method 0xbc1428f6. +// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. // -// Solidity: function minBlockDelayToFinalizeRequest() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) MinBlockDelayToFinalizeRequest() (*big.Int, error) { - return _SDUtilityPool.Contract.MinBlockDelayToFinalizeRequest(&_SDUtilityPool.CallOpts) +// 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) } -// NextRequestId is a free data retrieval call binding the contract method 0x6a84a985. +// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. // -// Solidity: function nextRequestId() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCaller) NextRequestId(opts *bind.CallOpts) (*big.Int, error) { +// 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, "nextRequestId") + err := _SDUtilityPool.contract.Call(opts, &out, "sdRequestedForWithdraw") if err != nil { return *new(*big.Int), err @@ -1177,26 +833,26 @@ func (_SDUtilityPool *SDUtilityPoolCaller) NextRequestId(opts *bind.CallOpts) (* } -// NextRequestId is a free data retrieval call binding the contract method 0x6a84a985. +// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. // -// Solidity: function nextRequestId() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) NextRequestId() (*big.Int, error) { - return _SDUtilityPool.Contract.NextRequestId(&_SDUtilityPool.CallOpts) +// Solidity: function sdRequestedForWithdraw() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) SdRequestedForWithdraw() (*big.Int, error) { + return _SDUtilityPool.Contract.SdRequestedForWithdraw(&_SDUtilityPool.CallOpts) } -// NextRequestId is a free data retrieval call binding the contract method 0x6a84a985. +// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. // -// Solidity: function nextRequestId() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) NextRequestId() (*big.Int, error) { - return _SDUtilityPool.Contract.NextRequestId(&_SDUtilityPool.CallOpts) +// Solidity: function sdRequestedForWithdraw() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) SdRequestedForWithdraw() (*big.Int, error) { + return _SDUtilityPool.Contract.SdRequestedForWithdraw(&_SDUtilityPool.CallOpts) } -// NextRequestIdToFinalize is a free data retrieval call binding the contract method 0xbbb84362. +// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. // -// Solidity: function nextRequestIdToFinalize() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCaller) NextRequestIdToFinalize(opts *bind.CallOpts) (*big.Int, error) { +// 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, "nextRequestIdToFinalize") + err := _SDUtilityPool.contract.Call(opts, &out, "utilizationRatePerBlock") if err != nil { return *new(*big.Int), err @@ -1208,57 +864,26 @@ func (_SDUtilityPool *SDUtilityPoolCaller) NextRequestIdToFinalize(opts *bind.Ca } -// NextRequestIdToFinalize is a free data retrieval call binding the contract method 0xbbb84362. +// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. // -// Solidity: function nextRequestIdToFinalize() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) NextRequestIdToFinalize() (*big.Int, error) { - return _SDUtilityPool.Contract.NextRequestIdToFinalize(&_SDUtilityPool.CallOpts) +// Solidity: function utilizationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) UtilizationRatePerBlock() (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizationRatePerBlock(&_SDUtilityPool.CallOpts) } -// NextRequestIdToFinalize is a free data retrieval call binding the contract method 0xbbb84362. +// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. // -// 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) +// Solidity: function utilizationRatePerBlock() view returns(uint256) +func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizationRatePerBlock() (*big.Int, error) { + return _SDUtilityPool.Contract.UtilizationRatePerBlock(&_SDUtilityPool.CallOpts) } -// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. +// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. // -// Solidity: function poolUtilization() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCaller) PoolUtilization(opts *bind.CallOpts) (*big.Int, error) { +// 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, "poolUtilization") + err := _SDUtilityPool.contract.Call(opts, &out, "utilizerBalanceStored", account) if err != nil { return *new(*big.Int), err @@ -1270,1936 +895,572 @@ func (_SDUtilityPool *SDUtilityPoolCaller) PoolUtilization(opts *bind.CallOpts) } -// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. +// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. // -// Solidity: function poolUtilization() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) PoolUtilization() (*big.Int, error) { - return _SDUtilityPool.Contract.PoolUtilization(&_SDUtilityPool.CallOpts) +// 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) } -// PoolUtilization is a free data retrieval call binding the contract method 0x9a3263ee. +// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. // -// Solidity: function poolUtilization() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) PoolUtilization() (*big.Int, error) { - return _SDUtilityPool.Contract.PoolUtilization(&_SDUtilityPool.CallOpts) +// 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) } -// ProtocolFee is a free data retrieval call binding the contract method 0xb0e21e8a. +// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. // -// Solidity: function protocolFee() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCaller) ProtocolFee(opts *bind.CallOpts) (*big.Int, error) { +// 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, "protocolFee") + err := _SDUtilityPool.contract.Call(opts, &out, "utilizerData", arg0) + outstruct := new(struct { + Principal *big.Int + UtilizeIndex *big.Int + }) if err != nil { - return *new(*big.Int), err + return *outstruct, err } - out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.Principal = *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + outstruct.UtilizeIndex = *abi.ConvertType(out[1], new(*big.Int)).(**big.Int) - return out0, err + return *outstruct, err } -// ProtocolFee is a free data retrieval call binding the contract method 0xb0e21e8a. +// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. // -// Solidity: function protocolFee() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) ProtocolFee() (*big.Int, error) { - return _SDUtilityPool.Contract.ProtocolFee(&_SDUtilityPool.CallOpts) +// 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) } -// ProtocolFee is a free data retrieval call binding the contract method 0xb0e21e8a. +// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. // -// Solidity: function protocolFee() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) ProtocolFee() (*big.Int, error) { - return _SDUtilityPool.Contract.ProtocolFee(&_SDUtilityPool.CallOpts) +// 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) } -// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. +// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. // -// 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 - +// Solidity: function accrueFee() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) AccrueFee(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "accrueFee") } -// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. +// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. // -// 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) +// Solidity: function accrueFee() returns() +func (_SDUtilityPool *SDUtilityPoolSession) AccrueFee() (*types.Transaction, error) { + return _SDUtilityPool.Contract.AccrueFee(&_SDUtilityPool.TransactOpts) } -// RequestIdsByDelegatorAddress is a free data retrieval call binding the contract method 0x7844e3af. +// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. // -// 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) +// Solidity: function accrueFee() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) AccrueFee() (*types.Transaction, error) { + return _SDUtilityPool.Contract.AccrueFee(&_SDUtilityPool.TransactOpts) } -// RiskConfig is a free data retrieval call binding the contract method 0x7c90a6ca. +// Claim is a paid mutator transaction binding the contract method 0x379607f5. // -// 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 - +// 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) } -// RiskConfig is a free data retrieval call binding the contract method 0x7c90a6ca. +// Claim is a paid mutator transaction binding the contract method 0x379607f5. // -// 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) +// Solidity: function claim(uint256 requestId) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Claim(requestId *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Claim(&_SDUtilityPool.TransactOpts, requestId) } -// RiskConfig is a free data retrieval call binding the contract method 0x7c90a6ca. +// Claim is a paid mutator transaction binding the contract method 0x379607f5. // -// 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) +// Solidity: function claim(uint256 requestId) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Claim(requestId *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Claim(&_SDUtilityPool.TransactOpts, requestId) } -// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. +// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. // -// 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 - +// 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) } -// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. +// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. // -// Solidity: function sdRequestedForWithdraw() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) SdRequestedForWithdraw() (*big.Int, error) { - return _SDUtilityPool.Contract.SdRequestedForWithdraw(&_SDUtilityPool.CallOpts) +// Solidity: function completeLiquidation(address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) CompleteLiquidation(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.CompleteLiquidation(&_SDUtilityPool.TransactOpts, account) } -// SdRequestedForWithdraw is a free data retrieval call binding the contract method 0x3b92e3cf. +// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. // -// Solidity: function sdRequestedForWithdraw() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) SdRequestedForWithdraw() (*big.Int, error) { - return _SDUtilityPool.Contract.SdRequestedForWithdraw(&_SDUtilityPool.CallOpts) +// Solidity: function completeLiquidation(address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) CompleteLiquidation(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.CompleteLiquidation(&_SDUtilityPool.TransactOpts, account) } -// SdReservedForClaim is a free data retrieval call binding the contract method 0x2b886941. +// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. // -// 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 - +// 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) } -// SdReservedForClaim is a free data retrieval call binding the contract method 0x2b886941. +// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. // -// Solidity: function sdReservedForClaim() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) SdReservedForClaim() (*big.Int, error) { - return _SDUtilityPool.Contract.SdReservedForClaim(&_SDUtilityPool.CallOpts) +// Solidity: function delegate(uint256 sdAmount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Delegate(sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Delegate(&_SDUtilityPool.TransactOpts, sdAmount) } -// SdReservedForClaim is a free data retrieval call binding the contract method 0x2b886941. +// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. // -// Solidity: function sdReservedForClaim() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) SdReservedForClaim() (*big.Int, error) { - return _SDUtilityPool.Contract.SdReservedForClaim(&_SDUtilityPool.CallOpts) +// Solidity: function delegate(uint256 sdAmount) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Delegate(sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Delegate(&_SDUtilityPool.TransactOpts, sdAmount) } -// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. // -// 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 - +// Solidity: function exchangeRateCurrent() returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) ExchangeRateCurrent(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "exchangeRateCurrent") } -// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. // -// Solidity: function staderConfig() view returns(address) -func (_SDUtilityPool *SDUtilityPoolSession) StaderConfig() (common.Address, error) { - return _SDUtilityPool.Contract.StaderConfig(&_SDUtilityPool.CallOpts) +// Solidity: function exchangeRateCurrent() returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) ExchangeRateCurrent() (*types.Transaction, error) { + return _SDUtilityPool.Contract.ExchangeRateCurrent(&_SDUtilityPool.TransactOpts) } -// StaderConfig is a free data retrieval call binding the contract method 0x490ffa35. +// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. // -// Solidity: function staderConfig() view returns(address) -func (_SDUtilityPool *SDUtilityPoolCallerSession) StaderConfig() (common.Address, error) { - return _SDUtilityPool.Contract.StaderConfig(&_SDUtilityPool.CallOpts) +// Solidity: function exchangeRateCurrent() returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) ExchangeRateCurrent() (*types.Transaction, error) { + return _SDUtilityPool.Contract.ExchangeRateCurrent(&_SDUtilityPool.TransactOpts) } -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. // -// 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 - +// Solidity: function finalizeDelegatorWithdrawalRequest() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) FinalizeDelegatorWithdrawalRequest(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "finalizeDelegatorWithdrawalRequest") } -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. // -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_SDUtilityPool *SDUtilityPoolSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _SDUtilityPool.Contract.SupportsInterface(&_SDUtilityPool.CallOpts, interfaceId) +// Solidity: function finalizeDelegatorWithdrawalRequest() returns() +func (_SDUtilityPool *SDUtilityPoolSession) FinalizeDelegatorWithdrawalRequest() (*types.Transaction, error) { + return _SDUtilityPool.Contract.FinalizeDelegatorWithdrawalRequest(&_SDUtilityPool.TransactOpts) } -// SupportsInterface is a free data retrieval call binding the contract method 0x01ffc9a7. +// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. // -// Solidity: function supportsInterface(bytes4 interfaceId) view returns(bool) -func (_SDUtilityPool *SDUtilityPoolCallerSession) SupportsInterface(interfaceId [4]byte) (bool, error) { - return _SDUtilityPool.Contract.SupportsInterface(&_SDUtilityPool.CallOpts, interfaceId) +// Solidity: function finalizeDelegatorWithdrawalRequest() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) FinalizeDelegatorWithdrawalRequest() (*types.Transaction, error) { + return _SDUtilityPool.Contract.FinalizeDelegatorWithdrawalRequest(&_SDUtilityPool.TransactOpts) } -// TotalUtilizedSD is a free data retrieval call binding the contract method 0x8763a328. +// LiquidationCall is a paid mutator transaction binding the contract method 0xd2ac4a3d. // -// 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 - +// 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) } -// TotalUtilizedSD is a free data retrieval call binding the contract method 0x8763a328. +// LiquidationCall is a paid mutator transaction binding the contract method 0xd2ac4a3d. // -// Solidity: function totalUtilizedSD() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) TotalUtilizedSD() (*big.Int, error) { - return _SDUtilityPool.Contract.TotalUtilizedSD(&_SDUtilityPool.CallOpts) +// Solidity: function liquidationCall(address account) returns() +func (_SDUtilityPool *SDUtilityPoolSession) LiquidationCall(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.LiquidationCall(&_SDUtilityPool.TransactOpts, account) } -// TotalUtilizedSD is a free data retrieval call binding the contract method 0x8763a328. +// LiquidationCall is a paid mutator transaction binding the contract method 0xd2ac4a3d. // -// Solidity: function totalUtilizedSD() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) TotalUtilizedSD() (*big.Int, error) { - return _SDUtilityPool.Contract.TotalUtilizedSD(&_SDUtilityPool.CallOpts) +// Solidity: function liquidationCall(address account) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) LiquidationCall(account common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.LiquidationCall(&_SDUtilityPool.TransactOpts, account) } -// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. // -// 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 - +// Solidity: function maxApproveSD() returns() +func (_SDUtilityPool *SDUtilityPoolTransactor) MaxApproveSD(opts *bind.TransactOpts) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "maxApproveSD") } -// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. // -// Solidity: function utilizationRatePerBlock() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) UtilizationRatePerBlock() (*big.Int, error) { - return _SDUtilityPool.Contract.UtilizationRatePerBlock(&_SDUtilityPool.CallOpts) +// Solidity: function maxApproveSD() returns() +func (_SDUtilityPool *SDUtilityPoolSession) MaxApproveSD() (*types.Transaction, error) { + return _SDUtilityPool.Contract.MaxApproveSD(&_SDUtilityPool.TransactOpts) } -// UtilizationRatePerBlock is a free data retrieval call binding the contract method 0x962c7070. +// MaxApproveSD is a paid mutator transaction binding the contract method 0x3e04cd35. // -// Solidity: function utilizationRatePerBlock() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizationRatePerBlock() (*big.Int, error) { - return _SDUtilityPool.Contract.UtilizationRatePerBlock(&_SDUtilityPool.CallOpts) +// Solidity: function maxApproveSD() returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) MaxApproveSD() (*types.Transaction, error) { + return _SDUtilityPool.Contract.MaxApproveSD(&_SDUtilityPool.TransactOpts) } -// UtilizeIndex is a free data retrieval call binding the contract method 0x634c48c7. +// Repay is a paid mutator transaction binding the contract method 0x371fd8e6. // -// 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 - +// Solidity: function repay(uint256 repayAmount) returns(uint256, uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) Repay(opts *bind.TransactOpts, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "repay", repayAmount) } -// UtilizeIndex is a free data retrieval call binding the contract method 0x634c48c7. +// Repay is a paid mutator transaction binding the contract method 0x371fd8e6. // -// Solidity: function utilizeIndex() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) UtilizeIndex() (*big.Int, error) { - return _SDUtilityPool.Contract.UtilizeIndex(&_SDUtilityPool.CallOpts) +// Solidity: function repay(uint256 repayAmount) returns(uint256, uint256) +func (_SDUtilityPool *SDUtilityPoolSession) Repay(repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Repay(&_SDUtilityPool.TransactOpts, repayAmount) } -// UtilizeIndex is a free data retrieval call binding the contract method 0x634c48c7. +// Repay is a paid mutator transaction binding the contract method 0x371fd8e6. // -// Solidity: function utilizeIndex() view returns(uint256) -func (_SDUtilityPool *SDUtilityPoolCallerSession) UtilizeIndex() (*big.Int, error) { - return _SDUtilityPool.Contract.UtilizeIndex(&_SDUtilityPool.CallOpts) +// Solidity: function repay(uint256 repayAmount) returns(uint256, uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) Repay(repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Repay(&_SDUtilityPool.TransactOpts, repayAmount) } -// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. +// RepayOnBehalf is a paid mutator transaction binding the contract method 0x9f689e0b. // -// 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 - +// Solidity: function repayOnBehalf(address utilizer, uint256 repayAmount) returns(uint256, uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) RepayOnBehalf(opts *bind.TransactOpts, utilizer common.Address, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "repayOnBehalf", utilizer, repayAmount) } -// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. +// RepayOnBehalf is a paid mutator transaction binding the contract method 0x9f689e0b. // -// 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) +// Solidity: function repayOnBehalf(address utilizer, uint256 repayAmount) returns(uint256, uint256) +func (_SDUtilityPool *SDUtilityPoolSession) RepayOnBehalf(utilizer common.Address, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayOnBehalf(&_SDUtilityPool.TransactOpts, utilizer, repayAmount) } -// UtilizerBalanceStored is a free data retrieval call binding the contract method 0x6e236aee. +// RepayOnBehalf is a paid mutator transaction binding the contract method 0x9f689e0b. // -// 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) +// Solidity: function repayOnBehalf(address utilizer, uint256 repayAmount) returns(uint256, uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RepayOnBehalf(utilizer common.Address, repayAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RepayOnBehalf(&_SDUtilityPool.TransactOpts, utilizer, repayAmount) } -// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. +// RequestWithdraw is a paid mutator transaction binding the contract method 0x745400c9. // -// 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 - +// Solidity: function requestWithdraw(uint256 cTokenAmount) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) RequestWithdraw(opts *bind.TransactOpts, cTokenAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "requestWithdraw", cTokenAmount) } -// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. +// RequestWithdraw is a paid mutator transaction binding the contract method 0x745400c9. // -// 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) +// Solidity: function requestWithdraw(uint256 cTokenAmount) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) RequestWithdraw(cTokenAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdraw(&_SDUtilityPool.TransactOpts, cTokenAmount) } -// UtilizerData is a free data retrieval call binding the contract method 0x9e070088. +// RequestWithdraw is a paid mutator transaction binding the contract method 0x745400c9. // -// 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) +// Solidity: function requestWithdraw(uint256 cTokenAmount) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RequestWithdraw(cTokenAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdraw(&_SDUtilityPool.TransactOpts, cTokenAmount) } -// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. +// RequestWithdrawWithSDAmount is a paid mutator transaction binding the contract method 0xc51cd1cc. // -// Solidity: function accrueFee() returns() -func (_SDUtilityPool *SDUtilityPoolTransactor) AccrueFee(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SDUtilityPool.contract.Transact(opts, "accrueFee") +// Solidity: function requestWithdrawWithSDAmount(uint256 sdAmount) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactor) RequestWithdrawWithSDAmount(opts *bind.TransactOpts, sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.contract.Transact(opts, "requestWithdrawWithSDAmount", sdAmount) } -// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. +// RequestWithdrawWithSDAmount is a paid mutator transaction binding the contract method 0xc51cd1cc. // -// Solidity: function accrueFee() returns() -func (_SDUtilityPool *SDUtilityPoolSession) AccrueFee() (*types.Transaction, error) { - return _SDUtilityPool.Contract.AccrueFee(&_SDUtilityPool.TransactOpts) +// Solidity: function requestWithdrawWithSDAmount(uint256 sdAmount) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolSession) RequestWithdrawWithSDAmount(sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdrawWithSDAmount(&_SDUtilityPool.TransactOpts, sdAmount) } -// AccrueFee is a paid mutator transaction binding the contract method 0xb26cc394. +// RequestWithdrawWithSDAmount is a paid mutator transaction binding the contract method 0xc51cd1cc. // -// Solidity: function accrueFee() returns() -func (_SDUtilityPool *SDUtilityPoolTransactorSession) AccrueFee() (*types.Transaction, error) { - return _SDUtilityPool.Contract.AccrueFee(&_SDUtilityPool.TransactOpts) +// Solidity: function requestWithdrawWithSDAmount(uint256 sdAmount) returns(uint256) +func (_SDUtilityPool *SDUtilityPoolTransactorSession) RequestWithdrawWithSDAmount(sdAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.RequestWithdrawWithSDAmount(&_SDUtilityPool.TransactOpts, sdAmount) } -// Claim is a paid mutator transaction binding the contract method 0x379607f5. +// UpdateConservativeEthPerKey is a paid mutator transaction binding the contract method 0x1c557f05. // -// 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) +// 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) } -// Claim is a paid mutator transaction binding the contract method 0x379607f5. +// UpdateConservativeEthPerKey is a paid mutator transaction binding the contract method 0x1c557f05. // -// Solidity: function claim(uint256 _requestId) returns() -func (_SDUtilityPool *SDUtilityPoolSession) Claim(_requestId *big.Int) (*types.Transaction, error) { - return _SDUtilityPool.Contract.Claim(&_SDUtilityPool.TransactOpts, _requestId) +// Solidity: function updateConservativeEthPerKey(uint256 _newEthPerKey) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateConservativeEthPerKey(_newEthPerKey *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateConservativeEthPerKey(&_SDUtilityPool.TransactOpts, _newEthPerKey) } -// Claim is a paid mutator transaction binding the contract method 0x379607f5. +// UpdateConservativeEthPerKey is a paid mutator transaction binding the contract method 0x1c557f05. // -// Solidity: function claim(uint256 _requestId) returns() -func (_SDUtilityPool *SDUtilityPoolTransactorSession) Claim(_requestId *big.Int) (*types.Transaction, error) { - return _SDUtilityPool.Contract.Claim(&_SDUtilityPool.TransactOpts, _requestId) +// Solidity: function updateConservativeEthPerKey(uint256 _newEthPerKey) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateConservativeEthPerKey(_newEthPerKey *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateConservativeEthPerKey(&_SDUtilityPool.TransactOpts, _newEthPerKey) } -// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. +// UpdateFinalizationBatchLimit is a paid mutator transaction binding the contract method 0x267fca73. // -// 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) +// 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) } -// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. +// UpdateFinalizationBatchLimit is a paid mutator transaction binding the contract method 0x267fca73. // -// Solidity: function completeLiquidation(address account) returns() -func (_SDUtilityPool *SDUtilityPoolSession) CompleteLiquidation(account common.Address) (*types.Transaction, error) { - return _SDUtilityPool.Contract.CompleteLiquidation(&_SDUtilityPool.TransactOpts, account) +// Solidity: function updateFinalizationBatchLimit(uint256 _finalizationBatchLimit) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateFinalizationBatchLimit(_finalizationBatchLimit *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateFinalizationBatchLimit(&_SDUtilityPool.TransactOpts, _finalizationBatchLimit) } -// CompleteLiquidation is a paid mutator transaction binding the contract method 0xd844cb6c. +// UpdateFinalizationBatchLimit is a paid mutator transaction binding the contract method 0x267fca73. // -// Solidity: function completeLiquidation(address account) returns() -func (_SDUtilityPool *SDUtilityPoolTransactorSession) CompleteLiquidation(account common.Address) (*types.Transaction, error) { - return _SDUtilityPool.Contract.CompleteLiquidation(&_SDUtilityPool.TransactOpts, account) +// Solidity: function updateFinalizationBatchLimit(uint256 _finalizationBatchLimit) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateFinalizationBatchLimit(_finalizationBatchLimit *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateFinalizationBatchLimit(&_SDUtilityPool.TransactOpts, _finalizationBatchLimit) } -// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. +// UpdateMaxETHWorthOfSDPerValidator is a paid mutator transaction binding the contract method 0x5393618e. // -// 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) +// 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) } -// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. +// UpdateMaxETHWorthOfSDPerValidator is a paid mutator transaction binding the contract method 0x5393618e. // -// Solidity: function delegate(uint256 sdAmount) returns() -func (_SDUtilityPool *SDUtilityPoolSession) Delegate(sdAmount *big.Int) (*types.Transaction, error) { - return _SDUtilityPool.Contract.Delegate(&_SDUtilityPool.TransactOpts, sdAmount) +// Solidity: function updateMaxETHWorthOfSDPerValidator(uint256 _maxETHWorthOfSDPerValidator) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateMaxETHWorthOfSDPerValidator(_maxETHWorthOfSDPerValidator *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxETHWorthOfSDPerValidator(&_SDUtilityPool.TransactOpts, _maxETHWorthOfSDPerValidator) } -// Delegate is a paid mutator transaction binding the contract method 0x9fa6dd35. +// UpdateMaxETHWorthOfSDPerValidator is a paid mutator transaction binding the contract method 0x5393618e. // -// Solidity: function delegate(uint256 sdAmount) returns() -func (_SDUtilityPool *SDUtilityPoolTransactorSession) Delegate(sdAmount *big.Int) (*types.Transaction, error) { - return _SDUtilityPool.Contract.Delegate(&_SDUtilityPool.TransactOpts, sdAmount) +// Solidity: function updateMaxETHWorthOfSDPerValidator(uint256 _maxETHWorthOfSDPerValidator) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateMaxETHWorthOfSDPerValidator(_maxETHWorthOfSDPerValidator *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxETHWorthOfSDPerValidator(&_SDUtilityPool.TransactOpts, _maxETHWorthOfSDPerValidator) } -// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. +// UpdateMaxNonRedeemedDelegatorRequestCount is a paid mutator transaction binding the contract method 0xee63e5f9. // -// Solidity: function exchangeRateCurrent() returns(uint256) -func (_SDUtilityPool *SDUtilityPoolTransactor) ExchangeRateCurrent(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SDUtilityPool.contract.Transact(opts, "exchangeRateCurrent") +// 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) } -// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. +// UpdateMaxNonRedeemedDelegatorRequestCount is a paid mutator transaction binding the contract method 0xee63e5f9. // -// Solidity: function exchangeRateCurrent() returns(uint256) -func (_SDUtilityPool *SDUtilityPoolSession) ExchangeRateCurrent() (*types.Transaction, error) { - return _SDUtilityPool.Contract.ExchangeRateCurrent(&_SDUtilityPool.TransactOpts) +// Solidity: function updateMaxNonRedeemedDelegatorRequestCount(uint256 _count) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateMaxNonRedeemedDelegatorRequestCount(_count *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.TransactOpts, _count) } -// ExchangeRateCurrent is a paid mutator transaction binding the contract method 0xbd6d894d. +// UpdateMaxNonRedeemedDelegatorRequestCount is a paid mutator transaction binding the contract method 0xee63e5f9. // -// Solidity: function exchangeRateCurrent() returns(uint256) -func (_SDUtilityPool *SDUtilityPoolTransactorSession) ExchangeRateCurrent() (*types.Transaction, error) { - return _SDUtilityPool.Contract.ExchangeRateCurrent(&_SDUtilityPool.TransactOpts) +// Solidity: function updateMaxNonRedeemedDelegatorRequestCount(uint256 _count) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateMaxNonRedeemedDelegatorRequestCount(_count *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMaxNonRedeemedDelegatorRequestCount(&_SDUtilityPool.TransactOpts, _count) } -// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. +// UpdateMinBlockDelayToFinalizeRequest is a paid mutator transaction binding the contract method 0x4a2965af. // -// Solidity: function finalizeDelegatorWithdrawalRequest() returns() -func (_SDUtilityPool *SDUtilityPoolTransactor) FinalizeDelegatorWithdrawalRequest(opts *bind.TransactOpts) (*types.Transaction, error) { - return _SDUtilityPool.contract.Transact(opts, "finalizeDelegatorWithdrawalRequest") +// 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) } -// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. +// UpdateMinBlockDelayToFinalizeRequest is a paid mutator transaction binding the contract method 0x4a2965af. // -// Solidity: function finalizeDelegatorWithdrawalRequest() returns() -func (_SDUtilityPool *SDUtilityPoolSession) FinalizeDelegatorWithdrawalRequest() (*types.Transaction, error) { - return _SDUtilityPool.Contract.FinalizeDelegatorWithdrawalRequest(&_SDUtilityPool.TransactOpts) +// Solidity: function updateMinBlockDelayToFinalizeRequest(uint256 _minBlockDelayToFinalizeRequest) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateMinBlockDelayToFinalizeRequest(_minBlockDelayToFinalizeRequest *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMinBlockDelayToFinalizeRequest(&_SDUtilityPool.TransactOpts, _minBlockDelayToFinalizeRequest) } -// FinalizeDelegatorWithdrawalRequest is a paid mutator transaction binding the contract method 0x71898b4e. +// UpdateMinBlockDelayToFinalizeRequest is a paid mutator transaction binding the contract method 0x4a2965af. // -// Solidity: function finalizeDelegatorWithdrawalRequest() returns() -func (_SDUtilityPool *SDUtilityPoolTransactorSession) FinalizeDelegatorWithdrawalRequest() (*types.Transaction, error) { - return _SDUtilityPool.Contract.FinalizeDelegatorWithdrawalRequest(&_SDUtilityPool.TransactOpts) +// Solidity: function updateMinBlockDelayToFinalizeRequest(uint256 _minBlockDelayToFinalizeRequest) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateMinBlockDelayToFinalizeRequest(_minBlockDelayToFinalizeRequest *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateMinBlockDelayToFinalizeRequest(&_SDUtilityPool.TransactOpts, _minBlockDelayToFinalizeRequest) } -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// UpdateProtocolFee is a paid mutator transaction binding the contract method 0x4256dd78. // -// 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) +// 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) } -// GrantRole is a paid mutator transaction binding the contract method 0x2f2ff15d. +// UpdateProtocolFee is a paid mutator transaction binding the contract method 0x4256dd78. // -// 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) -} - -// 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) -} - -// 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 -} - -// 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 +// Solidity: function updateProtocolFee(uint256 _protocolFee) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateProtocolFee(_protocolFee *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateProtocolFee(&_SDUtilityPool.TransactOpts, _protocolFee) } -// FilterInitialized is a free log retrieval operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// UpdateProtocolFee is a paid mutator transaction binding the contract method 0x4256dd78. // -// 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 +// Solidity: function updateProtocolFee(uint256 _protocolFee) returns() +func (_SDUtilityPool *SDUtilityPoolTransactorSession) UpdateProtocolFee(_protocolFee *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateProtocolFee(&_SDUtilityPool.TransactOpts, _protocolFee) } -// WatchInitialized is a free log subscription operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. // -// 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 +// 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) } -// ParseInitialized is a log parse operation binding the contract event 0x7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498. +// UpdateStaderConfig is a paid mutator transaction binding the contract method 0x9ee804cb. // -// 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 +// Solidity: function updateStaderConfig(address _staderConfig) returns() +func (_SDUtilityPool *SDUtilityPoolSession) UpdateStaderConfig(_staderConfig common.Address) (*types.Transaction, error) { + return _SDUtilityPool.Contract.UpdateStaderConfig(&_SDUtilityPool.TransactOpts, _staderConfig) +} - 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 +// 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) +} - case err := <-it.sub.Err(): - it.done = true - it.fail = err - return it.Next() - } +// 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) } -// Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolLiquidationCallIterator) Error() error { - return it.fail +// 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) } -// Close terminates the iteration process, releasing any pending underlying -// resources. -func (it *SDUtilityPoolLiquidationCallIterator) Close() error { - it.sub.Unsubscribe() - return nil +// 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) } -// 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 +// 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) } -// FilterLiquidationCall is a free log retrieval operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. +// Utilize is a paid mutator transaction binding the contract method 0xec29c551. // -// 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) { +// Solidity: function utilize(uint256 utilizeAmount) returns() +func (_SDUtilityPool *SDUtilityPoolSession) Utilize(utilizeAmount *big.Int) (*types.Transaction, error) { + return _SDUtilityPool.Contract.Utilize(&_SDUtilityPool.TransactOpts, utilizeAmount) +} - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } +// 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) +} - var liquidatorRule []interface{} - for _, liquidatorItem := range liquidator { - liquidatorRule = append(liquidatorRule, liquidatorItem) - } +// 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) +} - 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 +// 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) } -// WatchLiquidationCall is a free log subscription operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. +// UtilizeWhileAddingKeys is a paid mutator transaction binding the contract method 0x23c4ac1a. // -// 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) { +// 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) +} - var accountRule []interface{} - for _, accountItem := range account { - accountRule = append(accountRule, accountItem) - } +// 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) +} - var liquidatorRule []interface{} - for _, liquidatorItem := range liquidator { - liquidatorRule = append(liquidatorRule, liquidatorItem) - } +// 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) +} - 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 +// 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) +} - 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 +// 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) } -// ParseLiquidationCall is a log parse operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. +// WithdrawProtocolFee is a paid mutator transaction binding the contract method 0x424cd833. // -// 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 +// 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) } -// 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 +// 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 @@ -3213,7 +1474,7 @@ type SDUtilityPoolPausedIterator 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 *SDUtilityPoolPausedIterator) Next() bool { +func (it *SDUtilityPoolAccruedFeesIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3222,7 +1483,7 @@ func (it *SDUtilityPoolPausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolPaused) + it.Event = new(SDUtilityPoolAccruedFees) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3237,7 +1498,7 @@ func (it *SDUtilityPoolPausedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolPaused) + it.Event = new(SDUtilityPoolAccruedFees) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3253,41 +1514,43 @@ func (it *SDUtilityPoolPausedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolPausedIterator) Error() error { +func (it *SDUtilityPoolAccruedFeesIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolPausedIterator) Close() error { +func (it *SDUtilityPoolAccruedFeesIterator) 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 +// 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 } -// FilterPaused is a free log retrieval operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// FilterAccruedFees is a free log retrieval operation binding the contract event 0x7119249986febcaf2eaa8565a4a5f37df51951d3933512847e77ad489aff89a5. // -// Solidity: event Paused(address account) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterPaused(opts *bind.FilterOpts) (*SDUtilityPoolPausedIterator, error) { +// 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, "Paused") + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "AccruedFees") if err != nil { return nil, err } - return &SDUtilityPoolPausedIterator{contract: _SDUtilityPool.contract, event: "Paused", logs: logs, sub: sub}, nil + return &SDUtilityPoolAccruedFeesIterator{contract: _SDUtilityPool.contract, event: "AccruedFees", logs: logs, sub: sub}, nil } -// WatchPaused is a free log subscription operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// WatchAccruedFees is a free log subscription operation binding the contract event 0x7119249986febcaf2eaa8565a4a5f37df51951d3933512847e77ad489aff89a5. // -// Solidity: event Paused(address account) -func (_SDUtilityPool *SDUtilityPoolFilterer) WatchPaused(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolPaused) (event.Subscription, error) { +// 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, "Paused") + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "AccruedFees") if err != nil { return nil, err } @@ -3297,8 +1560,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchPaused(opts *bind.WatchOpts, s 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 { + event := new(SDUtilityPoolAccruedFees) + if err := _SDUtilityPool.contract.UnpackLog(event, "AccruedFees", log); err != nil { return err } event.Raw = log @@ -3319,21 +1582,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchPaused(opts *bind.WatchOpts, s }), nil } -// ParsePaused is a log parse operation binding the contract event 0x62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258. +// ParseAccruedFees is a log parse operation binding the contract event 0x7119249986febcaf2eaa8565a4a5f37df51951d3933512847e77ad489aff89a5. // -// 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 { +// 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 } -// 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 +// 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 @@ -3347,7 +1610,7 @@ type SDUtilityPoolProtocolFeeFactorUpdatedIterator 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 *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Next() bool { +func (it *SDUtilityPoolCompleteLiquidationIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3356,7 +1619,7 @@ func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolProtocolFeeFactorUpdated) + it.Event = new(SDUtilityPoolCompleteLiquidation) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3371,7 +1634,7 @@ func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolProtocolFeeFactorUpdated) + it.Event = new(SDUtilityPoolCompleteLiquidation) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3387,41 +1650,51 @@ func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Error() error { +func (it *SDUtilityPoolCompleteLiquidationIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Close() error { +func (it *SDUtilityPoolCompleteLiquidationIterator) 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 +// SDUtilityPoolCompleteLiquidation represents a CompleteLiquidation event raised by the SDUtilityPool contract. +type SDUtilityPoolCompleteLiquidation struct { + Index *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterProtocolFeeFactorUpdated is a free log retrieval operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. +// FilterCompleteLiquidation is a free log retrieval operation binding the contract event 0x2f0c36e8e230af6ceee7ecc30319e10800731fef4913c80afcf23f84b148df5d. // -// Solidity: event ProtocolFeeFactorUpdated(uint256 protocolFeeFactor) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterProtocolFeeFactorUpdated(opts *bind.FilterOpts) (*SDUtilityPoolProtocolFeeFactorUpdatedIterator, error) { +// Solidity: event CompleteLiquidation(uint256 indexed index) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterCompleteLiquidation(opts *bind.FilterOpts, index []*big.Int) (*SDUtilityPoolCompleteLiquidationIterator, error) { - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "ProtocolFeeFactorUpdated") + 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 &SDUtilityPoolProtocolFeeFactorUpdatedIterator{contract: _SDUtilityPool.contract, event: "ProtocolFeeFactorUpdated", logs: logs, sub: sub}, nil + return &SDUtilityPoolCompleteLiquidationIterator{contract: _SDUtilityPool.contract, event: "CompleteLiquidation", logs: logs, sub: sub}, nil } -// WatchProtocolFeeFactorUpdated is a free log subscription operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. +// WatchCompleteLiquidation is a free log subscription operation binding the contract event 0x2f0c36e8e230af6ceee7ecc30319e10800731fef4913c80afcf23f84b148df5d. // -// Solidity: event ProtocolFeeFactorUpdated(uint256 protocolFeeFactor) -func (_SDUtilityPool *SDUtilityPoolFilterer) WatchProtocolFeeFactorUpdated(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolProtocolFeeFactorUpdated) (event.Subscription, error) { +// Solidity: event CompleteLiquidation(uint256 indexed index) +func (_SDUtilityPool *SDUtilityPoolFilterer) WatchCompleteLiquidation(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolCompleteLiquidation, index []*big.Int) (event.Subscription, error) { - logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "ProtocolFeeFactorUpdated") + 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 } @@ -3431,8 +1704,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchProtocolFeeFactorUpdated(opts 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 { + event := new(SDUtilityPoolCompleteLiquidation) + if err := _SDUtilityPool.contract.UnpackLog(event, "CompleteLiquidation", log); err != nil { return err } event.Raw = log @@ -3453,21 +1726,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchProtocolFeeFactorUpdated(opts }), nil } -// ParseProtocolFeeFactorUpdated is a log parse operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. +// ParseCompleteLiquidation is a log parse operation binding the contract event 0x2f0c36e8e230af6ceee7ecc30319e10800731fef4913c80afcf23f84b148df5d. // -// 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 { +// 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 } -// 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 +// 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 @@ -3481,7 +1754,7 @@ type SDUtilityPoolRedeemedIterator 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 *SDUtilityPoolRedeemedIterator) Next() bool { +func (it *SDUtilityPoolDelegatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3490,7 +1763,7 @@ func (it *SDUtilityPoolRedeemedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRedeemed) + it.Event = new(SDUtilityPoolDelegated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3505,7 +1778,7 @@ func (it *SDUtilityPoolRedeemedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRedeemed) + it.Event = new(SDUtilityPoolDelegated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3521,53 +1794,53 @@ func (it *SDUtilityPoolRedeemedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRedeemedIterator) Error() error { +func (it *SDUtilityPoolDelegatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRedeemedIterator) Close() error { +func (it *SDUtilityPoolDelegatedIterator) Close() error { it.sub.Unsubscribe() return nil } -// SDUtilityPoolRedeemed represents a Redeemed event raised by the SDUtilityPool contract. -type SDUtilityPoolRedeemed struct { +// SDUtilityPoolDelegated represents a Delegated event raised by the SDUtilityPool contract. +type SDUtilityPoolDelegated struct { Delegator common.Address SdAmount *big.Int - SdXAmount *big.Int + SdXToMint *big.Int Raw types.Log // Blockchain specific contextual infos } -// FilterRedeemed is a free log retrieval operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. +// FilterDelegated is a free log retrieval operation binding the contract event 0x9a8f44850296624dadfd9c246d17e47171d35727a181bd090aa14bbbe00238bb. // -// Solidity: event Redeemed(address indexed delegator, uint256 sdAmount, uint256 sdXAmount) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRedeemed(opts *bind.FilterOpts, delegator []common.Address) (*SDUtilityPoolRedeemedIterator, error) { +// 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, "Redeemed", delegatorRule) + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Delegated", delegatorRule) if err != nil { return nil, err } - return &SDUtilityPoolRedeemedIterator{contract: _SDUtilityPool.contract, event: "Redeemed", logs: logs, sub: sub}, nil + return &SDUtilityPoolDelegatedIterator{contract: _SDUtilityPool.contract, event: "Delegated", logs: logs, sub: sub}, nil } -// WatchRedeemed is a free log subscription operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. +// WatchDelegated is a free log subscription operation binding the contract event 0x9a8f44850296624dadfd9c246d17e47171d35727a181bd090aa14bbbe00238bb. // -// 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) { +// 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, "Redeemed", delegatorRule) + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Delegated", delegatorRule) if err != nil { return nil, err } @@ -3577,8 +1850,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRedeemed(opts *bind.WatchOpts, 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 { + event := new(SDUtilityPoolDelegated) + if err := _SDUtilityPool.contract.UnpackLog(event, "Delegated", log); err != nil { return err } event.Raw = log @@ -3599,21 +1872,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRedeemed(opts *bind.WatchOpts, }), nil } -// ParseRedeemed is a log parse operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. +// ParseDelegated is a log parse operation binding the contract event 0x9a8f44850296624dadfd9c246d17e47171d35727a181bd090aa14bbbe00238bb. // -// 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 { +// 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 } -// 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 +// 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 @@ -3627,7 +1900,7 @@ type SDUtilityPoolRepaidIterator 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 *SDUtilityPoolRepaidIterator) Next() bool { +func (it *SDUtilityPoolFinalizedWithdrawRequestIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3636,7 +1909,7 @@ func (it *SDUtilityPoolRepaidIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRepaid) + it.Event = new(SDUtilityPoolFinalizedWithdrawRequest) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3651,7 +1924,7 @@ func (it *SDUtilityPoolRepaidIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRepaid) + it.Event = new(SDUtilityPoolFinalizedWithdrawRequest) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3667,52 +1940,41 @@ func (it *SDUtilityPoolRepaidIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRepaidIterator) Error() error { +func (it *SDUtilityPoolFinalizedWithdrawRequestIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRepaidIterator) Close() error { +func (it *SDUtilityPoolFinalizedWithdrawRequestIterator) 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 +// SDUtilityPoolFinalizedWithdrawRequest represents a FinalizedWithdrawRequest event raised by the SDUtilityPool contract. +type SDUtilityPoolFinalizedWithdrawRequest struct { + NextRequestIdToFinalize *big.Int + Raw types.Log // Blockchain specific contextual infos } -// FilterRepaid is a free log retrieval operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. +// FilterFinalizedWithdrawRequest is a free log retrieval operation binding the contract event 0x12a00f5e4c3614409f2dd90dc5be91b9b64ef89bac58a5b034ec0094376dbd37. // -// 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) - } +// Solidity: event FinalizedWithdrawRequest(uint256 nextRequestIdToFinalize) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterFinalizedWithdrawRequest(opts *bind.FilterOpts) (*SDUtilityPoolFinalizedWithdrawRequestIterator, error) { - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Repaid", utilizerRule) + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "FinalizedWithdrawRequest") if err != nil { return nil, err } - return &SDUtilityPoolRepaidIterator{contract: _SDUtilityPool.contract, event: "Repaid", logs: logs, sub: sub}, nil + return &SDUtilityPoolFinalizedWithdrawRequestIterator{contract: _SDUtilityPool.contract, event: "FinalizedWithdrawRequest", logs: logs, sub: sub}, nil } -// WatchRepaid is a free log subscription operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. +// WatchFinalizedWithdrawRequest is a free log subscription operation binding the contract event 0x12a00f5e4c3614409f2dd90dc5be91b9b64ef89bac58a5b034ec0094376dbd37. // -// 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) - } +// 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, "Repaid", utilizerRule) + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "FinalizedWithdrawRequest") if err != nil { return nil, err } @@ -3722,8 +1984,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRepaid(opts *bind.WatchOpts, s 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 { + event := new(SDUtilityPoolFinalizedWithdrawRequest) + if err := _SDUtilityPool.contract.UnpackLog(event, "FinalizedWithdrawRequest", log); err != nil { return err } event.Raw = log @@ -3744,21 +2006,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRepaid(opts *bind.WatchOpts, s }), nil } -// ParseRepaid is a log parse operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. +// ParseFinalizedWithdrawRequest is a log parse operation binding the contract event 0x12a00f5e4c3614409f2dd90dc5be91b9b64ef89bac58a5b034ec0094376dbd37. // -// 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 { +// 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 } -// 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 +// 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 @@ -3772,7 +2034,7 @@ type SDUtilityPoolRequestRedeemedIterator 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 *SDUtilityPoolRequestRedeemedIterator) Next() bool { +func (it *SDUtilityPoolLiquidationCallIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3781,7 +2043,7 @@ func (it *SDUtilityPoolRequestRedeemedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRequestRedeemed) + it.Event = new(SDUtilityPoolLiquidationCall) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3796,7 +2058,7 @@ func (it *SDUtilityPoolRequestRedeemedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRequestRedeemed) + it.Event = new(SDUtilityPoolLiquidationCall) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3812,42 +2074,65 @@ func (it *SDUtilityPoolRequestRedeemedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRequestRedeemedIterator) Error() error { +func (it *SDUtilityPoolLiquidationCallIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRequestRedeemedIterator) Close() error { +func (it *SDUtilityPoolLiquidationCallIterator) 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 +// 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 } -// FilterRequestRedeemed is a free log retrieval operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. +// FilterLiquidationCall is a free log retrieval operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. // -// Solidity: event RequestRedeemed(address caller, uint256 sdToTransfer) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRequestRedeemed(opts *bind.FilterOpts) (*SDUtilityPoolRequestRedeemedIterator, error) { +// 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) { - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RequestRedeemed") + 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 &SDUtilityPoolRequestRedeemedIterator{contract: _SDUtilityPool.contract, event: "RequestRedeemed", logs: logs, sub: sub}, nil + return &SDUtilityPoolLiquidationCallIterator{contract: _SDUtilityPool.contract, event: "LiquidationCall", logs: logs, sub: sub}, nil } -// WatchRequestRedeemed is a free log subscription operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. +// WatchLiquidationCall is a free log subscription operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. // -// Solidity: event RequestRedeemed(address caller, uint256 sdToTransfer) -func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRequestRedeemed(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRequestRedeemed) (event.Subscription, error) { +// 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) { - logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RequestRedeemed") + 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 } @@ -3857,8 +2142,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRequestRedeemed(opts *bind.Wat 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 { + event := new(SDUtilityPoolLiquidationCall) + if err := _SDUtilityPool.contract.UnpackLog(event, "LiquidationCall", log); err != nil { return err } event.Raw = log @@ -3879,21 +2164,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRequestRedeemed(opts *bind.Wat }), nil } -// ParseRequestRedeemed is a log parse operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. +// ParseLiquidationCall is a log parse operation binding the contract event 0xcc9de8be9ac1f02b70a8ca2612f451a769d6d160ad91de17dcc38e54c567a532. // -// 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 { +// 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 } -// 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 +// 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 @@ -3907,7 +2192,7 @@ type SDUtilityPoolRiskConfigUpdatedIterator 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 *SDUtilityPoolRiskConfigUpdatedIterator) Next() bool { +func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -3916,7 +2201,7 @@ func (it *SDUtilityPoolRiskConfigUpdatedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRiskConfigUpdated) + it.Event = new(SDUtilityPoolProtocolFeeFactorUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3931,7 +2216,7 @@ func (it *SDUtilityPoolRiskConfigUpdatedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRiskConfigUpdated) + it.Event = new(SDUtilityPoolProtocolFeeFactorUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -3947,44 +2232,41 @@ func (it *SDUtilityPoolRiskConfigUpdatedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRiskConfigUpdatedIterator) Error() error { +func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRiskConfigUpdatedIterator) Close() error { +func (it *SDUtilityPoolProtocolFeeFactorUpdatedIterator) 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. +// 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 RiskConfigUpdated(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRiskConfigUpdated(opts *bind.FilterOpts) (*SDUtilityPoolRiskConfigUpdatedIterator, error) { +// Solidity: event ProtocolFeeFactorUpdated(uint256 protocolFeeFactor) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterProtocolFeeFactorUpdated(opts *bind.FilterOpts) (*SDUtilityPoolProtocolFeeFactorUpdatedIterator, error) { - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RiskConfigUpdated") + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "ProtocolFeeFactorUpdated") if err != nil { return nil, err } - return &SDUtilityPoolRiskConfigUpdatedIterator{contract: _SDUtilityPool.contract, event: "RiskConfigUpdated", logs: logs, sub: sub}, nil + return &SDUtilityPoolProtocolFeeFactorUpdatedIterator{contract: _SDUtilityPool.contract, event: "ProtocolFeeFactorUpdated", logs: logs, sub: sub}, nil } -// WatchRiskConfigUpdated is a free log subscription operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. +// WatchProtocolFeeFactorUpdated is a free log subscription operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. // -// Solidity: event RiskConfigUpdated(uint256 liquidationThreshold, uint256 liquidationBonusPercent, uint256 liquidationFeePercent, uint256 ltv) -func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRiskConfigUpdated(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolRiskConfigUpdated) (event.Subscription, error) { +// 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, "RiskConfigUpdated") + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "ProtocolFeeFactorUpdated") if err != nil { return nil, err } @@ -3994,8 +2276,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRiskConfigUpdated(opts *bind.W 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 { + event := new(SDUtilityPoolProtocolFeeFactorUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "ProtocolFeeFactorUpdated", log); err != nil { return err } event.Raw = log @@ -4016,21 +2298,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRiskConfigUpdated(opts *bind.W }), nil } -// ParseRiskConfigUpdated is a log parse operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. +// ParseProtocolFeeFactorUpdated is a log parse operation binding the contract event 0xba813ee7ea736ec5148f515c7fe651c522fa84413c6c5ce693bd74abade775d3. // -// 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 { +// 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 } -// 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 +// 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 @@ -4044,7 +2326,7 @@ type SDUtilityPoolRoleAdminChangedIterator 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 *SDUtilityPoolRoleAdminChangedIterator) Next() bool { +func (it *SDUtilityPoolRedeemedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -4053,7 +2335,7 @@ func (it *SDUtilityPoolRoleAdminChangedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRoleAdminChanged) + it.Event = new(SDUtilityPoolRedeemed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4068,7 +2350,7 @@ func (it *SDUtilityPoolRoleAdminChangedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRoleAdminChanged) + it.Event = new(SDUtilityPoolRedeemed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4084,69 +2366,53 @@ func (it *SDUtilityPoolRoleAdminChangedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRoleAdminChangedIterator) Error() error { +func (it *SDUtilityPoolRedeemedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRoleAdminChangedIterator) Close() error { +func (it *SDUtilityPoolRedeemedIterator) 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 +// 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 } -// FilterRoleAdminChanged is a free log retrieval operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// FilterRedeemed is a free log retrieval operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. // -// 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) { +// Solidity: event Redeemed(address indexed delegator, uint256 sdAmount, uint256 sdXAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRedeemed(opts *bind.FilterOpts, delegator []common.Address) (*SDUtilityPoolRedeemedIterator, 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 delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) } - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Redeemed", delegatorRule) if err != nil { return nil, err } - return &SDUtilityPoolRoleAdminChangedIterator{contract: _SDUtilityPool.contract, event: "RoleAdminChanged", logs: logs, sub: sub}, nil + return &SDUtilityPoolRedeemedIterator{contract: _SDUtilityPool.contract, event: "Redeemed", logs: logs, sub: sub}, nil } -// WatchRoleAdminChanged is a free log subscription operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// WatchRedeemed is a free log subscription operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. // -// 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) { +// 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 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 delegatorRule []interface{} + for _, delegatorItem := range delegator { + delegatorRule = append(delegatorRule, delegatorItem) } - logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RoleAdminChanged", roleRule, previousAdminRoleRule, newAdminRoleRule) + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Redeemed", delegatorRule) if err != nil { return nil, err } @@ -4156,8 +2422,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleAdminChanged(opts *bind.Wa 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 { + event := new(SDUtilityPoolRedeemed) + if err := _SDUtilityPool.contract.UnpackLog(event, "Redeemed", log); err != nil { return err } event.Raw = log @@ -4178,21 +2444,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleAdminChanged(opts *bind.Wa }), nil } -// ParseRoleAdminChanged is a log parse operation binding the contract event 0xbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff. +// ParseRedeemed is a log parse operation binding the contract event 0xf3a670cd3af7d64b488926880889d08a8585a138ff455227af6737339a1ec262. // -// 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 { +// 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 } -// 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 +// 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 @@ -4206,7 +2472,7 @@ type SDUtilityPoolRoleGrantedIterator 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 *SDUtilityPoolRoleGrantedIterator) Next() bool { +func (it *SDUtilityPoolRepaidIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -4215,7 +2481,7 @@ func (it *SDUtilityPoolRoleGrantedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRoleGranted) + it.Event = new(SDUtilityPoolRepaid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4230,7 +2496,7 @@ func (it *SDUtilityPoolRoleGrantedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRoleGranted) + it.Event = new(SDUtilityPoolRepaid) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4246,69 +2512,52 @@ func (it *SDUtilityPoolRoleGrantedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRoleGrantedIterator) Error() error { +func (it *SDUtilityPoolRepaidIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRoleGrantedIterator) Close() error { +func (it *SDUtilityPoolRepaidIterator) 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 +// 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 } -// FilterRoleGranted is a free log retrieval operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// FilterRepaid is a free log retrieval operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. // -// 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) { +// Solidity: event Repaid(address indexed utilizer, uint256 repayAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRepaid(opts *bind.FilterOpts, utilizer []common.Address) (*SDUtilityPoolRepaidIterator, 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) + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) } - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Repaid", utilizerRule) if err != nil { return nil, err } - return &SDUtilityPoolRoleGrantedIterator{contract: _SDUtilityPool.contract, event: "RoleGranted", logs: logs, sub: sub}, nil + return &SDUtilityPoolRepaidIterator{contract: _SDUtilityPool.contract, event: "Repaid", logs: logs, sub: sub}, nil } -// WatchRoleGranted is a free log subscription operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// WatchRepaid is a free log subscription operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. // -// 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) { +// 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 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) + var utilizerRule []interface{} + for _, utilizerItem := range utilizer { + utilizerRule = append(utilizerRule, utilizerItem) } - logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RoleGranted", roleRule, accountRule, senderRule) + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "Repaid", utilizerRule) if err != nil { return nil, err } @@ -4318,8 +2567,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleGranted(opts *bind.WatchOp 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 { + event := new(SDUtilityPoolRepaid) + if err := _SDUtilityPool.contract.UnpackLog(event, "Repaid", log); err != nil { return err } event.Raw = log @@ -4340,21 +2589,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleGranted(opts *bind.WatchOp }), nil } -// ParseRoleGranted is a log parse operation binding the contract event 0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d. +// ParseRepaid is a log parse operation binding the contract event 0x0516911bcc3a0a7412a44601057c0a0a1ec628bde049a84284bc428866534488. // -// 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 { +// 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 } -// 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 +// 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 @@ -4368,7 +2617,7 @@ type SDUtilityPoolRoleRevokedIterator 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 *SDUtilityPoolRoleRevokedIterator) Next() bool { +func (it *SDUtilityPoolRequestRedeemedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -4377,7 +2626,7 @@ func (it *SDUtilityPoolRoleRevokedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRoleRevoked) + it.Event = new(SDUtilityPoolRequestRedeemed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4392,7 +2641,7 @@ func (it *SDUtilityPoolRoleRevokedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolRoleRevoked) + it.Event = new(SDUtilityPoolRequestRedeemed) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4408,69 +2657,42 @@ func (it *SDUtilityPoolRoleRevokedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolRoleRevokedIterator) Error() error { +func (it *SDUtilityPoolRequestRedeemedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolRoleRevokedIterator) Close() error { +func (it *SDUtilityPoolRequestRedeemedIterator) 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 +// 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 } -// FilterRoleRevoked is a free log retrieval operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// FilterRequestRedeemed is a free log retrieval operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. // -// 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) - } +// Solidity: event RequestRedeemed(address caller, uint256 sdToTransfer) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterRequestRedeemed(opts *bind.FilterOpts) (*SDUtilityPoolRequestRedeemedIterator, error) { - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RoleRevoked", roleRule, accountRule, senderRule) + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RequestRedeemed") if err != nil { return nil, err } - return &SDUtilityPoolRoleRevokedIterator{contract: _SDUtilityPool.contract, event: "RoleRevoked", logs: logs, sub: sub}, nil + return &SDUtilityPoolRequestRedeemedIterator{contract: _SDUtilityPool.contract, event: "RequestRedeemed", logs: logs, sub: sub}, nil } -// WatchRoleRevoked is a free log subscription operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// WatchRequestRedeemed is a free log subscription operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. // -// 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) - } +// 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, "RoleRevoked", roleRule, accountRule, senderRule) + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RequestRedeemed") if err != nil { return nil, err } @@ -4480,8 +2702,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleRevoked(opts *bind.WatchOp 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 { + event := new(SDUtilityPoolRequestRedeemed) + if err := _SDUtilityPool.contract.UnpackLog(event, "RequestRedeemed", log); err != nil { return err } event.Raw = log @@ -4502,21 +2724,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchRoleRevoked(opts *bind.WatchOp }), nil } -// ParseRoleRevoked is a log parse operation binding the contract event 0xf6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b. +// ParseRequestRedeemed is a log parse operation binding the contract event 0xf7aca15eb385953329daa8e235ce29ead201e26c1e36e1083d929821401bb7d2. // -// 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 { +// 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 } -// 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 +// 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 @@ -4530,7 +2752,7 @@ type SDUtilityPoolSDUtilizedIterator 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 *SDUtilityPoolSDUtilizedIterator) Next() bool { +func (it *SDUtilityPoolRiskConfigUpdatedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -4539,7 +2761,7 @@ func (it *SDUtilityPoolSDUtilizedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolSDUtilized) + it.Event = new(SDUtilityPoolRiskConfigUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4554,7 +2776,7 @@ func (it *SDUtilityPoolSDUtilizedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolSDUtilized) + it.Event = new(SDUtilityPoolRiskConfigUpdated) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4570,42 +2792,44 @@ func (it *SDUtilityPoolSDUtilizedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolSDUtilizedIterator) Error() error { +func (it *SDUtilityPoolRiskConfigUpdatedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolSDUtilizedIterator) Close() error { +func (it *SDUtilityPoolRiskConfigUpdatedIterator) 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 +// 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 } -// FilterSDUtilized is a free log retrieval operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. +// FilterRiskConfigUpdated is a free log retrieval operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. // -// Solidity: event SDUtilized(address utilizer, uint256 utilizeAmount) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterSDUtilized(opts *bind.FilterOpts) (*SDUtilityPoolSDUtilizedIterator, error) { +// 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, "SDUtilized") + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "RiskConfigUpdated") if err != nil { return nil, err } - return &SDUtilityPoolSDUtilizedIterator{contract: _SDUtilityPool.contract, event: "SDUtilized", logs: logs, sub: sub}, nil + return &SDUtilityPoolRiskConfigUpdatedIterator{contract: _SDUtilityPool.contract, event: "RiskConfigUpdated", logs: logs, sub: sub}, nil } -// WatchSDUtilized is a free log subscription operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. +// WatchRiskConfigUpdated is a free log subscription operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. // -// Solidity: event SDUtilized(address utilizer, uint256 utilizeAmount) -func (_SDUtilityPool *SDUtilityPoolFilterer) WatchSDUtilized(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolSDUtilized) (event.Subscription, error) { +// 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, "SDUtilized") + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "RiskConfigUpdated") if err != nil { return nil, err } @@ -4615,8 +2839,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchSDUtilized(opts *bind.WatchOpt 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 { + event := new(SDUtilityPoolRiskConfigUpdated) + if err := _SDUtilityPool.contract.UnpackLog(event, "RiskConfigUpdated", log); err != nil { return err } event.Raw = log @@ -4637,21 +2861,21 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchSDUtilized(opts *bind.WatchOpt }), nil } -// ParseSDUtilized is a log parse operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. +// ParseRiskConfigUpdated is a log parse operation binding the contract event 0x62dd46f943681bd727e339f4baaa19fb66ea209fbe7d9b4a75aa74c33acc18f3. // -// 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 { +// 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 } -// 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 +// 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 @@ -4665,7 +2889,7 @@ type SDUtilityPoolUnpausedIterator 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 *SDUtilityPoolUnpausedIterator) Next() bool { +func (it *SDUtilityPoolSDUtilizedIterator) Next() bool { // If the iterator failed, stop iterating if it.fail != nil { return false @@ -4674,7 +2898,7 @@ func (it *SDUtilityPoolUnpausedIterator) Next() bool { if it.done { select { case log := <-it.logs: - it.Event = new(SDUtilityPoolUnpaused) + it.Event = new(SDUtilityPoolSDUtilized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4689,7 +2913,7 @@ func (it *SDUtilityPoolUnpausedIterator) Next() bool { // Iterator still in progress, wait for either a data or an error event select { case log := <-it.logs: - it.Event = new(SDUtilityPoolUnpaused) + it.Event = new(SDUtilityPoolSDUtilized) if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { it.fail = err return false @@ -4705,41 +2929,42 @@ func (it *SDUtilityPoolUnpausedIterator) Next() bool { } // Error returns any retrieval or parsing error occurred during filtering. -func (it *SDUtilityPoolUnpausedIterator) Error() error { +func (it *SDUtilityPoolSDUtilizedIterator) Error() error { return it.fail } // Close terminates the iteration process, releasing any pending underlying // resources. -func (it *SDUtilityPoolUnpausedIterator) Close() error { +func (it *SDUtilityPoolSDUtilizedIterator) 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 +// 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 } -// FilterUnpaused is a free log retrieval operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// FilterSDUtilized is a free log retrieval operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. // -// Solidity: event Unpaused(address account) -func (_SDUtilityPool *SDUtilityPoolFilterer) FilterUnpaused(opts *bind.FilterOpts) (*SDUtilityPoolUnpausedIterator, error) { +// Solidity: event SDUtilized(address utilizer, uint256 utilizeAmount) +func (_SDUtilityPool *SDUtilityPoolFilterer) FilterSDUtilized(opts *bind.FilterOpts) (*SDUtilityPoolSDUtilizedIterator, error) { - logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "Unpaused") + logs, sub, err := _SDUtilityPool.contract.FilterLogs(opts, "SDUtilized") if err != nil { return nil, err } - return &SDUtilityPoolUnpausedIterator{contract: _SDUtilityPool.contract, event: "Unpaused", logs: logs, sub: sub}, nil + return &SDUtilityPoolSDUtilizedIterator{contract: _SDUtilityPool.contract, event: "SDUtilized", logs: logs, sub: sub}, nil } -// WatchUnpaused is a free log subscription operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// WatchSDUtilized is a free log subscription operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. // -// Solidity: event Unpaused(address account) -func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUnpaused(opts *bind.WatchOpts, sink chan<- *SDUtilityPoolUnpaused) (event.Subscription, error) { +// 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, "Unpaused") + logs, sub, err := _SDUtilityPool.contract.WatchLogs(opts, "SDUtilized") if err != nil { return nil, err } @@ -4749,8 +2974,8 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUnpaused(opts *bind.WatchOpts, 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 { + event := new(SDUtilityPoolSDUtilized) + if err := _SDUtilityPool.contract.UnpackLog(event, "SDUtilized", log); err != nil { return err } event.Raw = log @@ -4771,12 +2996,12 @@ func (_SDUtilityPool *SDUtilityPoolFilterer) WatchUnpaused(opts *bind.WatchOpts, }), nil } -// ParseUnpaused is a log parse operation binding the contract event 0x5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa. +// ParseSDUtilized is a log parse operation binding the contract event 0x29f5a3c94649e9fd569197488f431f12d8b1fe681596964128403511823a6386. // -// 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 { +// 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 diff --git a/stader-lib/sdutility/sd-utility.go b/stader-lib/sdutility/sd-utility.go index 7d0ccceaa..f1cccf044 100644 --- a/stader-lib/sdutility/sd-utility.go +++ b/stader-lib/sdutility/sd-utility.go @@ -106,3 +106,14 @@ func GetUserData(sp *stader.SDUtilityPoolContractManager, address common.Address return &userData, nil } + +func AlreadyLiquidated(sp *stader.SDUtilityPoolContractManager, address common.Address, opts *bind.CallOpts) (bool, error) { + liquidationIndex, err := sp.SDUtilityPool.LiquidationIndexByOperator(opts, address) + if err != nil { + return false, err + } + + isAlreadyLiquidated := liquidationIndex.Cmp(big.NewInt(0)) != 0 + + return isAlreadyLiquidated, nil +} diff --git a/stader/api/validator/deposit.go b/stader/api/validator/deposit.go index 6c9ff0633..3a98ebbd2 100644 --- a/stader/api/validator/deposit.go +++ b/stader/api/validator/deposit.go @@ -88,6 +88,11 @@ func GetSDStatus( return nil, err } + alreadyLiquidated, err := sdutility.AlreadyLiquidated(sdu, operatorAddress, nil) + if err != nil { + return nil, err + } + return &api.SdStatusResponse{ NotEnoughSdCollateral: !hasEnoughSdCollateral, SdUtilizerLatestBalance: sdUtilityLatestBalance, @@ -101,6 +106,7 @@ func GetSDStatus( SdRewardEligible: rewardEligibleSD, HealthFactor: userData.HealthFactor, AccumulatedInterest: userData.TotalInterestSD, + AlreadyLiquidated: alreadyLiquidated, }, nil }