597 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			597 lines
		
	
	
		
			23 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Code generated - DO NOT EDIT.
 | |
| // This file is a generated binding and any manual changes will be lost.
 | |
| 
 | |
| package usdc
 | |
| 
 | |
| import (
 | |
| 	"errors"
 | |
| 	"math/big"
 | |
| 	"strings"
 | |
| 
 | |
| 	ethereum "github.com/ethereum/go-ethereum"
 | |
| 	"github.com/ethereum/go-ethereum/accounts/abi"
 | |
| 	"github.com/ethereum/go-ethereum/accounts/abi/bind"
 | |
| 	"github.com/ethereum/go-ethereum/common"
 | |
| 	"github.com/ethereum/go-ethereum/core/types"
 | |
| 	"github.com/ethereum/go-ethereum/event"
 | |
| )
 | |
| 
 | |
| // Reference imports to suppress errors if they are not otherwise used.
 | |
| var (
 | |
| 	_ = errors.New
 | |
| 	_ = big.NewInt
 | |
| 	_ = strings.NewReader
 | |
| 	_ = ethereum.NotFound
 | |
| 	_ = bind.Bind
 | |
| 	_ = common.Big1
 | |
| 	_ = types.BloomLookup
 | |
| 	_ = event.NewSubscription
 | |
| 	_ = abi.ConvertType
 | |
| )
 | |
| 
 | |
| // UsdcMetaData contains all meta data concerning the Usdc contract.
 | |
| var UsdcMetaData = &bind.MetaData{
 | |
| 	ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\"}],\"name\":\"upgradeTo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newImplementation\",\"type\":\"address\"},{\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"implementation\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"changeAdmin\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"admin\",\"outputs\":[{\"name\":\"\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"name\":\"_implementation\",\"type\":\"address\"}],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"payable\":true,\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"previousAdmin\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"newAdmin\",\"type\":\"address\"}],\"name\":\"AdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"}]",
 | |
| }
 | |
| 
 | |
| // UsdcABI is the input ABI used to generate the binding from.
 | |
| // Deprecated: Use UsdcMetaData.ABI instead.
 | |
| var UsdcABI = UsdcMetaData.ABI
 | |
| 
 | |
| // Usdc is an auto generated Go binding around an Ethereum contract.
 | |
| type Usdc struct {
 | |
| 	UsdcCaller     // Read-only binding to the contract
 | |
| 	UsdcTransactor // Write-only binding to the contract
 | |
| 	UsdcFilterer   // Log filterer for contract events
 | |
| }
 | |
| 
 | |
| // UsdcCaller is an auto generated read-only Go binding around an Ethereum contract.
 | |
| type UsdcCaller struct {
 | |
| 	contract *bind.BoundContract // Generic contract wrapper for the low level calls
 | |
| }
 | |
| 
 | |
| // UsdcTransactor is an auto generated write-only Go binding around an Ethereum contract.
 | |
| type UsdcTransactor struct {
 | |
| 	contract *bind.BoundContract // Generic contract wrapper for the low level calls
 | |
| }
 | |
| 
 | |
| // UsdcFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
 | |
| type UsdcFilterer struct {
 | |
| 	contract *bind.BoundContract // Generic contract wrapper for the low level calls
 | |
| }
 | |
| 
 | |
| // UsdcSession is an auto generated Go binding around an Ethereum contract,
 | |
| // with pre-set call and transact options.
 | |
| type UsdcSession struct {
 | |
| 	Contract     *Usdc             // Generic contract binding to set the session for
 | |
| 	CallOpts     bind.CallOpts     // Call options to use throughout this session
 | |
| 	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
 | |
| }
 | |
| 
 | |
| // UsdcCallerSession is an auto generated read-only Go binding around an Ethereum contract,
 | |
| // with pre-set call options.
 | |
