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