github.com/status-im/status-go@v1.1.0/contracts/balancechecker/BalanceChecker.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 balancechecker
     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  // BalanceCheckerMetaData contains all meta data concerning the BalanceChecker contract.
    33  var BalanceCheckerMetaData = &bind.MetaData{
    34  	ABI: "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"users\",\"type\":\"address[]\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"balancesHash\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes32[]\",\"name\":\"\",\"type\":\"bytes32[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"tokens\",\"type\":\"address[]\"}],\"name\":\"balancesPerAddress\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"tokenBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
    35  }
    36  
    37  // BalanceCheckerABI is the input ABI used to generate the binding from.
    38  // Deprecated: Use BalanceCheckerMetaData.ABI instead.
    39  var BalanceCheckerABI = BalanceCheckerMetaData.ABI
    40  
    41  // BalanceChecker is an auto generated Go binding around an Ethereum contract.
    42  type BalanceChecker struct {
    43  	BalanceCheckerCaller     // Read-only binding to the contract
    44  	BalanceCheckerTransactor // Write-only binding to the contract
    45  	BalanceCheckerFilterer   // Log filterer for contract events
    46  }
    47  
    48  // BalanceCheckerCaller is an auto generated read-only Go binding around an Ethereum contract.
    49  type BalanceCheckerCaller struct {
    50  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    51  }
    52  
    53  // BalanceCheckerTransactor is an auto generated write-only Go binding around an Ethereum contract.
    54  type BalanceCheckerTransactor struct {
    55  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    56  }
    57  
    58  // BalanceCheckerFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    59  type BalanceCheckerFilterer struct {
    60  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    61  }
    62  
    63  // BalanceCheckerSession is an auto generated Go binding around an Ethereum contract,
    64  // with pre-set call and transact options.
    65  type BalanceCheckerSession struct {
    66  	Contract     *BalanceChecker   // Generic contract binding to set the session for
    67  	CallOpts     bind.CallOpts     // Call options to use throughout this session
    68  	TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session
    69  }
    70  
    71  // BalanceCheckerCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    72  // with pre-set call options.
    73  type BalanceCheckerCallerSession struct {
    74  	Contract *BalanceCheckerCaller // Generic contract caller binding to set the session for
    75  	CallOpts bind.CallOpts         // Call options to use throughout this session
    76  }
    77  
    78  // BalanceCheckerTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
    79  // with pre-set transact options.
    80  type BalanceCheckerTransactorSession struct {
    81  	Contract     *BalanceCheckerTransactor // Generic contract transactor binding to set the session for
    82  	TransactOpts bind.TransactOpts         // Transaction auth options to use throughout this session
    83  }
    84  
    85  // BalanceCheckerRaw is an auto generated low-level Go binding around an Ethereum contract.
    86  type BalanceCheckerRaw struct {
    87  	Contract *BalanceChecker // Generic contract binding to access the raw methods on
    88  }
    89  
    90  // BalanceCheckerCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
    91  type BalanceCheckerCallerRaw struct {
    92  	Contract *BalanceCheckerCaller // Generic read-only contract binding to access the raw methods on
    93  }
    94  
    95  // BalanceCheckerTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
    96  type BalanceCheckerTransactorRaw struct {
    97  	Contract *BalanceCheckerTransactor // Generic write-only contract binding to access the raw methods on
    98  }
    99  
   100  // NewBalanceChecker creates a new instance of BalanceChecker, bound to a specific deployed contract.
   101  func NewBalanceChecker(address common.Address, backend bind.ContractBackend) (*BalanceChecker, error) {
   102  	contract, err := bindBalanceChecker(address, backend, backend, backend)
   103  	if err != nil {
   104  		return nil, err
   105  	}
   106  	return &BalanceChecker{BalanceCheckerCaller: BalanceCheckerCaller{contract: contract}, BalanceCheckerTransactor: BalanceCheckerTransactor{contract: contract}, BalanceCheckerFilterer: BalanceCheckerFilterer{contract: contract}}, nil
   107  }
   108  
   109  // NewBalanceCheckerCaller creates a new read-only instance of BalanceChecker, bound to a specific deployed contract.
   110  func NewBalanceCheckerCaller(address common.Address, caller bind.ContractCaller) (*BalanceCheckerCaller, error) {
   111  	contract, err := bindBalanceChecker(address, caller, nil, nil)
   112  	if err != nil {
   113  		return nil, err
   114  	}
   115  	return &BalanceCheckerCaller{contract: contract}, nil
   116  }
   117  
   118  // NewBalanceCheckerTransactor creates a new write-only instance of BalanceChecker, bound to a specific deployed contract.
   119  func NewBalanceCheckerTransactor(address common.Address, transactor bind.ContractTransactor) (*BalanceCheckerTransactor, error) {
   120  	contract, err := bindBalanceChecker(address, nil, transactor, nil)
   121  	if err != nil {
   122  		return nil, err
   123  	}
   124  	return &BalanceCheckerTransactor{contract: contract}, nil
   125  }
   126  
   127  // NewBalanceCheckerFilterer creates a new log filterer instance of BalanceChecker, bound to a specific deployed contract.
   128  func NewBalanceCheckerFilterer(address common.Address, filterer bind.ContractFilterer) (*BalanceCheckerFilterer, error) {
   129  	contract, err := bindBalanceChecker(address, nil, nil, filterer)
   130  	if err != nil {
   131  		return nil, err
   132  	}
   133  	return &BalanceCheckerFilterer{contract: contract}, nil
   134  }
   135  
   136  // bindBalanceChecker binds a generic wrapper to an already deployed contract.
   137  func bindBalanceChecker(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   138  	parsed, err := BalanceCheckerMetaData.GetAbi()
   139  	if err != nil {
   140  		return nil, err
   141  	}
   142  	return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil
   143  }
   144  
   145  // Call invokes the (constant) contract method with params as input values and
   146  // sets the output to result. The result type might be a single field for simple
   147  // returns, a slice of interfaces for anonymous returns and a struct for named
   148  // returns.
   149  func (_BalanceChecker *BalanceCheckerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   150  	return _BalanceChecker.Contract.BalanceCheckerCaller.contract.Call(opts, result, method, params...)
   151  }
   152  
   153  // Transfer initiates a plain transaction to move funds to the contract, calling
   154  // its default method if one is available.
   155  func (_BalanceChecker *BalanceCheckerRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   156  	return _BalanceChecker.Contract.BalanceCheckerTransactor.contract.Transfer(opts)
   157  }
   158  
   159  // Transact invokes the (paid) contract method with params as input values.
   160  func (_BalanceChecker *BalanceCheckerRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   161  	return _BalanceChecker.Contract.BalanceCheckerTransactor.contract.Transact(opts, method, params...)
   162  }
   163  
   164  // Call invokes the (constant) contract method with params as input values and
   165  // sets the output to result. The result type might be a single field for simple
   166  // returns, a slice of interfaces for anonymous returns and a struct for named
   167  // returns.
   168  func (_BalanceChecker *BalanceCheckerCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   169  	return _BalanceChecker.Contract.contract.Call(opts, result, method, params...)
   170  }
   171  
   172  // Transfer initiates a plain transaction to move funds to the contract, calling
   173  // its default method if one is available.
   174  func (_BalanceChecker *BalanceCheckerTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   175  	return _BalanceChecker.Contract.contract.Transfer(opts)
   176  }
   177  
   178  // Transact invokes the (paid) contract method with params as input values.
   179  func (_BalanceChecker *BalanceCheckerTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   180  	return _BalanceChecker.Contract.contract.Transact(opts, method, params...)
   181  }
   182  
   183  // BalancesHash is a free data retrieval call binding the contract method 0x23c0503e.
   184  //
   185  // Solidity: function balancesHash(address[] users, address[] tokens) view returns(uint256, bytes32[])
   186  func (_BalanceChecker *BalanceCheckerCaller) BalancesHash(opts *bind.CallOpts, users []common.Address, tokens []common.Address) (*big.Int, [][32]byte, error) {
   187  	var out []interface{}
   188  	err := _BalanceChecker.contract.Call(opts, &out, "balancesHash", users, tokens)
   189  
   190  	if err != nil {
   191  		return *new(*big.Int), *new([][32]byte), err
   192  	}
   193  
   194  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   195  	out1 := *abi.ConvertType(out[1], new([][32]byte)).(*[][32]byte)
   196  
   197  	return out0, out1, err
   198  
   199  }
   200  
   201  // BalancesHash is a free data retrieval call binding the contract method 0x23c0503e.
   202  //
   203  // Solidity: function balancesHash(address[] users, address[] tokens) view returns(uint256, bytes32[])
   204  func (_BalanceChecker *BalanceCheckerSession) BalancesHash(users []common.Address, tokens []common.Address) (*big.Int, [][32]byte, error) {
   205  	return _BalanceChecker.Contract.BalancesHash(&_BalanceChecker.CallOpts, users, tokens)
   206  }
   207  
   208  // BalancesHash is a free data retrieval call binding the contract method 0x23c0503e.
   209  //
   210  // Solidity: function balancesHash(address[] users, address[] tokens) view returns(uint256, bytes32[])
   211  func (_BalanceChecker *BalanceCheckerCallerSession) BalancesHash(users []common.Address, tokens []common.Address) (*big.Int, [][32]byte, error) {
   212  	return _BalanceChecker.Contract.BalancesHash(&_BalanceChecker.CallOpts, users, tokens)
   213  }
   214  
   215  // BalancesPerAddress is a free data retrieval call binding the contract method 0x1a55d770.
   216  //
   217  // Solidity: function balancesPerAddress(address user, address[] tokens) view returns(uint256[])
   218  func (_BalanceChecker *BalanceCheckerCaller) BalancesPerAddress(opts *bind.CallOpts, user common.Address, tokens []common.Address) ([]*big.Int, error) {
   219  	var out []interface{}
   220  	err := _BalanceChecker.contract.Call(opts, &out, "balancesPerAddress", user, tokens)
   221  
   222  	if err != nil {
   223  		return *new([]*big.Int), err
   224  	}
   225  
   226  	out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int)
   227  
   228  	return out0, err
   229  
   230  }
   231  
   232  // BalancesPerAddress is a free data retrieval call binding the contract method 0x1a55d770.
   233  //
   234  // Solidity: function balancesPerAddress(address user, address[] tokens) view returns(uint256[])
   235  func (_BalanceChecker *BalanceCheckerSession) BalancesPerAddress(user common.Address, tokens []common.Address) ([]*big.Int, error) {
   236  	return _BalanceChecker.Contract.BalancesPerAddress(&_BalanceChecker.CallOpts, user, tokens)
   237  }
   238  
   239  // BalancesPerAddress is a free data retrieval call binding the contract method 0x1a55d770.
   240  //
   241  // Solidity: function balancesPerAddress(address user, address[] tokens) view returns(uint256[])
   242  func (_BalanceChecker *BalanceCheckerCallerSession) BalancesPerAddress(user common.Address, tokens []common.Address) ([]*big.Int, error) {
   243  	return _BalanceChecker.Contract.BalancesPerAddress(&_BalanceChecker.CallOpts, user, tokens)
   244  }
   245  
   246  // TokenBalance is a free data retrieval call binding the contract method 0x1049334f.
   247  //
   248  // Solidity: function tokenBalance(address user, address token) view returns(uint256)
   249  func (_BalanceChecker *BalanceCheckerCaller) TokenBalance(opts *bind.CallOpts, user common.Address, token common.Address) (*big.Int, error) {
   250  	var out []interface{}
   251  	err := _BalanceChecker.contract.Call(opts, &out, "tokenBalance", user, token)
   252  
   253  	if err != nil {
   254  		return *new(*big.Int), err
   255  	}
   256  
   257  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   258  
   259  	return out0, err
   260  
   261  }
   262  
   263  // TokenBalance is a free data retrieval call binding the contract method 0x1049334f.
   264  //
   265  // Solidity: function tokenBalance(address user, address token) view returns(uint256)
   266  func (_BalanceChecker *BalanceCheckerSession) TokenBalance(user common.Address, token common.Address) (*big.Int, error) {
   267  	return _BalanceChecker.Contract.TokenBalance(&_BalanceChecker.CallOpts, user, token)
   268  }
   269  
   270  // TokenBalance is a free data retrieval call binding the contract method 0x1049334f.
   271  //
   272  // Solidity: function tokenBalance(address user, address token) view returns(uint256)
   273  func (_BalanceChecker *BalanceCheckerCallerSession) TokenBalance(user common.Address, token common.Address) (*big.Int, error) {
   274  	return _BalanceChecker.Contract.TokenBalance(&_BalanceChecker.CallOpts, user, token)
   275  }