github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/numericmethodname.go.txt (about)

     1  // Code generated via abigen V2 - DO NOT EDIT.
     2  // This file is a generated binding and any manual changes will be lost.
     3  
     4  package bindtests
     5  
     6  import (
     7  	"bytes"
     8  	"errors"
     9  	"math/big"
    10  
    11  	"github.com/ethereum/go-ethereum/accounts/abi"
    12  	"github.com/ethereum/go-ethereum/accounts/abi/bind/v2"
    13  	"github.com/ethereum/go-ethereum/common"
    14  	"github.com/ethereum/go-ethereum/core/types"
    15  )
    16  
    17  // Reference imports to suppress errors if they are not otherwise used.
    18  var (
    19  	_ = bytes.Equal
    20  	_ = errors.New
    21  	_ = big.NewInt
    22  	_ = common.Big1
    23  	_ = types.BloomLookup
    24  	_ = abi.ConvertType
    25  )
    26  
    27  // NumericMethodNameMetaData contains all meta data concerning the NumericMethodName contract.
    28  var NumericMethodNameMetaData = bind.MetaData{
    29  	ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_param\",\"type\":\"address\"}],\"name\":\"_1TestEvent\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"_1test\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"__1test\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"__2test\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]",
    30  	ID:  "a691b347afbc44b90dd9a1dfbc65661904",
    31  	Bin: "0x6080604052348015600f57600080fd5b5060958061001e6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80639d993132146041578063d02767c7146049578063ffa02795146051575b600080fd5b60476059565b005b604f605b565b005b6057605d565b005b565b565b56fea26469706673582212200382ca602dff96a7e2ba54657985e2b4ac423a56abe4a1f0667bc635c4d4371f64736f6c63430008110033",
    32  }
    33  
    34  // NumericMethodName is an auto generated Go binding around an Ethereum contract.
    35  type NumericMethodName struct {
    36  	abi abi.ABI
    37  }
    38  
    39  // NewNumericMethodName creates a new instance of NumericMethodName.
    40  func NewNumericMethodName() *NumericMethodName {
    41  	parsed, err := NumericMethodNameMetaData.ParseABI()
    42  	if err != nil {
    43  		panic(errors.New("invalid ABI: " + err.Error()))
    44  	}
    45  	return &NumericMethodName{abi: *parsed}
    46  }
    47  
    48  // Instance creates a wrapper for a deployed contract instance at the given address.
    49  // Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc.
    50  func (c *NumericMethodName) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract {
    51  	return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
    52  }
    53  
    54  // PackE1test is the Go binding used to pack the parameters required for calling
    55  // the contract method with ID 0xffa02795.  This method will panic if any
    56  // invalid/nil inputs are passed.
    57  //
    58  // Solidity: function _1test() pure returns()
    59  func (numericMethodName *NumericMethodName) PackE1test() []byte {
    60  	enc, err := numericMethodName.abi.Pack("_1test")
    61  	if err != nil {
    62  		panic(err)
    63  	}
    64  	return enc
    65  }
    66  
    67  // TryPackE1test is the Go binding used to pack the parameters required for calling
    68  // the contract method with ID 0xffa02795.  This method will return an error
    69  // if any inputs are invalid/nil.
    70  //
    71  // Solidity: function _1test() pure returns()
    72  func (numericMethodName *NumericMethodName) TryPackE1test() ([]byte, error) {
    73  	return numericMethodName.abi.Pack("_1test")
    74  }
    75  
    76  // PackE1test0 is the Go binding used to pack the parameters required for calling
    77  // the contract method with ID 0xd02767c7.  This method will panic if any
    78  // invalid/nil inputs are passed.
    79  //
    80  // Solidity: function __1test() pure returns()
    81  func (numericMethodName *NumericMethodName) PackE1test0() []byte {
    82  	enc, err := numericMethodName.abi.Pack("__1test")
    83  	if err != nil {
    84  		panic(err)
    85  	}
    86  	return enc
    87  }
    88  
    89  // TryPackE1test0 is the Go binding used to pack the parameters required for calling
    90  // the contract method with ID 0xd02767c7.  This method will return an error
    91  // if any inputs are invalid/nil.
    92  //
    93  // Solidity: function __1test() pure returns()
    94  func (numericMethodName *NumericMethodName) TryPackE1test0() ([]byte, error) {
    95  	return numericMethodName.abi.Pack("__1test")
    96  }
    97  
    98  // PackE2test is the Go binding used to pack the parameters required for calling
    99  // the contract method with ID 0x9d993132.  This method will panic if any
   100  // invalid/nil inputs are passed.
   101  //
   102  // Solidity: function __2test() pure returns()
   103  func (numericMethodName *NumericMethodName) PackE2test() []byte {
   104  	enc, err := numericMethodName.abi.Pack("__2test")
   105  	if err != nil {
   106  		panic(err)
   107  	}
   108  	return enc
   109  }
   110  
   111  // TryPackE2test is the Go binding used to pack the parameters required for calling
   112  // the contract method with ID 0x9d993132.  This method will return an error
   113  // if any inputs are invalid/nil.
   114  //
   115  // Solidity: function __2test() pure returns()
   116  func (numericMethodName *NumericMethodName) TryPackE2test() ([]byte, error) {
   117  	return numericMethodName.abi.Pack("__2test")
   118  }
   119  
   120  // NumericMethodNameE1TestEvent represents a _1TestEvent event raised by the NumericMethodName contract.
   121  type NumericMethodNameE1TestEvent struct {
   122  	Param common.Address
   123  	Raw   *types.Log // Blockchain specific contextual infos
   124  }
   125  
   126  const NumericMethodNameE1TestEventEventName = "_1TestEvent"
   127  
   128  // ContractEventName returns the user-defined event name.
   129  func (NumericMethodNameE1TestEvent) ContractEventName() string {
   130  	return NumericMethodNameE1TestEventEventName
   131  }
   132  
   133  // UnpackE1TestEventEvent is the Go binding that unpacks the event data emitted
   134  // by contract.
   135  //
   136  // Solidity: event _1TestEvent(address _param)
   137  func (numericMethodName *NumericMethodName) UnpackE1TestEventEvent(log *types.Log) (*NumericMethodNameE1TestEvent, error) {
   138  	event := "_1TestEvent"
   139  	if log.Topics[0] != numericMethodName.abi.Events[event].ID {
   140  		return nil, errors.New("event signature mismatch")
   141  	}
   142  	out := new(NumericMethodNameE1TestEvent)
   143  	if len(log.Data) > 0 {
   144  		if err := numericMethodName.abi.UnpackIntoInterface(out, event, log.Data); err != nil {
   145  			return nil, err
   146  		}
   147  	}
   148  	var indexed abi.Arguments
   149  	for _, arg := range numericMethodName.abi.Events[event].Inputs {
   150  		if arg.Indexed {
   151  			indexed = append(indexed, arg)
   152  		}
   153  	}
   154  	if err := abi.ParseTopics(out, indexed, log.Topics[1:]); err != nil {
   155  		return nil, err
   156  	}
   157  	out.Raw = log
   158  	return out, nil
   159  }