github.com/status-im/status-go@v1.1.0/contracts/ethscan/ethscan.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 ethscan 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 // BalanceScannerResult is an auto generated low-level Go binding around an user-defined struct. 30 type BalanceScannerResult struct { 31 Success bool 32 Data []byte 33 } 34 35 // BalanceScannerABI is the input ABI used to generate the binding from. 36 const BalanceScannerABI = "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"contracts\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"},{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"call\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structBalanceScanner.Result[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"contracts\",\"type\":\"address[]\"},{\"internalType\":\"bytes[]\",\"name\":\"data\",\"type\":\"bytes[]\"}],\"name\":\"call\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structBalanceScanner.Result[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"}],\"name\":\"etherBalances\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structBalanceScanner.Result[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"addresses\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tokenBalances\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structBalanceScanner.Result[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"contracts\",\"type\":\"address[]\"}],\"name\":\"tokensBalance\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"success\",\"type\":\"bool\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"internalType\":\"structBalanceScanner.Result[]\",\"name\":\"results\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]" 37 38 // BalanceScannerFuncSigs maps the 4-byte function signature to its string representation. 39 var BalanceScannerFuncSigs = map[string]string{ 40 "458b3a7c": "call(address[],bytes[])", 41 "36738374": "call(address[],bytes[],uint256)", 42 "dbdbb51b": "etherBalances(address[])", 43 "aad33091": "tokenBalances(address[],address)", 44 "e5da1b68": "tokensBalance(address,address[])", 45 } 46 47 // BalanceScanner is an auto generated Go binding around an Ethereum contract. 48 type BalanceScanner struct { 49 BalanceScannerCaller // Read-only binding to the contract 50 BalanceScannerTransactor // Write-only binding to the contract 51 BalanceScannerFilterer // Log filterer for contract events 52 } 53 54 // BalanceScannerCaller is an auto generated read-only Go binding around an Ethereum contract. 55 type BalanceScannerCaller struct { 56 contract *bind.BoundContract // Generic contract wrapper for the low level calls 57 } 58 59 // BalanceScannerTransactor is an auto generated write-only Go binding around an Ethereum contract. 60 type BalanceScannerTransactor struct { 61 contract *bind.BoundContract // Generic contract wrapper for the low level calls 62 } 63 64 // BalanceScannerFilterer is an auto generated log filtering Go binding around an Ethereum contract events. 65 type BalanceScannerFilterer struct { 66 contract *bind.BoundContract // Generic contract wrapper for the low level calls 67 } 68 69 // BalanceScannerSession is an auto generated Go binding around an Ethereum contract, 70 // with pre-set call and transact options. 71 type BalanceScannerSession struct { 72 Contract *BalanceScanner // Generic contract binding to set the session for 73 CallOpts bind.CallOpts // Call options to use throughout this session 74 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 75 } 76 77 // BalanceScannerCallerSession is an auto generated read-only Go binding around an Ethereum contract, 78 // with pre-set call options. 79 type BalanceScannerCallerSession struct { 80 Contract *BalanceScannerCaller // Generic contract caller binding to set the session for 81 CallOpts bind.CallOpts // Call options to use throughout this session 82 } 83 84 // BalanceScannerTransactorSession is an auto generated write-only Go binding around an Ethereum contract, 85 // with pre-set transact options. 86 type BalanceScannerTransactorSession struct { 87 Contract *BalanceScannerTransactor // Generic contract transactor binding to set the session for 88 TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session 89 } 90 91 // BalanceScannerRaw is an auto generated low-level Go binding around an Ethereum contract. 92 type BalanceScannerRaw struct { 93 Contract *BalanceScanner // Generic contract binding to access the raw methods on 94 } 95 96 // BalanceScannerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. 97 type BalanceScannerCallerRaw struct { 98 Contract *BalanceScannerCaller // Generic read-only contract binding to access the raw methods on 99 } 100 101 // BalanceScannerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. 102 type BalanceScannerTransactorRaw struct { 103 Contract *BalanceScannerTransactor // Generic write-only contract binding to access the raw methods on 104 } 105 106 // NewBalanceScanner creates a new instance of BalanceScanner, bound to a specific deployed contract. 107 func NewBalanceScanner(address common.Address, backend bind.ContractBackend) (*BalanceScanner, error) { 108 contract, err := bindBalanceScanner(address, backend, backend, backend) 109 if err != nil { 110 return nil, err 111 } 112 return &BalanceScanner{BalanceScannerCaller: BalanceScannerCaller{contract: contract}, BalanceScannerTransactor: BalanceScannerTransactor{contract: contract}, BalanceScannerFilterer: BalanceScannerFilterer{contract: contract}}, nil 113 } 114 115 // NewBalanceScannerCaller creates a new read-only instance of BalanceScanner, bound to a specific deployed contract. 116 func NewBalanceScannerCaller(address common.Address, caller bind.ContractCaller) (*BalanceScannerCaller, error) { 117 contract, err := bindBalanceScanner(address, caller, nil, nil) 118 if err != nil { 119 return nil, err 120 } 121 return &BalanceScannerCaller{contract: contract}, nil 122 } 123 124 // NewBalanceScannerTransactor creates a new write-only instance of BalanceScanner, bound to a specific deployed contract. 125 func NewBalanceScannerTransactor(address common.Address, transactor bind.ContractTransactor) (*BalanceScannerTransactor, error) { 126 contract, err := bindBalanceScanner(address, nil, transactor, nil) 127 if err != nil { 128 return nil, err 129 } 130 return &BalanceScannerTransactor{contract: contract}, nil 131 } 132 133 // NewBalanceScannerFilterer creates a new log filterer instance of BalanceScanner, bound to a specific deployed contract. 134 func NewBalanceScannerFilterer(address common.Address, filterer bind.ContractFilterer) (*BalanceScannerFilterer, error) { 135 contract, err := bindBalanceScanner(address, nil, nil, filterer) 136 if err != nil { 137 return nil, err 138 } 139 return &BalanceScannerFilterer{contract: contract}, nil 140 } 141 142 // bindBalanceScanner binds a generic wrapper to an already deployed contract. 143 func bindBalanceScanner(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { 144 parsed, err := abi.JSON(strings.NewReader(BalanceScannerABI)) 145 if err != nil { 146 return nil, err 147 } 148 return bind.NewBoundContract(address, parsed, caller, transactor, filterer), nil 149 } 150 151 // Call invokes the (constant) contract method with params as input values and 152 // sets the output to result. The result type might be a single field for simple 153 // returns, a slice of interfaces for anonymous returns and a struct for named 154 // returns. 155 func (_BalanceScanner *BalanceScannerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 156 return _BalanceScanner.Contract.BalanceScannerCaller.contract.Call(opts, result, method, params...) 157 } 158 159 // Transfer initiates a plain transaction to move funds to the contract, calling 160 // its default method if one is available. 161 func (_BalanceScanner *BalanceScannerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 162 return _BalanceScanner.Contract.BalanceScannerTransactor.contract.Transfer(opts) 163 } 164 165 // Transact invokes the (paid) contract method with params as input values. 166 func (_BalanceScanner *BalanceScannerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 167 return _BalanceScanner.Contract.BalanceScannerTransactor.contract.Transact(opts, method, params...) 168 } 169 170 // Call invokes the (constant) contract method with params as input values and 171 // sets the output to result. The result type might be a single field for simple 172 // returns, a slice of interfaces for anonymous returns and a struct for named 173 // returns. 174 func (_BalanceScanner *BalanceScannerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { 175 return _BalanceScanner.Contract.contract.Call(opts, result, method, params...) 176 } 177 178 // Transfer initiates a plain transaction to move funds to the contract, calling 179 // its default method if one is available. 180 func (_BalanceScanner *BalanceScannerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { 181 return _BalanceScanner.Contract.contract.Transfer(opts) 182 } 183 184 // Transact invokes the (paid) contract method with params as input values. 185 func (_BalanceScanner *BalanceScannerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { 186 return _BalanceScanner.Contract.contract.Transact(opts, method, params...) 187 } 188 189 // Call is a free data retrieval call binding the contract method 0x36738374. 190 // 191 // Solidity: function call(address[] contracts, bytes[] data, uint256 gas) view returns((bool,bytes)[] results) 192 func (_BalanceScanner *BalanceScannerCaller) Call(opts *bind.CallOpts, contracts []common.Address, data [][]byte, gas *big.Int) ([]BalanceScannerResult, error) { 193 var out []interface{} 194 err := _BalanceScanner.contract.Call(opts, &out, "call", contracts, data, gas) 195 196 if err != nil { 197 return *new([]BalanceScannerResult), err 198 } 199 200 out0 := *abi.ConvertType(out[0], new([]BalanceScannerResult)).(*[]BalanceScannerResult) 201 202 return out0, err 203 204 } 205 206 // Call is a free data retrieval call binding the contract method 0x36738374. 207 // 208 // Solidity: function call(address[] contracts, bytes[] data, uint256 gas) view returns((bool,bytes)[] results) 209 func (_BalanceScanner *BalanceScannerSession) Call(contracts []common.Address, data [][]byte, gas *big.Int) ([]BalanceScannerResult, error) { 210 return _BalanceScanner.Contract.Call(&_BalanceScanner.CallOpts, contracts, data, gas) 211 } 212 213 // Call is a free data retrieval call binding the contract method 0x36738374. 214 // 215 // Solidity: function call(address[] contracts, bytes[] data, uint256 gas) view returns((bool,bytes)[] results) 216 func (_BalanceScanner *BalanceScannerCallerSession) Call(contracts []common.Address, data [][]byte, gas *big.Int) ([]BalanceScannerResult, error) { 217 return _BalanceScanner.Contract.Call(&_BalanceScanner.CallOpts, contracts, data, gas) 218 } 219 220 // Call0 is a free data retrieval call binding the contract method 0x458b3a7c. 221 // 222 // Solidity: function call(address[] contracts, bytes[] data) view returns((bool,bytes)[] results) 223 func (_BalanceScanner *BalanceScannerCaller) Call0(opts *bind.CallOpts, contracts []common.Address, data [][]byte) ([]BalanceScannerResult, error) { 224 var out []interface{} 225 err := _BalanceScanner.contract.Call(opts, &out, "call0", contracts, data) 226 227 if err != nil { 228 return *new([]BalanceScannerResult), err 229 } 230 231 out0 := *abi.ConvertType(out[0], new([]BalanceScannerResult)).(*[]BalanceScannerResult) 232 233 return out0, err 234 235 } 236 237 // Call0 is a free data retrieval call binding the contract method 0x458b3a7c. 238 // 239 // Solidity: function call(address[] contracts, bytes[] data) view returns((bool,bytes)[] results) 240 func (_BalanceScanner *BalanceScannerSession) Call0(contracts []common.Address, data [][]byte) ([]BalanceScannerResult, error) { 241 return _BalanceScanner.Contract.Call0(&_BalanceScanner.CallOpts, contracts, data) 242 } 243 244 // Call0 is a free data retrieval call binding the contract method 0x458b3a7c. 245 // 246 // Solidity: function call(address[] contracts, bytes[] data) view returns((bool,bytes)[] results) 247 func (_BalanceScanner *BalanceScannerCallerSession) Call0(contracts []common.Address, data [][]byte) ([]BalanceScannerResult, error) { 248 return _BalanceScanner.Contract.Call0(&_BalanceScanner.CallOpts, contracts, data) 249 } 250 251 // EtherBalances is a free data retrieval call binding the contract method 0xdbdbb51b. 252 // 253 // Solidity: function etherBalances(address[] addresses) view returns((bool,bytes)[] results) 254 func (_BalanceScanner *BalanceScannerCaller) EtherBalances(opts *bind.CallOpts, addresses []common.Address) ([]BalanceScannerResult, error) { 255 var out []interface{} 256 err := _BalanceScanner.contract.Call(opts, &out, "etherBalances", addresses) 257 258 if err != nil { 259 return *new([]BalanceScannerResult), err 260 } 261 262 out0 := *abi.ConvertType(out[0], new([]BalanceScannerResult)).(*[]BalanceScannerResult) 263 264 return out0, err 265 266 } 267 268 // EtherBalances is a free data retrieval call binding the contract method 0xdbdbb51b. 269 // 270 // Solidity: function etherBalances(address[] addresses) view returns((bool,bytes)[] results) 271 func (_BalanceScanner *BalanceScannerSession) EtherBalances(addresses []common.Address) ([]BalanceScannerResult, error) { 272 return _BalanceScanner.Contract.EtherBalances(&_BalanceScanner.CallOpts, addresses) 273 } 274 275 // EtherBalances is a free data retrieval call binding the contract method 0xdbdbb51b. 276 // 277 // Solidity: function etherBalances(address[] addresses) view returns((bool,bytes)[] results) 278 func (_BalanceScanner *BalanceScannerCallerSession) EtherBalances(addresses []common.Address) ([]BalanceScannerResult, error) { 279 return _BalanceScanner.Contract.EtherBalances(&_BalanceScanner.CallOpts, addresses) 280 } 281 282 // TokenBalances is a free data retrieval call binding the contract method 0xaad33091. 283 // 284 // Solidity: function tokenBalances(address[] addresses, address token) view returns((bool,bytes)[] results) 285 func (_BalanceScanner *BalanceScannerCaller) TokenBalances(opts *bind.CallOpts, addresses []common.Address, token common.Address) ([]BalanceScannerResult, error) { 286 var out []interface{} 287 err := _BalanceScanner.contract.Call(opts, &out, "tokenBalances", addresses, token) 288 289 if err != nil { 290 return *new([]BalanceScannerResult), err 291 } 292 293 out0 := *abi.ConvertType(out[0], new([]BalanceScannerResult)).(*[]BalanceScannerResult) 294 295 return out0, err 296 297 } 298 299 // TokenBalances is a free data retrieval call binding the contract method 0xaad33091. 300 // 301 // Solidity: function tokenBalances(address[] addresses, address token) view returns((bool,bytes)[] results) 302 func (_BalanceScanner *BalanceScannerSession) TokenBalances(addresses []common.Address, token common.Address) ([]BalanceScannerResult, error) { 303 return _BalanceScanner.Contract.TokenBalances(&_BalanceScanner.CallOpts, addresses, token) 304 } 305 306 // TokenBalances is a free data retrieval call binding the contract method 0xaad33091. 307 // 308 // Solidity: function tokenBalances(address[] addresses, address token) view returns((bool,bytes)[] results) 309 func (_BalanceScanner *BalanceScannerCallerSession) TokenBalances(addresses []common.Address, token common.Address) ([]BalanceScannerResult, error) { 310 return _BalanceScanner.Contract.TokenBalances(&_BalanceScanner.CallOpts, addresses, token) 311 } 312 313 // TokensBalance is a free data retrieval call binding the contract method 0xe5da1b68. 314 // 315 // Solidity: function tokensBalance(address owner, address[] contracts) view returns((bool,bytes)[] results) 316 func (_BalanceScanner *BalanceScannerCaller) TokensBalance(opts *bind.CallOpts, owner common.Address, contracts []common.Address) ([]BalanceScannerResult, error) { 317 var out []interface{} 318 err := _BalanceScanner.contract.Call(opts, &out, "tokensBalance", owner, contracts) 319 320 if err != nil { 321 return *new([]BalanceScannerResult), err 322 } 323 324 out0 := *abi.ConvertType(out[0], new([]BalanceScannerResult)).(*[]BalanceScannerResult) 325 326 return out0, err 327 328 } 329 330 // TokensBalance is a free data retrieval call binding the contract method 0xe5da1b68. 331 // 332 // Solidity: function tokensBalance(address owner, address[] contracts) view returns((bool,bytes)[] results) 333 func (_BalanceScanner *BalanceScannerSession) TokensBalance(owner common.Address, contracts []common.Address) ([]BalanceScannerResult, error) { 334 return _BalanceScanner.Contract.TokensBalance(&_BalanceScanner.CallOpts, owner, contracts) 335 } 336 337 // TokensBalance is a free data retrieval call binding the contract method 0xe5da1b68. 338 // 339 // Solidity: function tokensBalance(address owner, address[] contracts) view returns((bool,bytes)[] results) 340 func (_BalanceScanner *BalanceScannerCallerSession) TokensBalance(owner common.Address, contracts []common.Address) ([]BalanceScannerResult, error) { 341 return _BalanceScanner.Contract.TokensBalance(&_BalanceScanner.CallOpts, owner, contracts) 342 }