github.com/Onther-Tech/plasma-evm@v0.0.0-rc7.7/contracts/stamina/contract/stamina.go (about)

     1  // Code generated - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package contract
     5  
     6  import (
     7  	"math/big"
     8  	"strings"
     9  
    10  	"github.com/Onther-Tech/plasma-evm"
    11  	"github.com/Onther-Tech/plasma-evm/accounts/abi"
    12  	"github.com/Onther-Tech/plasma-evm/accounts/abi/bind"
    13  	"github.com/Onther-Tech/plasma-evm/common"
    14  	"github.com/Onther-Tech/plasma-evm/core/types"
    15  	"github.com/Onther-Tech/plasma-evm/event"
    16  )
    17  
    18  // Reference imports to suppress errors if they are not otherwise used.
    19  var (
    20  	_ = big.NewInt
    21  	_ = strings.NewReader
    22  	_ = ethereum.NotFound
    23  	_ = abi.U256
    24  	_ = bind.Bind
    25  	_ = common.Big1
    26  	_ = types.BloomLookup
    27  	_ = event.NewSubscription
    28  )
    29  
    30  // StaminaABI is the input ABI used to generate the binding from.
    31  const StaminaABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"oldDelegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"newDelegatee\",\"type\":\"address\"}],\"name\":\"DelegateeChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"recovered\",\"type\":\"bool\"}],\"name\":\"StaminaAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"StaminaSubtracted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"requestBlockNumber\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawalIndex\",\"type\":\"uint256\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"withdrawalIndex\",\"type\":\"uint256\"}],\"name\":\"Withdrawn\",\"type\":\"event\"},{\"constant\":true,\"inputs\":[],\"name\":\"MIN_DEPOSIT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"RECOVER_EPOCH_LENGTH\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"WITHDRAWAL_DELAY\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"addStamina\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"development\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"getDelegatee\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"getDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"getLastProcessedWithdrawalIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"getLastRecoveryBlock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"getNumRecovery\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"}],\"name\":\"getNumWithdrawals\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"}],\"name\":\"getStamina\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"}],\"name\":\"getTotalDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalIndex\",\"type\":\"uint256\"}],\"name\":\"getWithdrawal\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"requestBlockNumber\",\"type\":\"uint128\"},{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"processed\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"minDeposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"recoveryEpochLength\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"withdrawalDelay\",\"type\":\"uint256\"}],\"name\":\"init\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"initialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawal\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegator\",\"type\":\"address\"}],\"name\":\"setDelegator\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"address\",\"name\":\"delegatee\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"subtractStamina\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
    32  
    33  // StaminaFuncSigs maps the 4-byte function signature to its string representation.
    34  var StaminaFuncSigs = map[string]string{
    35  	"e1e158a5": "MIN_DEPOSIT()",
    36  	"1556d8ac": "RECOVER_EPOCH_LENGTH()",
    37  	"0ebb172a": "WITHDRAWAL_DELAY()",
    38  	"bcac9736": "addStamina(address,uint256)",
    39  	"f340fa01": "deposit(address)",
    40  	"7b929c27": "development()",
    41  	"9b4e735f": "getDelegatee(address)",
    42  	"c35082a9": "getDeposit(address,address)",
    43  	"22347f95": "getLastProcessedWithdrawalIndex(address)",
    44  	"937aaef1": "getLastRecoveryBlock(address)",
    45  	"b69ad63b": "getNumRecovery(address)",
    46  	"d898ae1c": "getNumWithdrawals(address)",
    47  	"3900e4ec": "getStamina(address)",
    48  	"857184d1": "getTotalDeposit(address)",
    49  	"5be4f765": "getWithdrawal(address,uint256)",
    50  	"8cd8db8a": "init(uint256,uint256,uint256)",
    51  	"158ef93e": "initialized()",
    52  	"da95ebf7": "requestWithdrawal(address,uint256)",
    53  	"83cd9cc3": "setDelegator(address)",
    54  	"d1c0c042": "subtractStamina(address,uint256)",
    55  	"3ccfd60b": "withdraw()",
    56  }
    57  
    58  // StaminaBin is the compiled bytecode used for deploying new contracts.
    59  var StaminaBin = "0x6080604052600c805460ff1916600117905534801561001d57600080fd5b50610fad8061002d6000396000f3fe60806040526004361061012a5760003560e01c80638cd8db8a116100ab578063c35082a91161006f578063c35082a914610425578063d1c0c04214610460578063d898ae1c14610499578063da95ebf7146104cc578063e1e158a514610505578063f340fa011461051a5761012a565b80638cd8db8a146102ff578063937aaef1146103375780639b4e735f1461036a578063b69ad63b146103b9578063bcac9736146103ec5761012a565b80633ccfd60b116100f25780633ccfd60b146101fa5780635be4f7651461020f5780637b929c271461028457806383cd9cc314610299578063857184d1146102cc5761012a565b80630ebb172a1461012f5780631556d8ac14610156578063158ef93e1461016b57806322347f95146101945780633900e4ec146101c7575b600080fd5b34801561013b57600080fd5b50610144610540565b60408051918252519081900360200190f35b34801561016257600080fd5b50610144610546565b34801561017757600080fd5b5061018061054c565b604080519115158252519081900360200190f35b3480156101a057600080fd5b50610144600480360360208110156101b757600080fd5b50356001600160a01b0316610555565b3480156101d357600080fd5b50610144600480360360208110156101ea57600080fd5b50356001600160a01b0316610570565b34801561020657600080fd5b5061018061058b565b34801561021b57600080fd5b506102486004803603604081101561023257600080fd5b506001600160a01b03813516906020013561074c565b604080516001600160801b0395861681529390941660208401526001600160a01b03909116828401521515606082015290519081900360800190f35b34801561029057600080fd5b50610180610808565b3480156102a557600080fd5b50610180600480360360208110156102bc57600080fd5b50356001600160a01b0316610811565b3480156102d857600080fd5b50610144600480360360208110156102ef57600080fd5b50356001600160a01b0316610892565b34801561030b57600080fd5b506103356004803603606081101561032257600080fd5b50803590602081013590604001356108ad565b005b34801561034357600080fd5b506101446004803603602081101561035a57600080fd5b50356001600160a01b031661090e565b34801561037657600080fd5b5061039d6004803603602081101561038d57600080fd5b50356001600160a01b0316610929565b604080516001600160a01b039092168252519081900360200190f35b3480156103c557600080fd5b50610144600480360360208110156103dc57600080fd5b50356001600160a01b0316610947565b3480156103f857600080fd5b506101806004803603604081101561040f57600080fd5b506001600160a01b038135169060200135610962565b34801561043157600080fd5b506101446004803603604081101561044857600080fd5b506001600160a01b0381358116916020013516610aeb565b34801561046c57600080fd5b506101806004803603604081101561048357600080fd5b506001600160a01b038135169060200135610b16565b3480156104a557600080fd5b50610144600480360360208110156104bc57600080fd5b50356001600160a01b0316610bb4565b3480156104d857600080fd5b50610180600480360360408110156104ef57600080fd5b506001600160a01b038135169060200135610bcf565b34801561051157600080fd5b50610144610dae565b6101806004803603602081101561053057600080fd5b50356001600160a01b0316610db4565b600b5481565b600a5481565b60085460ff1681565b6001600160a01b031660009081526006602052604090205490565b6001600160a01b031660009081526001602052604090205490565b33600090815260056020526040812080546105a557600080fd5b3360009081526006602052604081205490811580156105ed5750826000815481106105cc57fe5b906000526020600020906002020160010160149054906101000a900460ff16155b156105fa5750600061061c565b816106165782546002111561060e57600080fd5b50600161061c565b50600181015b8254811061062957600080fd5b33600090815260056020526040812080548390811061064457fe5b906000526020600020906002020190508060010160149054906101000a900460ff161561067057600080fd5b600b54815443600160801b9091046001600160801b0316909101111561069557600080fd5b805460018201805460ff60a01b1916600160a01b17905533600081815260066020526040808220869055516001600160801b039093169283156108fc0291849190818181858888f193505050501580156106f3573d6000803e3d6000fd5b506001820154604080518381526020810186905281516001600160a01b039093169233927f91fb9d98b786c57d74c099ccd2beca1739e9f6a81fb49001ca465c4b7591bbe2928290030190a36001955050505050505b90565b60008060008061075b86610bb4565b851061076657600080fd5b61076e610ef0565b6001600160a01b038716600090815260056020526040902080548790811061079257fe5b600091825260209182902060408051608081018252600290930290910180546001600160801b03808216808652600160801b909204169484018590526001909101546001600160a01b03811692840183905260ff600160a01b90910416151560609093018390529a929950975095509350505050565b600c5460ff1681565b60085460009060ff1661082357600080fd5b6001600160a01b03828116600081815260208181526040918290208054336001600160a01b0319821681179092558351951680865291850152815190937f5884d7e3ec123de8e772bcf576c18dcdad75b056c4314f999ed966693419c69292908290030190a250600192915050565b6001600160a01b031660009081526002602052604090205490565b60085460ff16156108bd57600080fd5b600083116108ca57600080fd5b600082116108d757600080fd5b600081116108e457600080fd5b8082600202106108f357600080fd5b600992909255600a55600b556008805460ff19166001179055565b6001600160a01b031660009081526004602052604090205490565b6001600160a01b039081166000908152602081905260409020541690565b6001600160a01b031660009081526007602052604090205490565b600c5460009060ff1680610974575033155b61097d57600080fd5b600a546001600160a01b03841660009081526004602052604090205443910111610a20576001600160a01b038316600081815260026020908152604080832054600180845282852091909155600483528184204390556007835281842080548201905581519384529183019190915280517f85bf8701ef98ea32e97f08708da81c7daa93e87ea3e2fd661801cce6d36f68099281900390910190a2506001610ae5565b6001600160a01b0383166000908152600260209081526040808320546001909252909120548381018110610a5357600080fd5b80840182811115610a7e576001600160a01b0386166000908152600160205260409020839055610a9a565b6001600160a01b03861660009081526001602052604090208190555b604080518681526000602082015281516001600160a01b038916927f85bf8701ef98ea32e97f08708da81c7daa93e87ea3e2fd661801cce6d36f6809928290030190a2600193505050505b92915050565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b600c5460009060ff1680610b28575033155b610b3157600080fd5b6001600160a01b0383166000908152600160205260409020548281038111610b5857600080fd5b6001600160a01b0384166000818152600160209081526040918290208685039055815186815291517f66649d0546ffaed7a9e91793ec2fba0941afa9ebed5b599a8031611ad911fd2f9281900390910190a25060019392505050565b6001600160a01b031660009081526005602052604090205490565b60085460009060ff16610be157600080fd5b60008211610bee57600080fd5b6001600160a01b038316600081815260026020908152604080832054338452600383528184209484529382528083205460019092529091205481610c3157600080fd5b8285840310610c3f57600080fd5b8185830310610c4d57600080fd5b6001600160a01b038616600081815260026020908152604080832089880390553383526003825280832093835292905220858303905584811115610cad576001600160a01b03861660009081526001602052604090208582039055610cc7565b6001600160a01b0386166000908152600160205260408120555b336000908152600560205260408120805490918282610ce98260018301610f17565b81548110610cf357fe5b60009182526020918290206002919091020180546fffffffffffffffffffffffffffffffff19166001600160801b038b8116919091178116600160801b43928316021782556001820180546001600160a01b0319166001600160a01b038e16908117909155604080518d81529485019290925283820186905290519193509133917f3aeb15af61588a39bcfafb19ed853140d195c2a924537afbf9a6d04348e76a69916060908290030190a350600198975050505050505050565b60095481565b60085460009060ff16610dc657600080fd5b600954341015610dd557600080fd5b6001600160a01b03821660008181526002602090815260408083205433845260038352818420948452938252808320546001909252909120543483018310610e1c57600080fd5b8134830111610e2a57600080fd5b8034820111610e3857600080fd5b6001600160a01b03851660008181526002602090815260408083203488810190915533845260038352818420948452938252808320868501905560018252808320938501909355600490522054610ea5576001600160a01b03851660009081526004602052604090204390555b6040805134815290516001600160a01b0387169133917f8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a79181900360200190a3506001949350505050565b60408051608081018252600080825260208201819052918101829052606081019190915290565b815481835581811115610f4357600202816002028360005260206000209182019101610f439190610f48565b505050565b61074991905b80821115610f7457600081556001810180546001600160a81b0319169055600201610f4e565b509056fea265627a7a72315820c78285bb85a38fbf4c44937f68e217e65725afcc6a0a0652f35e8a64e7cee11a64736f6c634300050c0032"
    60  
    61  // DeployStamina deploys a new Ethereum contract, binding an instance of Stamina to it.
    62  func DeployStamina(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Stamina, error) {
    63  	parsed, err := abi.JSON(strings.NewReader(StaminaABI))
    64  	if err != nil {
    65  		return common.Address{}, nil, nil, err
    66  	}
    67  
    68  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(StaminaBin), backend)
    69  	if err != nil {
    70  		return common.Address{}, nil, nil, err
    71  	}
    72  	return address, tx, &Stamina{StaminaCaller: StaminaCaller{contract: contract}, StaminaTransactor: StaminaTransactor{contract: contract}, StaminaFilterer: StaminaFilterer{contract: contract}}, nil
    73  }
    74  
    75  // Stamina is an auto generated Go binding around an Ethereum contract.
    76  type Stamina struct {
    77  	StaminaCaller     // Read-only binding to the contract
    78  	StaminaTransactor // Write-only binding to the contract
    79  	StaminaFilterer   // Log filterer for contract events
    80  }
    81  
    82  // StaminaCaller is an auto generated read-only Go binding around an Ethereum contract.
    83  type StaminaCaller struct {
    84  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    85  }
    86  
    87  // StaminaTransactor is an auto generated write-only Go binding around an Ethereum contract.
    88  type StaminaTransactor struct {
    89  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    90  }
    91  
    92  // StaminaFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    93  type StaminaFilterer struct {
    94  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    95  }
    96  
    97  // StaminaSession is an auto generated Go binding around an Ethereum contract,
    98  // with pre-set call and transact options.
    99  type StaminaSession struct {
   100  	Contract     *Stamina          // Generic contract binding to set the session for
   101  	CallOpts     bind.CallOpts     // Call options to use throughout this session
   102  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
   103  }
   104  
   105  // StaminaCallerSession is an auto generated read-only Go binding around an Ethereum contract,
   106  // with pre-set call options.
   107  type StaminaCallerSession struct {
   108  	Contract *StaminaCaller // Generic contract caller binding to set the session for
   109  	CallOpts bind.CallOpts  // Call options to use throughout this session
   110  }
   111  
   112  // StaminaTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   113  // with pre-set transact options.
   114  type StaminaTransactorSession struct {
   115  	Contract     *StaminaTransactor // Generic contract transactor binding to set the session for
   116  	TransactOpts bind.TransactOpts  // Transaction auth options to use throughout this session
   117  }
   118  
   119  // StaminaRaw is an auto generated low-level Go binding around an Ethereum contract.
   120  type StaminaRaw struct {
   121  	Contract *Stamina // Generic contract binding to access the raw methods on
   122  }
   123  
   124  // StaminaCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   125  type StaminaCallerRaw struct {
   126  	Contract *StaminaCaller // Generic read-only contract binding to access the raw methods on
   127  }
   128  
   129  // StaminaTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   130  type StaminaTransactorRaw struct {
   131  	Contract *StaminaTransactor // Generic write-only contract binding to access the raw methods on
   132  }
   133  
   134  // NewStamina creates a new instance of Stamina, bound to a specific deployed contract.
   135  func NewStamina(address common.Address, backend bind.ContractBackend) (*Stamina, error) {
   136  	contract, err := bindStamina(address, backend, backend, backend)
   137  	if err != nil {
   138  		return nil, err
   139  	}
   140  	return &Stamina{StaminaCaller: StaminaCaller{contract: contract}, StaminaTransactor: StaminaTransactor{contract: contract}, StaminaFilterer: StaminaFilterer{contract: contract}}, nil
   141  }
   142  
   143  // NewStaminaCaller creates a new read-only instance of Stamina, bound to a specific deployed contract.
   144  func NewStaminaCaller(address common.Address, caller bind.ContractCaller) (*StaminaCaller, error) {
   145  	contract, err := bindStamina(address, caller, nil, nil)
   146  	if err != nil {
   147  		return nil, err
   148  	}
   149  	return &StaminaCaller{contract: contract}, nil
   150  }
   151  
   152  // NewStaminaTransactor creates a new write-only instance of Stamina, bound to a specific deployed contract.
   153  func NewStaminaTransactor(address common.Address, transactor bind.ContractTransactor) (*StaminaTransactor, error) {
   154  	contract, err := bindStamina(address, nil, transactor, nil)
   155  	if err != nil {
   156  		return nil, err
   157  	}
   158  	return &StaminaTransactor{contract: contract}, nil
   159  }
   160  
   161  // NewStaminaFilterer creates a new log filterer instance of Stamina, bound to a specific deployed contract.
   162  func NewStaminaFilterer(address common.Address, filterer bind.ContractFilterer) (*StaminaFilterer, error) {
   163  	contract, err := bindStamina(address, nil, nil, filterer)
   164  	if err != nil {
   165  		return nil, err
   166  	}
   167  	return &StaminaFilterer{contract: contract}, nil
   168  }
   169  
   170  // bindStamina binds a generic wrapper to an already deployed contract.
   171  func bindStamina(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   172  	parsed, err := abi.JSON(strings.NewReader(StaminaABI))
   173  	if err != nil {
   174  		return nil, err
   175  	}
   176  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   177  }
   178  
   179  // Call invokes the (constant) contract method with params as input values and
   180  // sets the output to result. The result type might be a single field for simple
   181  // returns, a slice of interfaces for anonymous returns and a struct for named
   182  // returns.
   183  func (_Stamina *StaminaRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   184  	return _Stamina.Contract.StaminaCaller.contract.Call(opts, result, method, params...)
   185  }
   186  
   187  // Transfer initiates a plain transaction to move funds to the contract, calling
   188  // its default method if one is available.
   189  func (_Stamina *StaminaRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   190  	return _Stamina.Contract.StaminaTransactor.contract.Transfer(opts)
   191  }
   192  
   193  // Transact invokes the (paid) contract method with params as input values.
   194  func (_Stamina *StaminaRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   195  	return _Stamina.Contract.StaminaTransactor.contract.Transact(opts, method, params...)
   196  }
   197  
   198  // Call invokes the (constant) contract method with params as input values and
   199  // sets the output to result. The result type might be a single field for simple
   200  // returns, a slice of interfaces for anonymous returns and a struct for named
   201  // returns.
   202  func (_Stamina *StaminaCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   203  	return _Stamina.Contract.contract.Call(opts, result, method, params...)
   204  }
   205  
   206  // Transfer initiates a plain transaction to move funds to the contract, calling
   207  // its default method if one is available.
   208  func (_Stamina *StaminaTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   209  	return _Stamina.Contract.contract.Transfer(opts)
   210  }
   211  
   212  // Transact invokes the (paid) contract method with params as input values.
   213  func (_Stamina *StaminaTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   214  	return _Stamina.Contract.contract.Transact(opts, method, params...)
   215  }
   216  
   217  // MINDEPOSIT is a free data retrieval call binding the contract method 0xe1e158a5.
   218  //
   219  // Solidity: function MIN_DEPOSIT() constant returns(uint256)
   220  func (_Stamina *StaminaCaller) MINDEPOSIT(opts *bind.CallOpts) (*big.Int, error) {
   221  	var (
   222  		ret0 = new(*big.Int)
   223  	)
   224  	out := ret0
   225  	err := _Stamina.contract.Call(opts, out, "MIN_DEPOSIT")
   226  	return *ret0, err
   227  }
   228  
   229  // MINDEPOSIT is a free data retrieval call binding the contract method 0xe1e158a5.
   230  //
   231  // Solidity: function MIN_DEPOSIT() constant returns(uint256)
   232  func (_Stamina *StaminaSession) MINDEPOSIT() (*big.Int, error) {
   233  	return _Stamina.Contract.MINDEPOSIT(&_Stamina.CallOpts)
   234  }
   235  
   236  // MINDEPOSIT is a free data retrieval call binding the contract method 0xe1e158a5.
   237  //
   238  // Solidity: function MIN_DEPOSIT() constant returns(uint256)
   239  func (_Stamina *StaminaCallerSession) MINDEPOSIT() (*big.Int, error) {
   240  	return _Stamina.Contract.MINDEPOSIT(&_Stamina.CallOpts)
   241  }
   242  
   243  // RECOVEREPOCHLENGTH is a free data retrieval call binding the contract method 0x1556d8ac.
   244  //
   245  // Solidity: function RECOVER_EPOCH_LENGTH() constant returns(uint256)
   246  func (_Stamina *StaminaCaller) RECOVEREPOCHLENGTH(opts *bind.CallOpts) (*big.Int, error) {
   247  	var (
   248  		ret0 = new(*big.Int)
   249  	)
   250  	out := ret0
   251  	err := _Stamina.contract.Call(opts, out, "RECOVER_EPOCH_LENGTH")
   252  	return *ret0, err
   253  }
   254  
   255  // RECOVEREPOCHLENGTH is a free data retrieval call binding the contract method 0x1556d8ac.
   256  //
   257  // Solidity: function RECOVER_EPOCH_LENGTH() constant returns(uint256)
   258  func (_Stamina *StaminaSession) RECOVEREPOCHLENGTH() (*big.Int, error) {
   259  	return _Stamina.Contract.RECOVEREPOCHLENGTH(&_Stamina.CallOpts)
   260  }
   261  
   262  // RECOVEREPOCHLENGTH is a free data retrieval call binding the contract method 0x1556d8ac.
   263  //
   264  // Solidity: function RECOVER_EPOCH_LENGTH() constant returns(uint256)
   265  func (_Stamina *StaminaCallerSession) RECOVEREPOCHLENGTH() (*big.Int, error) {
   266  	return _Stamina.Contract.RECOVEREPOCHLENGTH(&_Stamina.CallOpts)
   267  }
   268  
   269  // WITHDRAWALDELAY is a free data retrieval call binding the contract method 0x0ebb172a.
   270  //
   271  // Solidity: function WITHDRAWAL_DELAY() constant returns(uint256)
   272  func (_Stamina *StaminaCaller) WITHDRAWALDELAY(opts *bind.CallOpts) (*big.Int, error) {
   273  	var (
   274  		ret0 = new(*big.Int)
   275  	)
   276  	out := ret0
   277  	err := _Stamina.contract.Call(opts, out, "WITHDRAWAL_DELAY")
   278  	return *ret0, err
   279  }
   280  
   281  // WITHDRAWALDELAY is a free data retrieval call binding the contract method 0x0ebb172a.
   282  //
   283  // Solidity: function WITHDRAWAL_DELAY() constant returns(uint256)
   284  func (_Stamina *StaminaSession) WITHDRAWALDELAY() (*big.Int, error) {
   285  	return _Stamina.Contract.WITHDRAWALDELAY(&_Stamina.CallOpts)
   286  }
   287  
   288  // WITHDRAWALDELAY is a free data retrieval call binding the contract method 0x0ebb172a.
   289  //
   290  // Solidity: function WITHDRAWAL_DELAY() constant returns(uint256)
   291  func (_Stamina *StaminaCallerSession) WITHDRAWALDELAY() (*big.Int, error) {
   292  	return _Stamina.Contract.WITHDRAWALDELAY(&_Stamina.CallOpts)
   293  }
   294  
   295  // Development is a free data retrieval call binding the contract method 0x7b929c27.
   296  //
   297  // Solidity: function development() constant returns(bool)
   298  func (_Stamina *StaminaCaller) Development(opts *bind.CallOpts) (bool, error) {
   299  	var (
   300  		ret0 = new(bool)
   301  	)
   302  	out := ret0
   303  	err := _Stamina.contract.Call(opts, out, "development")
   304  	return *ret0, err
   305  }
   306  
   307  // Development is a free data retrieval call binding the contract method 0x7b929c27.
   308  //
   309  // Solidity: function development() constant returns(bool)
   310  func (_Stamina *StaminaSession) Development() (bool, error) {
   311  	return _Stamina.Contract.Development(&_Stamina.CallOpts)
   312  }
   313  
   314  // Development is a free data retrieval call binding the contract method 0x7b929c27.
   315  //
   316  // Solidity: function development() constant returns(bool)
   317  func (_Stamina *StaminaCallerSession) Development() (bool, error) {
   318  	return _Stamina.Contract.Development(&_Stamina.CallOpts)
   319  }
   320  
   321  // GetDelegatee is a free data retrieval call binding the contract method 0x9b4e735f.
   322  //
   323  // Solidity: function getDelegatee(address delegator) constant returns(address)
   324  func (_Stamina *StaminaCaller) GetDelegatee(opts *bind.CallOpts, delegator common.Address) (common.Address, error) {
   325  	var (
   326  		ret0 = new(common.Address)
   327  	)
   328  	out := ret0
   329  	err := _Stamina.contract.Call(opts, out, "getDelegatee", delegator)
   330  	return *ret0, err
   331  }
   332  
   333  // GetDelegatee is a free data retrieval call binding the contract method 0x9b4e735f.
   334  //
   335  // Solidity: function getDelegatee(address delegator) constant returns(address)
   336  func (_Stamina *StaminaSession) GetDelegatee(delegator common.Address) (common.Address, error) {
   337  	return _Stamina.Contract.GetDelegatee(&_Stamina.CallOpts, delegator)
   338  }
   339  
   340  // GetDelegatee is a free data retrieval call binding the contract method 0x9b4e735f.
   341  //
   342  // Solidity: function getDelegatee(address delegator) constant returns(address)
   343  func (_Stamina *StaminaCallerSession) GetDelegatee(delegator common.Address) (common.Address, error) {
   344  	return _Stamina.Contract.GetDelegatee(&_Stamina.CallOpts, delegator)
   345  }
   346  
   347  // GetDeposit is a free data retrieval call binding the contract method 0xc35082a9.
   348  //
   349  // Solidity: function getDeposit(address depositor, address delegatee) constant returns(uint256)
   350  func (_Stamina *StaminaCaller) GetDeposit(opts *bind.CallOpts, depositor common.Address, delegatee common.Address) (*big.Int, error) {
   351  	var (
   352  		ret0 = new(*big.Int)
   353  	)
   354  	out := ret0
   355  	err := _Stamina.contract.Call(opts, out, "getDeposit", depositor, delegatee)
   356  	return *ret0, err
   357  }
   358  
   359  // GetDeposit is a free data retrieval call binding the contract method 0xc35082a9.
   360  //
   361  // Solidity: function getDeposit(address depositor, address delegatee) constant returns(uint256)
   362  func (_Stamina *StaminaSession) GetDeposit(depositor common.Address, delegatee common.Address) (*big.Int, error) {
   363  	return _Stamina.Contract.GetDeposit(&_Stamina.CallOpts, depositor, delegatee)
   364  }
   365  
   366  // GetDeposit is a free data retrieval call binding the contract method 0xc35082a9.
   367  //
   368  // Solidity: function getDeposit(address depositor, address delegatee) constant returns(uint256)
   369  func (_Stamina *StaminaCallerSession) GetDeposit(depositor common.Address, delegatee common.Address) (*big.Int, error) {
   370  	return _Stamina.Contract.GetDeposit(&_Stamina.CallOpts, depositor, delegatee)
   371  }
   372  
   373  // GetLastProcessedWithdrawalIndex is a free data retrieval call binding the contract method 0x22347f95.
   374  //
   375  // Solidity: function getLastProcessedWithdrawalIndex(address depositor) constant returns(uint256)
   376  func (_Stamina *StaminaCaller) GetLastProcessedWithdrawalIndex(opts *bind.CallOpts, depositor common.Address) (*big.Int, error) {
   377  	var (
   378  		ret0 = new(*big.Int)
   379  	)
   380  	out := ret0
   381  	err := _Stamina.contract.Call(opts, out, "getLastProcessedWithdrawalIndex", depositor)
   382  	return *ret0, err
   383  }
   384  
   385  // GetLastProcessedWithdrawalIndex is a free data retrieval call binding the contract method 0x22347f95.
   386  //
   387  // Solidity: function getLastProcessedWithdrawalIndex(address depositor) constant returns(uint256)
   388  func (_Stamina *StaminaSession) GetLastProcessedWithdrawalIndex(depositor common.Address) (*big.Int, error) {
   389  	return _Stamina.Contract.GetLastProcessedWithdrawalIndex(&_Stamina.CallOpts, depositor)
   390  }
   391  
   392  // GetLastProcessedWithdrawalIndex is a free data retrieval call binding the contract method 0x22347f95.
   393  //
   394  // Solidity: function getLastProcessedWithdrawalIndex(address depositor) constant returns(uint256)
   395  func (_Stamina *StaminaCallerSession) GetLastProcessedWithdrawalIndex(depositor common.Address) (*big.Int, error) {
   396  	return _Stamina.Contract.GetLastProcessedWithdrawalIndex(&_Stamina.CallOpts, depositor)
   397  }
   398  
   399  // GetLastRecoveryBlock is a free data retrieval call binding the contract method 0x937aaef1.
   400  //
   401  // Solidity: function getLastRecoveryBlock(address delegatee) constant returns(uint256)
   402  func (_Stamina *StaminaCaller) GetLastRecoveryBlock(opts *bind.CallOpts, delegatee common.Address) (*big.Int, error) {
   403  	var (
   404  		ret0 = new(*big.Int)
   405  	)
   406  	out := ret0
   407  	err := _Stamina.contract.Call(opts, out, "getLastRecoveryBlock", delegatee)
   408  	return *ret0, err
   409  }
   410  
   411  // GetLastRecoveryBlock is a free data retrieval call binding the contract method 0x937aaef1.
   412  //
   413  // Solidity: function getLastRecoveryBlock(address delegatee) constant returns(uint256)
   414  func (_Stamina *StaminaSession) GetLastRecoveryBlock(delegatee common.Address) (*big.Int, error) {
   415  	return _Stamina.Contract.GetLastRecoveryBlock(&_Stamina.CallOpts, delegatee)
   416  }
   417  
   418  // GetLastRecoveryBlock is a free data retrieval call binding the contract method 0x937aaef1.
   419  //
   420  // Solidity: function getLastRecoveryBlock(address delegatee) constant returns(uint256)
   421  func (_Stamina *StaminaCallerSession) GetLastRecoveryBlock(delegatee common.Address) (*big.Int, error) {
   422  	return _Stamina.Contract.GetLastRecoveryBlock(&_Stamina.CallOpts, delegatee)
   423  }
   424  
   425  // GetNumRecovery is a free data retrieval call binding the contract method 0xb69ad63b.
   426  //
   427  // Solidity: function getNumRecovery(address delegatee) constant returns(uint256)
   428  func (_Stamina *StaminaCaller) GetNumRecovery(opts *bind.CallOpts, delegatee common.Address) (*big.Int, error) {
   429  	var (
   430  		ret0 = new(*big.Int)
   431  	)
   432  	out := ret0
   433  	err := _Stamina.contract.Call(opts, out, "getNumRecovery", delegatee)
   434  	return *ret0, err
   435  }
   436  
   437  // GetNumRecovery is a free data retrieval call binding the contract method 0xb69ad63b.
   438  //
   439  // Solidity: function getNumRecovery(address delegatee) constant returns(uint256)
   440  func (_Stamina *StaminaSession) GetNumRecovery(delegatee common.Address) (*big.Int, error) {
   441  	return _Stamina.Contract.GetNumRecovery(&_Stamina.CallOpts, delegatee)
   442  }
   443  
   444  // GetNumRecovery is a free data retrieval call binding the contract method 0xb69ad63b.
   445  //
   446  // Solidity: function getNumRecovery(address delegatee) constant returns(uint256)
   447  func (_Stamina *StaminaCallerSession) GetNumRecovery(delegatee common.Address) (*big.Int, error) {
   448  	return _Stamina.Contract.GetNumRecovery(&_Stamina.CallOpts, delegatee)
   449  }
   450  
   451  // GetNumWithdrawals is a free data retrieval call binding the contract method 0xd898ae1c.
   452  //
   453  // Solidity: function getNumWithdrawals(address depositor) constant returns(uint256)
   454  func (_Stamina *StaminaCaller) GetNumWithdrawals(opts *bind.CallOpts, depositor common.Address) (*big.Int, error) {
   455  	var (
   456  		ret0 = new(*big.Int)
   457  	)
   458  	out := ret0
   459  	err := _Stamina.contract.Call(opts, out, "getNumWithdrawals", depositor)
   460  	return *ret0, err
   461  }
   462  
   463  // GetNumWithdrawals is a free data retrieval call binding the contract method 0xd898ae1c.
   464  //
   465  // Solidity: function getNumWithdrawals(address depositor) constant returns(uint256)
   466  func (_Stamina *StaminaSession) GetNumWithdrawals(depositor common.Address) (*big.Int, error) {
   467  	return _Stamina.Contract.GetNumWithdrawals(&_Stamina.CallOpts, depositor)
   468  }
   469  
   470  // GetNumWithdrawals is a free data retrieval call binding the contract method 0xd898ae1c.
   471  //
   472  // Solidity: function getNumWithdrawals(address depositor) constant returns(uint256)
   473  func (_Stamina *StaminaCallerSession) GetNumWithdrawals(depositor common.Address) (*big.Int, error) {
   474  	return _Stamina.Contract.GetNumWithdrawals(&_Stamina.CallOpts, depositor)
   475  }
   476  
   477  // GetStamina is a free data retrieval call binding the contract method 0x3900e4ec.
   478  //
   479  // Solidity: function getStamina(address addr) constant returns(uint256)
   480  func (_Stamina *StaminaCaller) GetStamina(opts *bind.CallOpts, addr common.Address) (*big.Int, error) {
   481  	var (
   482  		ret0 = new(*big.Int)
   483  	)
   484  	out := ret0
   485  	err := _Stamina.contract.Call(opts, out, "getStamina", addr)
   486  	return *ret0, err
   487  }
   488  
   489  // GetStamina is a free data retrieval call binding the contract method 0x3900e4ec.
   490  //
   491  // Solidity: function getStamina(address addr) constant returns(uint256)
   492  func (_Stamina *StaminaSession) GetStamina(addr common.Address) (*big.Int, error) {
   493  	return _Stamina.Contract.GetStamina(&_Stamina.CallOpts, addr)
   494  }
   495  
   496  // GetStamina is a free data retrieval call binding the contract method 0x3900e4ec.
   497  //
   498  // Solidity: function getStamina(address addr) constant returns(uint256)
   499  func (_Stamina *StaminaCallerSession) GetStamina(addr common.Address) (*big.Int, error) {
   500  	return _Stamina.Contract.GetStamina(&_Stamina.CallOpts, addr)
   501  }
   502  
   503  // GetTotalDeposit is a free data retrieval call binding the contract method 0x857184d1.
   504  //
   505  // Solidity: function getTotalDeposit(address delegatee) constant returns(uint256)
   506  func (_Stamina *StaminaCaller) GetTotalDeposit(opts *bind.CallOpts, delegatee common.Address) (*big.Int, error) {
   507  	var (
   508  		ret0 = new(*big.Int)
   509  	)
   510  	out := ret0
   511  	err := _Stamina.contract.Call(opts, out, "getTotalDeposit", delegatee)
   512  	return *ret0, err
   513  }
   514  
   515  // GetTotalDeposit is a free data retrieval call binding the contract method 0x857184d1.
   516  //
   517  // Solidity: function getTotalDeposit(address delegatee) constant returns(uint256)
   518  func (_Stamina *StaminaSession) GetTotalDeposit(delegatee common.Address) (*big.Int, error) {
   519  	return _Stamina.Contract.GetTotalDeposit(&_Stamina.CallOpts, delegatee)
   520  }
   521  
   522  // GetTotalDeposit is a free data retrieval call binding the contract method 0x857184d1.
   523  //
   524  // Solidity: function getTotalDeposit(address delegatee) constant returns(uint256)
   525  func (_Stamina *StaminaCallerSession) GetTotalDeposit(delegatee common.Address) (*big.Int, error) {
   526  	return _Stamina.Contract.GetTotalDeposit(&_Stamina.CallOpts, delegatee)
   527  }
   528  
   529  // GetWithdrawal is a free data retrieval call binding the contract method 0x5be4f765.
   530  //
   531  // Solidity: function getWithdrawal(address depositor, uint256 withdrawalIndex) constant returns(uint128 amount, uint128 requestBlockNumber, address delegatee, bool processed)
   532  func (_Stamina *StaminaCaller) GetWithdrawal(opts *bind.CallOpts, depositor common.Address, withdrawalIndex *big.Int) (struct {
   533  	Amount             *big.Int
   534  	RequestBlockNumber *big.Int
   535  	Delegatee          common.Address
   536  	Processed          bool
   537  }, error) {
   538  	ret := new(struct {
   539  		Amount             *big.Int
   540  		RequestBlockNumber *big.Int
   541  		Delegatee          common.Address
   542  		Processed          bool
   543  	})
   544  	out := ret
   545  	err := _Stamina.contract.Call(opts, out, "getWithdrawal", depositor, withdrawalIndex)
   546  	return *ret, err
   547  }
   548  
   549  // GetWithdrawal is a free data retrieval call binding the contract method 0x5be4f765.
   550  //
   551  // Solidity: function getWithdrawal(address depositor, uint256 withdrawalIndex) constant returns(uint128 amount, uint128 requestBlockNumber, address delegatee, bool processed)
   552  func (_Stamina *StaminaSession) GetWithdrawal(depositor common.Address, withdrawalIndex *big.Int) (struct {
   553  	Amount             *big.Int
   554  	RequestBlockNumber *big.Int
   555  	Delegatee          common.Address
   556  	Processed          bool
   557  }, error) {
   558  	return _Stamina.Contract.GetWithdrawal(&_Stamina.CallOpts, depositor, withdrawalIndex)
   559  }
   560  
   561  // GetWithdrawal is a free data retrieval call binding the contract method 0x5be4f765.
   562  //
   563  // Solidity: function getWithdrawal(address depositor, uint256 withdrawalIndex) constant returns(uint128 amount, uint128 requestBlockNumber, address delegatee, bool processed)
   564  func (_Stamina *StaminaCallerSession) GetWithdrawal(depositor common.Address, withdrawalIndex *big.Int) (struct {
   565  	Amount             *big.Int
   566  	RequestBlockNumber *big.Int
   567  	Delegatee          common.Address
   568  	Processed          bool
   569  }, error) {
   570  	return _Stamina.Contract.GetWithdrawal(&_Stamina.CallOpts, depositor, withdrawalIndex)
   571  }
   572  
   573  // Initialized is a free data retrieval call binding the contract method 0x158ef93e.
   574  //
   575  // Solidity: function initialized() constant returns(bool)
   576  func (_Stamina *StaminaCaller) Initialized(opts *bind.CallOpts) (bool, error) {
   577  	var (
   578  		ret0 = new(bool)
   579  	)
   580  	out := ret0
   581  	err := _Stamina.contract.Call(opts, out, "initialized")
   582  	return *ret0, err
   583  }
   584  
   585  // Initialized is a free data retrieval call binding the contract method 0x158ef93e.
   586  //
   587  // Solidity: function initialized() constant returns(bool)
   588  func (_Stamina *StaminaSession) Initialized() (bool, error) {
   589  	return _Stamina.Contract.Initialized(&_Stamina.CallOpts)
   590  }
   591  
   592  // Initialized is a free data retrieval call binding the contract method 0x158ef93e.
   593  //
   594  // Solidity: function initialized() constant returns(bool)
   595  func (_Stamina *StaminaCallerSession) Initialized() (bool, error) {
   596  	return _Stamina.Contract.Initialized(&_Stamina.CallOpts)
   597  }
   598  
   599  // AddStamina is a paid mutator transaction binding the contract method 0xbcac9736.
   600  //
   601  // Solidity: function addStamina(address delegatee, uint256 amount) returns(bool)
   602  func (_Stamina *StaminaTransactor) AddStamina(opts *bind.TransactOpts, delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   603  	return _Stamina.contract.Transact(opts, "addStamina", delegatee, amount)
   604  }
   605  
   606  // AddStamina is a paid mutator transaction binding the contract method 0xbcac9736.
   607  //
   608  // Solidity: function addStamina(address delegatee, uint256 amount) returns(bool)
   609  func (_Stamina *StaminaSession) AddStamina(delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   610  	return _Stamina.Contract.AddStamina(&_Stamina.TransactOpts, delegatee, amount)
   611  }
   612  
   613  // AddStamina is a paid mutator transaction binding the contract method 0xbcac9736.
   614  //
   615  // Solidity: function addStamina(address delegatee, uint256 amount) returns(bool)
   616  func (_Stamina *StaminaTransactorSession) AddStamina(delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   617  	return _Stamina.Contract.AddStamina(&_Stamina.TransactOpts, delegatee, amount)
   618  }
   619  
   620  // Deposit is a paid mutator transaction binding the contract method 0xf340fa01.
   621  //
   622  // Solidity: function deposit(address delegatee) returns(bool)
   623  func (_Stamina *StaminaTransactor) Deposit(opts *bind.TransactOpts, delegatee common.Address) (*types.Transaction, error) {
   624  	return _Stamina.contract.Transact(opts, "deposit", delegatee)
   625  }
   626  
   627  // Deposit is a paid mutator transaction binding the contract method 0xf340fa01.
   628  //
   629  // Solidity: function deposit(address delegatee) returns(bool)
   630  func (_Stamina *StaminaSession) Deposit(delegatee common.Address) (*types.Transaction, error) {
   631  	return _Stamina.Contract.Deposit(&_Stamina.TransactOpts, delegatee)
   632  }
   633  
   634  // Deposit is a paid mutator transaction binding the contract method 0xf340fa01.
   635  //
   636  // Solidity: function deposit(address delegatee) returns(bool)
   637  func (_Stamina *StaminaTransactorSession) Deposit(delegatee common.Address) (*types.Transaction, error) {
   638  	return _Stamina.Contract.Deposit(&_Stamina.TransactOpts, delegatee)
   639  }
   640  
   641  // Init is a paid mutator transaction binding the contract method 0x8cd8db8a.
   642  //
   643  // Solidity: function init(uint256 minDeposit, uint256 recoveryEpochLength, uint256 withdrawalDelay) returns()
   644  func (_Stamina *StaminaTransactor) Init(opts *bind.TransactOpts, minDeposit *big.Int, recoveryEpochLength *big.Int, withdrawalDelay *big.Int) (*types.Transaction, error) {
   645  	return _Stamina.contract.Transact(opts, "init", minDeposit, recoveryEpochLength, withdrawalDelay)
   646  }
   647  
   648  // Init is a paid mutator transaction binding the contract method 0x8cd8db8a.
   649  //
   650  // Solidity: function init(uint256 minDeposit, uint256 recoveryEpochLength, uint256 withdrawalDelay) returns()
   651  func (_Stamina *StaminaSession) Init(minDeposit *big.Int, recoveryEpochLength *big.Int, withdrawalDelay *big.Int) (*types.Transaction, error) {
   652  	return _Stamina.Contract.Init(&_Stamina.TransactOpts, minDeposit, recoveryEpochLength, withdrawalDelay)
   653  }
   654  
   655  // Init is a paid mutator transaction binding the contract method 0x8cd8db8a.
   656  //
   657  // Solidity: function init(uint256 minDeposit, uint256 recoveryEpochLength, uint256 withdrawalDelay) returns()
   658  func (_Stamina *StaminaTransactorSession) Init(minDeposit *big.Int, recoveryEpochLength *big.Int, withdrawalDelay *big.Int) (*types.Transaction, error) {
   659  	return _Stamina.Contract.Init(&_Stamina.TransactOpts, minDeposit, recoveryEpochLength, withdrawalDelay)
   660  }
   661  
   662  // RequestWithdrawal is a paid mutator transaction binding the contract method 0xda95ebf7.
   663  //
   664  // Solidity: function requestWithdrawal(address delegatee, uint256 amount) returns(bool)
   665  func (_Stamina *StaminaTransactor) RequestWithdrawal(opts *bind.TransactOpts, delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   666  	return _Stamina.contract.Transact(opts, "requestWithdrawal", delegatee, amount)
   667  }
   668  
   669  // RequestWithdrawal is a paid mutator transaction binding the contract method 0xda95ebf7.
   670  //
   671  // Solidity: function requestWithdrawal(address delegatee, uint256 amount) returns(bool)
   672  func (_Stamina *StaminaSession) RequestWithdrawal(delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   673  	return _Stamina.Contract.RequestWithdrawal(&_Stamina.TransactOpts, delegatee, amount)
   674  }
   675  
   676  // RequestWithdrawal is a paid mutator transaction binding the contract method 0xda95ebf7.
   677  //
   678  // Solidity: function requestWithdrawal(address delegatee, uint256 amount) returns(bool)
   679  func (_Stamina *StaminaTransactorSession) RequestWithdrawal(delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   680  	return _Stamina.Contract.RequestWithdrawal(&_Stamina.TransactOpts, delegatee, amount)
   681  }
   682  
   683  // SetDelegator is a paid mutator transaction binding the contract method 0x83cd9cc3.
   684  //
   685  // Solidity: function setDelegator(address delegator) returns(bool)
   686  func (_Stamina *StaminaTransactor) SetDelegator(opts *bind.TransactOpts, delegator common.Address) (*types.Transaction, error) {
   687  	return _Stamina.contract.Transact(opts, "setDelegator", delegator)
   688  }
   689  
   690  // SetDelegator is a paid mutator transaction binding the contract method 0x83cd9cc3.
   691  //
   692  // Solidity: function setDelegator(address delegator) returns(bool)
   693  func (_Stamina *StaminaSession) SetDelegator(delegator common.Address) (*types.Transaction, error) {
   694  	return _Stamina.Contract.SetDelegator(&_Stamina.TransactOpts, delegator)
   695  }
   696  
   697  // SetDelegator is a paid mutator transaction binding the contract method 0x83cd9cc3.
   698  //
   699  // Solidity: function setDelegator(address delegator) returns(bool)
   700  func (_Stamina *StaminaTransactorSession) SetDelegator(delegator common.Address) (*types.Transaction, error) {
   701  	return _Stamina.Contract.SetDelegator(&_Stamina.TransactOpts, delegator)
   702  }
   703  
   704  // SubtractStamina is a paid mutator transaction binding the contract method 0xd1c0c042.
   705  //
   706  // Solidity: function subtractStamina(address delegatee, uint256 amount) returns(bool)
   707  func (_Stamina *StaminaTransactor) SubtractStamina(opts *bind.TransactOpts, delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   708  	return _Stamina.contract.Transact(opts, "subtractStamina", delegatee, amount)
   709  }
   710  
   711  // SubtractStamina is a paid mutator transaction binding the contract method 0xd1c0c042.
   712  //
   713  // Solidity: function subtractStamina(address delegatee, uint256 amount) returns(bool)
   714  func (_Stamina *StaminaSession) SubtractStamina(delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   715  	return _Stamina.Contract.SubtractStamina(&_Stamina.TransactOpts, delegatee, amount)
   716  }
   717  
   718  // SubtractStamina is a paid mutator transaction binding the contract method 0xd1c0c042.
   719  //
   720  // Solidity: function subtractStamina(address delegatee, uint256 amount) returns(bool)
   721  func (_Stamina *StaminaTransactorSession) SubtractStamina(delegatee common.Address, amount *big.Int) (*types.Transaction, error) {
   722  	return _Stamina.Contract.SubtractStamina(&_Stamina.TransactOpts, delegatee, amount)
   723  }
   724  
   725  // Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b.
   726  //
   727  // Solidity: function withdraw() returns(bool)
   728  func (_Stamina *StaminaTransactor) Withdraw(opts *bind.TransactOpts) (*types.Transaction, error) {
   729  	return _Stamina.contract.Transact(opts, "withdraw")
   730  }
   731  
   732  // Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b.
   733  //
   734  // Solidity: function withdraw() returns(bool)
   735  func (_Stamina *StaminaSession) Withdraw() (*types.Transaction, error) {
   736  	return _Stamina.Contract.Withdraw(&_Stamina.TransactOpts)
   737  }
   738  
   739  // Withdraw is a paid mutator transaction binding the contract method 0x3ccfd60b.
   740  //
   741  // Solidity: function withdraw() returns(bool)
   742  func (_Stamina *StaminaTransactorSession) Withdraw() (*types.Transaction, error) {
   743  	return _Stamina.Contract.Withdraw(&_Stamina.TransactOpts)
   744  }
   745  
   746  // StaminaDelegateeChangedIterator is returned from FilterDelegateeChanged and is used to iterate over the raw logs and unpacked data for DelegateeChanged events raised by the Stamina contract.
   747  type StaminaDelegateeChangedIterator struct {
   748  	Event *StaminaDelegateeChanged // Event containing the contract specifics and raw log
   749  
   750  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   751  	event    string              // Event name to use for unpacking event data
   752  
   753  	logs chan types.Log        // Log channel receiving the found contract events
   754  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   755  	done bool                  // Whether the subscription completed delivering logs
   756  	fail error                 // Occurred error to stop iteration
   757  }
   758  
   759  // Next advances the iterator to the subsequent event, returning whether there
   760  // are any more events found. In case of a retrieval or parsing error, false is
   761  // returned and Error() can be queried for the exact failure.
   762  func (it *StaminaDelegateeChangedIterator) Next() bool {
   763  	// If the iterator failed, stop iterating
   764  	if it.fail != nil {
   765  		return false
   766  	}
   767  	// If the iterator completed, deliver directly whatever's available
   768  	if it.done {
   769  		select {
   770  		case log := <-it.logs:
   771  			it.Event = new(StaminaDelegateeChanged)
   772  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   773  				it.fail = err
   774  				return false
   775  			}
   776  			it.Event.Raw = log
   777  			return true
   778  
   779  		default:
   780  			return false
   781  		}
   782  	}
   783  	// Iterator still in progress, wait for either a data or an error event
   784  	select {
   785  	case log := <-it.logs:
   786  		it.Event = new(StaminaDelegateeChanged)
   787  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   788  			it.fail = err
   789  			return false
   790  		}
   791  		it.Event.Raw = log
   792  		return true
   793  
   794  	case err := <-it.sub.Err():
   795  		it.done = true
   796  		it.fail = err
   797  		return it.Next()
   798  	}
   799  }
   800  
   801  // Error returns any retrieval or parsing error occurred during filtering.
   802  func (it *StaminaDelegateeChangedIterator) Error() error {
   803  	return it.fail
   804  }
   805  
   806  // Close terminates the iteration process, releasing any pending underlying
   807  // resources.
   808  func (it *StaminaDelegateeChangedIterator) Close() error {
   809  	it.sub.Unsubscribe()
   810  	return nil
   811  }
   812  
   813  // StaminaDelegateeChanged represents a DelegateeChanged event raised by the Stamina contract.
   814  type StaminaDelegateeChanged struct {
   815  	Delegator    common.Address
   816  	OldDelegatee common.Address
   817  	NewDelegatee common.Address
   818  	Raw          types.Log // Blockchain specific contextual infos
   819  }
   820  
   821  // FilterDelegateeChanged is a free log retrieval operation binding the contract event 0x5884d7e3ec123de8e772bcf576c18dcdad75b056c4314f999ed966693419c692.
   822  //
   823  // Solidity: event DelegateeChanged(address indexed delegator, address oldDelegatee, address newDelegatee)
   824  func (_Stamina *StaminaFilterer) FilterDelegateeChanged(opts *bind.FilterOpts, delegator []common.Address) (*StaminaDelegateeChangedIterator, error) {
   825  
   826  	var delegatorRule []interface{}
   827  	for _, delegatorItem := range delegator {
   828  		delegatorRule = append(delegatorRule, delegatorItem)
   829  	}
   830  
   831  	logs, sub, err := _Stamina.contract.FilterLogs(opts, "DelegateeChanged", delegatorRule)
   832  	if err != nil {
   833  		return nil, err
   834  	}
   835  	return &StaminaDelegateeChangedIterator{contract: _Stamina.contract, event: "DelegateeChanged", logs: logs, sub: sub}, nil
   836  }
   837  
   838  // WatchDelegateeChanged is a free log subscription operation binding the contract event 0x5884d7e3ec123de8e772bcf576c18dcdad75b056c4314f999ed966693419c692.
   839  //
   840  // Solidity: event DelegateeChanged(address indexed delegator, address oldDelegatee, address newDelegatee)
   841  func (_Stamina *StaminaFilterer) WatchDelegateeChanged(opts *bind.WatchOpts, sink chan<- *StaminaDelegateeChanged, delegator []common.Address) (event.Subscription, error) {
   842  
   843  	var delegatorRule []interface{}
   844  	for _, delegatorItem := range delegator {
   845  		delegatorRule = append(delegatorRule, delegatorItem)
   846  	}
   847  
   848  	logs, sub, err := _Stamina.contract.WatchLogs(opts, "DelegateeChanged", delegatorRule)
   849  	if err != nil {
   850  		return nil, err
   851  	}
   852  	return event.NewSubscription(func(quit <-chan struct{}) error {
   853  		defer sub.Unsubscribe()
   854  		for {
   855  			select {
   856  			case log := <-logs:
   857  				// New log arrived, parse the event and forward to the user
   858  				event := new(StaminaDelegateeChanged)
   859  				if err := _Stamina.contract.UnpackLog(event, "DelegateeChanged", log); err != nil {
   860  					return err
   861  				}
   862  				event.Raw = log
   863  
   864  				select {
   865  				case sink <- event:
   866  				case err := <-sub.Err():
   867  					return err
   868  				case <-quit:
   869  					return nil
   870  				}
   871  			case err := <-sub.Err():
   872  				return err
   873  			case <-quit:
   874  				return nil
   875  			}
   876  		}
   877  	}), nil
   878  }
   879  
   880  // ParseDelegateeChanged is a log parse operation binding the contract event 0x5884d7e3ec123de8e772bcf576c18dcdad75b056c4314f999ed966693419c692.
   881  //
   882  // Solidity: event DelegateeChanged(address indexed delegator, address oldDelegatee, address newDelegatee)
   883  func (_Stamina *StaminaFilterer) ParseDelegateeChanged(log types.Log) (*StaminaDelegateeChanged, error) {
   884  	event := new(StaminaDelegateeChanged)
   885  	if err := _Stamina.contract.UnpackLog(event, "DelegateeChanged", log); err != nil {
   886  		return nil, err
   887  	}
   888  	return event, nil
   889  }
   890  
   891  // StaminaDepositedIterator is returned from FilterDeposited and is used to iterate over the raw logs and unpacked data for Deposited events raised by the Stamina contract.
   892  type StaminaDepositedIterator struct {
   893  	Event *StaminaDeposited // Event containing the contract specifics and raw log
   894  
   895  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   896  	event    string              // Event name to use for unpacking event data
   897  
   898  	logs chan types.Log        // Log channel receiving the found contract events
   899  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   900  	done bool                  // Whether the subscription completed delivering logs
   901  	fail error                 // Occurred error to stop iteration
   902  }
   903  
   904  // Next advances the iterator to the subsequent event, returning whether there
   905  // are any more events found. In case of a retrieval or parsing error, false is
   906  // returned and Error() can be queried for the exact failure.
   907  func (it *StaminaDepositedIterator) Next() bool {
   908  	// If the iterator failed, stop iterating
   909  	if it.fail != nil {
   910  		return false
   911  	}
   912  	// If the iterator completed, deliver directly whatever's available
   913  	if it.done {
   914  		select {
   915  		case log := <-it.logs:
   916  			it.Event = new(StaminaDeposited)
   917  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   918  				it.fail = err
   919  				return false
   920  			}
   921  			it.Event.Raw = log
   922  			return true
   923  
   924  		default:
   925  			return false
   926  		}
   927  	}
   928  	// Iterator still in progress, wait for either a data or an error event
   929  	select {
   930  	case log := <-it.logs:
   931  		it.Event = new(StaminaDeposited)
   932  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   933  			it.fail = err
   934  			return false
   935  		}
   936  		it.Event.Raw = log
   937  		return true
   938  
   939  	case err := <-it.sub.Err():
   940  		it.done = true
   941  		it.fail = err
   942  		return it.Next()
   943  	}
   944  }
   945  
   946  // Error returns any retrieval or parsing error occurred during filtering.
   947  func (it *StaminaDepositedIterator) Error() error {
   948  	return it.fail
   949  }
   950  
   951  // Close terminates the iteration process, releasing any pending underlying
   952  // resources.
   953  func (it *StaminaDepositedIterator) Close() error {
   954  	it.sub.Unsubscribe()
   955  	return nil
   956  }
   957  
   958  // StaminaDeposited represents a Deposited event raised by the Stamina contract.
   959  type StaminaDeposited struct {
   960  	Depositor common.Address
   961  	Delegatee common.Address
   962  	Amount    *big.Int
   963  	Raw       types.Log // Blockchain specific contextual infos
   964  }
   965  
   966  // FilterDeposited is a free log retrieval operation binding the contract event 0x8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7.
   967  //
   968  // Solidity: event Deposited(address indexed depositor, address indexed delegatee, uint256 amount)
   969  func (_Stamina *StaminaFilterer) FilterDeposited(opts *bind.FilterOpts, depositor []common.Address, delegatee []common.Address) (*StaminaDepositedIterator, error) {
   970  
   971  	var depositorRule []interface{}
   972  	for _, depositorItem := range depositor {
   973  		depositorRule = append(depositorRule, depositorItem)
   974  	}
   975  	var delegateeRule []interface{}
   976  	for _, delegateeItem := range delegatee {
   977  		delegateeRule = append(delegateeRule, delegateeItem)
   978  	}
   979  
   980  	logs, sub, err := _Stamina.contract.FilterLogs(opts, "Deposited", depositorRule, delegateeRule)
   981  	if err != nil {
   982  		return nil, err
   983  	}
   984  	return &StaminaDepositedIterator{contract: _Stamina.contract, event: "Deposited", logs: logs, sub: sub}, nil
   985  }
   986  
   987  // WatchDeposited is a free log subscription operation binding the contract event 0x8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7.
   988  //
   989  // Solidity: event Deposited(address indexed depositor, address indexed delegatee, uint256 amount)
   990  func (_Stamina *StaminaFilterer) WatchDeposited(opts *bind.WatchOpts, sink chan<- *StaminaDeposited, depositor []common.Address, delegatee []common.Address) (event.Subscription, error) {
   991  
   992  	var depositorRule []interface{}
   993  	for _, depositorItem := range depositor {
   994  		depositorRule = append(depositorRule, depositorItem)
   995  	}
   996  	var delegateeRule []interface{}
   997  	for _, delegateeItem := range delegatee {
   998  		delegateeRule = append(delegateeRule, delegateeItem)
   999  	}
  1000  
  1001  	logs, sub, err := _Stamina.contract.WatchLogs(opts, "Deposited", depositorRule, delegateeRule)
  1002  	if err != nil {
  1003  		return nil, err
  1004  	}
  1005  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1006  		defer sub.Unsubscribe()
  1007  		for {
  1008  			select {
  1009  			case log := <-logs:
  1010  				// New log arrived, parse the event and forward to the user
  1011  				event := new(StaminaDeposited)
  1012  				if err := _Stamina.contract.UnpackLog(event, "Deposited", log); err != nil {
  1013  					return err
  1014  				}
  1015  				event.Raw = log
  1016  
  1017  				select {
  1018  				case sink <- event:
  1019  				case err := <-sub.Err():
  1020  					return err
  1021  				case <-quit:
  1022  					return nil
  1023  				}
  1024  			case err := <-sub.Err():
  1025  				return err
  1026  			case <-quit:
  1027  				return nil
  1028  			}
  1029  		}
  1030  	}), nil
  1031  }
  1032  
  1033  // ParseDeposited is a log parse operation binding the contract event 0x8752a472e571a816aea92eec8dae9baf628e840f4929fbcc2d155e6233ff68a7.
  1034  //
  1035  // Solidity: event Deposited(address indexed depositor, address indexed delegatee, uint256 amount)
  1036  func (_Stamina *StaminaFilterer) ParseDeposited(log types.Log) (*StaminaDeposited, error) {
  1037  	event := new(StaminaDeposited)
  1038  	if err := _Stamina.contract.UnpackLog(event, "Deposited", log); err != nil {
  1039  		return nil, err
  1040  	}
  1041  	return event, nil
  1042  }
  1043  
  1044  // StaminaStaminaAddedIterator is returned from FilterStaminaAdded and is used to iterate over the raw logs and unpacked data for StaminaAdded events raised by the Stamina contract.
  1045  type StaminaStaminaAddedIterator struct {
  1046  	Event *StaminaStaminaAdded // Event containing the contract specifics and raw log
  1047  
  1048  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1049  	event    string              // Event name to use for unpacking event data
  1050  
  1051  	logs chan types.Log        // Log channel receiving the found contract events
  1052  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1053  	done bool                  // Whether the subscription completed delivering logs
  1054  	fail error                 // Occurred error to stop iteration
  1055  }
  1056  
  1057  // Next advances the iterator to the subsequent event, returning whether there
  1058  // are any more events found. In case of a retrieval or parsing error, false is
  1059  // returned and Error() can be queried for the exact failure.
  1060  func (it *StaminaStaminaAddedIterator) Next() bool {
  1061  	// If the iterator failed, stop iterating
  1062  	if it.fail != nil {
  1063  		return false
  1064  	}
  1065  	// If the iterator completed, deliver directly whatever's available
  1066  	if it.done {
  1067  		select {
  1068  		case log := <-it.logs:
  1069  			it.Event = new(StaminaStaminaAdded)
  1070  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1071  				it.fail = err
  1072  				return false
  1073  			}
  1074  			it.Event.Raw = log
  1075  			return true
  1076  
  1077  		default:
  1078  			return false
  1079  		}
  1080  	}
  1081  	// Iterator still in progress, wait for either a data or an error event
  1082  	select {
  1083  	case log := <-it.logs:
  1084  		it.Event = new(StaminaStaminaAdded)
  1085  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1086  			it.fail = err
  1087  			return false
  1088  		}
  1089  		it.Event.Raw = log
  1090  		return true
  1091  
  1092  	case err := <-it.sub.Err():
  1093  		it.done = true
  1094  		it.fail = err
  1095  		return it.Next()
  1096  	}
  1097  }
  1098  
  1099  // Error returns any retrieval or parsing error occurred during filtering.
  1100  func (it *StaminaStaminaAddedIterator) Error() error {
  1101  	return it.fail
  1102  }
  1103  
  1104  // Close terminates the iteration process, releasing any pending underlying
  1105  // resources.
  1106  func (it *StaminaStaminaAddedIterator) Close() error {
  1107  	it.sub.Unsubscribe()
  1108  	return nil
  1109  }
  1110  
  1111  // StaminaStaminaAdded represents a StaminaAdded event raised by the Stamina contract.
  1112  type StaminaStaminaAdded struct {
  1113  	Delegatee common.Address
  1114  	Amount    *big.Int
  1115  	Recovered bool
  1116  	Raw       types.Log // Blockchain specific contextual infos
  1117  }
  1118  
  1119  // FilterStaminaAdded is a free log retrieval operation binding the contract event 0x85bf8701ef98ea32e97f08708da81c7daa93e87ea3e2fd661801cce6d36f6809.
  1120  //
  1121  // Solidity: event StaminaAdded(address indexed delegatee, uint256 amount, bool recovered)
  1122  func (_Stamina *StaminaFilterer) FilterStaminaAdded(opts *bind.FilterOpts, delegatee []common.Address) (*StaminaStaminaAddedIterator, error) {
  1123  
  1124  	var delegateeRule []interface{}
  1125  	for _, delegateeItem := range delegatee {
  1126  		delegateeRule = append(delegateeRule, delegateeItem)
  1127  	}
  1128  
  1129  	logs, sub, err := _Stamina.contract.FilterLogs(opts, "StaminaAdded", delegateeRule)
  1130  	if err != nil {
  1131  		return nil, err
  1132  	}
  1133  	return &StaminaStaminaAddedIterator{contract: _Stamina.contract, event: "StaminaAdded", logs: logs, sub: sub}, nil
  1134  }
  1135  
  1136  // WatchStaminaAdded is a free log subscription operation binding the contract event 0x85bf8701ef98ea32e97f08708da81c7daa93e87ea3e2fd661801cce6d36f6809.
  1137  //
  1138  // Solidity: event StaminaAdded(address indexed delegatee, uint256 amount, bool recovered)
  1139  func (_Stamina *StaminaFilterer) WatchStaminaAdded(opts *bind.WatchOpts, sink chan<- *StaminaStaminaAdded, delegatee []common.Address) (event.Subscription, error) {
  1140  
  1141  	var delegateeRule []interface{}
  1142  	for _, delegateeItem := range delegatee {
  1143  		delegateeRule = append(delegateeRule, delegateeItem)
  1144  	}
  1145  
  1146  	logs, sub, err := _Stamina.contract.WatchLogs(opts, "StaminaAdded", delegateeRule)
  1147  	if err != nil {
  1148  		return nil, err
  1149  	}
  1150  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1151  		defer sub.Unsubscribe()
  1152  		for {
  1153  			select {
  1154  			case log := <-logs:
  1155  				// New log arrived, parse the event and forward to the user
  1156  				event := new(StaminaStaminaAdded)
  1157  				if err := _Stamina.contract.UnpackLog(event, "StaminaAdded", log); err != nil {
  1158  					return err
  1159  				}
  1160  				event.Raw = log
  1161  
  1162  				select {
  1163  				case sink <- event:
  1164  				case err := <-sub.Err():
  1165  					return err
  1166  				case <-quit:
  1167  					return nil
  1168  				}
  1169  			case err := <-sub.Err():
  1170  				return err
  1171  			case <-quit:
  1172  				return nil
  1173  			}
  1174  		}
  1175  	}), nil
  1176  }
  1177  
  1178  // ParseStaminaAdded is a log parse operation binding the contract event 0x85bf8701ef98ea32e97f08708da81c7daa93e87ea3e2fd661801cce6d36f6809.
  1179  //
  1180  // Solidity: event StaminaAdded(address indexed delegatee, uint256 amount, bool recovered)
  1181  func (_Stamina *StaminaFilterer) ParseStaminaAdded(log types.Log) (*StaminaStaminaAdded, error) {
  1182  	event := new(StaminaStaminaAdded)
  1183  	if err := _Stamina.contract.UnpackLog(event, "StaminaAdded", log); err != nil {
  1184  		return nil, err
  1185  	}
  1186  	return event, nil
  1187  }
  1188  
  1189  // StaminaStaminaSubtractedIterator is returned from FilterStaminaSubtracted and is used to iterate over the raw logs and unpacked data for StaminaSubtracted events raised by the Stamina contract.
  1190  type StaminaStaminaSubtractedIterator struct {
  1191  	Event *StaminaStaminaSubtracted // Event containing the contract specifics and raw log
  1192  
  1193  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1194  	event    string              // Event name to use for unpacking event data
  1195  
  1196  	logs chan types.Log        // Log channel receiving the found contract events
  1197  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1198  	done bool                  // Whether the subscription completed delivering logs
  1199  	fail error                 // Occurred error to stop iteration
  1200  }
  1201  
  1202  // Next advances the iterator to the subsequent event, returning whether there
  1203  // are any more events found. In case of a retrieval or parsing error, false is
  1204  // returned and Error() can be queried for the exact failure.
  1205  func (it *StaminaStaminaSubtractedIterator) Next() bool {
  1206  	// If the iterator failed, stop iterating
  1207  	if it.fail != nil {
  1208  		return false
  1209  	}
  1210  	// If the iterator completed, deliver directly whatever's available
  1211  	if it.done {
  1212  		select {
  1213  		case log := <-it.logs:
  1214  			it.Event = new(StaminaStaminaSubtracted)
  1215  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1216  				it.fail = err
  1217  				return false
  1218  			}
  1219  			it.Event.Raw = log
  1220  			return true
  1221  
  1222  		default:
  1223  			return false
  1224  		}
  1225  	}
  1226  	// Iterator still in progress, wait for either a data or an error event
  1227  	select {
  1228  	case log := <-it.logs:
  1229  		it.Event = new(StaminaStaminaSubtracted)
  1230  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1231  			it.fail = err
  1232  			return false
  1233  		}
  1234  		it.Event.Raw = log
  1235  		return true
  1236  
  1237  	case err := <-it.sub.Err():
  1238  		it.done = true
  1239  		it.fail = err
  1240  		return it.Next()
  1241  	}
  1242  }
  1243  
  1244  // Error returns any retrieval or parsing error occurred during filtering.
  1245  func (it *StaminaStaminaSubtractedIterator) Error() error {
  1246  	return it.fail
  1247  }
  1248  
  1249  // Close terminates the iteration process, releasing any pending underlying
  1250  // resources.
  1251  func (it *StaminaStaminaSubtractedIterator) Close() error {
  1252  	it.sub.Unsubscribe()
  1253  	return nil
  1254  }
  1255  
  1256  // StaminaStaminaSubtracted represents a StaminaSubtracted event raised by the Stamina contract.
  1257  type StaminaStaminaSubtracted struct {
  1258  	Delegatee common.Address
  1259  	Amount    *big.Int
  1260  	Raw       types.Log // Blockchain specific contextual infos
  1261  }
  1262  
  1263  // FilterStaminaSubtracted is a free log retrieval operation binding the contract event 0x66649d0546ffaed7a9e91793ec2fba0941afa9ebed5b599a8031611ad911fd2f.
  1264  //
  1265  // Solidity: event StaminaSubtracted(address indexed delegatee, uint256 amount)
  1266  func (_Stamina *StaminaFilterer) FilterStaminaSubtracted(opts *bind.FilterOpts, delegatee []common.Address) (*StaminaStaminaSubtractedIterator, error) {
  1267  
  1268  	var delegateeRule []interface{}
  1269  	for _, delegateeItem := range delegatee {
  1270  		delegateeRule = append(delegateeRule, delegateeItem)
  1271  	}
  1272  
  1273  	logs, sub, err := _Stamina.contract.FilterLogs(opts, "StaminaSubtracted", delegateeRule)
  1274  	if err != nil {
  1275  		return nil, err
  1276  	}
  1277  	return &StaminaStaminaSubtractedIterator{contract: _Stamina.contract, event: "StaminaSubtracted", logs: logs, sub: sub}, nil
  1278  }
  1279  
  1280  // WatchStaminaSubtracted is a free log subscription operation binding the contract event 0x66649d0546ffaed7a9e91793ec2fba0941afa9ebed5b599a8031611ad911fd2f.
  1281  //
  1282  // Solidity: event StaminaSubtracted(address indexed delegatee, uint256 amount)
  1283  func (_Stamina *StaminaFilterer) WatchStaminaSubtracted(opts *bind.WatchOpts, sink chan<- *StaminaStaminaSubtracted, delegatee []common.Address) (event.Subscription, error) {
  1284  
  1285  	var delegateeRule []interface{}
  1286  	for _, delegateeItem := range delegatee {
  1287  		delegateeRule = append(delegateeRule, delegateeItem)
  1288  	}
  1289  
  1290  	logs, sub, err := _Stamina.contract.WatchLogs(opts, "StaminaSubtracted", delegateeRule)
  1291  	if err != nil {
  1292  		return nil, err
  1293  	}
  1294  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1295  		defer sub.Unsubscribe()
  1296  		for {
  1297  			select {
  1298  			case log := <-logs:
  1299  				// New log arrived, parse the event and forward to the user
  1300  				event := new(StaminaStaminaSubtracted)
  1301  				if err := _Stamina.contract.UnpackLog(event, "StaminaSubtracted", log); err != nil {
  1302  					return err
  1303  				}
  1304  				event.Raw = log
  1305  
  1306  				select {
  1307  				case sink <- event:
  1308  				case err := <-sub.Err():
  1309  					return err
  1310  				case <-quit:
  1311  					return nil
  1312  				}
  1313  			case err := <-sub.Err():
  1314  				return err
  1315  			case <-quit:
  1316  				return nil
  1317  			}
  1318  		}
  1319  	}), nil
  1320  }
  1321  
  1322  // ParseStaminaSubtracted is a log parse operation binding the contract event 0x66649d0546ffaed7a9e91793ec2fba0941afa9ebed5b599a8031611ad911fd2f.
  1323  //
  1324  // Solidity: event StaminaSubtracted(address indexed delegatee, uint256 amount)
  1325  func (_Stamina *StaminaFilterer) ParseStaminaSubtracted(log types.Log) (*StaminaStaminaSubtracted, error) {
  1326  	event := new(StaminaStaminaSubtracted)
  1327  	if err := _Stamina.contract.UnpackLog(event, "StaminaSubtracted", log); err != nil {
  1328  		return nil, err
  1329  	}
  1330  	return event, nil
  1331  }
  1332  
  1333  // StaminaWithdrawalRequestedIterator is returned from FilterWithdrawalRequested and is used to iterate over the raw logs and unpacked data for WithdrawalRequested events raised by the Stamina contract.
  1334  type StaminaWithdrawalRequestedIterator struct {
  1335  	Event *StaminaWithdrawalRequested // Event containing the contract specifics and raw log
  1336  
  1337  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1338  	event    string              // Event name to use for unpacking event data
  1339  
  1340  	logs chan types.Log        // Log channel receiving the found contract events
  1341  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1342  	done bool                  // Whether the subscription completed delivering logs
  1343  	fail error                 // Occurred error to stop iteration
  1344  }
  1345  
  1346  // Next advances the iterator to the subsequent event, returning whether there
  1347  // are any more events found. In case of a retrieval or parsing error, false is
  1348  // returned and Error() can be queried for the exact failure.
  1349  func (it *StaminaWithdrawalRequestedIterator) Next() bool {
  1350  	// If the iterator failed, stop iterating
  1351  	if it.fail != nil {
  1352  		return false
  1353  	}
  1354  	// If the iterator completed, deliver directly whatever's available
  1355  	if it.done {
  1356  		select {
  1357  		case log := <-it.logs:
  1358  			it.Event = new(StaminaWithdrawalRequested)
  1359  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1360  				it.fail = err
  1361  				return false
  1362  			}
  1363  			it.Event.Raw = log
  1364  			return true
  1365  
  1366  		default:
  1367  			return false
  1368  		}
  1369  	}
  1370  	// Iterator still in progress, wait for either a data or an error event
  1371  	select {
  1372  	case log := <-it.logs:
  1373  		it.Event = new(StaminaWithdrawalRequested)
  1374  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1375  			it.fail = err
  1376  			return false
  1377  		}
  1378  		it.Event.Raw = log
  1379  		return true
  1380  
  1381  	case err := <-it.sub.Err():
  1382  		it.done = true
  1383  		it.fail = err
  1384  		return it.Next()
  1385  	}
  1386  }
  1387  
  1388  // Error returns any retrieval or parsing error occurred during filtering.
  1389  func (it *StaminaWithdrawalRequestedIterator) Error() error {
  1390  	return it.fail
  1391  }
  1392  
  1393  // Close terminates the iteration process, releasing any pending underlying
  1394  // resources.
  1395  func (it *StaminaWithdrawalRequestedIterator) Close() error {
  1396  	it.sub.Unsubscribe()
  1397  	return nil
  1398  }
  1399  
  1400  // StaminaWithdrawalRequested represents a WithdrawalRequested event raised by the Stamina contract.
  1401  type StaminaWithdrawalRequested struct {
  1402  	Depositor          common.Address
  1403  	Delegatee          common.Address
  1404  	Amount             *big.Int
  1405  	RequestBlockNumber *big.Int
  1406  	WithdrawalIndex    *big.Int
  1407  	Raw                types.Log // Blockchain specific contextual infos
  1408  }
  1409  
  1410  // FilterWithdrawalRequested is a free log retrieval operation binding the contract event 0x3aeb15af61588a39bcfafb19ed853140d195c2a924537afbf9a6d04348e76a69.
  1411  //
  1412  // Solidity: event WithdrawalRequested(address indexed depositor, address indexed delegatee, uint256 amount, uint256 requestBlockNumber, uint256 withdrawalIndex)
  1413  func (_Stamina *StaminaFilterer) FilterWithdrawalRequested(opts *bind.FilterOpts, depositor []common.Address, delegatee []common.Address) (*StaminaWithdrawalRequestedIterator, error) {
  1414  
  1415  	var depositorRule []interface{}
  1416  	for _, depositorItem := range depositor {
  1417  		depositorRule = append(depositorRule, depositorItem)
  1418  	}
  1419  	var delegateeRule []interface{}
  1420  	for _, delegateeItem := range delegatee {
  1421  		delegateeRule = append(delegateeRule, delegateeItem)
  1422  	}
  1423  
  1424  	logs, sub, err := _Stamina.contract.FilterLogs(opts, "WithdrawalRequested", depositorRule, delegateeRule)
  1425  	if err != nil {
  1426  		return nil, err
  1427  	}
  1428  	return &StaminaWithdrawalRequestedIterator{contract: _Stamina.contract, event: "WithdrawalRequested", logs: logs, sub: sub}, nil
  1429  }
  1430  
  1431  // WatchWithdrawalRequested is a free log subscription operation binding the contract event 0x3aeb15af61588a39bcfafb19ed853140d195c2a924537afbf9a6d04348e76a69.
  1432  //
  1433  // Solidity: event WithdrawalRequested(address indexed depositor, address indexed delegatee, uint256 amount, uint256 requestBlockNumber, uint256 withdrawalIndex)
  1434  func (_Stamina *StaminaFilterer) WatchWithdrawalRequested(opts *bind.WatchOpts, sink chan<- *StaminaWithdrawalRequested, depositor []common.Address, delegatee []common.Address) (event.Subscription, error) {
  1435  
  1436  	var depositorRule []interface{}
  1437  	for _, depositorItem := range depositor {
  1438  		depositorRule = append(depositorRule, depositorItem)
  1439  	}
  1440  	var delegateeRule []interface{}
  1441  	for _, delegateeItem := range delegatee {
  1442  		delegateeRule = append(delegateeRule, delegateeItem)
  1443  	}
  1444  
  1445  	logs, sub, err := _Stamina.contract.WatchLogs(opts, "WithdrawalRequested", depositorRule, delegateeRule)
  1446  	if err != nil {
  1447  		return nil, err
  1448  	}
  1449  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1450  		defer sub.Unsubscribe()
  1451  		for {
  1452  			select {
  1453  			case log := <-logs:
  1454  				// New log arrived, parse the event and forward to the user
  1455  				event := new(StaminaWithdrawalRequested)
  1456  				if err := _Stamina.contract.UnpackLog(event, "WithdrawalRequested", log); err != nil {
  1457  					return err
  1458  				}
  1459  				event.Raw = log
  1460  
  1461  				select {
  1462  				case sink <- event:
  1463  				case err := <-sub.Err():
  1464  					return err
  1465  				case <-quit:
  1466  					return nil
  1467  				}
  1468  			case err := <-sub.Err():
  1469  				return err
  1470  			case <-quit:
  1471  				return nil
  1472  			}
  1473  		}
  1474  	}), nil
  1475  }
  1476  
  1477  // ParseWithdrawalRequested is a log parse operation binding the contract event 0x3aeb15af61588a39bcfafb19ed853140d195c2a924537afbf9a6d04348e76a69.
  1478  //
  1479  // Solidity: event WithdrawalRequested(address indexed depositor, address indexed delegatee, uint256 amount, uint256 requestBlockNumber, uint256 withdrawalIndex)
  1480  func (_Stamina *StaminaFilterer) ParseWithdrawalRequested(log types.Log) (*StaminaWithdrawalRequested, error) {
  1481  	event := new(StaminaWithdrawalRequested)
  1482  	if err := _Stamina.contract.UnpackLog(event, "WithdrawalRequested", log); err != nil {
  1483  		return nil, err
  1484  	}
  1485  	return event, nil
  1486  }
  1487  
  1488  // StaminaWithdrawnIterator is returned from FilterWithdrawn and is used to iterate over the raw logs and unpacked data for Withdrawn events raised by the Stamina contract.
  1489  type StaminaWithdrawnIterator struct {
  1490  	Event *StaminaWithdrawn // Event containing the contract specifics and raw log
  1491  
  1492  	contract *bind.BoundContract // Generic contract to use for unpacking event data
  1493  	event    string              // Event name to use for unpacking event data
  1494  
  1495  	logs chan types.Log        // Log channel receiving the found contract events
  1496  	sub  ethereum.Subscription // Subscription for errors, completion and termination
  1497  	done bool                  // Whether the subscription completed delivering logs
  1498  	fail error                 // Occurred error to stop iteration
  1499  }
  1500  
  1501  // Next advances the iterator to the subsequent event, returning whether there
  1502  // are any more events found. In case of a retrieval or parsing error, false is
  1503  // returned and Error() can be queried for the exact failure.
  1504  func (it *StaminaWithdrawnIterator) Next() bool {
  1505  	// If the iterator failed, stop iterating
  1506  	if it.fail != nil {
  1507  		return false
  1508  	}
  1509  	// If the iterator completed, deliver directly whatever's available
  1510  	if it.done {
  1511  		select {
  1512  		case log := <-it.logs:
  1513  			it.Event = new(StaminaWithdrawn)
  1514  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1515  				it.fail = err
  1516  				return false
  1517  			}
  1518  			it.Event.Raw = log
  1519  			return true
  1520  
  1521  		default:
  1522  			return false
  1523  		}
  1524  	}
  1525  	// Iterator still in progress, wait for either a data or an error event
  1526  	select {
  1527  	case log := <-it.logs:
  1528  		it.Event = new(StaminaWithdrawn)
  1529  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
  1530  			it.fail = err
  1531  			return false
  1532  		}
  1533  		it.Event.Raw = log
  1534  		return true
  1535  
  1536  	case err := <-it.sub.Err():
  1537  		it.done = true
  1538  		it.fail = err
  1539  		return it.Next()
  1540  	}
  1541  }
  1542  
  1543  // Error returns any retrieval or parsing error occurred during filtering.
  1544  func (it *StaminaWithdrawnIterator) Error() error {
  1545  	return it.fail
  1546  }
  1547  
  1548  // Close terminates the iteration process, releasing any pending underlying
  1549  // resources.
  1550  func (it *StaminaWithdrawnIterator) Close() error {
  1551  	it.sub.Unsubscribe()
  1552  	return nil
  1553  }
  1554  
  1555  // StaminaWithdrawn represents a Withdrawn event raised by the Stamina contract.
  1556  type StaminaWithdrawn struct {
  1557  	Depositor       common.Address
  1558  	Delegatee       common.Address
  1559  	Amount          *big.Int
  1560  	WithdrawalIndex *big.Int
  1561  	Raw             types.Log // Blockchain specific contextual infos
  1562  }
  1563  
  1564  // FilterWithdrawn is a free log retrieval operation binding the contract event 0x91fb9d98b786c57d74c099ccd2beca1739e9f6a81fb49001ca465c4b7591bbe2.
  1565  //
  1566  // Solidity: event Withdrawn(address indexed depositor, address indexed delegatee, uint256 amount, uint256 withdrawalIndex)
  1567  func (_Stamina *StaminaFilterer) FilterWithdrawn(opts *bind.FilterOpts, depositor []common.Address, delegatee []common.Address) (*StaminaWithdrawnIterator, error) {
  1568  
  1569  	var depositorRule []interface{}
  1570  	for _, depositorItem := range depositor {
  1571  		depositorRule = append(depositorRule, depositorItem)
  1572  	}
  1573  	var delegateeRule []interface{}
  1574  	for _, delegateeItem := range delegatee {
  1575  		delegateeRule = append(delegateeRule, delegateeItem)
  1576  	}
  1577  
  1578  	logs, sub, err := _Stamina.contract.FilterLogs(opts, "Withdrawn", depositorRule, delegateeRule)
  1579  	if err != nil {
  1580  		return nil, err
  1581  	}
  1582  	return &StaminaWithdrawnIterator{contract: _Stamina.contract, event: "Withdrawn", logs: logs, sub: sub}, nil
  1583  }
  1584  
  1585  // WatchWithdrawn is a free log subscription operation binding the contract event 0x91fb9d98b786c57d74c099ccd2beca1739e9f6a81fb49001ca465c4b7591bbe2.
  1586  //
  1587  // Solidity: event Withdrawn(address indexed depositor, address indexed delegatee, uint256 amount, uint256 withdrawalIndex)
  1588  func (_Stamina *StaminaFilterer) WatchWithdrawn(opts *bind.WatchOpts, sink chan<- *StaminaWithdrawn, depositor []common.Address, delegatee []common.Address) (event.Subscription, error) {
  1589  
  1590  	var depositorRule []interface{}
  1591  	for _, depositorItem := range depositor {
  1592  		depositorRule = append(depositorRule, depositorItem)
  1593  	}
  1594  	var delegateeRule []interface{}
  1595  	for _, delegateeItem := range delegatee {
  1596  		delegateeRule = append(delegateeRule, delegateeItem)
  1597  	}
  1598  
  1599  	logs, sub, err := _Stamina.contract.WatchLogs(opts, "Withdrawn", depositorRule, delegateeRule)
  1600  	if err != nil {
  1601  		return nil, err
  1602  	}
  1603  	return event.NewSubscription(func(quit <-chan struct{}) error {
  1604  		defer sub.Unsubscribe()
  1605  		for {
  1606  			select {
  1607  			case log := <-logs:
  1608  				// New log arrived, parse the event and forward to the user
  1609  				event := new(StaminaWithdrawn)
  1610  				if err := _Stamina.contract.UnpackLog(event, "Withdrawn", log); err != nil {
  1611  					return err
  1612  				}
  1613  				event.Raw = log
  1614  
  1615  				select {
  1616  				case sink <- event:
  1617  				case err := <-sub.Err():
  1618  					return err
  1619  				case <-quit:
  1620  					return nil
  1621  				}
  1622  			case err := <-sub.Err():
  1623  				return err
  1624  			case <-quit:
  1625  				return nil
  1626  			}
  1627  		}
  1628  	}), nil
  1629  }
  1630  
  1631  // ParseWithdrawn is a log parse operation binding the contract event 0x91fb9d98b786c57d74c099ccd2beca1739e9f6a81fb49001ca465c4b7591bbe2.
  1632  //
  1633  // Solidity: event Withdrawn(address indexed depositor, address indexed delegatee, uint256 amount, uint256 withdrawalIndex)
  1634  func (_Stamina *StaminaFilterer) ParseWithdrawn(log types.Log) (*StaminaWithdrawn, error) {
  1635  	event := new(StaminaWithdrawn)
  1636  	if err := _Stamina.contract.UnpackLog(event, "Withdrawn", log); err != nil {
  1637  		return nil, err
  1638  	}
  1639  	return event, nil
  1640  }