github.com/diadata-org/diadata@v1.4.593/pkg/dia/scraper/blockchain-scrapers/blockchains/ethereum/oracleService/oracleService.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 oracleService
     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  // DiaOracleABI is the input ABI used to generate the binding from.
    30  const DiaOracleABI = "[{\"constant\":false,\"inputs\":[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"symbol\",\"type\":\"string\"},{\"name\":\"newPrice\",\"type\":\"uint256\"},{\"name\":\"newSupply\",\"type\":\"uint256\"},{\"name\":\"newTimestamp\",\"type\":\"uint256\"}],\"name\":\"updateCoinInfo\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"changeOwner\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"name\",\"type\":\"string\"}],\"name\":\"getCoinInfo\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"uint256\"},{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"name\":\"name\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"symbol\",\"type\":\"string\"},{\"indexed\":false,\"name\":\"price\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"supply\",\"type\":\"uint256\"},{\"indexed\":false,\"name\":\"lastUpdateTimestamp\",\"type\":\"uint256\"}],\"name\":\"newCoinInfo\",\"type\":\"event\"}]"
    31  
    32  // DiaOracleFuncSigs maps the 4-byte function signature to its string representation.
    33  var DiaOracleFuncSigs = map[string]string{
    34  	"a6f9dae1": "changeOwner(address)",
    35  	"e1221400": "getCoinInfo(string)",
    36  	"45cc0a2f": "updateCoinInfo(string,string,uint256,uint256,uint256)",
    37  }
    38  
    39  // DiaOracleBin is the compiled bytecode used for deploying new contracts.
    40  var DiaOracleBin = "0x608060405234801561001057600080fd5b5060008054600160a060020a0319163317905561076c806100326000396000f3006080604052600436106100565763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166345cc0a2f811461005b578063a6f9dae114610101578063e12214001461012f575b600080fd5b34801561006757600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526100ff94369492936024939284019190819084018382808284375050604080516020601f89358b018035918201839004830284018301909452808352979a999881019791965091820194509250829150840183828082843750949750508435955050506020830135926040013591506102159050565b005b34801561010d57600080fd5b506100ff73ffffffffffffffffffffffffffffffffffffffff6004351661040d565b34801561013b57600080fd5b506040805160206004803580820135601f810184900484028501840190955284845261018894369492936024939284019190819084018382808284375094975061046d9650505050505050565b6040518085815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156101d75781810151838201526020016101bf565b50505050905090810190601f1680156102045780820380516001836020036101000a031916815260200191505b509550505050505060405180910390f35b60005473ffffffffffffffffffffffffffffffffffffffff16331461023957600080fd5b608060405190810160405280848152602001838152602001828152602001858152506001866040518082805190602001908083835b6020831061028d5780518252601f19909201916020918201910161026e565b51815160209384036101000a60001901801990921691161790529201948552506040805194859003820190942085518155858201516001820155938501516002850155606085015180516102ea94506003860193509101906106a5565b509050507f8d468b5f823f8d38322e9c4433d184adf453fd3eaa28cef280056aa0664981f08585858585604051808060200180602001868152602001858152602001848152602001838103835288818151815260200191508051906020019080838360005b8381101561036757818101518382015260200161034f565b50505050905090810190601f1680156103945780820380516001836020036101000a031916815260200191505b50838103825287518152875160209182019189019080838360005b838110156103c75781810151838201526020016103af565b50505050905090810190601f1680156103f45780820380516001836020036101000a031916815260200191505b5097505050505050505060405180910390a15050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461043157600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600080600060606001856040518082805190602001908083835b602083106104a65780518252601f199092019160209182019101610487565b51815160209384036101000a600019018019909216911617905292019485525060405193849003810184205489519094600194508a9350918291908401908083835b602083106105075780518252601f1990920191602091820191016104e8565b6001836020036101000a0380198251168184511680821785525050505050509050019150509081526020016040518091039020600101546001876040518082805190602001908083835b602083106105705780518252601f199092019160209182019101610551565b51815160209384036101000a60001901801990921691161790529201948552506040519384900381018420600201548b519094600194508c9350918291908401908083835b602083106105d45780518252601f1990920191602091820191016105b5565b518151600019602094850361010090810a820192831692199390931691909117909252949092019687526040805197889003820188206003018054601f60026001831615909802909501169590950492830182900482028801820190528187529295945085935091840190508282801561068f5780601f106106645761010080835404028352916020019161068f565b820191906000526020600020905b81548152906001019060200180831161067257829003601f168201915b5050505050905093509350935093509193509193565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106106e657805160ff1916838001178555610713565b82800160010185558215610713579182015b828111156107135782518255916020019190600101906106f8565b5061071f929150610723565b5090565b61073d91905b8082111561071f5760008155600101610729565b905600a165627a7a72305820c8712ca2f191c931fcbf0027a8be3145627a0182919794b4d7cd81dcbe3655e80029"
    41  
    42  // DeployDiaOracle deploys a new Ethereum contract, binding an instance of DiaOracle to it.
    43  func DeployDiaOracle(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *DiaOracle, error) {
    44  	parsed, err := abi.JSON(strings.NewReader(DiaOracleABI))
    45  	if err != nil {
    46  		return common.Address{}, nil, nil, err
    47  	}
    48  
    49  	address, tx, contract, err := bind.DeployContract(auth, parsed, common.FromHex(DiaOracleBin), backend)
    50  	if err != nil {
    51  		return common.Address{}, nil, nil, err
    52  	}
    53  	return address, tx, &DiaOracle{DiaOracleCaller: DiaOracleCaller{contract: contract}, DiaOracleTransactor: DiaOracleTransactor{contract: contract}, DiaOracleFilterer: DiaOracleFilterer{contract: contract}}, nil
    54  }
    55  
    56  // DiaOracle is an auto generated Go binding around an Ethereum contract.
    57  type DiaOracle struct {
    58  	DiaOracleCaller     // Read-only binding to the contract
    59  	DiaOracleTransactor // Write-only binding to the contract
    60  	DiaOracleFilterer   // Log filterer for contract events
    61  }
    62  
    63  // DiaOracleCaller is an auto generated read-only Go binding around an Ethereum contract.
    64  type DiaOracleCaller struct {
    65  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    66  }
    67  
    68  // DiaOracleTransactor is an auto generated write-only Go binding around an Ethereum contract.
    69  type DiaOracleTransactor struct {
    70  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    71  }
    72  
    73  // DiaOracleFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    74  type DiaOracleFilterer struct {
    75  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    76  }
    77  
    78  // DiaOracleSession is an auto generated Go binding around an Ethereum contract,
    79  // with pre-set call and transact options.
    80  type DiaOracleSession struct {
    81  	Contract     *DiaOracle        // Generic contract binding to set the session for
    82  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    83  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    84  }
    85  
    86  // DiaOracleCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    87  // with pre-set call options.
    88  type DiaOracleCallerSession struct {
    89  	Contract *DiaOracleCaller // Generic contract caller binding to set the session for
    90  	CallOpts bind.CallOpts    // Call options to use throughout this session
    91  }
    92  
    93  // DiaOracleTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    94  // with pre-set transact options.
    95  type DiaOracleTransactorSession struct {
    96  	Contract     *DiaOracleTransactor // Generic contract transactor binding to set the session for
    97  	TransactOpts bind.TransactOpts    // Transaction auth options to use throughout this session
    98  }
    99  
   100  // DiaOracleRaw is an auto generated low-level Go binding around an Ethereum contract.
   101  type DiaOracleRaw struct {
   102  	Contract *DiaOracle // Generic contract binding to access the raw methods on
   103  }
   104  
   105  // DiaOracleCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   106  type DiaOracleCallerRaw struct {
   107  	Contract *DiaOracleCaller // Generic read-only contract binding to access the raw methods on
   108  }
   109  
   110  // DiaOracleTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   111  type DiaOracleTransactorRaw struct {
   112  	Contract *DiaOracleTransactor // Generic write-only contract binding to access the raw methods on
   113  }
   114  
   115  // NewDiaOracle creates a new instance of DiaOracle, bound to a specific deployed contract.
   116  func NewDiaOracle(address common.Address, backend bind.ContractBackend) (*DiaOracle, error) {
   117  	contract, err := bindDiaOracle(address, backend, backend, backend)
   118  	if err != nil {
   119  		return nil, err
   120  	}
   121  	return &DiaOracle{DiaOracleCaller: DiaOracleCaller{contract: contract}, DiaOracleTransactor: DiaOracleTransactor{contract: contract}, DiaOracleFilterer: DiaOracleFilterer{contract: contract}}, nil
   122  }
   123  
   124  // NewDiaOracleCaller creates a new read-only instance of DiaOracle, bound to a specific deployed contract.
   125  func NewDiaOracleCaller(address common.Address, caller bind.ContractCaller) (*DiaOracleCaller, error) {
   126  	contract, err := bindDiaOracle(address, caller, nil, nil)
   127  	if err != nil {
   128  		return nil, err
   129  	}
   130  	return &DiaOracleCaller{contract: contract}, nil
   131  }
   132  
   133  // NewDiaOracleTransactor creates a new write-only instance of DiaOracle, bound to a specific deployed contract.
   134  func NewDiaOracleTransactor(address common.Address, transactor bind.ContractTransactor) (*DiaOracleTransactor, error) {
   135  	contract, err := bindDiaOracle(address, nil, transactor, nil)
   136  	if err != nil {
   137  		return nil, err
   138  	}
   139  	return &DiaOracleTransactor{contract: contract}, nil
   140  }
   141  
   142  // NewDiaOracleFilterer creates a new log filterer instance of DiaOracle, bound to a specific deployed contract.
   143  func NewDiaOracleFilterer(address common.Address, filterer bind.ContractFilterer) (*DiaOracleFilterer, error) {
   144  	contract, err := bindDiaOracle(address, nil, nil, filterer)
   145  	if err != nil {
   146  		return nil, err
   147  	}
   148  	return &DiaOracleFilterer{contract: contract}, nil
   149  }
   150  
   151  // bindDiaOracle binds a generic wrapper to an already deployed contract.
   152  func bindDiaOracle(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   153  	parsed, err := abi.JSON(strings.NewReader(DiaOracleABI))
   154  	if err != nil {
   155  		return nil, err
   156  	}
   157  	return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil
   158  }
   159  
   160  // Call invokes the (constant) contract method with params as input values and
   161  // sets the output to result. The result type might be a single field for simple
   162  // returns, a slice of interfaces for anonymous returns and a struct for named
   163  // returns.
   164  func (_DiaOracle *DiaOracleRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   165  	return _DiaOracle.Contract.DiaOracleCaller.contract.Call(opts, result, method, params...)
   166  }
   167  
   168  // Transfer initiates a plain transaction to move funds to the contract, calling
   169  // its default method if one is available.
   170  func (_DiaOracle *DiaOracleRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   171  	return _DiaOracle.Contract.DiaOracleTransactor.contract.Transfer(opts)
   172  }
   173  
   174  // Transact invokes the (paid) contract method with params as input values.
   175  func (_DiaOracle *DiaOracleRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   176  	return _DiaOracle.Contract.DiaOracleTransactor.contract.Transact(opts, method, params...)
   177  }
   178  
   179  // Call invokes the (constant) contract method with params as input values and
   180  // sets the output to result. The result type might be a single field for simple
   181  // returns, a slice of interfaces for anonymous returns and a struct for named
   182  // returns.
   183  func (_DiaOracle *DiaOracleCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   184  	return _DiaOracle.Contract.contract.Call(opts, result, method, params...)
   185  }
   186  
   187  // Transfer initiates a plain transaction to move funds to the contract, calling
   188  // its default method if one is available.
   189  func (_DiaOracle *DiaOracleTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   190  	return _DiaOracle.Contract.contract.Transfer(opts)
   191  }
   192  
   193  // Transact invokes the (paid) contract method with params as input values.
   194  func (_DiaOracle *DiaOracleTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   195  	return _DiaOracle.Contract.contract.Transact(opts, method, params...)
   196  }
   197  
   198  // GetCoinInfo is a free data retrieval call binding the contract method 0xe1221400.
   199  //
   200  // Solidity: function getCoinInfo(string name) view returns(uint256, uint256, uint256, string)
   201  func (_DiaOracle *DiaOracleCaller) GetCoinInfo(opts *bind.CallOpts, name string) (*big.Int, *big.Int, *big.Int, string, error) {
   202  	var out []interface{}
   203  	err := _DiaOracle.contract.Call(opts, &out, "getCoinInfo", name)
   204  
   205  	if err != nil {
   206  		return *new(*big.Int), *new(*big.Int), *new(*big.Int), *new(string), err
   207  	}
   208  
   209  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   210  	out1 := *abi.ConvertType(out[1], new(*big.Int)).(**big.Int)
   211  	out2 := *abi.ConvertType(out[2], new(*big.Int)).(**big.Int)
   212  	out3 := *abi.ConvertType(out[3], new(string)).(*string)
   213  
   214  	return out0, out1, out2, out3, err
   215  
   216  }
   217  
   218  // GetCoinInfo is a free data retrieval call binding the contract method 0xe1221400.
   219  //
   220  // Solidity: function getCoinInfo(string name) view returns(uint256, uint256, uint256, string)
   221  func (_DiaOracle *DiaOracleSession) GetCoinInfo(name string) (*big.Int, *big.Int, *big.Int, string, error) {
   222  	return _DiaOracle.Contract.GetCoinInfo(&_DiaOracle.CallOpts, name)
   223  }
   224  
   225  // GetCoinInfo is a free data retrieval call binding the contract method 0xe1221400.
   226  //
   227  // Solidity: function getCoinInfo(string name) view returns(uint256, uint256, uint256, string)
   228  func (_DiaOracle *DiaOracleCallerSession) GetCoinInfo(name string) (*big.Int, *big.Int, *big.Int, string, error) {
   229  	return _DiaOracle.Contract.GetCoinInfo(&_DiaOracle.CallOpts, name)
   230  }
   231  
   232  // ChangeOwner is a paid mutator transaction binding the contract method 0xa6f9dae1.
   233  //
   234  // Solidity: function changeOwner(address newOwner) returns()
   235  func (_DiaOracle *DiaOracleTransactor) ChangeOwner(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) {
   236  	return _DiaOracle.contract.Transact(opts, "changeOwner", newOwner)
   237  }
   238  
   239  // ChangeOwner is a paid mutator transaction binding the contract method 0xa6f9dae1.
   240  //
   241  // Solidity: function changeOwner(address newOwner) returns()
   242  func (_DiaOracle *DiaOracleSession) ChangeOwner(newOwner common.Address) (*types.Transaction, error) {
   243  	return _DiaOracle.Contract.ChangeOwner(&_DiaOracle.TransactOpts, newOwner)
   244  }
   245  
   246  // ChangeOwner is a paid mutator transaction binding the contract method 0xa6f9dae1.
   247  //
   248  // Solidity: function changeOwner(address newOwner) returns()
   249  func (_DiaOracle *DiaOracleTransactorSession) ChangeOwner(newOwner common.Address) (*types.Transaction, error) {
   250  	return _DiaOracle.Contract.ChangeOwner(&_DiaOracle.TransactOpts, newOwner)
   251  }
   252  
   253  // UpdateCoinInfo is a paid mutator transaction binding the contract method 0x45cc0a2f.
   254  //
   255  // Solidity: function updateCoinInfo(string name, string symbol, uint256 newPrice, uint256 newSupply, uint256 newTimestamp) returns()
   256  func (_DiaOracle *DiaOracleTransactor) UpdateCoinInfo(opts *bind.TransactOpts, name string, symbol string, newPrice *big.Int, newSupply *big.Int, newTimestamp *big.Int) (*types.Transaction, error) {
   257  	return _DiaOracle.contract.Transact(opts, "updateCoinInfo", name, symbol, newPrice, newSupply, newTimestamp)
   258  }
   259  
   260  // UpdateCoinInfo is a paid mutator transaction binding the contract method 0x45cc0a2f.
   261  //
   262  // Solidity: function updateCoinInfo(string name, string symbol, uint256 newPrice, uint256 newSupply, uint256 newTimestamp) returns()
   263  func (_DiaOracle *DiaOracleSession) UpdateCoinInfo(name string, symbol string, newPrice *big.Int, newSupply *big.Int, newTimestamp *big.Int) (*types.Transaction, error) {
   264  	return _DiaOracle.Contract.UpdateCoinInfo(&_DiaOracle.TransactOpts, name, symbol, newPrice, newSupply, newTimestamp)
   265  }
   266  
   267  // UpdateCoinInfo is a paid mutator transaction binding the contract method 0x45cc0a2f.
   268  //
   269  // Solidity: function updateCoinInfo(string name, string symbol, uint256 newPrice, uint256 newSupply, uint256 newTimestamp) returns()
   270  func (_DiaOracle *DiaOracleTransactorSession) UpdateCoinInfo(name string, symbol string, newPrice *big.Int, newSupply *big.Int, newTimestamp *big.Int) (*types.Transaction, error) {
   271  	return _DiaOracle.Contract.UpdateCoinInfo(&_DiaOracle.TransactOpts, name, symbol, newPrice, newSupply, newTimestamp)
   272  }
   273  
   274  // DiaOracleNewCoinInfoIterator is returned from FilterNewCoinInfo and is used to iterate over the raw logs and unpacked data for NewCoinInfo events raised by the DiaOracle contract.
   275  type DiaOracleNewCoinInfoIterator struct {
   276  	Event *DiaOracleNewCoinInfo // Event containing the contract specifics and raw log
   277  
   278  	contract *bind.BoundContract // Generic contract to use for unpacking event data
   279  	event    string              // Event name to use for unpacking event data
   280  
   281  	logs chan types.Log        // Log channel receiving the found contract events
   282  	sub  ethereum.Subscription // Subscription for errors, completion and termination
   283  	done bool                  // Whether the subscription completed delivering logs
   284  	fail error                 // Occurred error to stop iteration
   285  }
   286  
   287  // Next advances the iterator to the subsequent event, returning whether there
   288  // are any more events found. In case of a retrieval or parsing error, false is
   289  // returned and Error() can be queried for the exact failure.
   290  func (it *DiaOracleNewCoinInfoIterator) Next() bool {
   291  	// If the iterator failed, stop iterating
   292  	if it.fail != nil {
   293  		return false
   294  	}
   295  	// If the iterator completed, deliver directly whatever's available
   296  	if it.done {
   297  		select {
   298  		case log := <-it.logs:
   299  			it.Event = new(DiaOracleNewCoinInfo)
   300  			if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   301  				it.fail = err
   302  				return false
   303  			}
   304  			it.Event.Raw = log
   305  			return true
   306  
   307  		default:
   308  			return false
   309  		}
   310  	}
   311  	// Iterator still in progress, wait for either a data or an error event
   312  	select {
   313  	case log := <-it.logs:
   314  		it.Event = new(DiaOracleNewCoinInfo)
   315  		if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil {
   316  			it.fail = err
   317  			return false
   318  		}
   319  		it.Event.Raw = log
   320  		return true
   321  
   322  	case err := <-it.sub.Err():
   323  		it.done = true
   324  		it.fail = err
   325  		return it.Next()
   326  	}
   327  }
   328  
   329  // Error returns any retrieval or parsing error occurred during filtering.
   330  func (it *DiaOracleNewCoinInfoIterator) Error() error {
   331  	return it.fail
   332  }
   333  
   334  // Close terminates the iteration process, releasing any pending underlying
   335  // resources.
   336  func (it *DiaOracleNewCoinInfoIterator) Close() error {
   337  	it.sub.Unsubscribe()
   338  	return nil
   339  }
   340  
   341  // DiaOracleNewCoinInfo represents a NewCoinInfo event raised by the DiaOracle contract.
   342  type DiaOracleNewCoinInfo struct {
   343  	Name                string
   344  	Symbol              string
   345  	Price               *big.Int
   346  	Supply              *big.Int
   347  	LastUpdateTimestamp *big.Int
   348  	Raw                 types.Log // Blockchain specific contextual infos
   349  }
   350  
   351  // FilterNewCoinInfo is a free log retrieval operation binding the contract event 0x8d468b5f823f8d38322e9c4433d184adf453fd3eaa28cef280056aa0664981f0.
   352  //
   353  // Solidity: event newCoinInfo(string name, string symbol, uint256 price, uint256 supply, uint256 lastUpdateTimestamp)
   354  func (_DiaOracle *DiaOracleFilterer) FilterNewCoinInfo(opts *bind.FilterOpts) (*DiaOracleNewCoinInfoIterator, error) {
   355  
   356  	logs, sub, err := _DiaOracle.contract.FilterLogs(opts, "newCoinInfo")
   357  	if err != nil {
   358  		return nil, err
   359  	}
   360  	return &DiaOracleNewCoinInfoIterator{contract: _DiaOracle.contract, event: "newCoinInfo", logs: logs, sub: sub}, nil
   361  }
   362  
   363  // WatchNewCoinInfo is a free log subscription operation binding the contract event 0x8d468b5f823f8d38322e9c4433d184adf453fd3eaa28cef280056aa0664981f0.
   364  //
   365  // Solidity: event newCoinInfo(string name, string symbol, uint256 price, uint256 supply, uint256 lastUpdateTimestamp)
   366  func (_DiaOracle *DiaOracleFilterer) WatchNewCoinInfo(opts *bind.WatchOpts, sink chan<- *DiaOracleNewCoinInfo) (event.Subscription, error) {
   367  
   368  	logs, sub, err := _DiaOracle.contract.WatchLogs(opts, "newCoinInfo")
   369  	if err != nil {
   370  		return nil, err
   371  	}
   372  	return event.NewSubscription(func(quit <-chan struct{}) error {
   373  		defer sub.Unsubscribe()
   374  		for {
   375  			select {
   376  			case log := <-logs:
   377  				// New log arrived, parse the event and forward to the user
   378  				event := new(DiaOracleNewCoinInfo)
   379  				if err := _DiaOracle.contract.UnpackLog(event, "newCoinInfo", log); err != nil {
   380  					return err
   381  				}
   382  				event.Raw = log
   383  
   384  				select {
   385  				case sink <- event:
   386  				case err := <-sub.Err():
   387  					return err
   388  				case <-quit:
   389  					return nil
   390  				}
   391  			case err := <-sub.Err():
   392  				return err
   393  			case <-quit:
   394  				return nil
   395  			}
   396  		}
   397  	}), nil
   398  }
   399  
   400  // ParseNewCoinInfo is a log parse operation binding the contract event 0x8d468b5f823f8d38322e9c4433d184adf453fd3eaa28cef280056aa0664981f0.
   401  //
   402  // Solidity: event newCoinInfo(string name, string symbol, uint256 price, uint256 supply, uint256 lastUpdateTimestamp)
   403  func (_DiaOracle *DiaOracleFilterer) ParseNewCoinInfo(log types.Log) (*DiaOracleNewCoinInfo, error) {
   404  	event := new(DiaOracleNewCoinInfo)
   405  	if err := _DiaOracle.contract.UnpackLog(event, "newCoinInfo", log); err != nil {
   406  		return nil, err
   407  	}
   408  	event.Raw = log
   409  	return event, nil
   410  }