| type UsdcCallerSession struct {
 | |
| 	Contract *UsdcCaller   // Generic contract caller binding to set the session for
 | |
| 	CallOpts bind.CallOpts // Call options to use throughout this session
 | |
| }
 | |
| 
 | |
| // UsdcTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
 | |
| // with pre-set transact options.
 | |
| type UsdcTransactorSession struct {
 | |
| 	Contract     *UsdcTransactor   // Generic contract transactor binding to set the session for
 | |
| 	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
 | |
| }
 | |
| 
 | |
| // UsdcRaw is an auto generated low-level Go binding around an Ethereum contract.
 | |
| type UsdcRaw struct {
 | |
| 	Contract *Usdc // Generic contract binding to access the raw methods on
 | |
| }
 | |
| 
 | |
| // UsdcCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
 | |
| type UsdcCallerRaw struct {
 | |
| 	Contract *UsdcCaller // Generic read-only contract binding to access the raw methods on
 | |
| }
 | |
| 
 | |
| // UsdcTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
 | |
| type UsdcTransactorRaw struct {
 | |
| 	Contract *UsdcTransactor // Generic write-only contract binding to access the raw methods on
 | |
| }
 | |
| 
 | |
| // NewUsdc creates a new instance of Usdc, bound to a specific deployed contract.
 | |
| func NewUsdc(address common.Address, backend bind.ContractBackend) (*Usdc, error) {
 | |
| 	contract, err := bindUsdc(address, backend, backend, backend)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return &Usdc{UsdcCaller: UsdcCaller{contract: contract}, UsdcTransactor: UsdcTransactor{contract: contract}, UsdcFilterer: UsdcFilterer{contract: contract}}, nil
 | |
| }
 | |
| 
 | |
| // NewUsdcCaller creates a new read-only instance of Usdc, bound to a specific deployed contract.
 | |
| func NewUsdcCaller(address common.Address, caller bind.ContractCaller) (*UsdcCaller, error) {
 | |
| 	contract, err := bindUsdc(address, caller, nil, nil)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return &UsdcCaller{contract: contract}, nil
 | |
| }
 | |
| 
 | |
| // NewUsdcTransactor creates a new write-only instance of Usdc, bound to a specific deployed contract.
 | |
| func NewUsdcTransactor(address common.Address, transactor bind.ContractTransactor) (*UsdcTransactor, error) {
 | |
| 	contract, err := bindUsdc(address, nil, transactor, nil)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return &UsdcTransactor{contract: contract}, nil
 | |
| }
 | |
| 
 | |
| // NewUsdcFilterer creates a new log filterer instance of Usdc, bound to a specific deployed contract.
 | |
| func NewUsdcFilterer(address common.Address, filterer bind.ContractFilterer) (*UsdcFilterer, error) {
 | |
| 	contract, err := bindUsdc(address, nil, nil, filterer)
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return &UsdcFilterer{contract: contract}, nil
 | |
| }
 | |
| 
 | |
| // bindUsdc binds a generic wrapper to an already deployed contract.
 | |
| func bindUsdc(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
 | |
| 	parsed, err := UsdcMetaData.GetAbi()
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
 | |
| }
 | |
| 
 | |
| // Call invokes the (constant) contract method with params as input values and
 | |
| // sets the output to result. The result type might be a single field for simple
 | |
| // returns, a slice of interfaces for anonymous returns and a struct for named
 | |
| // returns.
 | |
| func (_Usdc *UsdcRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
 | |
| 	return _Usdc.Contract.UsdcCaller.contract.Call(opts, result, method, params...)
 | |
| }
 | |
| 
 | |
| // Transfer initiates a plain transaction to move funds to the contract, calling
 | |
| // its default method if one is available.
 | |
| func (_Usdc *UsdcRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.UsdcTransactor.contract.Transfer(opts)
 | |
| }
 | |
| 
 | |
| // Transact invokes the (paid) contract method with params as input values.
 | |
| func (_Usdc *UsdcRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.UsdcTransactor.contract.Transact(opts, method, params...)
 | |
| }
 | |
