github.com/ethereum/go-ethereum@v1.16.1/accounts/abi/abigen/testdata/v2/callbackparam.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 // CallbackParamMetaData contains all meta data concerning the CallbackParam contract. 28 var CallbackParamMetaData = bind.MetaData{ 29 ABI: "[{\"constant\":false,\"inputs\":[{\"name\":\"callback\",\"type\":\"function\"}],\"name\":\"test\",\"outputs\":[],\"payable\":false,\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", 30 ID: "949f96f86d3c2e1bcc15563ad898beaaca", 31 Bin: "0x608060405234801561001057600080fd5b5061015e806100206000396000f3fe60806040526004361061003b576000357c010000000000000000000000000000000000000000000000000000000090048063d7a5aba214610040575b600080fd5b34801561004c57600080fd5b506100be6004803603602081101561006357600080fd5b810190808035806c0100000000000000000000000090049068010000000000000000900463ffffffff1677ffffffffffffffffffffffffffffffffffffffffffffffff169091602001919093929190939291905050506100c0565b005b818160016040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050600060405180830381600087803b15801561011657600080fd5b505af115801561012a573d6000803e3d6000fd5b50505050505056fea165627a7a7230582062f87455ff84be90896dbb0c4e4ddb505c600d23089f8e80a512548440d7e2580029", 32 } 33 34 // CallbackParam is an auto generated Go binding around an Ethereum contract. 35 type CallbackParam struct { 36 abi abi.ABI 37 } 38 39 // NewCallbackParam creates a new instance of CallbackParam. 40 func NewCallbackParam() *CallbackParam { 41 parsed, err := CallbackParamMetaData.ParseABI() 42 if err != nil { 43 panic(errors.New("invalid ABI: " + err.Error())) 44 } 45 return &CallbackParam{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 *CallbackParam) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract { 51 return bind.NewBoundContract(addr, c.abi, backend, backend, backend) 52 } 53 54 // PackTest is the Go binding used to pack the parameters required for calling 55 // the contract method with ID 0xd7a5aba2. This method will panic if any 56 // invalid/nil inputs are passed. 57 // 58 // Solidity: function test(function callback) returns() 59 func (callbackParam *CallbackParam) PackTest(callback [24]byte) []byte { 60 enc, err := callbackParam.abi.Pack("test", callback) 61 if err != nil { 62 panic(err) 63 } 64 return enc 65 } 66 67 // TryPackTest is the Go binding used to pack the parameters required for calling 68 // the contract method with ID 0xd7a5aba2. This method will return an error 69 // if any inputs are invalid/nil. 70 // 71 // Solidity: function test(function callback) returns() 72 func (callbackParam *CallbackParam) TryPackTest(callback [24]byte) ([]byte, error) { 73 return callbackParam.abi.Pack("test", callback) 74 }