github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/structs.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 // Struct0 is an auto generated low-level Go binding around an user-defined struct. 28 type Struct0 struct { 29 B [32]byte 30 } 31 32 // StructsMetaData contains all meta data concerning the Structs contract. 33 var StructsMetaData = bind.MetaData{ 34 ABI: "[{\"inputs\":[],\"name\":\"F\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"B\",\"type\":\"bytes32\"}],\"internalType\":\"structStructs.A[]\",\"name\":\"a\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"c\",\"type\":\"uint256[]\"},{\"internalType\":\"bool[]\",\"name\":\"d\",\"type\":\"bool[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"G\",\"outputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"B\",\"type\":\"bytes32\"}],\"internalType\":\"structStructs.A[]\",\"name\":\"a\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]", 35 ID: "920a35318e7581766aec7a17218628a91d", 36 Bin: "0x608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806328811f591461003b5780636fecb6231461005b575b600080fd5b610043610070565b604051610052939291906101a0565b60405180910390f35b6100636100d6565b6040516100529190610186565b604080516002808252606082810190935282918291829190816020015b610095610131565b81526020019060019003908161008d575050805190915061026960611b9082906000906100be57fe5b60209081029190910101515293606093508392509050565b6040805160028082526060828101909352829190816020015b6100f7610131565b8152602001906001900390816100ef575050805190915061026960611b90829060009061012057fe5b602090810291909101015152905090565b60408051602081019091526000815290565b815260200190565b6000815180845260208085019450808401835b8381101561017b578151518752958201959082019060010161015e565b509495945050505050565b600060208252610199602083018461014b565b9392505050565b6000606082526101b3606083018661014b565b6020838203818501528186516101c98185610239565b91508288019350845b818110156101f3576101e5838651610143565b9484019492506001016101d2565b505084810360408601528551808252908201925081860190845b8181101561022b57825115158552938301939183019160010161020d565b509298975050505050505050565b9081526020019056fea2646970667358221220eb85327e285def14230424c52893aebecec1e387a50bb6b75fc4fdbed647f45f64736f6c63430006050033", 37 } 38 39 // Structs is an auto generated Go binding around an Ethereum contract. 40 type Structs struct { 41 abi abi.ABI 42 } 43 44 // NewStructs creates a new instance of Structs. 45 func NewStructs() *Structs { 46 parsed, err := StructsMetaData.ParseABI() 47 if err != nil { 48 panic(errors.New("invalid ABI: " + err.Error())) 49 } 50 return &Structs{abi: *parsed} 51 } 52 53 // Instance creates a wrapper for a deployed contract instance at the given address. 54 // Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc. 55 func (c *Structs) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { 56 return bind.NewBoundContract(addr, c.abi, backend, backend, backend) 57 } 58 59 // PackF is the Go binding used to pack the parameters required for calling 60 // the contract method with ID 0x28811f59. This method will panic if any 61 // invalid/nil inputs are passed. 62 // 63 // Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d) 64 func (structs *Structs) PackF() []byte { 65 enc, err := structs.abi.Pack("F") 66 if err != nil { 67 panic(err) 68 } 69 return enc 70 } 71 72 // TryPackF is the Go binding used to pack the parameters required for calling 73 // the contract method with ID 0x28811f59. This method will return an error 74 // if any inputs are invalid/nil. 75 // 76 // Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d) 77 func (structs *Structs) TryPackF() ([]byte, error) { 78 return structs.abi.Pack("F") 79 } 80 81 // FOutput serves as a container for the return parameters of contract 82 // method F. 83 type FOutput struct { 84 A []Struct0 85 C []*big.Int 86 D []bool 87 } 88 89 // UnpackF is the Go binding that unpacks the parameters returned 90 // from invoking the contract method with ID 0x28811f59. 91 // 92 // Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d) 93 func (structs *Structs) UnpackF(data []byte) (FOutput, error) { 94 out, err := structs.abi.Unpack("F", data) 95 outstruct := new(FOutput) 96 if err != nil { 97 return *outstruct, err 98 } 99 outstruct.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0) 100 outstruct.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int) 101 outstruct.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool) 102 return *outstruct, nil 103 } 104 105 // PackG is the Go binding used to pack the parameters required for calling 106 // the contract method with ID 0x6fecb623. This method will panic if any 107 // invalid/nil inputs are passed. 108 // 109 // Solidity: function G() view returns((bytes32)[] a) 110 func (structs *Structs) PackG() []byte { 111 enc, err := structs.abi.Pack("G") 112 if err != nil { 113 panic(err) 114 } 115 return enc 116 } 117 118 // TryPackG is the Go binding used to pack the parameters required for calling 119 // the contract method with ID 0x6fecb623. This method will return an error 120 // if any inputs are invalid/nil. 121 // 122 // Solidity: function G() view returns((bytes32)[] a) 123 func (structs *Structs) TryPackG() ([]byte, error) { 124 return structs.abi.Pack("G") 125 } 126 127 // UnpackG is the Go binding that unpacks the parameters returned 128 // from invoking the contract method with ID 0x6fecb623. 129 // 130 // Solidity: function G() view returns((bytes32)[] a) 131 func (structs *Structs) UnpackG(data []byte) ([]Struct0, error) { 132 out, err := structs.abi.Unpack("G", data) 133 if err != nil { 134 return *new([]Struct0), err 135 } 136 out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0) 137 return out0, nil 138 }