github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/interactor.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  // InteractorMetaData contains all meta data concerning the Interactor contract.
    28  var InteractorMetaData = bind.MetaData{
    29  	ABI: "[{\"constant\":true,\"inputs\":[],\"name\":\"transactString\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"deployString\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"str\",\"type\":\"string\"}],\"name\":\"transact\",\"outputs\":[],\"type\":\"function\"},{\"inputs\":[{\"name\":\"str\",\"type\":\"string\"}],\"type\":\"constructor\"}]",
    30  	ID:  "f63980878028f3242c9033fdc30fd21a81",
    31  	Bin: "0x6060604052604051610328380380610328833981016040528051018060006000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10608d57805160ff19168380011785555b50607c9291505b8082111560ba57838155600101606b565b50505061026a806100be6000396000f35b828001600101855582156064579182015b828111156064578251826000505591602001919060010190609e565b509056606060405260e060020a60003504630d86a0e181146100315780636874e8091461008d578063d736c513146100ea575b005b610190600180546020600282841615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156102295780601f106101fe57610100808354040283529160200191610229565b61019060008054602060026001831615610100026000190190921691909104601f810182900490910260809081016040526060828152929190828280156102295780601f106101fe57610100808354040283529160200191610229565b60206004803580820135601f81018490049093026080908101604052606084815261002f946024939192918401918190838280828437509496505050505050508060016000509080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061023157805160ff19168380011785555b506102619291505b808211156102665760008155830161017d565b60405180806020018281038252838181518152602001915080519060200190808383829060006004602084601f0104600f02600301f150905090810190601f1680156101f05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b820191906000526020600020905b81548152906001019060200180831161020c57829003601f168201915b505050505081565b82800160010185558215610175579182015b82811115610175578251826000505591602001919060010190610243565b505050565b509056",
    32  }
    33  
    34  // Interactor is an auto generated Go binding around an Ethereum contract.
    35  type Interactor struct {
    36  	abi abi.ABI
    37  }
    38  
    39  // NewInteractor creates a new instance of Interactor.
    40  func NewInteractor() *Interactor {
    41  	parsed, err := InteractorMetaData.ParseABI()
    42  	if err != nil {
    43  		panic(errors.New("invalid ABI: " + err.Error()))
    44  	}
    45  	return &Interactor{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 *Interactor) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract {
    51  	return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
    52  }
    53  
    54  // PackConstructor is the Go binding used to pack the parameters required for
    55  // contract deployment.
    56  //
    57  // Solidity: constructor(string str) returns()
    58  func (interactor *Interactor) PackConstructor(str string) []byte {
    59  	enc, err := interactor.abi.Pack("", str)
    60  	if err != nil {
    61  		panic(err)
    62  	}
    63  	return enc
    64  }
    65  
    66  // PackDeployString is the Go binding used to pack the parameters required for calling
    67  // the contract method with ID 0x6874e809.  This method will panic if any
    68  // invalid/nil inputs are passed.
    69  //
    70  // Solidity: function deployString() returns(string)
    71  func (interactor *Interactor) PackDeployString() []byte {
    72  	enc, err := interactor.abi.Pack("deployString")
    73  	if err != nil {
    74  		panic(err)
    75  	}
    76  	return enc
    77  }
    78  
    79  // TryPackDeployString is the Go binding used to pack the parameters required for calling
    80  // the contract method with ID 0x6874e809.  This method will return an error
    81  // if any inputs are invalid/nil.
    82  //
    83  // Solidity: function deployString() returns(string)
    84  func (interactor *Interactor) TryPackDeployString() ([]byte, error) {
    85  	return interactor.abi.Pack("deployString")
    86  }
    87  
    88  // UnpackDeployString is the Go binding that unpacks the parameters returned
    89  // from invoking the contract method with ID 0x6874e809.
    90  //
    91  // Solidity: function deployString() returns(string)
    92  func (interactor *Interactor) UnpackDeployString(data []byte) (string, error) {
    93  	out, err := interactor.abi.Unpack("deployString", data)
    94  	if err != nil {
    95  		return *new(string), err
    96  	}
    97  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
    98  	return out0, nil
    99  }
   100  
   101  // PackTransact is the Go binding used to pack the parameters required for calling
   102  // the contract method with ID 0xd736c513.  This method will panic if any
   103  // invalid/nil inputs are passed.
   104  //
   105  // Solidity: function transact(string str) returns()
   106  func (interactor *Interactor) PackTransact(str string) []byte {
   107  	enc, err := interactor.abi.Pack("transact", str)
   108  	if err != nil {
   109  		panic(err)
   110  	}
   111  	return enc
   112  }
   113  
   114  // TryPackTransact is the Go binding used to pack the parameters required for calling
   115  // the contract method with ID 0xd736c513.  This method will return an error
   116  // if any inputs are invalid/nil.
   117  //
   118  // Solidity: function transact(string str) returns()
   119  func (interactor *Interactor) TryPackTransact(str string) ([]byte, error) {
   120  	return interactor.abi.Pack("transact", str)
   121  }
   122  
   123  // PackTransactString is the Go binding used to pack the parameters required for calling
   124  // the contract method with ID 0x0d86a0e1.  This method will panic if any
   125  // invalid/nil inputs are passed.
   126  //
   127  // Solidity: function transactString() returns(string)
   128  func (interactor *Interactor) PackTransactString() []byte {
   129  	enc, err := interactor.abi.Pack("transactString")
   130  	if err != nil {
   131  		panic(err)
   132  	}
   133  	return enc
   134  }
   135  
   136  // TryPackTransactString is the Go binding used to pack the parameters required for calling
   137  // the contract method with ID 0x0d86a0e1.  This method will return an error
   138  // if any inputs are invalid/nil.
   139  //
   140  // Solidity: function transactString() returns(string)
   141  func (interactor *Interactor) TryPackTransactString() ([]byte, error) {
   142  	return interactor.abi.Pack("transactString")
   143  }
   144  
   145  // UnpackTransactString is the Go binding that unpacks the parameters returned
   146  // from invoking the contract method with ID 0x0d86a0e1.
   147  //
   148  // Solidity: function transactString() returns(string)
   149  func (interactor *Interactor) UnpackTransactString(data []byte) (string, error) {
   150  	out, err := interactor.abi.Unpack("transactString", data)
   151  	if err != nil {
   152  		return *new(string), err
   153  	}
   154  	out0 := *abi.ConvertType(out[0], new(string)).(*string)
   155  	return out0, nil
   156  }