| 
 | |
| // Call invokes the (constant) contract method with params as input values and
 | |
| // sets the output to result. The result type might be a single field for simple
 | |
| // returns, a slice of interfaces for anonymous returns and a struct for named
 | |
| // returns.
 | |
| func (_Usdc *UsdcCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
 | |
| 	return _Usdc.Contract.contract.Call(opts, result, method, params...)
 | |
| }
 | |
| 
 | |
| // Transfer initiates a plain transaction to move funds to the contract, calling
 | |
| // its default method if one is available.
 | |
| func (_Usdc *UsdcTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.contract.Transfer(opts)
 | |
| }
 | |
| 
 | |
| // Transact invokes the (paid) contract method with params as input values.
 | |
| func (_Usdc *UsdcTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.contract.Transact(opts, method, params...)
 | |
| }
 | |
| 
 | |
| // Admin is a free data retrieval call binding the contract method 0xf851a440.
 | |
| //
 | |
| // Solidity: function admin() view returns(address)
 | |
| func (_Usdc *UsdcCaller) Admin(opts *bind.CallOpts) (common.Address, error) {
 | |
| 	var out []interface{}
 | |
| 	err := _Usdc.contract.Call(opts, &out, "admin")
 | |
| 
 | |
| 	if err != nil {
 | |
| 		return *new(common.Address), err
 | |
| 	}
 | |
| 
 | |
| 	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
 | |
| 
 | |
| 	return out0, err
 | |
| 
 | |
| }
 | |
| 
 | |
| // Admin is a free data retrieval call binding the contract method 0xf851a440.
 | |
| //
 | |
| // Solidity: function admin() view returns(address)
 | |
| func (_Usdc *UsdcSession) Admin() (common.Address, error) {
 | |
| 	return _Usdc.Contract.Admin(&_Usdc.CallOpts)
 | |
| }
 | |
| 
 | |
| // Admin is a free data retrieval call binding the contract method 0xf851a440.
 | |
| //
 | |
| // Solidity: function admin() view returns(address)
 | |
| func (_Usdc *UsdcCallerSession) Admin() (common.Address, error) {
 | |
| 	return _Usdc.Contract.Admin(&_Usdc.CallOpts)
 | |
| }
 | |
| 
 | |
| // Implementation is a free data retrieval call binding the contract method 0x5c60da1b.
 | |
| //
 | |
| // Solidity: function implementation() view returns(address)
 | |
| func (_Usdc *UsdcCaller) Implementation(opts *bind.CallOpts) (common.Address, error) {
 | |
| 	var out []interface{}
 | |
| 	err := _Usdc.contract.Call(opts, &out, "implementation")
 | |
| 
 | |
| 	if err != nil {
 | |
| 		return *new(common.Address), err
 | |
| 	}
 | |
| 
 | |
| 	out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
 | |
| 
 | |
| 	return out0, err
 | |
| 
 | |
| }
 | |
| 
 | |
| // Implementation is a free data retrieval call binding the contract method 0x5c60da1b.
 | |
| //
 | |
| // Solidity: function implementation() view returns(address)
 | |
| func (_Usdc *UsdcSession) Implementation() (common.Address, error) {
 | |
| 	return _Usdc.Contract.Implementation(&_Usdc.CallOpts)
 | |
| }
 | |
| 
 | |
| // Implementation is a free data retrieval call binding the contract method 0x5c60da1b.
 | |
| //
 | |
| // Solidity: function implementation() view returns(address)
 | |
| func (_Usdc *UsdcCallerSession) Implementation() (common.Address, error) {
 | |
| 	return _Usdc.Contract.Implementation(&_Usdc.CallOpts)
 | |
| }
 | |
| 
 | |
| // ChangeAdmin is a paid mutator transaction binding the contract method 0x8f283970.
 | |
| //
 | |
