github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/underscorer.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  // UnderscorerMetaData contains all meta data concerning the Underscorer contract.
    28  var UnderscorerMetaData = bind.MetaData{
    29  	ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"LowerUpperCollision\",\"outputs\":[{\"name\":\"_res\",\"type\":\"int256\"},{\"name\":\"Res\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"_under_scored_func\",\"outputs\":[{\"name\":\"_int\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"UnderscoredOutput\",\"outputs\":[{\"name\":\"_int\",\"type\":\"int256\"},{\"name\":\"_string\",\"type\":\"string\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"PurelyUnderscoredOutput\",\"outputs\":[{\"name\":\"_\",\"type\":\"int256\"},{\"name\":\"res\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"UpperLowerCollision\",\"outputs\":[{\"name\":\"_Res\",\"type\":\"int256\"},{\"name\":\"res\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"AllPurelyUnderscoredOutput\",\"outputs\":[{\"name\":\"_\",\"type\":\"int256\"},{\"name\":\"__\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"UpperUpperCollision\",\"outputs\":[{\"name\":\"_Res\",\"type\":\"int256\"},{\"name\":\"Res\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"LowerLowerCollision\",\"outputs\":[{\"name\":\"_res\",\"type\":\"int256\"},{\"name\":\"res\",\"type\":\"int256\"}],\"payable\":false,\"stateMutability\":\"view\",\"type\":\"function\"}]",
    30  	ID:  "5873a90ab43c925dfced86ad53f871f01d",
    31  	Bin: "0x6060604052341561000f57600080fd5b6103858061001e6000396000f30060606040526004361061008e576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806303a592131461009357806346546dbe146100c357806367e6633d146100ec5780639df4848514610181578063af7486ab146101b1578063b564b34d146101e1578063e02ab24d14610211578063e409ca4514610241575b600080fd5b341561009e57600080fd5b6100a6610271565b604051808381526020018281526020019250505060405180910390f35b34156100ce57600080fd5b6100d6610286565b6040518082815260200191505060405180910390f35b34156100f757600080fd5b6100ff61028e565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561014557808201518184015260208101905061012a565b50505050905090810190601f1680156101725780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b341561018c57600080fd5b6101946102dc565b604051808381526020018281526020019250505060405180910390f35b34156101bc57600080fd5b6101c46102f1565b604051808381526020018281526020019250505060405180910390f35b34156101ec57600080fd5b6101f4610306565b604051808381526020018281526020019250505060405180910390f35b341561021c57600080fd5b61022461031b565b604051808381526020018281526020019250505060405180910390f35b341561024c57600080fd5b610254610330565b604051808381526020018281526020019250505060405180910390f35b60008060016002819150809050915091509091565b600080905090565b6000610298610345565b61013a8090506040805190810160405280600281526020017f7069000000000000000000000000000000000000000000000000000000000000815250915091509091565b60008060016002819150809050915091509091565b60008060016002819150809050915091509091565b60008060016002819150809050915091509091565b60008060016002819150809050915091509091565b60008060016002819150809050915091509091565b6020604051908101604052806000815250905600a165627a7a72305820d1a53d9de9d1e3d55cb3dc591900b63c4f1ded79114f7b79b332684840e186a40029",
    32  }
    33  
    34  // Underscorer is an auto generated Go binding around an Ethereum contract.
    35  type Underscorer struct {
    36  	abi abi.ABI
    37  }
    38  
    39  // NewUnderscorer creates a new instance of Underscorer.
    40  func NewUnderscorer() *Underscorer {
    41  	parsed, err := UnderscorerMetaData.ParseABI()
    42  	if err != nil {
    43  		panic(errors.New("invalid ABI: " + err.Error()))
    44  	}
    45  	return &Underscorer{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 *Underscorer) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract {
    51  	return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
    52  }
    53  
    54  // PackAllPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
    55  // the contract method with ID 0xb564b34d.  This method will panic if any
    56  // invalid/nil inputs are passed.
    57  //
    58  // Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
    59  func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte {
    60  	enc, err := underscorer.abi.Pack("AllPurelyUnderscoredOutput")
    61  	if err != nil {
    62  		panic(err)
    63  	}
    64  	return enc
    65  }
    66  
    67  // TryPackAllPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
    68  // the contract method with ID 0xb564b34d.  This method will return an error
    69  // if any inputs are invalid/nil.
    70  //
    71  // Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
    72  func (underscorer *Underscorer) TryPackAllPurelyUnderscoredOutput() ([]byte, error) {
    73  	return underscorer.abi.Pack("AllPurelyUnderscoredOutput")
    74  }
    75  
    76  // AllPurelyUnderscoredOutputOutput serves as a container for the return parameters of contract
    77  // method AllPurelyUnderscoredOutput.
    78  type AllPurelyUnderscoredOutputOutput struct {
    79  	Arg0 *big.Int
    80  	Arg1 *big.Int
    81  }
    82  
    83  // UnpackAllPurelyUnderscoredOutput is the Go binding that unpacks the parameters returned
    84  // from invoking the contract method with ID 0xb564b34d.
    85  //
    86  // Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
    87  func (underscorer *Underscorer) UnpackAllPurelyUnderscoredOutput(data []byte) (AllPurelyUnderscoredOutputOutput, error) {
    88  	out, err := underscorer.abi.Unpack("AllPurelyUnderscoredOutput", data)
    89  	outstruct := new(AllPurelyUnderscoredOutputOutput)
    90  	if err != nil {
    91  		return *outstruct, err
    92  	}
    93  	outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
    94  	outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
    95  	return *outstruct, nil
    96  }
    97  
    98  // PackLowerLowerCollision is the Go binding used to pack the parameters required for calling
    99  // the contract method with ID 0xe409ca45.  This method will panic if any
   100  // invalid/nil inputs are passed.
   101  //
   102  // Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
   103  func (underscorer *Underscorer) PackLowerLowerCollision() []byte {
   104  	enc, err := underscorer.abi.Pack("LowerLowerCollision")
   105  	if err != nil {
   106  		panic(err)
   107  	}
   108  	return enc
   109  }
   110  
   111  // TryPackLowerLowerCollision is the Go binding used to pack the parameters required for calling
   112  // the contract method with ID 0xe409ca45.  This method will return an error
   113  // if any inputs are invalid/nil.
   114  //
   115  // Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
   116  func (underscorer *Underscorer) TryPackLowerLowerCollision() ([]byte, error) {
   117  	return underscorer.abi.Pack("LowerLowerCollision")
   118  }
   119  
   120  // LowerLowerCollisionOutput serves as a container for the return parameters of contract
   121  // method LowerLowerCollision.
   122  type LowerLowerCollisionOutput struct {
   123  	Res  *big.Int
   124  	Res0 *big.Int
   125  }
   126  
   127  // UnpackLowerLowerCollision is the Go binding that unpacks the parameters returned
   128  // from invoking the contract method with ID 0xe409ca45.
   129  //
   130  // Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
   131  func (underscorer *Underscorer) UnpackLowerLowerCollision(data []byte) (LowerLowerCollisionOutput, error) {
   132  	out, err := underscorer.abi.Unpack("LowerLowerCollision", data)
   133  	outstruct := new(LowerLowerCollisionOutput)
   134  	if err != nil {
   135  		return *outstruct, err
   136  	}
   137  	outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   138  	outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
   139  	return *outstruct, nil
   140  }
   141  
   142  // PackLowerUpperCollision is the Go binding used to pack the parameters required for calling
   143  // the contract method with ID 0x03a59213.  This method will panic if any
   144  // invalid/nil inputs are passed.
   145  //
   146  // Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
   147  func (underscorer *Underscorer) PackLowerUpperCollision() []byte {
   148  	enc, err := underscorer.abi.Pack("LowerUpperCollision")
   149  	if err != nil {
   150  		panic(err)
   151  	}
   152  	return enc
   153  }
   154  
   155  // TryPackLowerUpperCollision is the Go binding used to pack the parameters required for calling
   156  // the contract method with ID 0x03a59213.  This method will return an error
   157  // if any inputs are invalid/nil.
   158  //
   159  // Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
   160  func (underscorer *Underscorer) TryPackLowerUpperCollision() ([]byte, error) {
   161  	return underscorer.abi.Pack("LowerUpperCollision")
   162  }
   163  
   164  // LowerUpperCollisionOutput serves as a container for the return parameters of contract
   165  // method LowerUpperCollision.
   166  type LowerUpperCollisionOutput struct {
   167  	Res  *big.Int
   168  	Res0 *big.Int
   169  }
   170  
   171  // UnpackLowerUpperCollision is the Go binding that unpacks the parameters returned
   172  // from invoking the contract method with ID 0x03a59213.
   173  //
   174  // Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
   175  func (underscorer *Underscorer) UnpackLowerUpperCollision(data []byte) (LowerUpperCollisionOutput, error) {
   176  	out, err := underscorer.abi.Unpack("LowerUpperCollision", data)
   177  	outstruct := new(LowerUpperCollisionOutput)
   178  	if err != nil {
   179  		return *outstruct, err
   180  	}
   181  	outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   182  	outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
   183  	return *outstruct, nil
   184  }
   185  
   186  // PackPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
   187  // the contract method with ID 0x9df48485.  This method will panic if any
   188  // invalid/nil inputs are passed.
   189  //
   190  // Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
   191  func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte {
   192  	enc, err := underscorer.abi.Pack("PurelyUnderscoredOutput")
   193  	if err != nil {
   194  		panic(err)
   195  	}
   196  	return enc
   197  }
   198  
   199  // TryPackPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
   200  // the contract method with ID 0x9df48485.  This method will return an error
   201  // if any inputs are invalid/nil.
   202  //
   203  // Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
   204  func (underscorer *Underscorer) TryPackPurelyUnderscoredOutput() ([]byte, error) {
   205  	return underscorer.abi.Pack("PurelyUnderscoredOutput")
   206  }
   207  
   208  // PurelyUnderscoredOutputOutput serves as a container for the return parameters of contract
   209  // method PurelyUnderscoredOutput.
   210  type PurelyUnderscoredOutputOutput struct {
   211  	Arg0 *big.Int
   212  	Res  *big.Int
   213  }
   214  
   215  // UnpackPurelyUnderscoredOutput is the Go binding that unpacks the parameters returned
   216  // from invoking the contract method with ID 0x9df48485.
   217  //
   218  // Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
   219  func (underscorer *Underscorer) UnpackPurelyUnderscoredOutput(data []byte) (PurelyUnderscoredOutputOutput, error) {
   220  	out, err := underscorer.abi.Unpack("PurelyUnderscoredOutput", data)
   221  	outstruct := new(PurelyUnderscoredOutputOutput)
   222  	if err != nil {
   223  		return *outstruct, err
   224  	}
   225  	outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   226  	outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
   227  	return *outstruct, nil
   228  }
   229  
   230  // PackUnderscoredOutput is the Go binding used to pack the parameters required for calling
   231  // the contract method with ID 0x67e6633d.  This method will panic if any
   232  // invalid/nil inputs are passed.
   233  //
   234  // Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
   235  func (underscorer *Underscorer) PackUnderscoredOutput() []byte {
   236  	enc, err := underscorer.abi.Pack("UnderscoredOutput")
   237  	if err != nil {
   238  		panic(err)
   239  	}
   240  	return enc
   241  }
   242  
   243  // TryPackUnderscoredOutput is the Go binding used to pack the parameters required for calling
   244  // the contract method with ID 0x67e6633d.  This method will return an error
   245  // if any inputs are invalid/nil.
   246  //
   247  // Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
   248  func (underscorer *Underscorer) TryPackUnderscoredOutput() ([]byte, error) {
   249  	return underscorer.abi.Pack("UnderscoredOutput")
   250  }
   251  
   252  // UnderscoredOutputOutput serves as a container for the return parameters of contract
   253  // method UnderscoredOutput.
   254  type UnderscoredOutputOutput struct {
   255  	Int    *big.Int
   256  	String string
   257  }
   258  
   259  // UnpackUnderscoredOutput is the Go binding that unpacks the parameters returned
   260  // from invoking the contract method with ID 0x67e6633d.
   261  //
   262  // Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
   263  func (underscorer *Underscorer) UnpackUnderscoredOutput(data []byte) (UnderscoredOutputOutput, error) {
   264  	out, err := underscorer.abi.Unpack("UnderscoredOutput", data)
   265  	outstruct := new(UnderscoredOutputOutput)
   266  	if err != nil {
   267  		return *outstruct, err
   268  	}
   269  	outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   270  	outstruct.String = *abi.ConvertType(out[1], new(string)).(*string)
   271  	return *outstruct, nil
   272  }
   273  
   274  // PackUpperLowerCollision is the Go binding used to pack the parameters required for calling
   275  // the contract method with ID 0xaf7486ab.  This method will panic if any
   276  // invalid/nil inputs are passed.
   277  //
   278  // Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
   279  func (underscorer *Underscorer) PackUpperLowerCollision() []byte {
   280  	enc, err := underscorer.abi.Pack("UpperLowerCollision")
   281  	if err != nil {
   282  		panic(err)
   283  	}
   284  	return enc
   285  }
   286  
   287  // TryPackUpperLowerCollision is the Go binding used to pack the parameters required for calling
   288  // the contract method with ID 0xaf7486ab.  This method will return an error
   289  // if any inputs are invalid/nil.
   290  //
   291  // Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
   292  func (underscorer *Underscorer) TryPackUpperLowerCollision() ([]byte, error) {
   293  	return underscorer.abi.Pack("UpperLowerCollision")
   294  }
   295  
   296  // UpperLowerCollisionOutput serves as a container for the return parameters of contract
   297  // method UpperLowerCollision.
   298  type UpperLowerCollisionOutput struct {
   299  	Res  *big.Int
   300  	Res0 *big.Int
   301  }
   302  
   303  // UnpackUpperLowerCollision is the Go binding that unpacks the parameters returned
   304  // from invoking the contract method with ID 0xaf7486ab.
   305  //
   306  // Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
   307  func (underscorer *Underscorer) UnpackUpperLowerCollision(data []byte) (UpperLowerCollisionOutput, error) {
   308  	out, err := underscorer.abi.Unpack("UpperLowerCollision", data)
   309  	outstruct := new(UpperLowerCollisionOutput)
   310  	if err != nil {
   311  		return *outstruct, err
   312  	}
   313  	outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   314  	outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
   315  	return *outstruct, nil
   316  }
   317  
   318  // PackUpperUpperCollision is the Go binding used to pack the parameters required for calling
   319  // the contract method with ID 0xe02ab24d.  This method will panic if any
   320  // invalid/nil inputs are passed.
   321  //
   322  // Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
   323  func (underscorer *Underscorer) PackUpperUpperCollision() []byte {
   324  	enc, err := underscorer.abi.Pack("UpperUpperCollision")
   325  	if err != nil {
   326  		panic(err)
   327  	}
   328  	return enc
   329  }
   330  
   331  // TryPackUpperUpperCollision is the Go binding used to pack the parameters required for calling
   332  // the contract method with ID 0xe02ab24d.  This method will return an error
   333  // if any inputs are invalid/nil.
   334  //
   335  // Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
   336  func (underscorer *Underscorer) TryPackUpperUpperCollision() ([]byte, error) {
   337  	return underscorer.abi.Pack("UpperUpperCollision")
   338  }
   339  
   340  // UpperUpperCollisionOutput serves as a container for the return parameters of contract
   341  // method UpperUpperCollision.
   342  type UpperUpperCollisionOutput struct {
   343  	Res  *big.Int
   344  	Res0 *big.Int
   345  }
   346  
   347  // UnpackUpperUpperCollision is the Go binding that unpacks the parameters returned
   348  // from invoking the contract method with ID 0xe02ab24d.
   349  //
   350  // Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
   351  func (underscorer *Underscorer) UnpackUpperUpperCollision(data []byte) (UpperUpperCollisionOutput, error) {
   352  	out, err := underscorer.abi.Unpack("UpperUpperCollision", data)
   353  	outstruct := new(UpperUpperCollisionOutput)
   354  	if err != nil {
   355  		return *outstruct, err
   356  	}
   357  	outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   358  	outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
   359  	return *outstruct, nil
   360  }
   361  
   362  // PackUnderScoredFunc is the Go binding used to pack the parameters required for calling
   363  // the contract method with ID 0x46546dbe.  This method will panic if any
   364  // invalid/nil inputs are passed.
   365  //
   366  // Solidity: function _under_scored_func() view returns(int256 _int)
   367  func (underscorer *Underscorer) PackUnderScoredFunc() []byte {
   368  	enc, err := underscorer.abi.Pack("_under_scored_func")
   369  	if err != nil {
   370  		panic(err)
   371  	}
   372  	return enc
   373  }
   374  
   375  // TryPackUnderScoredFunc is the Go binding used to pack the parameters required for calling
   376  // the contract method with ID 0x46546dbe.  This method will return an error
   377  // if any inputs are invalid/nil.
   378  //
   379  // Solidity: function _under_scored_func() view returns(int256 _int)
   380  func (underscorer *Underscorer) TryPackUnderScoredFunc() ([]byte, error) {
   381  	return underscorer.abi.Pack("_under_scored_func")
   382  }
   383  
   384  // UnpackUnderScoredFunc is the Go binding that unpacks the parameters returned
   385  // from invoking the contract method with ID 0x46546dbe.
   386  //
   387  // Solidity: function _under_scored_func() view returns(int256 _int)
   388  func (underscorer *Underscorer) UnpackUnderScoredFunc(data []byte) (*big.Int, error) {
   389  	out, err := underscorer.abi.Unpack("_under_scored_func", data)
   390  	if err != nil {
   391  		return new(big.Int), err
   392  	}
   393  	out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
   394  	return out0, nil
   395  }