github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/slicer.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 // SlicerMetaData contains all meta data concerning the Slicer contract. 28 var SlicerMetaData = bind.MetaData{ 29 ABI: "[{\"constant\":true,\"inputs\":[{\"name\":\"input\",\"type\":\"address[]\"}],\"name\":\"echoAddresses\",\"outputs\":[{\"name\":\"output\",\"type\":\"address[]\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"input\",\"type\":\"uint24[23]\"}],\"name\":\"echoFancyInts\",\"outputs\":[{\"name\":\"output\",\"type\":\"uint24[23]\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"input\",\"type\":\"int256[]\"}],\"name\":\"echoInts\",\"outputs\":[{\"name\":\"output\",\"type\":\"int256[]\"}],\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"input\",\"type\":\"bool[]\"}],\"name\":\"echoBools\",\"outputs\":[{\"name\":\"output\",\"type\":\"bool[]\"}],\"type\":\"function\"}]", 30 ID: "082c0740ab6537c7169cb573d097c52112", 31 Bin: "0x606060405261015c806100126000396000f3606060405260e060020a6000350463be1127a3811461003c578063d88becc014610092578063e15a3db71461003c578063f637e5891461003c575b005b604080516020600480358082013583810285810185019096528085526100ee959294602494909392850192829185019084908082843750949650505050505050604080516020810190915260009052805b919050565b604080516102e0818101909252610138916004916102e491839060179083908390808284375090955050505050506102e0604051908101604052806017905b60008152602001906001900390816100d15790505081905061008d565b60405180806020018281038252838181518152602001915080519060200190602002808383829060006004602084601f0104600f02600301f1509050019250505060405180910390f35b60405180826102e0808381846000600461015cf15090500191505060405180910390f3", 32 } 33 34 // Slicer is an auto generated Go binding around an Ethereum contract. 35 type Slicer struct { 36 abi abi.ABI 37 } 38 39 // NewSlicer creates a new instance of Slicer. 40 func NewSlicer() *Slicer { 41 parsed, err := SlicerMetaData.ParseABI() 42 if err != nil { 43 panic(errors.New("invalid ABI: " + err.Error())) 44 } 45 return &Slicer{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 *Slicer) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { 51 return bind.NewBoundContract(addr, c.abi, backend, backend, backend) 52 } 53 54 // PackEchoAddresses is the Go binding used to pack the parameters required for calling 55 // the contract method with ID 0xbe1127a3. This method will panic if any 56 // invalid/nil inputs are passed. 57 // 58 // Solidity: function echoAddresses(address[] input) returns(address[] output) 59 func (slicer *Slicer) PackEchoAddresses(input []common.Address) []byte { 60 enc, err := slicer.abi.Pack("echoAddresses", input) 61 if err != nil { 62 panic(err) 63 } 64 return enc 65 } 66 67 // TryPackEchoAddresses is the Go binding used to pack the parameters required for calling 68 // the contract method with ID 0xbe1127a3. This method will return an error 69 // if any inputs are invalid/nil. 70 // 71 // Solidity: function echoAddresses(address[] input) returns(address[] output) 72 func (slicer *Slicer) TryPackEchoAddresses(input []common.Address) ([]byte, error) { 73 return slicer.abi.Pack("echoAddresses", input) 74 } 75 76 // UnpackEchoAddresses is the Go binding that unpacks the parameters returned 77 // from invoking the contract method with ID 0xbe1127a3. 78 // 79 // Solidity: function echoAddresses(address[] input) returns(address[] output) 80 func (slicer *Slicer) UnpackEchoAddresses(data []byte) ([]common.Address, error) { 81 out, err := slicer.abi.Unpack("echoAddresses", data) 82 if err != nil { 83 return *new([]common.Address), err 84 } 85 out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address) 86 return out0, nil 87 } 88 89 // PackEchoBools is the Go binding used to pack the parameters required for calling 90 // the contract method with ID 0xf637e589. This method will panic if any 91 // invalid/nil inputs are passed. 92 // 93 // Solidity: function echoBools(bool[] input) returns(bool[] output) 94 func (slicer *Slicer) PackEchoBools(input []bool) []byte { 95 enc, err := slicer.abi.Pack("echoBools", input) 96 if err != nil { 97 panic(err) 98 } 99 return enc 100 } 101 102 // TryPackEchoBools is the Go binding used to pack the parameters required for calling 103 // the contract method with ID 0xf637e589. This method will return an error 104 // if any inputs are invalid/nil. 105 // 106 // Solidity: function echoBools(bool[] input) returns(bool[] output) 107 func (slicer *Slicer) TryPackEchoBools(input []bool) ([]byte, error) { 108 return slicer.abi.Pack("echoBools", input) 109 } 110 111 // UnpackEchoBools is the Go binding that unpacks the parameters returned 112 // from invoking the contract method with ID 0xf637e589. 113 // 114 // Solidity: function echoBools(bool[] input) returns(bool[] output) 115 func (slicer *Slicer) UnpackEchoBools(data []byte) ([]bool, error) { 116 out, err := slicer.abi.Unpack("echoBools", data) 117 if err != nil { 118 return *new([]bool), err 119 } 120 out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool) 121 return out0, nil 122 } 123 124 // PackEchoFancyInts is the Go binding used to pack the parameters required for calling 125 // the contract method with ID 0xd88becc0. This method will panic if any 126 // invalid/nil inputs are passed. 127 // 128 // Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output) 129 func (slicer *Slicer) PackEchoFancyInts(input [23]*big.Int) []byte { 130 enc, err := slicer.abi.Pack("echoFancyInts", input) 131 if err != nil { 132 panic(err) 133 } 134 return enc 135 } 136 137 // TryPackEchoFancyInts is the Go binding used to pack the parameters required for calling 138 // the contract method with ID 0xd88becc0. This method will return an error 139 // if any inputs are invalid/nil. 140 // 141 // Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output) 142 func (slicer *Slicer) TryPackEchoFancyInts(input [23]*big.Int) ([]byte, error) { 143 return slicer.abi.Pack("echoFancyInts", input) 144 } 145 146 // UnpackEchoFancyInts is the Go binding that unpacks the parameters returned 147 // from invoking the contract method with ID 0xd88becc0. 148 // 149 // Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output) 150 func (slicer *Slicer) UnpackEchoFancyInts(data []byte) ([23]*big.Int, error) { 151 out, err := slicer.abi.Unpack("echoFancyInts", data) 152 if err != nil { 153 return *new([23]*big.Int), err 154 } 155 out0 := *abi.ConvertType(out[0], new([23]*big.Int)).(*[23]*big.Int) 156 return out0, nil 157 } 158 159 // PackEchoInts is the Go binding used to pack the parameters required for calling 160 // the contract method with ID 0xe15a3db7. This method will panic if any 161 // invalid/nil inputs are passed. 162 // 163 // Solidity: function echoInts(int256[] input) returns(int256[] output) 164 func (slicer *Slicer) PackEchoInts(input []*big.Int) []byte { 165 enc, err := slicer.abi.Pack("echoInts", input) 166 if err != nil { 167 panic(err) 168 } 169 return enc 170 } 171 172 // TryPackEchoInts is the Go binding used to pack the parameters required for calling 173 // the contract method with ID 0xe15a3db7. This method will return an error 174 // if any inputs are invalid/nil. 175 // 176 // Solidity: function echoInts(int256[] input) returns(int256[] output) 177 func (slicer *Slicer) TryPackEchoInts(input []*big.Int) ([]byte, error) { 178 return slicer.abi.Pack("echoInts", input) 179 } 180 181 // UnpackEchoInts is the Go binding that unpacks the parameters returned 182 // from invoking the contract method with ID 0xe15a3db7. 183 // 184 // Solidity: function echoInts(int256[] input) returns(int256[] output) 185 func (slicer *Slicer) UnpackEchoInts(data []byte) ([]*big.Int, error) { 186 out, err := slicer.abi.Unpack("echoInts", data) 187 if err != nil { 188 return *new([]*big.Int), err 189 } 190 out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int) 191 return out0, nil 192 }