| // Solidity: function changeAdmin(address newAdmin) returns()
 | |
| func (_Usdc *UsdcTransactor) ChangeAdmin(opts *bind.TransactOpts, newAdmin common.Address) (*types.Transaction, error) {
 | |
| 	return _Usdc.contract.Transact(opts, "changeAdmin", newAdmin)
 | |
| }
 | |
| 
 | |
| // ChangeAdmin is a paid mutator transaction binding the contract method 0x8f283970.
 | |
| //
 | |
| // Solidity: function changeAdmin(address newAdmin) returns()
 | |
| func (_Usdc *UsdcSession) ChangeAdmin(newAdmin common.Address) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.ChangeAdmin(&_Usdc.TransactOpts, newAdmin)
 | |
| }
 | |
| 
 | |
| // ChangeAdmin is a paid mutator transaction binding the contract method 0x8f283970.
 | |
| //
 | |
| // Solidity: function changeAdmin(address newAdmin) returns()
 | |
| func (_Usdc *UsdcTransactorSession) ChangeAdmin(newAdmin common.Address) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.ChangeAdmin(&_Usdc.TransactOpts, newAdmin)
 | |
| }
 | |
| 
 | |
| // UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
 | |
| //
 | |
| // Solidity: function upgradeTo(address newImplementation) returns()
 | |
| func (_Usdc *UsdcTransactor) UpgradeTo(opts *bind.TransactOpts, newImplementation common.Address) (*types.Transaction, error) {
 | |
| 	return _Usdc.contract.Transact(opts, "upgradeTo", newImplementation)
 | |
| }
 | |
| 
 | |
| // UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
 | |
| //
 | |
| // Solidity: function upgradeTo(address newImplementation) returns()
 | |
| func (_Usdc *UsdcSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.UpgradeTo(&_Usdc.TransactOpts, newImplementation)
 | |
| }
 | |
| 
 | |
| // UpgradeTo is a paid mutator transaction binding the contract method 0x3659cfe6.
 | |
| //
 | |
| // Solidity: function upgradeTo(address newImplementation) returns()
 | |
| func (_Usdc *UsdcTransactorSession) UpgradeTo(newImplementation common.Address) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.UpgradeTo(&_Usdc.TransactOpts, newImplementation)
 | |
| }
 | |
| 
 | |
| // UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
 | |
| //
 | |
| // Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
 | |
| func (_Usdc *UsdcTransactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) {
 | |
| 	return _Usdc.contract.Transact(opts, "upgradeToAndCall", newImplementation, data)
 | |
| }
 | |
| 
 | |
| // UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
 | |
| //
 | |
| // Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
 | |
| func (_Usdc *UsdcSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.UpgradeToAndCall(&_Usdc.TransactOpts, newImplementation, data)
 | |
| }
 | |
| 
 | |
| // UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286.
 | |
| //
 | |
| // Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns()
 | |
| func (_Usdc *UsdcTransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.UpgradeToAndCall(&_Usdc.TransactOpts, newImplementation, data)
 | |
| }
 | |
| 
 | |
| // Fallback is a paid mutator transaction binding the contract fallback function.
 | |
| //
 | |
| // Solidity: fallback() payable returns()
 | |
| func (_Usdc *UsdcTransactor) Fallback(opts *bind.TransactOpts, calldata []byte) (*types.Transaction, error) {
 | |
| 	return _Usdc.contract.RawTransact(opts, calldata)
 | |
| }
 | |
| 
 | |
| // Fallback is a paid mutator transaction binding the contract fallback function.
 | |
| //
 | |
| // Solidity: fallback() payable returns()
 | |
| func (_Usdc *UsdcSession) Fallback(calldata []byte) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.Fallback(&_Usdc.TransactOpts, calldata)
 | |
| }
 | |
| 
 | |
| // Fallback is a paid mutator transaction binding the contract fallback function.
 | |
| //
 | |
| // Solidity: fallback() payable returns()
 | |
