github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/outputchecker.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  // OutputCheckerMetaData contains all meta data concerning the OutputChecker contract.
    28  var OutputCheckerMetaData = bind.MetaData{
    29  	ABI: "[{\"type\":\"function\",\"name\":\"noOutput\",\"constant\":true,\"inputs\":[],\"outputs\":[]},{\"type\":\"function\",\"name\":\"namedOutput\",\"constant\":true,\"inputs\":[],\"outputs\":[{\"name\":\"str\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"anonOutput\",\"constant\":true,\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"namedOutputs\",\"constant\":true,\"inputs\":[],\"outputs\":[{\"name\":\"str1\",\"type\":\"string\"},{\"name\":\"str2\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"collidingOutputs\",\"constant\":true,\"inputs\":[],\"outputs\":[{\"name\":\"str\",\"type\":\"string\"},{\"name\":\"Str\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"anonOutputs\",\"constant\":true,\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"\",\"type\":\"string\"}]},{\"type\":\"function\",\"name\":\"mixedOutputs\",\"constant\":true,\"inputs\":[],\"outputs\":[{\"name\":\"\",\"type\":\"string\"},{\"name\":\"str\",\"type\":\"string\"}]}]",
    30  	ID:  "cc1d4e235801a590b506d5130b0cca90a1",
    31  }
    32  
    33  // OutputChecker is an auto generated Go binding around an Ethereum contract.
    34  type OutputChecker struct {
    35  	abi abi.ABI
    36  }
    37  
    38  // NewOutputChecker creates a new instance of OutputChecker.
    39  func NewOutputChecker() *OutputChecker {
    40  	parsed, err := OutputCheckerMetaData.ParseABI()
    41  	if err != nil {
    42  		panic(errors.New("invalid ABI: " + err.Error()))
    43  	}
    44  	return &OutputChecker{abi: *parsed}
    45  }
    46  
    47  // Instance creates a wrapper for a deployed contract instance at the given address.
    48  // Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc.
    49  func (c *OutputChecker) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract {
    50  	return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
    51  }
    52  
    53  // PackAnonOutput is the Go binding used to pack the parameters required for calling
    54  // the contract method with ID 0x008bda05.  This method will panic if any
    55  // invalid/nil inputs are passed.
    56  //
    57  // Solidity: function anonOutput() returns(string)
    58  func (outputChecker *OutputChecker) PackAnonOutput() []byte {
    59  	enc, err := outputChecker.abi.Pack("anonOutput")
    60  	if err != nil {
    61  		panic(err)
    62  	}
    63  	return enc
    64  }
    65  
    66  // TryPackAnonOutput is the Go binding used to pack the parameters required for calling
    67  // the contract method with ID 0x008bda05.  This method will return an error
    68  // if any inputs are invalid/nil.
    69  //
    70  // Solidity: function anonOutput() returns(string)
    71  func (outputChecker *OutputChecker) TryPackAnonOutput() ([]byte, error) {
    72  	return outputChecker.abi.Pack("anonOutput")
    73  }
    74  
    75  // UnpackAnonOutput is the Go binding that unpacks the parameters returned
    76  // from invoking the contract method with ID 0x008bda05.
    77  //
    78  // Solidity: function anonOutput() returns(string)
    79  func (outputChecker *OutputChecker) UnpackAnonOutput(data []byte) (string, error) {
    80  	out, err := outputChecker.abi.Unpack("anonOutput", data)
    81  	if err != nil {
    82  		return *new(string), err
    83  	}
    84  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
    85  	return out0, nil
    86  }
    87  
    88  // PackAnonOutputs is the Go binding used to pack the parameters required for calling
    89  // the contract method with ID 0x3c401115.  This method will panic if any
    90  // invalid/nil inputs are passed.
    91  //
    92  // Solidity: function anonOutputs() returns(string, string)
    93  func (outputChecker *OutputChecker) PackAnonOutputs() []byte {
    94  	enc, err := outputChecker.abi.Pack("anonOutputs")
    95  	if err != nil {
    96  		panic(err)
    97  	}
    98  	return enc
    99  }
   100  
   101  // TryPackAnonOutputs is the Go binding used to pack the parameters required for calling
   102  // the contract method with ID 0x3c401115.  This method will return an error
   103  // if any inputs are invalid/nil.
   104  //
   105  // Solidity: function anonOutputs() returns(string, string)
   106  func (outputChecker *OutputChecker) TryPackAnonOutputs() ([]byte, error) {
   107  	return outputChecker.abi.Pack("anonOutputs")
   108  }
   109  
   110  // AnonOutputsOutput serves as a container for the return parameters of contract
   111  // method AnonOutputs.
   112  type AnonOutputsOutput struct {
   113  	Arg0 string
   114  	Arg1 string
   115  }
   116  
   117  // UnpackAnonOutputs is the Go binding that unpacks the parameters returned
   118  // from invoking the contract method with ID 0x3c401115.
   119  //
   120  // Solidity: function anonOutputs() returns(string, string)
   121  func (outputChecker *OutputChecker) UnpackAnonOutputs(data []byte) (AnonOutputsOutput, error) {
   122  	out, err := outputChecker.abi.Unpack("anonOutputs", data)
   123  	outstruct := new(AnonOutputsOutput)
   124  	if err != nil {
   125  		return *outstruct, err
   126  	}
   127  	outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
   128  	outstruct.Arg1 = *abi.ConvertType(out[1], new(string)).(*string)
   129  	return *outstruct, nil
   130  }
   131  
   132  // PackCollidingOutputs is the Go binding used to pack the parameters required for calling
   133  // the contract method with ID 0xeccbc1ee.  This method will panic if any
   134  // invalid/nil inputs are passed.
   135  //
   136  // Solidity: function collidingOutputs() returns(string str, string Str)
   137  func (outputChecker *OutputChecker) PackCollidingOutputs() []byte {
   138  	enc, err := outputChecker.abi.Pack("collidingOutputs")
   139  	if err != nil {
   140  		panic(err)
   141  	}
   142  	return enc
   143  }
   144  
   145  // TryPackCollidingOutputs is the Go binding used to pack the parameters required for calling
   146  // the contract method with ID 0xeccbc1ee.  This method will return an error
   147  // if any inputs are invalid/nil.
   148  //
   149  // Solidity: function collidingOutputs() returns(string str, string Str)
   150  func (outputChecker *OutputChecker) TryPackCollidingOutputs() ([]byte, error) {
   151  	return outputChecker.abi.Pack("collidingOutputs")
   152  }
   153  
   154  // CollidingOutputsOutput serves as a container for the return parameters of contract
   155  // method CollidingOutputs.
   156  type CollidingOutputsOutput struct {
   157  	Str  string
   158  	Str0 string
   159  }
   160  
   161  // UnpackCollidingOutputs is the Go binding that unpacks the parameters returned
   162  // from invoking the contract method with ID 0xeccbc1ee.
   163  //
   164  // Solidity: function collidingOutputs() returns(string str, string Str)
   165  func (outputChecker *OutputChecker) UnpackCollidingOutputs(data []byte) (CollidingOutputsOutput, error) {
   166  	out, err := outputChecker.abi.Unpack("collidingOutputs", data)
   167  	outstruct := new(CollidingOutputsOutput)
   168  	if err != nil {
   169  		return *outstruct, err
   170  	}
   171  	outstruct.Str = *abi.ConvertType(out[0], new(string)).(*string)
   172  	outstruct.Str0 = *abi.ConvertType(out[1], new(string)).(*string)
   173  	return *outstruct, nil
   174  }
   175  
   176  // PackMixedOutputs is the Go binding used to pack the parameters required for calling
   177  // the contract method with ID 0x21b77b44.  This method will panic if any
   178  // invalid/nil inputs are passed.
   179  //
   180  // Solidity: function mixedOutputs() returns(string, string str)
   181  func (outputChecker *OutputChecker) PackMixedOutputs() []byte {
   182  	enc, err := outputChecker.abi.Pack("mixedOutputs")
   183  	if err != nil {
   184  		panic(err)
   185  	}
   186  	return enc
   187  }
   188  
   189  // TryPackMixedOutputs is the Go binding used to pack the parameters required for calling
   190  // the contract method with ID 0x21b77b44.  This method will return an error
   191  // if any inputs are invalid/nil.
   192  //
   193  // Solidity: function mixedOutputs() returns(string, string str)
   194  func (outputChecker *OutputChecker) TryPackMixedOutputs() ([]byte, error) {
   195  	return outputChecker.abi.Pack("mixedOutputs")
   196  }
   197  
   198  // MixedOutputsOutput serves as a container for the return parameters of contract
   199  // method MixedOutputs.
   200  type MixedOutputsOutput struct {
   201  	Arg0 string
   202  	Str  string
   203  }
   204  
   205  // UnpackMixedOutputs is the Go binding that unpacks the parameters returned
   206  // from invoking the contract method with ID 0x21b77b44.
   207  //
   208  // Solidity: function mixedOutputs() returns(string, string str)
   209  func (outputChecker *OutputChecker) UnpackMixedOutputs(data []byte) (MixedOutputsOutput, error) {
   210  	out, err := outputChecker.abi.Unpack("mixedOutputs", data)
   211  	outstruct := new(MixedOutputsOutput)
   212  	if err != nil {
   213  		return *outstruct, err
   214  	}
   215  	outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
   216  	outstruct.Str = *abi.ConvertType(out[1], new(string)).(*string)
   217  	return *outstruct, nil
   218  }
   219  
   220  // PackNamedOutput is the Go binding used to pack the parameters required for calling
   221  // the contract method with ID 0x5e632bd5.  This method will panic if any
   222  // invalid/nil inputs are passed.
   223  //
   224  // Solidity: function namedOutput() returns(string str)
   225  func (outputChecker *OutputChecker) PackNamedOutput() []byte {
   226  	enc, err := outputChecker.abi.Pack("namedOutput")
   227  	if err != nil {
   228  		panic(err)
   229  	}
   230  	return enc
   231  }
   232  
   233  // TryPackNamedOutput is the Go binding used to pack the parameters required for calling
   234  // the contract method with ID 0x5e632bd5.  This method will return an error
   235  // if any inputs are invalid/nil.
   236  //
   237  // Solidity: function namedOutput() returns(string str)
   238  func (outputChecker *OutputChecker) TryPackNamedOutput() ([]byte, error) {
   239  	return outputChecker.abi.Pack("namedOutput")
   240  }
   241  
   242  // UnpackNamedOutput is the Go binding that unpacks the parameters returned
   243  // from invoking the contract method with ID 0x5e632bd5.
   244  //
   245  // Solidity: function namedOutput() returns(string str)
   246  func (outputChecker *OutputChecker) UnpackNamedOutput(data []byte) (string, error) {
   247  	out, err := outputChecker.abi.Unpack("namedOutput", data)
   248  	if err != nil {
   249  		return *new(string), err
   250  	}
   251  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
   252  	return out0, nil
   253  }
   254  
   255  // PackNamedOutputs is the Go binding used to pack the parameters required for calling
   256  // the contract method with ID 0x7970a189.  This method will panic if any
   257  // invalid/nil inputs are passed.
   258  //
   259  // Solidity: function namedOutputs() returns(string str1, string str2)
   260  func (outputChecker *OutputChecker) PackNamedOutputs() []byte {
   261  	enc, err := outputChecker.abi.Pack("namedOutputs")
   262  	if err != nil {
   263  		panic(err)
   264  	}
   265  	return enc
   266  }
   267  
   268  // TryPackNamedOutputs is the Go binding used to pack the parameters required for calling
   269  // the contract method with ID 0x7970a189.  This method will return an error
   270  // if any inputs are invalid/nil.
   271  //
   272  // Solidity: function namedOutputs() returns(string str1, string str2)
   273  func (outputChecker *OutputChecker) TryPackNamedOutputs() ([]byte, error) {
   274  	return outputChecker.abi.Pack("namedOutputs")
   275  }
   276  
   277  // NamedOutputsOutput serves as a container for the return parameters of contract
   278  // method NamedOutputs.
   279  type NamedOutputsOutput struct {
   280  	Str1 string
   281  	Str2 string
   282  }
   283  
   284  // UnpackNamedOutputs is the Go binding that unpacks the parameters returned
   285  // from invoking the contract method with ID 0x7970a189.
   286  //
   287  // Solidity: function namedOutputs() returns(string str1, string str2)
   288  func (outputChecker *OutputChecker) UnpackNamedOutputs(data []byte) (NamedOutputsOutput, error) {
   289  	out, err := outputChecker.abi.Unpack("namedOutputs", data)
   290  	outstruct := new(NamedOutputsOutput)
   291  	if err != nil {
   292  		return *outstruct, err
   293  	}
   294  	outstruct.Str1 = *abi.ConvertType(out[0], new(string)).(*string)
   295  	outstruct.Str2 = *abi.ConvertType(out[1], new(string)).(*string)
   296  	return *outstruct, nil
   297  }
   298  
   299  // PackNoOutput is the Go binding used to pack the parameters required for calling
   300  // the contract method with ID 0x625f0306.  This method will panic if any
   301  // invalid/nil inputs are passed.
   302  //
   303  // Solidity: function noOutput() returns()
   304  func (outputChecker *OutputChecker) PackNoOutput() []byte {
   305  	enc, err := outputChecker.abi.Pack("noOutput")
   306  	if err != nil {
   307  		panic(err)
   308  	}
   309  	return enc
   310  }
   311  
   312  // TryPackNoOutput is the Go binding used to pack the parameters required for calling
   313  // the contract method with ID 0x625f0306.  This method will return an error
   314  // if any inputs are invalid/nil.
   315  //
   316  // Solidity: function noOutput() returns()
   317  func (outputChecker *OutputChecker) TryPackNoOutput() ([]byte, error) {
   318  	return outputChecker.abi.Pack("noOutput")
   319  }