github.com/0xPolygon/supernets2-node@v0.0.0-20230711153321-2fe574524eaa/test/contracts/bin/Interaction/Interaction.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 Interaction
     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  // InteractionMetaData contains all meta data concerning the Interaction contract.
    33  var InteractionMetaData = &bind.MetaData{
    34  	ABI: "[{\"inputs\":[],\"name\":\"getCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_counter\",\"type\":\"address\"}],\"name\":\"setCounterAddr\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]",
    35  	Bin: "0x608060405234801561001057600080fd5b50610183806100206000396000f3fe6080604052600436106100295760003560e01c8063a87d942c1461002e578063ec39b42914610055575b600080fd5b34801561003a57600080fd5b50610043610087565b60405190815260200160405180910390f35b610085610063366004610104565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b005b60008060009054906101000a90046001600160a01b03166001600160a01b03166306661abd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156100db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906100ff9190610134565b905090565b60006020828403121561011657600080fd5b81356001600160a01b038116811461012d57600080fd5b9392505050565b60006020828403121561014657600080fd5b505191905056fea264697066735822122058d432243ff91dfaa2dc1ed0a7a18603bef86a1c9a5fb323673b24e70a6d472664736f6c634300080c0033",
    36  }
    37  
    38  // InteractionABI is the input ABI used to generate the binding from.
    39  // Deprecated: Use InteractionMetaData.ABI instead.
    40  var InteractionABI = InteractionMetaData.ABI
    41  
    42  // InteractionBin is the compiled bytecode used for deploying new contracts.
    43  // Deprecated: Use InteractionMetaData.Bin instead.
    44  var InteractionBin = InteractionMetaData.Bin
    45  
    46  // DeployInteraction deploys a new Ethereum contract, binding an instance of Interaction to it.
    47  func DeployInteraction(auth *bind.TransactOpts, backend bind.ContractBackend) (common.Address, *types.Transaction, *Interaction, error) {
    48  	parsed, err := InteractionMetaData.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(InteractionBin), backend)
    57  	if err != nil {
    58  		return common.Address{}, nil, nil, err
    59  	}
    60  	return address, tx, &Interaction{InteractionCaller: InteractionCaller{contract: contract}, InteractionTransactor: InteractionTransactor{contract: contract}, InteractionFilterer: InteractionFilterer{contract: contract}}, nil
    61  }
    62  
    63  // Interaction is an auto generated Go binding around an Ethereum contract.
    64  type Interaction struct {
    65  	InteractionCaller     // Read-only binding to the contract
    66  	InteractionTransactor // Write-only binding to the contract
    67  	InteractionFilterer   // Log filterer for contract events
    68  }
    69  
    70  // InteractionCaller is an auto generated read-only Go binding around an Ethereum contract.
    71  type InteractionCaller struct {
    72  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    73  }
    74  
    75  // InteractionTransactor is an auto generated write-only Go binding around an Ethereum contract.
    76  type InteractionTransactor struct {
    77  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    78  }
    79  
    80  // InteractionFilterer is an auto generated log filtering Go binding around an Ethereum contract events.
    81  type InteractionFilterer struct {
    82  	contract *bind.BoundContract // Generic contract wrapper for the low level calls
    83  }
    84  
    85  // InteractionSession is an auto generated Go binding around an Ethereum contract,
    86  // with pre-set call and transact options.
    87  type InteractionSession struct {
    88  	Contract     *Interaction      // 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  // InteractionCallerSession is an auto generated read-only Go binding around an Ethereum contract,
    94  // with pre-set call options.
    95  type InteractionCallerSession struct {
    96  	Contract *InteractionCaller // Generic contract caller binding to set the session for
    97  	CallOpts bind.CallOpts      // Call options to use throughout this session
    98  }
    99  
   100  // InteractionTransactorSession is an auto generated write-only Go binding around an Ethereum contract,
   101  // with pre-set transact options.
   102  type InteractionTransactorSession struct {
   103  	Contract     *InteractionTransactor // Generic contract transactor binding to set the session for
   104  	TransactOpts bind.TransactOpts      // Transaction auth options to use throughout this session
   105  }
   106  
   107  // InteractionRaw is an auto generated low-level Go binding around an Ethereum contract.
   108  type InteractionRaw struct {
   109  	Contract *Interaction // Generic contract binding to access the raw methods on
   110  }
   111  
   112  // InteractionCallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract.
   113  type InteractionCallerRaw struct {
   114  	Contract *InteractionCaller // Generic read-only contract binding to access the raw methods on
   115  }
   116  
   117  // InteractionTransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract.
   118  type InteractionTransactorRaw struct {
   119  	Contract *InteractionTransactor // Generic write-only contract binding to access the raw methods on
   120  }
   121  
   122  // NewInteraction creates a new instance of Interaction, bound to a specific deployed contract.
   123  func NewInteraction(address common.Address, backend bind.ContractBackend) (*Interaction, error) {
   124  	contract, err := bindInteraction(address, backend, backend, backend)
   125  	if err != nil {
   126  		return nil, err
   127  	}
   128  	return &Interaction{InteractionCaller: InteractionCaller{contract: contract}, InteractionTransactor: InteractionTransactor{contract: contract}, InteractionFilterer: InteractionFilterer{contract: contract}}, nil
   129  }
   130  
   131  // NewInteractionCaller creates a new read-only instance of Interaction, bound to a specific deployed contract.
   132  func NewInteractionCaller(address common.Address, caller bind.ContractCaller) (*InteractionCaller, error) {
   133  	contract, err := bindInteraction(address, caller, nil, nil)
   134  	if err != nil {
   135  		return nil, err
   136  	}
   137  	return &InteractionCaller{contract: contract}, nil
   138  }
   139  
   140  // NewInteractionTransactor creates a new write-only instance of Interaction, bound to a specific deployed contract.
   141  func NewInteractionTransactor(address common.Address, transactor bind.ContractTransactor) (*InteractionTransactor, error) {
   142  	contract, err := bindInteraction(address, nil, transactor, nil)
   143  	if err != nil {
   144  		return nil, err
   145  	}
   146  	return &InteractionTransactor{contract: contract}, nil
   147  }
   148  
   149  // NewInteractionFilterer creates a new log filterer instance of Interaction, bound to a specific deployed contract.
   150  func NewInteractionFilterer(address common.Address, filterer bind.ContractFilterer) (*InteractionFilterer, error) {
   151  	contract, err := bindInteraction(address, nil, nil, filterer)
   152  	if err != nil {
   153  		return nil, err
   154  	}
   155  	return &InteractionFilterer{contract: contract}, nil
   156  }
   157  
   158  // bindInteraction binds a generic wrapper to an already deployed contract.
   159  func bindInteraction(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) {
   160  	parsed, err := InteractionMetaData.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 (_Interaction *InteractionRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   172  	return _Interaction.Contract.InteractionCaller.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 (_Interaction *InteractionRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   178  	return _Interaction.Contract.InteractionTransactor.contract.Transfer(opts)
   179  }
   180  
   181  // Transact invokes the (paid) contract method with params as input values.
   182  func (_Interaction *InteractionRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   183  	return _Interaction.Contract.InteractionTransactor.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 (_Interaction *InteractionCallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error {
   191  	return _Interaction.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 (_Interaction *InteractionTransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) {
   197  	return _Interaction.Contract.contract.Transfer(opts)
   198  }
   199  
   200  // Transact invokes the (paid) contract method with params as input values.
   201  func (_Interaction *InteractionTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
   202  	return _Interaction.Contract.contract.Transact(opts, method, params...)
   203  }
   204  
   205  // GetCount is a free data retrieval call binding the contract method 0xa87d942c.
   206  //
   207  // Solidity: function getCount() view returns(uint256)
   208  func (_Interaction *InteractionCaller) GetCount(opts *bind.CallOpts) (*big.Int, error) {
   209  	var out []interface{}
   210  	err := _Interaction.contract.Call(opts, &out, "getCount")
   211  
   212  	if err != nil {
   213  		return *new(*big.Int), err
   214  	}
   215  
   216  	out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int)
   217  
   218  	return out0, err
   219  
   220  }
   221  
   222  // GetCount is a free data retrieval call binding the contract method 0xa87d942c.
   223  //
   224  // Solidity: function getCount() view returns(uint256)
   225  func (_Interaction *InteractionSession) GetCount() (*big.Int, error) {
   226  	return _Interaction.Contract.GetCount(&_Interaction.CallOpts)
   227  }
   228  
   229  // GetCount is a free data retrieval call binding the contract method 0xa87d942c.
   230  //
   231  // Solidity: function getCount() view returns(uint256)
   232  func (_Interaction *InteractionCallerSession) GetCount() (*big.Int, error) {
   233  	return _Interaction.Contract.GetCount(&_Interaction.CallOpts)
   234  }
   235  
   236  // SetCounterAddr is a paid mutator transaction binding the contract method 0xec39b429.
   237  //
   238  // Solidity: function setCounterAddr(address _counter) payable returns()
   239  func (_Interaction *InteractionTransactor) SetCounterAddr(opts *bind.TransactOpts, _counter common.Address) (*types.Transaction, error) {
   240  	return _Interaction.contract.Transact(opts, "setCounterAddr", _counter)
   241  }
   242  
   243  // SetCounterAddr is a paid mutator transaction binding the contract method 0xec39b429.
   244  //
   245  // Solidity: function setCounterAddr(address _counter) payable returns()
   246  func (_Interaction *InteractionSession) SetCounterAddr(_counter common.Address) (*types.Transaction, error) {
   247  	return _Interaction.Contract.SetCounterAddr(&_Interaction.TransactOpts, _counter)
   248  }
   249  
   250  // SetCounterAddr is a paid mutator transaction binding the contract method 0xec39b429.
   251  //
   252  // Solidity: function setCounterAddr(address _counter) payable returns()
   253  func (_Interaction *InteractionTransactorSession) SetCounterAddr(_counter common.Address) (*types.Transaction, error) {
   254  	return _Interaction.Contract.SetCounterAddr(&_Interaction.TransactOpts, _counter)
   255  }