| func (_Usdc *UsdcTransactorSession) Fallback(calldata []byte) (*types.Transaction, error) {
 | |
| 	return _Usdc.Contract.Fallback(&_Usdc.TransactOpts, calldata)
 | |
| }
 | |
| 
 | |
| // UsdcAdminChangedIterator is returned from FilterAdminChanged and is used to iterate over the raw logs and unpacked data for AdminChanged events raised by the Usdc contract.
 | |
| type UsdcAdminChangedIterator struct {
 | |
| 	Event *UsdcAdminChanged // Event containing the contract specifics and raw log
 | |
| 
 | |
| 	contract *bind.BoundContract // Generic contract to use for unpacking event data
 | |
| 	event    string              // Event name to use for unpacking event data
 | |
| 
 | |
| 	logs chan types.Log        // Log channel receiving the found contract events
 | |
| 	sub  ethereum.Subscription // Subscription for errors, completion and termination
 | |
| 	done bool                  // Whether the subscription completed delivering logs
 | |
| 	fail error                 // Occurred error to stop iteration
 | |
| }
 | |
| 
 | |
| // Next advances the iterator to the subsequent event, returning whether there
 | |
| // are any more events found. In case of a retrieval or parsing error, false is
 | |
| // returned and Error() can be queried for the exact failure.
 | |
| func (it *UsdcAdminChangedIterator) Next() bool {
 | |
| 	// If the iterator failed, stop iterating
 | |
| 	if it.fail != nil {
 | |
| 		return false
 | |
| 	}
 | |
| 	// If the iterator completed, deliver directly whatever's available
 | |
| 	if it.done {
 | |
| 		select {
 | |
| 		case log := <-it.logs:
 | |
| 			it.Event = new(UsdcAdminChanged)
 | |
| 			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
 | |
| 				it.fail = err
 | |
| 				return false
 | |
| 			}
 | |
| 			it.Event.Raw = log
 | |
| 			return true
 | |
| 
 | |
| 		default:
 | |
| 			return false
 | |
| 		}
 | |
| 	}
 | |
| 	// Iterator still in progress, wait for either a data or an error event
 | |
| 	select {
 | |
| 	case log := <-it.logs:
 | |
| 		it.Event = new(UsdcAdminChanged)
 | |
| 		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
 | |
| 			it.fail = err
 | |
| 			return false
 | |
| 		}
 | |
| 		it.Event.Raw = log
 | |
| 		return true
 | |
| 
 | |
| 	case err := <-it.sub.Err():
 | |
| 		it.done = true
 | |
| 		it.fail = err
 | |
| 		return it.Next()
 | |
| 	}
 | |
| }
 | |
| 
 | |
| // Error returns any retrieval or parsing error occurred during filtering.
 | |
| func (it *UsdcAdminChangedIterator) Error() error {
 | |
| 	return it.fail
 | |
| }
 | |
| 
 | |
| // Close terminates the iteration process, releasing any pending underlying
 | |
| // resources.
 | |
