github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/blockchain-scrapers/blockchains/ethereum/diaDfynOracleService/diaDfynOracleService.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 diaDfynOracleService
     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  // DIADfynOracleABI is the input ABI used to generate the binding from.
    30  const DIADfynOracleABI = "[{\"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  // DIADfynOracleFuncSigs maps the 4-byte function signature to its string representation.
    33  var DIADfynOracleFuncSigs = map[string]string{
    34  	"960384a0": "getValue(string)",
    35  	"7898e0c2": "setValue(string,uint128,uint128)",
    36  	"6aa45efc": "updateOracleUpdaterAddress(address)",
    37  	"5a9ade8b": "values(string)",
    38  }
    39  
    40  // DIADfynOracleBin is the compiled bytecode used for deploying new contracts.
    41  var DIADfynOracleBin = "0x608060405234801561001057600080fd5b50600180546001600160a01b0319163317905561054d806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80635a9ade8b146100515780636aa45efc146101095780637898e0c214610131578063960384a0146101ed575b600080fd5b6100f76004803603602081101561006757600080fd5b81019060208101813564010000000081111561008257600080fd5b82018360208201111561009457600080fd5b803590602001918460018302840111640100000000831117156100b657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506102c2945050505050565b60408051918252519081900360200190f35b61012f6004803603602081101561011f57600080fd5b50356001600160a01b03166102df565b005b61012f6004803603606081101561014757600080fd5b81019060208101813564010000000081111561016257600080fd5b82018360208201111561017457600080fd5b8035906020019184600183028401116401000000008311171561019657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160801b03833581169450602090930135909216915061034a9050565b6102936004803603602081101561020357600080fd5b81019060208101813564010000000081111561021e57600080fd5b82018360208201111561023057600080fd5b8035906020019184600183028401116401000000008311171561025257600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061049a945050505050565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b805160208183018101805160008252928201919093012091525481565b6001546001600160a01b031633146102f657600080fd5b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f121e958a4cadf7f8dadefa22cc019700365240223668418faebed197da07089f9181900360200190a150565b6001546001600160a01b0316331461036157600080fd5b6000816001600160801b03166080846001600160801b0316901b019050806000856040518082805190602001908083835b602083106103b15780518252601f199092019160209182019101610392565b51815160209384036101000a6000190180199092169116179052920194855250604080519485900382018520959095556001600160801b03888116858301528716948401949094525050606080825286519082015285517fa7fc99ed7617309ee23f63ae90196a1e490d362e6f6a547a59bc809ee2291782928792879287928291608083019187019080838360005b83811015610458578181015183820152602001610440565b50505050905090810190601f1680156104855780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a150505050565b600080600080846040518082805190602001908083835b602083106104d05780518252601f1990920191602091820191016104b1565b51815160209384036101000a6000190180199092169116179052920194855250604051938490030190922054608081901c976001600160801b03909116965094505050505056fea2646970667358221220f95309cfdb74b2dd1ba11f8df1bbdac769aa1363ed8744b2aae8dc36d89627de64736f6c63430007040033"
    42  
    43  // DeployDIADfynOracle deploys a new Ethereum contract, binding an instance of DIADfynOracle to it.
    44  func DeployDIADfynOracle(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *DIADfynOracle, error) {
    45  	parsed, err := abi.JSON(strings.NewReader(DIADfynOracleABI))
    46  	if err != nil {
    47  		return common.Address{}, nil, nil, err
    48  	}
    49  
    50  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(DIADfynOracleBin), backend)
    51  	if err != nil {
    52  		return common.Address{}, nil, nil, err
    53  	}
    54  	return address, tx, &DIADfynOracle{DIADfynOracleCaller: DIADfynOracleCaller{contract: contract}, DIADfynOracleTransactor: DIADfynOracleTransactor{contract: contract}, DIADfynOracleFilterer: DIADfynOracleFilterer{contract: contract}}, nil
    55  }
    56  
    57  // DIADfynOracle is an auto generated Go binding around an Ethereum contract.
    58  type DIADfynOracle struct {
    59  	DIADfynOracleCaller     // Read-only binding to the contract
    60  	DIADfynOracleTransactor // Write-only binding to the contract
    61  	DIADfynOracleFilterer   // Log filterer for contract events
    62  }
    63  
    64  // DIADfynOracleCaller is an auto generated read-only Go binding around an Ethereum contract.
    65  type DIADfynOracleCaller struct {
    66  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    67  }
    68  
    69  // DIADfynOracleTransactor is an auto generated write-only Go binding around an Ethereum contract.
    70  type DIADfynOracleTransactor struct {
    71  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    72  }
    73  
    74  // DIADfynOracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    75  type DIADfynOracleFilterer struct {
    76  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    77  }
    78  
    79  // DIADfynOracleSession is an auto generated Go binding around an Ethereum contract,
    80  // with pre-set call and transact options.
    81  type DIADfynOracleSession struct {
    82  	Contract     *DIADfynOracle    // 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  // DIADfynOracleCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    88  // with pre-set call options.
    89  type DIADfynOracleCallerSession struct {
    90  	Contract *DIADfynOracleCaller // Generic contract caller binding to set the session for
    91  	CallOpts bind.CallOpts        // Call options to use throughout this session
    92  }
    93  
    94  // DIADfynOracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    95  // with pre-set transact options.
    96  type DIADfynOracleTransactorSession struct {
    97  	Contract     *DIADfynOracleTransactor // Generic contract transactor binding to set the session for
    98  	TransactOpts bind.TransactOpts        // Transaction auth options to use throughout this session
    99  }
   100  
   101  // DIADfynOracleRaw is an auto generated low-level Go binding around an Ethereum contract.
   102  type DIADfynOracleRaw struct {
   103  	Contract *DIADfynOracle // Generic contract binding to access the raw methods on
   104  }
   105  
   106  // DIADfynOracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   107  type DIADfynOracleCallerRaw struct {
   108  	Contract *DIADfynOracleCaller // Generic read-only contract binding to access the raw methods on
   109  }
   110  
   111  // DIADfynOracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   112  type DIADfynOracleTransactorRaw struct {
   113  	Contract *DIADfynOracleTransactor // Generic write-only contract binding to access the raw methods on
   114  }
   115  
   116  // NewDIADfynOracle creates a new instance of DIADfynOracle, bound to a specific deployed contract.
   117  func NewDIADfynOracle(address common.Address, backend bind.ContractBackend) (*DIADfynOracle, error) {
   118  	contract, err := bindDIADfynOracle(address, backend, backend, backend)
   119  	if err != nil {
   120  		return nil, err
   121  	}
   122  	return &DIADfynOracle{DIADfynOracleCaller: DIADfynOracleCaller{contract: contract}, DIADfynOracleTransactor: DIADfynOracleTransactor{contract: contract}, DIADfynOracleFilterer: DIADfynOracleFilterer{contract: contract}}, nil
   123  }
   124  
   125  // NewDIADfynOracleCaller creates a new read-only instance of DIADfynOracle, bound to a specific deployed contract.
   126  func NewDIADfynOracleCaller(address common.Address, caller bind.ContractCaller) (*DIADfynOracleCaller, error) {
   127  	contract, err := bindDIADfynOracle(address, caller, nil, nil)
   128  	if err != nil {
   129  		return nil, err
   130  	}
   131  	return &DIADfynOracleCaller{contract: contract}, nil
   132  }
   133  
   134  // NewDIADfynOracleTransactor creates a new write-only instance of DIADfynOracle, bound to a specific deployed contract.
   135  func NewDIADfynOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*DIADfynOracleTransactor, error) {
   136  	contract, err := bindDIADfynOracle(address, nil, transactor, nil)
   137  	if err != nil {
   138  		return nil, err
   139  	}
   140  	return &DIADfynOracleTransactor{contract: contract}, nil
   141  }
   142  
   143  // NewDIADfynOracleFilterer creates a new log filterer instance of DIADfynOracle, bound to a specific deployed contract.
   144  func NewDIADfynOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*DIADfynOracleFilterer, error) {
   145  	contract, err := bindDIADfynOracle(address, nil, nil, filterer)
   146  	if err != nil {
   147  		return nil, err
   148  	}
   149  	return &DIADfynOracleFilterer{contract: contract}, nil
   150  }
   151  
   152  // bindDIADfynOracle binds a generic wrapper to an already deployed contract.
   153  func bindDIADfynOracle(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   154  	parsed, err := abi.JSON(strings.NewReader(DIADfynOracleABI))
   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 (_DIADfynOracle *DIADfynOracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   166  	return _DIADfynOracle.Contract.DIADfynOracleCaller.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 (_DIADfynOracle *DIADfynOracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   172  	return _DIADfynOracle.Contract.DIADfynOracleTransactor.contract.Transfer(opts)
   173  }
   174  
   175  // Transact invokes the (paid) contract method with params as input values.
   176  func (_DIADfynOracle *DIADfynOracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   177  	return _DIADfynOracle.Contract.DIADfynOracleTransactor.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 (_DIADfynOracle *DIADfynOracleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   185  	return _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   191  	return _DIADfynOracle.Contract.contract.Transfer(opts)
   192  }
   193  
   194  // Transact invokes the (paid) contract method with params as input values.
   195  func (_DIADfynOracle *DIADfynOracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   196  	return _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleCaller) GetValue(opts *bind.CallOpts, key string) (*big.Int, *big.Int, error) {
   203  	var out []interface{}
   204  	err := _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleSession) GetValue(key string) (*big.Int, *big.Int, error) {
   221  	return _DIADfynOracle.Contract.GetValue(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleCallerSession) GetValue(key string) (*big.Int, *big.Int, error) {
   228  	return _DIADfynOracle.Contract.GetValue(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleCaller) Values(opts *bind.CallOpts, arg0 string) (*big.Int, error) {
   235  	var out []interface{}
   236  	err := _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleSession) Values(arg0 string) (*big.Int, error) {
   252  	return _DIADfynOracle.Contract.Values(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleCallerSession) Values(arg0 string) (*big.Int, error) {
   259  	return _DIADfynOracle.Contract.Values(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleTransactor) SetValue(opts *bind.TransactOpts, key string, value *big.Int, timestamp *big.Int) (*types.Transaction, error) {
   266  	return _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleSession) SetValue(key string, value *big.Int, timestamp *big.Int) (*types.Transaction, error) {
   273  	return _DIADfynOracle.Contract.SetValue(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleTransactorSession) SetValue(key string, value *big.Int, timestamp *big.Int) (*types.Transaction, error) {
   280  	return _DIADfynOracle.Contract.SetValue(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleTransactor) UpdateOracleUpdaterAddress(opts *bind.TransactOpts, newOracleUpdaterAddress common.Address) (*types.Transaction, error) {
   287  	return _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleSession) UpdateOracleUpdaterAddress(newOracleUpdaterAddress common.Address) (*types.Transaction, error) {
   294  	return _DIADfynOracle.Contract.UpdateOracleUpdaterAddress(&_DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleTransactorSession) UpdateOracleUpdaterAddress(newOracleUpdaterAddress common.Address) (*types.Transaction, error) {
   301  	return _DIADfynOracle.Contract.UpdateOracleUpdaterAddress(&_DIADfynOracle.TransactOpts, newOracleUpdaterAddress)
   302  }
   303  
   304  // DIADfynOracleOracleUpdateIterator is returned from FilterOracleUpdate and is used to iterate over the raw logs and unpacked data for OracleUpdate events raised by the DIADfynOracle contract.
   305  type DIADfynOracleOracleUpdateIterator struct {
   306  	Event *DIADfynOracleOracleUpdate // 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 *DIADfynOracleOracleUpdateIterator) 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(DIADfynOracleOracleUpdate)
   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(DIADfynOracleOracleUpdate)
   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 *DIADfynOracleOracleUpdateIterator) Error() error {
   361  	return it.fail
   362  }
   363  
   364  // Close terminates the iteration process, releasing any pending underlying
   365  // resources.
   366  func (it *DIADfynOracleOracleUpdateIterator) Close() error {
   367  	it.sub.Unsubscribe()
   368  	return nil
   369  }
   370  
   371  // DIADfynOracleOracleUpdate represents a OracleUpdate event raised by the DIADfynOracle contract.
   372  type DIADfynOracleOracleUpdate 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 (_DIADfynOracle *DIADfynOracleFilterer) FilterOracleUpdate(opts *bind.FilterOpts) (*DIADfynOracleOracleUpdateIterator, error) {
   383  
   384  	logs, sub, err := _DIADfynOracle.contract.FilterLogs(opts, "OracleUpdate")
   385  	if err != nil {
   386  		return nil, err
   387  	}
   388  	return &DIADfynOracleOracleUpdateIterator{contract: _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleFilterer) WatchOracleUpdate(opts *bind.WatchOpts, sink chan<- *DIADfynOracleOracleUpdate) (event.Subscription, error) {
   395  
   396  	logs, sub, err := _DIADfynOracle.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(DIADfynOracleOracleUpdate)
   407  				if err := _DIADfynOracle.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 (_DIADfynOracle *DIADfynOracleFilterer) ParseOracleUpdate(log types.Log) (*DIADfynOracleOracleUpdate, error) {
   432  	event := new(DIADfynOracleOracleUpdate)
   433  	if err := _DIADfynOracle.contract.UnpackLog(event, "OracleUpdate", log); err != nil {
   434  		return nil, err
   435  	}
   436  	event.Raw = log
   437  	return event, nil
   438  }
   439  
   440  // DIADfynOracleUpdaterAddressChangeIterator is returned from FilterUpdaterAddressChange and is used to iterate over the raw logs and unpacked data for UpdaterAddressChange events raised by the DIADfynOracle contract.
   441  type DIADfynOracleUpdaterAddressChangeIterator struct {
   442  	Event *DIADfynOracleUpdaterAddressChange // Event containing the contract specifics and raw log
   443  
   444  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   445  	event    string              // Event name to use for unpacking event data
   446  
   447  	logs chan types.Log        // Log channel receiving the found contract events
   448  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   449  	done bool                  // Whether the subscription completed delivering logs
   450  	fail error                 // Occurred error to stop iteration
   451  }
   452  
   453  // Next advances the iterator to the subsequent event, returning whether there
   454  // are any more events found. In case of a retrieval or parsing error, false is
   455  // returned and Error() can be queried for the exact failure.
   456  func (it *DIADfynOracleUpdaterAddressChangeIterator) Next() bool {
   457  	// If the iterator failed, stop iterating
   458  	if it.fail != nil {
   459  		return false
   460  	}
   461  	// If the iterator completed, deliver directly whatever's available
   462  	if it.done {
   463  		select {
   464  		case log := <-it.logs:
   465  			it.Event = new(DIADfynOracleUpdaterAddressChange)
   466  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   467  				it.fail = err
   468  				return false
   469  			}
   470  			it.Event.Raw = log
   471  			return true
   472  
   473  		default:
   474  			return false
   475  		}
   476  	}
   477  	// Iterator still in progress, wait for either a data or an error event
   478  	select {
   479  	case log := <-it.logs:
   480  		it.Event = new(DIADfynOracleUpdaterAddressChange)
   481  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   482  			it.fail = err
   483  			return false
   484  		}
   485  		it.Event.Raw = log
   486  		return true
   487  
   488  	case err := <-it.sub.Err():
   489  		it.done = true
   490  		it.fail = err
   491  		return it.Next()
   492  	}
   493  }
   494  
   495  // Error returns any retrieval or parsing error occurred during filtering.
   496  func (it *DIADfynOracleUpdaterAddressChangeIterator) Error() error {
   497  	return it.fail
   498  }
   499  
   500  // Close terminates the iteration process, releasing any pending underlying
   501  // resources.
   502  func (it *DIADfynOracleUpdaterAddressChangeIterator) Close() error {
   503  	it.sub.Unsubscribe()
   504  	return nil
   505  }
   506  
   507  // DIADfynOracleUpdaterAddressChange represents a UpdaterAddressChange event raised by the DIADfynOracle contract.
   508  type DIADfynOracleUpdaterAddressChange struct {
   509  	NewUpdater common.Address
   510  	Raw        types.Log // Blockchain specific contextual infos
   511  }
   512  
   513  // FilterUpdaterAddressChange is a free log retrieval operation binding the contract event 0x121e958a4cadf7f8dadefa22cc019700365240223668418faebed197da07089f.
   514  //
   515  // Solidity: event UpdaterAddressChange(address newUpdater)
   516  func (_DIADfynOracle *DIADfynOracleFilterer) FilterUpdaterAddressChange(opts *bind.FilterOpts) (*DIADfynOracleUpdaterAddressChangeIterator, error) {
   517  
   518  	logs, sub, err := _DIADfynOracle.contract.FilterLogs(opts, "UpdaterAddressChange")
   519  	if err != nil {
   520  		return nil, err
   521  	}
   522  	return &DIADfynOracleUpdaterAddressChangeIterator{contract: _DIADfynOracle.contract, event: "UpdaterAddressChange", logs: logs, sub: sub}, nil
   523  }
   524  
   525  // WatchUpdaterAddressChange is a free log subscription operation binding the contract event 0x121e958a4cadf7f8dadefa22cc019700365240223668418faebed197da07089f.
   526  //
   527  // Solidity: event UpdaterAddressChange(address newUpdater)
   528  func (_DIADfynOracle *DIADfynOracleFilterer) WatchUpdaterAddressChange(opts *bind.WatchOpts, sink chan<- *DIADfynOracleUpdaterAddressChange) (event.Subscription, error) {
   529  
   530  	logs, sub, err := _DIADfynOracle.contract.WatchLogs(opts, "UpdaterAddressChange")
   531  	if err != nil {
   532  		return nil, err
   533  	}
   534  	return event.NewSubscription(func(quit <-chan struct{}) error {
   535  		defer sub.Unsubscribe()
   536  		for {
   537  			select {
   538  			case log := <-logs:
   539  				// New log arrived, parse the event and forward to the user
   540  				event := new(DIADfynOracleUpdaterAddressChange)
   541  				if err := _DIADfynOracle.contract.UnpackLog(event, "UpdaterAddressChange", log); err != nil {
   542  					return err
   543  				}
   544  				event.Raw = log
   545  
   546  				select {
   547  				case sink <- event:
   548  				case err := <-sub.Err():
   549  					return err
   550  				case <-quit:
   551  					return nil
   552  				}
   553  			case err := <-sub.Err():
   554  				return err
   555  			case <-quit:
   556  				return nil
   557  			}
   558  		}
   559  	}), nil
   560  }
   561  
   562  // ParseUpdaterAddressChange is a log parse operation binding the contract event 0x121e958a4cadf7f8dadefa22cc019700365240223668418faebed197da07089f.
   563  //
   564  // Solidity: event UpdaterAddressChange(address newUpdater)
   565  func (_DIADfynOracle *DIADfynOracleFilterer) ParseUpdaterAddressChange(log types.Log) (*DIADfynOracleUpdaterAddressChange, error) {
   566  	event := new(DIADfynOracleUpdaterAddressChange)
   567  	if err := _DIADfynOracle.contract.UnpackLog(event, "UpdaterAddressChange", log); err != nil {
   568  		return nil, err
   569  	}
   570  	event.Raw = log
   571  	return event, nil
   572  }