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