github.com/codingfuture/orig-energi3@v0.8.4/energi/abi/IGovernedProxy.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 abi
     5  
     6  import (
     7  	"math/big"
     8  	"strings"
     9  
    10  	ethereum "github.com/ethereum/go-ethereum"
    11  	"github.com/ethereum/go-ethereum/accounts/abi"
    12  	"github.com/ethereum/go-ethereum/accounts/abi/bind"
    13  	"github.com/ethereum/go-ethereum/common"
    14  	"github.com/ethereum/go-ethereum/core/types"
    15  	"github.com/ethereum/go-ethereum/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  // IGovernedProxyABI is the input ABI used to generate the binding from.
    31  const IGovernedProxyABI = "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIGovernedContract\",\"name\":\"impl\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contractIUpgradeProposal\",\"name\":\"proposal\",\"type\":\"address\"}],\"name\":\"UpgradeProposal\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contractIGovernedContract\",\"name\":\"impl\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"contractIUpgradeProposal\",\"name\":\"proposal\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIUpgradeProposal\",\"name\":\"_proposal\",\"type\":\"address\"}],\"name\":\"collectUpgradeProposal\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"impl\",\"outputs\":[{\"internalType\":\"contractIGovernedContract\",\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"listUpgradeProposals\",\"outputs\":[{\"internalType\":\"contractIUpgradeProposal[]\",\"name\":\"proposals\",\"type\":\"address[]\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIGovernedContract\",\"name\":\"_newImpl\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_period\",\"type\":\"uint256\"}],\"name\":\"proposeUpgrade\",\"outputs\":[{\"internalType\":\"contractIUpgradeProposal\",\"name\":\"\",\"type\":\"address\"}],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"internalType\":\"contractIUpgradeProposal\",\"name\":\"_proposal\",\"type\":\"address\"}],\"name\":\"upgrade\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"internalType\":\"contractIUpgradeProposal\",\"name\":\"_proposal\",\"type\":\"address\"}],\"name\":\"upgradeProposalImpl\",\"outputs\":[{\"internalType\":\"contractIGovernedContract\",\"name\":\"new_impl\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]"
    32  
    33  // IGovernedProxy is an auto generated Go binding around an Ethereum contract.
    34  type IGovernedProxy struct {
    35  	IGovernedProxyCaller     // Read-only binding to the contract
    36  	IGovernedProxyTransactor // Write-only binding to the contract
    37  	IGovernedProxyFilterer   // Log filterer for contract events
    38  }
    39  
    40  // IGovernedProxyCaller is an auto generated read-only Go binding around an Ethereum contract.
    41  type IGovernedProxyCaller struct {
    42  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    43  }
    44  
    45  // IGovernedProxyTransactor is an auto generated write-only Go binding around an Ethereum contract.
    46  type IGovernedProxyTransactor struct {
    47  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    48  }
    49  
    50  // IGovernedProxyFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    51  type IGovernedProxyFilterer struct {
    52  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    53  }
    54  
    55  // IGovernedProxySession is an auto generated Go binding around an Ethereum contract,
    56  // with pre-set call and transact options.
    57  type IGovernedProxySession struct {
    58  	Contract     *IGovernedProxy   // Generic contract binding to set the session for
    59  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    60  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    61  }
    62  
    63  // IGovernedProxyCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    64  // with pre-set call options.
    65  type IGovernedProxyCallerSession struct {
    66  	Contract *IGovernedProxyCaller // Generic contract caller binding to set the session for
    67  	CallOpts bind.CallOpts         // Call options to use throughout this session
    68  }
    69  
    70  // IGovernedProxyTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    71  // with pre-set transact options.
    72  type IGovernedProxyTransactorSession struct {
    73  	Contract     *IGovernedProxyTransactor // Generic contract transactor binding to set the session for
    74  	TransactOpts bind.TransactOpts         // Transaction auth options to use throughout this session
    75  }
    76  
    77  // IGovernedProxyRaw is an auto generated low-level Go binding around an Ethereum contract.
    78  type IGovernedProxyRaw struct {
    79  	Contract *IGovernedProxy // Generic contract binding to access the raw methods on
    80  }
    81  
    82  // IGovernedProxyCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    83  type IGovernedProxyCallerRaw struct {
    84  	Contract *IGovernedProxyCaller // Generic read-only contract binding to access the raw methods on
    85  }
    86  
    87  // IGovernedProxyTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    88  type IGovernedProxyTransactorRaw struct {
    89  	Contract *IGovernedProxyTransactor // Generic write-only contract binding to access the raw methods on
    90  }
    91  
    92  // NewIGovernedProxy creates a new instance of IGovernedProxy, bound to a specific deployed contract.
    93  func NewIGovernedProxy(address common.Address, backend bind.ContractBackend) (*IGovernedProxy, error) {
    94  	contract, err := bindIGovernedProxy(address, backend, backend, backend)
    95  	if err != nil {
    96  		return nil, err
    97  	}
    98  	return &IGovernedProxy{IGovernedProxyCaller: IGovernedProxyCaller{contract: contract}, IGovernedProxyTransactor: IGovernedProxyTransactor{contract: contract}, IGovernedProxyFilterer: IGovernedProxyFilterer{contract: contract}}, nil
    99  }
   100  
   101  // NewIGovernedProxyCaller creates a new read-only instance of IGovernedProxy, bound to a specific deployed contract.
   102  func NewIGovernedProxyCaller(address common.Address, caller bind.ContractCaller) (*IGovernedProxyCaller, error) {
   103  	contract, err := bindIGovernedProxy(address, caller, nil, nil)
   104  	if err != nil {
   105  		return nil, err
   106  	}
   107  	return &IGovernedProxyCaller{contract: contract}, nil
   108  }
   109  
   110  // NewIGovernedProxyTransactor creates a new write-only instance of IGovernedProxy, bound to a specific deployed contract.
   111  func NewIGovernedProxyTransactor(address common.Address, transactor bind.ContractTransactor) (*IGovernedProxyTransactor, error) {
   112  	contract, err := bindIGovernedProxy(address, nil, transactor, nil)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return &IGovernedProxyTransactor{contract: contract}, nil
   117  }
   118  
   119  // NewIGovernedProxyFilterer creates a new log filterer instance of IGovernedProxy, bound to a specific deployed contract.
   120  func NewIGovernedProxyFilterer(address common.Address, filterer bind.ContractFilterer) (*IGovernedProxyFilterer, error) {
   121  	contract, err := bindIGovernedProxy(address, nil, nil, filterer)
   122  	if err != nil {
   123  		return nil, err
   124  	}
   125  	return &IGovernedProxyFilterer{contract: contract}, nil
   126  }
   127  
   128  // bindIGovernedProxy binds a generic wrapper to an already deployed contract.
   129  func bindIGovernedProxy(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   130  	parsed, err := abi.JSON(strings.NewReader(IGovernedProxyABI))
   131  	if err != nil {
   132  		return nil, err
   133  	}
   134  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   135  }
   136  
   137  // Call invokes the (constant) contract method with params as input values and
   138  // sets the output to result. The result type might be a single field for simple
   139  // returns, a slice of interfaces for anonymous returns and a struct for named
   140  // returns.
   141  func (_IGovernedProxy *IGovernedProxyRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   142  	return _IGovernedProxy.Contract.IGovernedProxyCaller.contract.Call(opts, result, method, params...)
   143  }
   144  
   145  // Transfer initiates a plain transaction to move funds to the contract, calling
   146  // its default method if one is available.
   147  func (_IGovernedProxy *IGovernedProxyRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   148  	return _IGovernedProxy.Contract.IGovernedProxyTransactor.contract.Transfer(opts)
   149  }
   150  
   151  // Transact invokes the (paid) contract method with params as input values.
   152  func (_IGovernedProxy *IGovernedProxyRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   153  	return _IGovernedProxy.Contract.IGovernedProxyTransactor.contract.Transact(opts, method, params...)
   154  }
   155  
   156  // Call invokes the (constant) contract method with params as input values and
   157  // sets the output to result. The result type might be a single field for simple
   158  // returns, a slice of interfaces for anonymous returns and a struct for named
   159  // returns.
   160  func (_IGovernedProxy *IGovernedProxyCallerRaw) Call(opts *bind.CallOpts, result interface{}, method string, params ...interface{}) error {
   161  	return _IGovernedProxy.Contract.contract.Call(opts, result, method, params...)
   162  }
   163  
   164  // Transfer initiates a plain transaction to move funds to the contract, calling
   165  // its default method if one is available.
   166  func (_IGovernedProxy *IGovernedProxyTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   167  	return _IGovernedProxy.Contract.contract.Transfer(opts)
   168  }
   169  
   170  // Transact invokes the (paid) contract method with params as input values.
   171  func (_IGovernedProxy *IGovernedProxyTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   172  	return _IGovernedProxy.Contract.contract.Transact(opts, method, params...)
   173  }
   174  
   175  // Impl is a free data retrieval call binding the contract method 0x8abf6077.
   176  //
   177  // Solidity: function impl() constant returns(address)
   178  func (_IGovernedProxy *IGovernedProxyCaller) Impl(opts *bind.CallOpts) (common.Address, error) {
   179  	var (
   180  		ret0 = new(common.Address)
   181  	)
   182  	out := ret0
   183  	err := _IGovernedProxy.contract.Call(opts, out, "impl")
   184  	return *ret0, err
   185  }
   186  
   187  // Impl is a free data retrieval call binding the contract method 0x8abf6077.
   188  //
   189  // Solidity: function impl() constant returns(address)
   190  func (_IGovernedProxy *IGovernedProxySession) Impl() (common.Address, error) {
   191  	return _IGovernedProxy.Contract.Impl(&_IGovernedProxy.CallOpts)
   192  }
   193  
   194  // Impl is a free data retrieval call binding the contract method 0x8abf6077.
   195  //
   196  // Solidity: function impl() constant returns(address)
   197  func (_IGovernedProxy *IGovernedProxyCallerSession) Impl() (common.Address, error) {
   198  	return _IGovernedProxy.Contract.Impl(&_IGovernedProxy.CallOpts)
   199  }
   200  
   201  // ListUpgradeProposals is a free data retrieval call binding the contract method 0xb364595e.
   202  //
   203  // Solidity: function listUpgradeProposals() constant returns(address[] proposals)
   204  func (_IGovernedProxy *IGovernedProxyCaller) ListUpgradeProposals(opts *bind.CallOpts) ([]common.Address, error) {
   205  	var (
   206  		ret0 = new([]common.Address)
   207  	)
   208  	out := ret0
   209  	err := _IGovernedProxy.contract.Call(opts, out, "listUpgradeProposals")
   210  	return *ret0, err
   211  }
   212  
   213  // ListUpgradeProposals is a free data retrieval call binding the contract method 0xb364595e.
   214  //
   215  // Solidity: function listUpgradeProposals() constant returns(address[] proposals)
   216  func (_IGovernedProxy *IGovernedProxySession) ListUpgradeProposals() ([]common.Address, error) {
   217  	return _IGovernedProxy.Contract.ListUpgradeProposals(&_IGovernedProxy.CallOpts)
   218  }
   219  
   220  // ListUpgradeProposals is a free data retrieval call binding the contract method 0xb364595e.
   221  //
   222  // Solidity: function listUpgradeProposals() constant returns(address[] proposals)
   223  func (_IGovernedProxy *IGovernedProxyCallerSession) ListUpgradeProposals() ([]common.Address, error) {
   224  	return _IGovernedProxy.Contract.ListUpgradeProposals(&_IGovernedProxy.CallOpts)
   225  }
   226  
   227  // UpgradeProposalImpl is a free data retrieval call binding the contract method 0x6d5b6c44.
   228  //
   229  // Solidity: function upgradeProposalImpl(address _proposal) constant returns(address new_impl)
   230  func (_IGovernedProxy *IGovernedProxyCaller) UpgradeProposalImpl(opts *bind.CallOpts, _proposal common.Address) (common.Address, error) {
   231  	var (
   232  		ret0 = new(common.Address)
   233  	)
   234  	out := ret0
   235  	err := _IGovernedProxy.contract.Call(opts, out, "upgradeProposalImpl", _proposal)
   236  	return *ret0, err
   237  }
   238  
   239  // UpgradeProposalImpl is a free data retrieval call binding the contract method 0x6d5b6c44.
   240  //
   241  // Solidity: function upgradeProposalImpl(address _proposal) constant returns(address new_impl)
   242  func (_IGovernedProxy *IGovernedProxySession) UpgradeProposalImpl(_proposal common.Address) (common.Address, error) {
   243  	return _IGovernedProxy.Contract.UpgradeProposalImpl(&_IGovernedProxy.CallOpts, _proposal)
   244  }
   245  
   246  // UpgradeProposalImpl is a free data retrieval call binding the contract method 0x6d5b6c44.
   247  //
   248  // Solidity: function upgradeProposalImpl(address _proposal) constant returns(address new_impl)
   249  func (_IGovernedProxy *IGovernedProxyCallerSession) UpgradeProposalImpl(_proposal common.Address) (common.Address, error) {
   250  	return _IGovernedProxy.Contract.UpgradeProposalImpl(&_IGovernedProxy.CallOpts, _proposal)
   251  }
   252  
   253  // CollectUpgradeProposal is a paid mutator transaction binding the contract method 0xa1b0e476.
   254  //
   255  // Solidity: function collectUpgradeProposal(address _proposal) returns()
   256  func (_IGovernedProxy *IGovernedProxyTransactor) CollectUpgradeProposal(opts *bind.TransactOpts, _proposal common.Address) (*types.Transaction, error) {
   257  	return _IGovernedProxy.contract.Transact(opts, "collectUpgradeProposal", _proposal)
   258  }
   259  
   260  // CollectUpgradeProposal is a paid mutator transaction binding the contract method 0xa1b0e476.
   261  //
   262  // Solidity: function collectUpgradeProposal(address _proposal) returns()
   263  func (_IGovernedProxy *IGovernedProxySession) CollectUpgradeProposal(_proposal common.Address) (*types.Transaction, error) {
   264  	return _IGovernedProxy.Contract.CollectUpgradeProposal(&_IGovernedProxy.TransactOpts, _proposal)
   265  }
   266  
   267  // CollectUpgradeProposal is a paid mutator transaction binding the contract method 0xa1b0e476.
   268  //
   269  // Solidity: function collectUpgradeProposal(address _proposal) returns()
   270  func (_IGovernedProxy *IGovernedProxyTransactorSession) CollectUpgradeProposal(_proposal common.Address) (*types.Transaction, error) {
   271  	return _IGovernedProxy.Contract.CollectUpgradeProposal(&_IGovernedProxy.TransactOpts, _proposal)
   272  }
   273  
   274  // ProposeUpgrade is a paid mutator transaction binding the contract method 0x5b6dee4c.
   275  //
   276  // Solidity: function proposeUpgrade(address _newImpl, uint256 _period) returns(address)
   277  func (_IGovernedProxy *IGovernedProxyTransactor) ProposeUpgrade(opts *bind.TransactOpts, _newImpl common.Address, _period *big.Int) (*types.Transaction, error) {
   278  	return _IGovernedProxy.contract.Transact(opts, "proposeUpgrade", _newImpl, _period)
   279  }
   280  
   281  // ProposeUpgrade is a paid mutator transaction binding the contract method 0x5b6dee4c.
   282  //
   283  // Solidity: function proposeUpgrade(address _newImpl, uint256 _period) returns(address)
   284  func (_IGovernedProxy *IGovernedProxySession) ProposeUpgrade(_newImpl common.Address, _period *big.Int) (*types.Transaction, error) {
   285  	return _IGovernedProxy.Contract.ProposeUpgrade(&_IGovernedProxy.TransactOpts, _newImpl, _period)
   286  }
   287  
   288  // ProposeUpgrade is a paid mutator transaction binding the contract method 0x5b6dee4c.
   289  //
   290  // Solidity: function proposeUpgrade(address _newImpl, uint256 _period) returns(address)
   291  func (_IGovernedProxy *IGovernedProxyTransactorSession) ProposeUpgrade(_newImpl common.Address, _period *big.Int) (*types.Transaction, error) {
   292  	return _IGovernedProxy.Contract.ProposeUpgrade(&_IGovernedProxy.TransactOpts, _newImpl, _period)
   293  }
   294  
   295  // Upgrade is a paid mutator transaction binding the contract method 0x0900f010.
   296  //
   297  // Solidity: function upgrade(address _proposal) returns()
   298  func (_IGovernedProxy *IGovernedProxyTransactor) Upgrade(opts *bind.TransactOpts, _proposal common.Address) (*types.Transaction, error) {
   299  	return _IGovernedProxy.contract.Transact(opts, "upgrade", _proposal)
   300  }
   301  
   302  // Upgrade is a paid mutator transaction binding the contract method 0x0900f010.
   303  //
   304  // Solidity: function upgrade(address _proposal) returns()
   305  func (_IGovernedProxy *IGovernedProxySession) Upgrade(_proposal common.Address) (*types.Transaction, error) {
   306  	return _IGovernedProxy.Contract.Upgrade(&_IGovernedProxy.TransactOpts, _proposal)
   307  }
   308  
   309  // Upgrade is a paid mutator transaction binding the contract method 0x0900f010.
   310  //
   311  // Solidity: function upgrade(address _proposal) returns()
   312  func (_IGovernedProxy *IGovernedProxyTransactorSession) Upgrade(_proposal common.Address) (*types.Transaction, error) {
   313  	return _IGovernedProxy.Contract.Upgrade(&_IGovernedProxy.TransactOpts, _proposal)
   314  }
   315  
   316  // IGovernedProxyUpgradeProposalIterator is returned from FilterUpgradeProposal and is used to iterate over the raw logs and unpacked data for UpgradeProposal events raised by the IGovernedProxy contract.
   317  type IGovernedProxyUpgradeProposalIterator struct {
   318  	Event *IGovernedProxyUpgradeProposal // Event containing the contract specifics and raw log
   319  
   320  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   321  	event    string              // Event name to use for unpacking event data
   322  
   323  	logs chan types.Log        // Log channel receiving the found contract events
   324  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   325  	done bool                  // Whether the subscription completed delivering logs
   326  	fail error                 // Occurred error to stop iteration
   327  }
   328  
   329  // Next advances the iterator to the subsequent event, returning whether there
   330  // are any more events found. In case of a retrieval or parsing error, false is
   331  // returned and Error() can be queried for the exact failure.
   332  func (it *IGovernedProxyUpgradeProposalIterator) Next() bool {
   333  	// If the iterator failed, stop iterating
   334  	if it.fail != nil {
   335  		return false
   336  	}
   337  	// If the iterator completed, deliver directly whatever's available
   338  	if it.done {
   339  		select {
   340  		case log := <-it.logs:
   341  			it.Event = new(IGovernedProxyUpgradeProposal)
   342  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   343  				it.fail = err
   344  				return false
   345  			}
   346  			it.Event.Raw = log
   347  			return true
   348  
   349  		default:
   350  			return false
   351  		}
   352  	}
   353  	// Iterator still in progress, wait for either a data or an error event
   354  	select {
   355  	case log := <-it.logs:
   356  		it.Event = new(IGovernedProxyUpgradeProposal)
   357  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   358  			it.fail = err
   359  			return false
   360  		}
   361  		it.Event.Raw = log
   362  		return true
   363  
   364  	case err := <-it.sub.Err():
   365  		it.done = true
   366  		it.fail = err
   367  		return it.Next()
   368  	}
   369  }
   370  
   371  // Error returns any retrieval or parsing error occurred during filtering.
   372  func (it *IGovernedProxyUpgradeProposalIterator) Error() error {
   373  	return it.fail
   374  }
   375  
   376  // Close terminates the iteration process, releasing any pending underlying
   377  // resources.
   378  func (it *IGovernedProxyUpgradeProposalIterator) Close() error {
   379  	it.sub.Unsubscribe()
   380  	return nil
   381  }
   382  
   383  // IGovernedProxyUpgradeProposal represents a UpgradeProposal event raised by the IGovernedProxy contract.
   384  type IGovernedProxyUpgradeProposal struct {
   385  	Impl     common.Address
   386  	Proposal common.Address
   387  	Raw      types.Log // Blockchain specific contextual infos
   388  }
   389  
   390  // FilterUpgradeProposal is a free log retrieval operation binding the contract event 0x812eb2689eecf94cfb55caf4a123ea76c6d93eef07dd54a5273b7a4949f7d763.
   391  //
   392  // Solidity: event UpgradeProposal(address indexed impl, address proposal)
   393  func (_IGovernedProxy *IGovernedProxyFilterer) FilterUpgradeProposal(opts *bind.FilterOpts, impl []common.Address) (*IGovernedProxyUpgradeProposalIterator, error) {
   394  
   395  	var implRule []interface{}
   396  	for _, implItem := range impl {
   397  		implRule = append(implRule, implItem)
   398  	}
   399  
   400  	logs, sub, err := _IGovernedProxy.contract.FilterLogs(opts, "UpgradeProposal", implRule)
   401  	if err != nil {
   402  		return nil, err
   403  	}
   404  	return &IGovernedProxyUpgradeProposalIterator{contract: _IGovernedProxy.contract, event: "UpgradeProposal", logs: logs, sub: sub}, nil
   405  }
   406  
   407  // WatchUpgradeProposal is a free log subscription operation binding the contract event 0x812eb2689eecf94cfb55caf4a123ea76c6d93eef07dd54a5273b7a4949f7d763.
   408  //
   409  // Solidity: event UpgradeProposal(address indexed impl, address proposal)
   410  func (_IGovernedProxy *IGovernedProxyFilterer) WatchUpgradeProposal(opts *bind.WatchOpts, sink chan<- *IGovernedProxyUpgradeProposal, impl []common.Address) (event.Subscription, error) {
   411  
   412  	var implRule []interface{}
   413  	for _, implItem := range impl {
   414  		implRule = append(implRule, implItem)
   415  	}
   416  
   417  	logs, sub, err := _IGovernedProxy.contract.WatchLogs(opts, "UpgradeProposal", implRule)
   418  	if err != nil {
   419  		return nil, err
   420  	}
   421  	return event.NewSubscription(func(quit <-chan struct{}) error {
   422  		defer sub.Unsubscribe()
   423  		for {
   424  			select {
   425  			case log := <-logs:
   426  				// New log arrived, parse the event and forward to the user
   427  				event := new(IGovernedProxyUpgradeProposal)
   428  				if err := _IGovernedProxy.contract.UnpackLog(event, "UpgradeProposal", log); err != nil {
   429  					return err
   430  				}
   431  				event.Raw = log
   432  
   433  				select {
   434  				case sink <- event:
   435  				case err := <-sub.Err():
   436  					return err
   437  				case <-quit:
   438  					return nil
   439  				}
   440  			case err := <-sub.Err():
   441  				return err
   442  			case <-quit:
   443  				return nil
   444  			}
   445  		}
   446  	}), nil
   447  }
   448  
   449  // IGovernedProxyUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the IGovernedProxy contract.
   450  type IGovernedProxyUpgradedIterator struct {
   451  	Event *IGovernedProxyUpgraded // Event containing the contract specifics and raw log
   452  
   453  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   454  	event    string              // Event name to use for unpacking event data
   455  
   456  	logs chan types.Log        // Log channel receiving the found contract events
   457  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   458  	done bool                  // Whether the subscription completed delivering logs
   459  	fail error                 // Occurred error to stop iteration
   460  }
   461  
   462  // Next advances the iterator to the subsequent event, returning whether there
   463  // are any more events found. In case of a retrieval or parsing error, false is
   464  // returned and Error() can be queried for the exact failure.
   465  func (it *IGovernedProxyUpgradedIterator) Next() bool {
   466  	// If the iterator failed, stop iterating
   467  	if it.fail != nil {
   468  		return false
   469  	}
   470  	// If the iterator completed, deliver directly whatever's available
   471  	if it.done {
   472  		select {
   473  		case log := <-it.logs:
   474  			it.Event = new(IGovernedProxyUpgraded)
   475  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   476  				it.fail = err
   477  				return false
   478  			}
   479  			it.Event.Raw = log
   480  			return true
   481  
   482  		default:
   483  			return false
   484  		}
   485  	}
   486  	// Iterator still in progress, wait for either a data or an error event
   487  	select {
   488  	case log := <-it.logs:
   489  		it.Event = new(IGovernedProxyUpgraded)
   490  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   491  			it.fail = err
   492  			return false
   493  		}
   494  		it.Event.Raw = log
   495  		return true
   496  
   497  	case err := <-it.sub.Err():
   498  		it.done = true
   499  		it.fail = err
   500  		return it.Next()
   501  	}
   502  }
   503  
   504  // Error returns any retrieval or parsing error occurred during filtering.
   505  func (it *IGovernedProxyUpgradedIterator) Error() error {
   506  	return it.fail
   507  }
   508  
   509  // Close terminates the iteration process, releasing any pending underlying
   510  // resources.
   511  func (it *IGovernedProxyUpgradedIterator) Close() error {
   512  	it.sub.Unsubscribe()
   513  	return nil
   514  }
   515  
   516  // IGovernedProxyUpgraded represents a Upgraded event raised by the IGovernedProxy contract.
   517  type IGovernedProxyUpgraded struct {
   518  	Impl     common.Address
   519  	Proposal common.Address
   520  	Raw      types.Log // Blockchain specific contextual infos
   521  }
   522  
   523  // FilterUpgraded is a free log retrieval operation binding the contract event 0x5d611f318680d00598bb735d61bacf0c514c6b50e1e5ad30040a4df2b12791c7.
   524  //
   525  // Solidity: event Upgraded(address indexed impl, address proposal)
   526  func (_IGovernedProxy *IGovernedProxyFilterer) FilterUpgraded(opts *bind.FilterOpts, impl []common.Address) (*IGovernedProxyUpgradedIterator, error) {
   527  
   528  	var implRule []interface{}
   529  	for _, implItem := range impl {
   530  		implRule = append(implRule, implItem)
   531  	}
   532  
   533  	logs, sub, err := _IGovernedProxy.contract.FilterLogs(opts, "Upgraded", implRule)
   534  	if err != nil {
   535  		return nil, err
   536  	}
   537  	return &IGovernedProxyUpgradedIterator{contract: _IGovernedProxy.contract, event: "Upgraded", logs: logs, sub: sub}, nil
   538  }
   539  
   540  // WatchUpgraded is a free log subscription operation binding the contract event 0x5d611f318680d00598bb735d61bacf0c514c6b50e1e5ad30040a4df2b12791c7.
   541  //
   542  // Solidity: event Upgraded(address indexed impl, address proposal)
   543  func (_IGovernedProxy *IGovernedProxyFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *IGovernedProxyUpgraded, impl []common.Address) (event.Subscription, error) {
   544  
   545  	var implRule []interface{}
   546  	for _, implItem := range impl {
   547  		implRule = append(implRule, implItem)
   548  	}
   549  
   550  	logs, sub, err := _IGovernedProxy.contract.WatchLogs(opts, "Upgraded", implRule)
   551  	if err != nil {
   552  		return nil, err
   553  	}
   554  	return event.NewSubscription(func(quit <-chan struct{}) error {
   555  		defer sub.Unsubscribe()
   556  		for {
   557  			select {
   558  			case log := <-logs:
   559  				// New log arrived, parse the event and forward to the user
   560  				event := new(IGovernedProxyUpgraded)
   561  				if err := _IGovernedProxy.contract.UnpackLog(event, "Upgraded", log); err != nil {
   562  					return err
   563  				}
   564  				event.Raw = log
   565  
   566  				select {
   567  				case sink <- event:
   568  				case err := <-sub.Err():
   569  					return err
   570  				case <-quit:
   571  					return nil
   572  				}
   573  			case err := <-sub.Err():
   574  				return err
   575  			case <-quit:
   576  				return nil
   577  			}
   578  		}
   579  	}), nil
   580  }