| func (it *UsdcAdminChangedIterator) Close() error {
 | |
| 	it.sub.Unsubscribe()
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| // UsdcAdminChanged represents a AdminChanged event raised by the Usdc contract.
 | |
| type UsdcAdminChanged struct {
 | |
| 	PreviousAdmin common.Address
 | |
| 	NewAdmin      common.Address
 | |
| 	Raw           types.Log // Blockchain specific contextual infos
 | |
| }
 | |
| 
 | |
| // FilterAdminChanged is a free log retrieval operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
 | |
| //
 | |
| // Solidity: event AdminChanged(address previousAdmin, address newAdmin)
 | |
| func (_Usdc *UsdcFilterer) FilterAdminChanged(opts *bind.FilterOpts) (*UsdcAdminChangedIterator, error) {
 | |
| 
 | |
| 	logs, sub, err := _Usdc.contract.FilterLogs(opts, "AdminChanged")
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return &UsdcAdminChangedIterator{contract: _Usdc.contract, event: "AdminChanged", logs: logs, sub: sub}, nil
 | |
| }
 | |
| 
 | |
| // WatchAdminChanged is a free log subscription operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
 | |
| //
 | |
| // Solidity: event AdminChanged(address previousAdmin, address newAdmin)
 | |
| func (_Usdc *UsdcFilterer) WatchAdminChanged(opts *bind.WatchOpts, sink chan<- *UsdcAdminChanged) (event.Subscription, error) {
 | |
| 
 | |
| 	logs, sub, err := _Usdc.contract.WatchLogs(opts, "AdminChanged")
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return event.NewSubscription(func(quit <-chan struct{}) error {
 | |
| 		defer sub.Unsubscribe()
 | |
| 		for {
 | |
| 			select {
 | |
| 			case log := <-logs:
 | |
| 				// New log arrived, parse the event and forward to the user
 | |
| 				event := new(UsdcAdminChanged)
 | |
| 				if err := _Usdc.contract.UnpackLog(event, "AdminChanged", log); err != nil {
 | |
| 					return err
 | |
| 				}
 | |
| 				event.Raw = log
 | |
| 
 | |
| 				select {
 | |
| 				case sink <- event:
 | |
| 				case err := <-sub.Err():
 | |
| 					return err
 | |
| 				case <-quit:
 | |
| 					return nil
 | |
| 				}
 | |
| 			case err := <-sub.Err():
 | |
| 				return err
 | |
| 			case <-quit:
 | |
| 				return nil
 | |
| 			}
 | |
| 		}
 | |
| 	}), nil
 | |
| }
 | |
| 
 | |
| // ParseAdminChanged is a log parse operation binding the contract event 0x7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f.
 | |
| //
 | |
| // Solidity: event AdminChanged(address previousAdmin, address newAdmin)
 | |
| func (_Usdc *UsdcFilterer) ParseAdminChanged(log types.Log) (*UsdcAdminChanged, error) {
 | |
| 	event := new(UsdcAdminChanged)
 | |
| 	if err := _Usdc.contract.UnpackLog(event, "AdminChanged", log); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	event.Raw = log
 | |
| 	return event, nil
 | |
| }
 | |
| 
 | |
| // UsdcUpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Usdc contract.
 | |
| type UsdcUpgradedIterator struct {
 | |
| 	Event *UsdcUpgraded // Event containing the contract specifics and raw log
 | |
| 
 | |
| 	contract *bind.BoundContract // Generic contract to use for unpacking event data
 | |
| 	event    string              // Event name to use for unpacking event data
 | |
| 
 | |
| 	logs chan types.Log        // Log channel receiving the found contract events
 | |
| 	sub  ethereum.Subscription // Subscription for errors, completion and termination
 | |
| 	done bool                  // Whether the subscription completed delivering logs
 | |
| 	fail error                 // Occurred error to stop iteration
 | |
| }
 | |
| 
 | |
| // Next advances the iterator to the subsequent event, returning whether there
 | |
| // are any more events found. In case of a retrieval or parsing error, false is
 | |
| // returned and Error() can be queried for the exact failure.
 | |
| func (it *UsdcUpgradedIterator) Next() bool {
 | |
| 	// If the iterator failed, stop iterating
 | |
| 	if it.fail != nil {
 | |
| 		return false
 | |
| 	}
 | |
| 	// If the iterator completed, deliver directly whatever's available
 | |
| 	if it.done {
 | |
| 		select {
 | |
| 		case log := <-it.logs:
 | |
| 			it.Event = new(UsdcUpgraded)
 | |
| 			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
 | |
| 				it.fail = err
 | |
| 				return false
 | |
| 			}
 | |
| 			it.Event.Raw = log
 | |
| 			return true
 | |
| 
 | |
| 		default:
 | |
| 			return false
 | |
| 		}
 | |
| 	}
 | |
| 	// Iterator still in progress, wait for either a data or an error event
 | |
| 	select {
 | |
| 	case log := <-it.logs:
 | |
| 		it.Event = new(UsdcUpgraded)
 | |
| 		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
 | |
| 			it.fail = err
 | |
| 			return false
 | |
| 		}
 | |
| 		it.Event.Raw = log
 | |
| 		return true
 | |
| 
 | |
| 	case err := <-it.sub.Err():
 | |
| 		it.done = true
 | |
| 		it.fail = err
 | |
| 		return it.Next()
 | |
| 	}
 | |
| }
 | |
| 
 | |
| // Error returns any retrieval or parsing error occurred during filtering.
 | |
| func (it *UsdcUpgradedIterator) Error() error {
 | |
| 	return it.fail
 | |
| }
 | |
| 
 | |
| // Close terminates the iteration process, releasing any pending underlying
 | |
| // resources.
 | |
| func (it *UsdcUpgradedIterator) Close() error {
 | |
| 	it.sub.Unsubscribe()
 | |
| 	return nil
 | |
| }
 | |
| 
 | |
| // UsdcUpgraded represents a Upgraded event raised by the Usdc contract.
 | |
| type UsdcUpgraded struct {
 | |
| 	Implementation common.Address
 | |
| 	Raw            types.Log // Blockchain specific contextual infos
 | |
| }
 | |
| 
 | |
| // FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
 | |
| //
 | |
| // Solidity: event Upgraded(address implementation)
 | |
| func (_Usdc *UsdcFilterer) FilterUpgraded(opts *bind.FilterOpts) (*UsdcUpgradedIterator, error) {
 | |
| 
 | |
| 	logs, sub, err := _Usdc.contract.FilterLogs(opts, "Upgraded")
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return &UsdcUpgradedIterator{contract: _Usdc.contract, event: "Upgraded", logs: logs, sub: sub}, nil
 | |
| }
 | |
| 
 | |
| // WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
 | |
| //
 | |
| // Solidity: event Upgraded(address implementation)
 | |
| func (_Usdc *UsdcFilterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *UsdcUpgraded) (event.Subscription, error) {
 | |
| 
 | |
| 	logs, sub, err := _Usdc.contract.WatchLogs(opts, "Upgraded")
 | |
| 	if err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	return event.NewSubscription(func(quit <-chan struct{}) error {
 | |
| 		defer sub.Unsubscribe()
 | |
| 		for {
 | |
| 			select {
 | |
| 			case log := <-logs:
 | |
| 				// New log arrived, parse the event and forward to the user
 | |
| 				event := new(UsdcUpgraded)
 | |
| 				if err := _Usdc.contract.UnpackLog(event, "Upgraded", log); err != nil {
 | |
| 					return err
 | |
| 				}
 | |
| 				event.Raw = log
 | |
| 
 | |
| 				select {
 | |
| 				case sink <- event:
 | |
| 				case err := <-sub.Err():
 | |
| 					return err
 | |
| 				case <-quit:
 | |
| 					return nil
 | |
| 				}
 | |
| 			case err := <-sub.Err():
 | |
| 				return err
 | |
| 			case <-quit:
 | |
| 				return nil
 | |
| 			}
 | |
| 		}
 | |
| 	}), nil
 | |
| }
 | |
| 
 | |
| // ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b.
 | |
| //
 | |
| // Solidity: event Upgraded(address implementation)
 | |
| func (_Usdc *UsdcFilterer) ParseUpgraded(log types.Log) (*UsdcUpgraded, error) {
 | |
| 	event := new(UsdcUpgraded)
 | |
| 	if err := _Usdc.contract.UnpackLog(event, "Upgraded", log); err != nil {
 | |
| 		return nil, err
 | |
| 	}
 | |
| 	event.Raw = log
 | |
| 	return event, nil
 | |
| }
 |