mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-14 16:03:45 +00:00
accounts/abi/abigen: improve v2 template
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
This commit is contained in:
parent
2241fbb5f4
commit
9ab62d60f0
30 changed files with 945 additions and 633 deletions
|
|
@ -34,31 +34,7 @@ type bindV2Test struct {
|
||||||
aliases map[string]string
|
aliases map[string]string
|
||||||
}
|
}
|
||||||
|
|
||||||
// bindABI returns bindings for a test case supplying only the ABI definition for bindings, and not the deployer
|
func bindCombinedJSON(test *bindV2Test) (string, error) {
|
||||||
// bytecode.
|
|
||||||
func bindABI(test *bindV2Test) (bound string, err error) {
|
|
||||||
var (
|
|
||||||
abis []string
|
|
||||||
bins []string
|
|
||||||
types []string
|
|
||||||
)
|
|
||||||
libs := make(map[string]string)
|
|
||||||
|
|
||||||
for i := 0; i < len(test.types); i++ {
|
|
||||||
abis = append(abis, test.abis[i])
|
|
||||||
bins = append(bins, "")
|
|
||||||
types = append(types, test.types[i])
|
|
||||||
}
|
|
||||||
|
|
||||||
code, err := BindV2(types, abis, bins, "convertedv1bindtests", libs, test.aliases)
|
|
||||||
if err != nil {
|
|
||||||
return "", fmt.Errorf("error creating bindings: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
return code, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func bindCombinedJSON(test *bindV2Test) (bound string, err error) {
|
|
||||||
var (
|
var (
|
||||||
abis []string
|
abis []string
|
||||||
bins []string
|
bins []string
|
||||||
|
|
@ -68,9 +44,8 @@ func bindCombinedJSON(test *bindV2Test) (bound string, err error) {
|
||||||
for i := 0; i < len(test.types); i++ {
|
for i := 0; i < len(test.types); i++ {
|
||||||
// fully qualified name is of the form <solFilePath>:<type>
|
// fully qualified name is of the form <solFilePath>:<type>
|
||||||
typeName := test.types[i]
|
typeName := test.types[i]
|
||||||
bin := test.bytecodes[i]
|
|
||||||
abis = append(abis, test.abis[i])
|
abis = append(abis, test.abis[i])
|
||||||
bins = append(bins, bin)
|
bins = append(bins, test.bytecodes[i])
|
||||||
types = append(types, typeName)
|
types = append(types, typeName)
|
||||||
|
|
||||||
// Derive the library placeholder which is a 34 character prefix of the
|
// Derive the library placeholder which is a 34 character prefix of the
|
||||||
|
|
@ -83,11 +58,10 @@ func bindCombinedJSON(test *bindV2Test) (bound string, err error) {
|
||||||
if test.aliases == nil {
|
if test.aliases == nil {
|
||||||
test.aliases = make(map[string]string)
|
test.aliases = make(map[string]string)
|
||||||
}
|
}
|
||||||
code, err := BindV2(types, abis, bins, "convertedv1bindtests", libs, test.aliases)
|
code, err := BindV2(types, abis, bins, "bindtests", libs, test.aliases)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", fmt.Errorf("error creating bindings: %v", err)
|
return "", fmt.Errorf("error creating bindings: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return code, nil
|
return code, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -282,18 +256,18 @@ var combinedJSONBindTestsV2 = []bindV2Test{
|
||||||
nil,
|
nil,
|
||||||
nil,
|
nil,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"Structs",
|
||||||
|
[]string{`[{"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"}]`},
|
||||||
|
[]string{`608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806328811f591461003b5780636fecb6231461005b575b600080fd5b610043610070565b604051610052939291906101a0565b60405180910390f35b6100636100d6565b6040516100529190610186565b604080516002808252606082810190935282918291829190816020015b610095610131565b81526020019060019003908161008d575050805190915061026960611b9082906000906100be57fe5b60209081029190910101515293606093508392509050565b6040805160028082526060828101909352829190816020015b6100f7610131565b8152602001906001900390816100ef575050805190915061026960611b90829060009061012057fe5b602090810291909101015152905090565b60408051602081019091526000815290565b815260200190565b6000815180845260208085019450808401835b8381101561017b578151518752958201959082019060010161015e565b509495945050505050565b600060208252610199602083018461014b565b9392505050565b6000606082526101b3606083018661014b565b6020838203818501528186516101c98185610239565b91508288019350845b818110156101f3576101e5838651610143565b9484019492506001016101d2565b505084810360408601528551808252908201925081860190845b8181101561022b57825115158552938301939183019160010161020d565b509298975050505050505050565b9081526020019056fea2646970667358221220eb85327e285def14230424c52893aebecec1e387a50bb6b75fc4fdbed647f45f64736f6c63430006050033`},
|
||||||
|
nil,
|
||||||
|
nil,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var abiBindTestCase = bindV2Test{
|
// TestBindingV2ConvertedV1Tests regenerates contracts from the v1 binding test
|
||||||
"Structs",
|
// cases (using v2 binding mode) and ensures that no mutations occurred compared
|
||||||
[]string{`[{"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"}]`},
|
// to the expected output included under testdata/v2.
|
||||||
[]string{`608060405234801561001057600080fd5b50610278806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c806328811f591461003b5780636fecb6231461005b575b600080fd5b610043610070565b604051610052939291906101a0565b60405180910390f35b6100636100d6565b6040516100529190610186565b604080516002808252606082810190935282918291829190816020015b610095610131565b81526020019060019003908161008d575050805190915061026960611b9082906000906100be57fe5b60209081029190910101515293606093508392509050565b6040805160028082526060828101909352829190816020015b6100f7610131565b8152602001906001900390816100ef575050805190915061026960611b90829060009061012057fe5b602090810291909101015152905090565b60408051602081019091526000815290565b815260200190565b6000815180845260208085019450808401835b8381101561017b578151518752958201959082019060010161015e565b509495945050505050565b600060208252610199602083018461014b565b9392505050565b6000606082526101b3606083018661014b565b6020838203818501528186516101c98185610239565b91508288019350845b818110156101f3576101e5838651610143565b9484019492506001016101d2565b505084810360408601528551808252908201925081860190845b8181101561022b57825115158552938301939183019160010161020d565b509298975050505050505050565b9081526020019056fea2646970667358221220eb85327e285def14230424c52893aebecec1e387a50bb6b75fc4fdbed647f45f64736f6c63430006050033`},
|
|
||||||
nil,
|
|
||||||
nil,
|
|
||||||
}
|
|
||||||
|
|
||||||
// TestBindingV2ConvertedV1Tests regenerates contracts from the v1 binding test cases (using v2 binding mode) and ensures
|
|
||||||
// that no mutations occurred compared to the expected output included under internal/convertedv1bindtests.
|
|
||||||
func TestBindingV2ConvertedV1Tests(t *testing.T) {
|
func TestBindingV2ConvertedV1Tests(t *testing.T) {
|
||||||
for _, tc := range combinedJSONBindTestsV2 {
|
for _, tc := range combinedJSONBindTestsV2 {
|
||||||
fname := fmt.Sprintf("testdata/v2/%v.go.txt", strings.ToLower(tc.name))
|
fname := fmt.Sprintf("testdata/v2/%v.go.txt", strings.ToLower(tc.name))
|
||||||
|
|
@ -323,37 +297,6 @@ func TestBindingV2ConvertedV1Tests(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestBindingV2ConvertedV1TestABI regenerates contracts from the v1 binding test cases (using v2 binding mode) and ensures
|
|
||||||
// that no mutations occurred compared to the expected output included under internal/convertedv1bindtests. Binding generation
|
|
||||||
// is performed sourcing only the ABI definition as input (this is what the --abi option of abigen does).
|
|
||||||
func TestBindingV2ConvertedV1TestABI(t *testing.T) {
|
|
||||||
tc := abiBindTestCase
|
|
||||||
fname := fmt.Sprintf("testdata/v2/%v-abi.go.txt", strings.ToLower(tc.name))
|
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
|
||||||
if tc.types == nil {
|
|
||||||
tc.types = []string{tc.name}
|
|
||||||
}
|
|
||||||
have, err := bindABI(&tc)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("got error from bindCombinedJSON: %v", err)
|
|
||||||
}
|
|
||||||
// Set this environment variable to regenerate the test outputs.
|
|
||||||
if os.Getenv("WRITE_TEST_FILES") != "" {
|
|
||||||
if err := os.WriteFile((fname), []byte(have), 0666); err != nil {
|
|
||||||
t.Fatalf("err writing expected output to file: %v\n", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Verify the generated code
|
|
||||||
want, err := os.ReadFile(fname)
|
|
||||||
if err != nil {
|
|
||||||
t.Fatalf("failed to read file %v", fname)
|
|
||||||
}
|
|
||||||
if have != string(want) {
|
|
||||||
t.Fatalf("wrong output: %v", prettyDiff(have, string(want)))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestNormalizeArgs(t *testing.T) {
|
func TestNormalizeArgs(t *testing.T) {
|
||||||
type normalizeArgsTc struct {
|
type normalizeArgsTc struct {
|
||||||
inp []string
|
inp []string
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{{- /* -*- indent-tabs-mode: t -*- */ -}}
|
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package {{.Package}}
|
package {{.Package}}
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"math/big"
|
"math/big"
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
|
|
@ -16,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -74,6 +75,10 @@ var (
|
||||||
}
|
}
|
||||||
|
|
||||||
{{ if .Constructor.Inputs }}
|
{{ if .Constructor.Inputs }}
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: {{.Constructor.String}}
|
||||||
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) PackConstructor({{range .Constructor.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte {
|
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) PackConstructor({{range .Constructor.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte {
|
||||||
enc, err := {{ decapitalise $contract.Type}}.abi.Pack("" {{range .Constructor.Inputs}}, {{.Name}}{{end}})
|
enc, err := {{ decapitalise $contract.Type}}.abi.Pack("" {{range .Constructor.Inputs}}, {{.Name}}{{end}})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -81,10 +86,11 @@ var (
|
||||||
}
|
}
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
{{ end -}}
|
{{ end }}
|
||||||
|
|
||||||
{{range .Calls}}
|
{{range .Calls}}
|
||||||
// {{.Normalized.Name}} is a free data retrieval call binding the contract method 0x{{printf "%x" .Original.ID}}.
|
// {{.Normalized.Name}} is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x{{printf "%x" .Original.ID}}.
|
||||||
//
|
//
|
||||||
// Solidity: {{.Original.String}}
|
// Solidity: {{.Original.String}}
|
||||||
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Pack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte {
|
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Pack{{.Normalized.Name}}({{range .Normalized.Inputs}} {{.Name}} {{bindtype .Type $structs}}, {{end}}) []byte {
|
||||||
|
|
@ -98,57 +104,75 @@ var (
|
||||||
{{/* Unpack method is needed only when there are return args */}}
|
{{/* Unpack method is needed only when there are return args */}}
|
||||||
{{if .Normalized.Outputs }}
|
{{if .Normalized.Outputs }}
|
||||||
{{ if .Structured }}
|
{{ if .Structured }}
|
||||||
|
// {{.Normalized.Name}}Output serves as a container for the return parameters of contract
|
||||||
|
// method {{ .Normalized.Name }}.
|
||||||
type {{.Normalized.Name}}Output struct {
|
type {{.Normalized.Name}}Output struct {
|
||||||
{{range .Normalized.Outputs}}
|
{{range .Normalized.Outputs}}
|
||||||
{{.Name}} {{bindtype .Type $structs}}{{end}}
|
{{.Name}} {{bindtype .Type $structs}}{{end}}
|
||||||
}
|
}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}(data []byte) ({{if .Structured}} {{.Normalized.Name}}Output,{{else}}{{range .Normalized.Outputs}}{{bindtype .Type $structs}},{{end}}{{end}} error) {
|
|
||||||
|
// Unpack{{.Normalized.Name}} is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x{{printf "%x" .Original.ID}}.
|
||||||
|
//
|
||||||
|
// Solidity: {{.Original.String}}
|
||||||
|
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}(data []byte) (
|
||||||
|
{{- if .Structured}} {{.Normalized.Name}}Output,{{else}}
|
||||||
|
{{- range .Normalized.Outputs}} {{bindtype .Type $structs}},{{- end }}
|
||||||
|
{{- end }} error) {
|
||||||
out, err := {{ decapitalise $contract.Type}}.abi.Unpack("{{.Original.Name}}", data)
|
out, err := {{ decapitalise $contract.Type}}.abi.Unpack("{{.Original.Name}}", data)
|
||||||
{{if .Structured}}
|
{{- if .Structured}}
|
||||||
outstruct := new({{.Normalized.Name}}Output)
|
outstruct := new({{.Normalized.Name}}Output)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
{{range $i, $t := .Normalized.Outputs}}
|
{{- range $i, $t := .Normalized.Outputs}}
|
||||||
{{if ispointertype .Type}}
|
{{- if ispointertype .Type}}
|
||||||
outstruct.{{.Name}} = abi.ConvertType(out[{{$i}}], new({{underlyingbindtype .Type }})).({{bindtype .Type $structs}})
|
outstruct.{{.Name}} = abi.ConvertType(out[{{$i}}], new({{underlyingbindtype .Type }})).({{bindtype .Type $structs}})
|
||||||
{{ else }}
|
{{- else }}
|
||||||
outstruct.{{.Name}} = *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
|
outstruct.{{.Name}} = *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
|
||||||
{{ end }}{{end}}
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
{{else}}
|
{{else}}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return {{range $i, $_ := .Normalized.Outputs}}{{if ispointertype .Type}}new({{underlyingbindtype .Type }}), {{else}}*new({{bindtype .Type $structs}}), {{end}}{{end}} err
|
return {{range $i, $_ := .Normalized.Outputs}}{{if ispointertype .Type}}new({{underlyingbindtype .Type }}), {{else}}*new({{bindtype .Type $structs}}), {{end}}{{end}} err
|
||||||
}
|
}
|
||||||
{{range $i, $t := .Normalized.Outputs}}
|
{{- range $i, $t := .Normalized.Outputs}}
|
||||||
{{ if ispointertype .Type }}
|
{{- if ispointertype .Type }}
|
||||||
out{{$i}} := abi.ConvertType(out[{{$i}}], new({{underlyingbindtype .Type}})).({{bindtype .Type $structs}})
|
out{{$i}} := abi.ConvertType(out[{{$i}}], new({{underlyingbindtype .Type}})).({{bindtype .Type $structs}})
|
||||||
{{ else }}
|
{{- else }}
|
||||||
out{{$i}} := *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
|
out{{$i}} := *abi.ConvertType(out[{{$i}}], new({{bindtype .Type $structs}})).(*{{bindtype .Type $structs}})
|
||||||
{{ end }}
|
{{- end }}
|
||||||
{{end}}
|
{{- end}}
|
||||||
|
|
||||||
return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} err
|
return {{range $i, $t := .Normalized.Outputs}}out{{$i}}, {{end}} err
|
||||||
{{end}}
|
{{- end}}
|
||||||
}
|
}
|
||||||
{{end}}
|
{{end}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{range .Events}}
|
{{range .Events}}
|
||||||
// {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} event raised by the {{$contract.Type}} contract.
|
// {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} event raised by the {{$contract.Type}} contract.
|
||||||
type {{$contract.Type}}{{.Normalized.Name}} struct { {{range .Normalized.Inputs}}
|
type {{$contract.Type}}{{.Normalized.Name}} struct {
|
||||||
{{capitalise .Name}} {{if .Indexed}}{{bindtopictype .Type $structs}}{{else}}{{bindtype .Type $structs}}{{end}}; {{end}}
|
{{- range .Normalized.Inputs}}
|
||||||
|
{{- capitalise .Name}}
|
||||||
|
{{- else}} {{bindtype .Type $structs}}
|
||||||
|
{{- end }}
|
||||||
|
{{end}}
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const {{$contract.Type}}{{.Normalized.Name}}EventName = "{{.Original.Name}}"
|
const {{$contract.Type}}{{.Normalized.Name}}EventName = "{{.Original.Name}}"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func ({{$contract.Type}}{{.Normalized.Name}}) ContractEventName() string {
|
func ({{$contract.Type}}{{.Normalized.Name}}) ContractEventName() string {
|
||||||
return {{$contract.Type}}{{.Normalized.Name}}EventName
|
return {{$contract.Type}}{{.Normalized.Name}}EventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unpack{{.Normalized.Name}}Event is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: {{.Original.String}}
|
||||||
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Event(log *types.Log) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
|
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Event(log *types.Log) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
|
||||||
event := "{{.Original.Name}}"
|
event := "{{.Original.Name}}"
|
||||||
if log.Topics[0] != {{ decapitalise $contract.Type}}.abi.Events[event].ID {
|
if log.Topics[0] != {{ decapitalise $contract.Type}}.abi.Events[event].ID {
|
||||||
|
|
@ -175,25 +199,17 @@ var (
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{ if .Errors }}
|
{{ if .Errors }}
|
||||||
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) UnpackError(raw []byte) any {
|
// UnpackError attempts to decode the provided error data using user-defined
|
||||||
// TODO: we should be able to discern the error type from the selector, instead of trying each possible type
|
// error definitions.
|
||||||
// strip off the error type selector
|
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) UnpackError(raw []byte) (any, error) {
|
||||||
raw = raw[4:]
|
{{- range $k, $v := .Errors}}
|
||||||
{{$i := 0}}
|
if bytes.Equal(raw[:4], {{ decapitalise $contract.Type}}.abi.Errors["{{.Normalized.Name}}"].ID.Bytes()[:4]) {
|
||||||
{{range $k, $v := .Errors}}
|
return {{ decapitalise $contract.Type}}.Unpack{{.Normalized.Name}}Error(raw[4:])
|
||||||
{{ if eq $i 0 }}
|
}
|
||||||
if val, err := {{ decapitalise $contract.Type}}.Unpack{{.Normalized.Name}}Error(raw); err == nil {
|
{{- end }}
|
||||||
return val
|
return nil, errors.New("Unknown error")
|
||||||
{{ else }}
|
|
||||||
} else if val, err := {{ decapitalise $contract.Type}}.Unpack{{.Normalized.Name}}Error(raw); err == nil {
|
|
||||||
return val
|
|
||||||
{{ end -}}
|
|
||||||
{{$i = add $i 1}}
|
|
||||||
{{end -}}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
{{ end -}}
|
{{ end }}
|
||||||
|
|
||||||
{{range .Errors}}
|
{{range .Errors}}
|
||||||
// {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} error raised by the {{$contract.Type}} contract.
|
// {{$contract.Type}}{{.Normalized.Name}} represents a {{.Normalized.Name}} error raised by the {{$contract.Type}} contract.
|
||||||
|
|
@ -201,14 +217,20 @@ var (
|
||||||
{{capitalise .Name}} {{if .Indexed}}{{bindtopictype .Type $structs}}{{else}}{{bindtype .Type $structs}}{{end}}; {{end}}
|
{{capitalise .Name}} {{if .Indexed}}{{bindtopictype .Type $structs}}{{else}}{{bindtype .Type $structs}}{{end}}; {{end}}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ErrorID returns the hash of canonical representation of the error's signature.
|
||||||
|
//
|
||||||
|
// Solidity: {{.Original.String}}
|
||||||
func {{$contract.Type}}{{.Normalized.Name}}ErrorID() common.Hash {
|
func {{$contract.Type}}{{.Normalized.Name}}ErrorID() common.Hash {
|
||||||
return common.HexToHash("{{.Original.ID}}")
|
return common.HexToHash("{{.Original.ID}}")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unpack{{.Normalized.Name}}Error is the Go binding used to decode the provided
|
||||||
|
// error data into the corresponding Go error struct.
|
||||||
|
//
|
||||||
|
// Solidity: {{.Original.String}}
|
||||||
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Error(raw []byte) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
|
func ({{ decapitalise $contract.Type}} *{{$contract.Type}}) Unpack{{.Normalized.Name}}Error(raw []byte) (*{{$contract.Type}}{{.Normalized.Name}}, error) {
|
||||||
errName := "{{.Normalized.Name}}"
|
|
||||||
out := new({{$contract.Type}}{{.Normalized.Name}})
|
out := new({{$contract.Type}}{{.Normalized.Name}})
|
||||||
if err := {{ decapitalise $contract.Type}}.abi.UnpackIntoInterface(out, errName, raw); err != nil {
|
if err := {{ decapitalise $contract.Type}}.abi.UnpackIntoInterface(out, "{{.Normalized.Name}}", raw); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *CallbackParam) Instance(backend bind.ContractBackend, addr common.Addre
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test is a free data retrieval call binding the contract method 0xd7a5aba2.
|
// Test is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xd7a5aba2.
|
||||||
//
|
//
|
||||||
// Solidity: function test(function callback) returns()
|
// Solidity: function test(function callback) returns()
|
||||||
func (callbackParam *CallbackParam) PackTest(Callback [24]byte) []byte {
|
func (callbackParam *CallbackParam) PackTest(Callback [24]byte) []byte {
|
||||||
|
|
|
||||||
98
accounts/abi/abigen/testdata/v2/crowdsale.go.txt
vendored
98
accounts/abi/abigen/testdata/v2/crowdsale.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,6 +51,10 @@ func (c *Crowdsale) Instance(backend bind.ContractBackend, addr common.Address)
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: constructor(address ifSuccessfulSendTo, uint256 fundingGoalInEthers, uint256 durationInMinutes, uint256 etherCostOfEachToken, address addressOfTokenUsedAsReward) returns()
|
||||||
func (crowdsale *Crowdsale) PackConstructor(ifSuccessfulSendTo common.Address, fundingGoalInEthers *big.Int, durationInMinutes *big.Int, etherCostOfEachToken *big.Int, addressOfTokenUsedAsReward common.Address) []byte {
|
func (crowdsale *Crowdsale) PackConstructor(ifSuccessfulSendTo common.Address, fundingGoalInEthers *big.Int, durationInMinutes *big.Int, etherCostOfEachToken *big.Int, addressOfTokenUsedAsReward common.Address) []byte {
|
||||||
enc, err := crowdsale.abi.Pack("", ifSuccessfulSendTo, fundingGoalInEthers, durationInMinutes, etherCostOfEachToken, addressOfTokenUsedAsReward)
|
enc, err := crowdsale.abi.Pack("", ifSuccessfulSendTo, fundingGoalInEthers, durationInMinutes, etherCostOfEachToken, addressOfTokenUsedAsReward)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -57,7 +63,8 @@ func (crowdsale *Crowdsale) PackConstructor(ifSuccessfulSendTo common.Address, f
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// AmountRaised is a free data retrieval call binding the contract method 0x7b3e5e7b.
|
// AmountRaised is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x7b3e5e7b.
|
||||||
//
|
//
|
||||||
// Solidity: function amountRaised() returns(uint256)
|
// Solidity: function amountRaised() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) PackAmountRaised() []byte {
|
func (crowdsale *Crowdsale) PackAmountRaised() []byte {
|
||||||
|
|
@ -68,20 +75,21 @@ func (crowdsale *Crowdsale) PackAmountRaised() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackAmountRaised is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x7b3e5e7b.
|
||||||
|
//
|
||||||
|
// Solidity: function amountRaised() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) UnpackAmountRaised(data []byte) (*big.Int, error) {
|
func (crowdsale *Crowdsale) UnpackAmountRaised(data []byte) (*big.Int, error) {
|
||||||
out, err := crowdsale.abi.Unpack("amountRaised", data)
|
out, err := crowdsale.abi.Unpack("amountRaised", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Beneficiary is a free data retrieval call binding the contract method 0x38af3eed.
|
// Beneficiary is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x38af3eed.
|
||||||
//
|
//
|
||||||
// Solidity: function beneficiary() returns(address)
|
// Solidity: function beneficiary() returns(address)
|
||||||
func (crowdsale *Crowdsale) PackBeneficiary() []byte {
|
func (crowdsale *Crowdsale) PackBeneficiary() []byte {
|
||||||
|
|
@ -92,20 +100,21 @@ func (crowdsale *Crowdsale) PackBeneficiary() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBeneficiary is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x38af3eed.
|
||||||
|
//
|
||||||
|
// Solidity: function beneficiary() returns(address)
|
||||||
func (crowdsale *Crowdsale) UnpackBeneficiary(data []byte) (common.Address, error) {
|
func (crowdsale *Crowdsale) UnpackBeneficiary(data []byte) (common.Address, error) {
|
||||||
out, err := crowdsale.abi.Unpack("beneficiary", data)
|
out, err := crowdsale.abi.Unpack("beneficiary", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(common.Address), err
|
return *new(common.Address), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckGoalReached is a free data retrieval call binding the contract method 0x01cb3b20.
|
// CheckGoalReached is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x01cb3b20.
|
||||||
//
|
//
|
||||||
// Solidity: function checkGoalReached() returns()
|
// Solidity: function checkGoalReached() returns()
|
||||||
func (crowdsale *Crowdsale) PackCheckGoalReached() []byte {
|
func (crowdsale *Crowdsale) PackCheckGoalReached() []byte {
|
||||||
|
|
@ -116,7 +125,8 @@ func (crowdsale *Crowdsale) PackCheckGoalReached() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deadline is a free data retrieval call binding the contract method 0x29dcb0cf.
|
// Deadline is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x29dcb0cf.
|
||||||
//
|
//
|
||||||
// Solidity: function deadline() returns(uint256)
|
// Solidity: function deadline() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) PackDeadline() []byte {
|
func (crowdsale *Crowdsale) PackDeadline() []byte {
|
||||||
|
|
@ -127,20 +137,21 @@ func (crowdsale *Crowdsale) PackDeadline() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDeadline is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x29dcb0cf.
|
||||||
|
//
|
||||||
|
// Solidity: function deadline() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) UnpackDeadline(data []byte) (*big.Int, error) {
|
func (crowdsale *Crowdsale) UnpackDeadline(data []byte) (*big.Int, error) {
|
||||||
out, err := crowdsale.abi.Unpack("deadline", data)
|
out, err := crowdsale.abi.Unpack("deadline", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Funders is a free data retrieval call binding the contract method 0xdc0d3dff.
|
// Funders is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xdc0d3dff.
|
||||||
//
|
//
|
||||||
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
|
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
|
||||||
func (crowdsale *Crowdsale) PackFunders(Arg0 *big.Int) []byte {
|
func (crowdsale *Crowdsale) PackFunders(Arg0 *big.Int) []byte {
|
||||||
|
|
@ -151,28 +162,31 @@ func (crowdsale *Crowdsale) PackFunders(Arg0 *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FundersOutput serves as a container for the return parameters of contract
|
||||||
|
// method Funders.
|
||||||
type FundersOutput struct {
|
type FundersOutput struct {
|
||||||
Addr common.Address
|
Addr common.Address
|
||||||
Amount *big.Int
|
Amount *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackFunders is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xdc0d3dff.
|
||||||
|
//
|
||||||
|
// Solidity: function funders(uint256 ) returns(address addr, uint256 amount)
|
||||||
func (crowdsale *Crowdsale) UnpackFunders(data []byte) (FundersOutput, error) {
|
func (crowdsale *Crowdsale) UnpackFunders(data []byte) (FundersOutput, error) {
|
||||||
out, err := crowdsale.abi.Unpack("funders", data)
|
out, err := crowdsale.abi.Unpack("funders", data)
|
||||||
|
|
||||||
outstruct := new(FundersOutput)
|
outstruct := new(FundersOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
outstruct.Addr = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||||
|
|
||||||
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// FundingGoal is a free data retrieval call binding the contract method 0x7a3a0e84.
|
// FundingGoal is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x7a3a0e84.
|
||||||
//
|
//
|
||||||
// Solidity: function fundingGoal() returns(uint256)
|
// Solidity: function fundingGoal() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) PackFundingGoal() []byte {
|
func (crowdsale *Crowdsale) PackFundingGoal() []byte {
|
||||||
|
|
@ -183,20 +197,21 @@ func (crowdsale *Crowdsale) PackFundingGoal() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackFundingGoal is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x7a3a0e84.
|
||||||
|
//
|
||||||
|
// Solidity: function fundingGoal() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) UnpackFundingGoal(data []byte) (*big.Int, error) {
|
func (crowdsale *Crowdsale) UnpackFundingGoal(data []byte) (*big.Int, error) {
|
||||||
out, err := crowdsale.abi.Unpack("fundingGoal", data)
|
out, err := crowdsale.abi.Unpack("fundingGoal", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Price is a free data retrieval call binding the contract method 0xa035b1fe.
|
// Price is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xa035b1fe.
|
||||||
//
|
//
|
||||||
// Solidity: function price() returns(uint256)
|
// Solidity: function price() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) PackPrice() []byte {
|
func (crowdsale *Crowdsale) PackPrice() []byte {
|
||||||
|
|
@ -207,20 +222,21 @@ func (crowdsale *Crowdsale) PackPrice() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackPrice is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xa035b1fe.
|
||||||
|
//
|
||||||
|
// Solidity: function price() returns(uint256)
|
||||||
func (crowdsale *Crowdsale) UnpackPrice(data []byte) (*big.Int, error) {
|
func (crowdsale *Crowdsale) UnpackPrice(data []byte) (*big.Int, error) {
|
||||||
out, err := crowdsale.abi.Unpack("price", data)
|
out, err := crowdsale.abi.Unpack("price", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenReward is a free data retrieval call binding the contract method 0x6e66f6e9.
|
// TokenReward is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x6e66f6e9.
|
||||||
//
|
//
|
||||||
// Solidity: function tokenReward() returns(address)
|
// Solidity: function tokenReward() returns(address)
|
||||||
func (crowdsale *Crowdsale) PackTokenReward() []byte {
|
func (crowdsale *Crowdsale) PackTokenReward() []byte {
|
||||||
|
|
@ -231,17 +247,17 @@ func (crowdsale *Crowdsale) PackTokenReward() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTokenReward is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x6e66f6e9.
|
||||||
|
//
|
||||||
|
// Solidity: function tokenReward() returns(address)
|
||||||
func (crowdsale *Crowdsale) UnpackTokenReward(data []byte) (common.Address, error) {
|
func (crowdsale *Crowdsale) UnpackTokenReward(data []byte) (common.Address, error) {
|
||||||
out, err := crowdsale.abi.Unpack("tokenReward", data)
|
out, err := crowdsale.abi.Unpack("tokenReward", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(common.Address), err
|
return *new(common.Address), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CrowdsaleFundTransfer represents a FundTransfer event raised by the Crowdsale contract.
|
// CrowdsaleFundTransfer represents a FundTransfer event raised by the Crowdsale contract.
|
||||||
|
|
@ -249,15 +265,21 @@ type CrowdsaleFundTransfer struct {
|
||||||
Backer common.Address
|
Backer common.Address
|
||||||
Amount *big.Int
|
Amount *big.Int
|
||||||
IsContribution bool
|
IsContribution bool
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const CrowdsaleFundTransferEventName = "FundTransfer"
|
const CrowdsaleFundTransferEventName = "FundTransfer"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (CrowdsaleFundTransfer) ContractEventName() string {
|
func (CrowdsaleFundTransfer) ContractEventName() string {
|
||||||
return CrowdsaleFundTransferEventName
|
return CrowdsaleFundTransferEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackFundTransferEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event FundTransfer(address backer, uint256 amount, bool isContribution)
|
||||||
func (crowdsale *Crowdsale) UnpackFundTransferEvent(log *types.Log) (*CrowdsaleFundTransfer, error) {
|
func (crowdsale *Crowdsale) UnpackFundTransferEvent(log *types.Log) (*CrowdsaleFundTransfer, error) {
|
||||||
event := "FundTransfer"
|
event := "FundTransfer"
|
||||||
if log.Topics[0] != crowdsale.abi.Events[event].ID {
|
if log.Topics[0] != crowdsale.abi.Events[event].ID {
|
||||||
|
|
|
||||||
202
accounts/abi/abigen/testdata/v2/dao.go.txt
vendored
202
accounts/abi/abigen/testdata/v2/dao.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,6 +51,10 @@ func (c *DAO) Instance(backend bind.ContractBackend, addr common.Address) *bind.
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: constructor(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority, address congressLeader) returns()
|
||||||
func (dAO *DAO) PackConstructor(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int, congressLeader common.Address) []byte {
|
func (dAO *DAO) PackConstructor(minimumQuorumForProposals *big.Int, minutesForDebate *big.Int, marginOfVotesForMajority *big.Int, congressLeader common.Address) []byte {
|
||||||
enc, err := dAO.abi.Pack("", minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority, congressLeader)
|
enc, err := dAO.abi.Pack("", minimumQuorumForProposals, minutesForDebate, marginOfVotesForMajority, congressLeader)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -57,7 +63,8 @@ func (dAO *DAO) PackConstructor(minimumQuorumForProposals *big.Int, minutesForDe
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChangeMembership is a free data retrieval call binding the contract method 0x9644fcbd.
|
// ChangeMembership is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x9644fcbd.
|
||||||
//
|
//
|
||||||
// Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns()
|
// Solidity: function changeMembership(address targetMember, bool canVote, string memberName) returns()
|
||||||
func (dAO *DAO) PackChangeMembership(TargetMember common.Address, CanVote bool, MemberName string) []byte {
|
func (dAO *DAO) PackChangeMembership(TargetMember common.Address, CanVote bool, MemberName string) []byte {
|
||||||
|
|
@ -68,7 +75,8 @@ func (dAO *DAO) PackChangeMembership(TargetMember common.Address, CanVote bool,
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// ChangeVotingRules is a free data retrieval call binding the contract method 0xbcca1fd3.
|
// ChangeVotingRules is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xbcca1fd3.
|
||||||
//
|
//
|
||||||
// Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns()
|
// Solidity: function changeVotingRules(uint256 minimumQuorumForProposals, uint256 minutesForDebate, int256 marginOfVotesForMajority) returns()
|
||||||
func (dAO *DAO) PackChangeVotingRules(MinimumQuorumForProposals *big.Int, MinutesForDebate *big.Int, MarginOfVotesForMajority *big.Int) []byte {
|
func (dAO *DAO) PackChangeVotingRules(MinimumQuorumForProposals *big.Int, MinutesForDebate *big.Int, MarginOfVotesForMajority *big.Int) []byte {
|
||||||
|
|
@ -79,7 +87,8 @@ func (dAO *DAO) PackChangeVotingRules(MinimumQuorumForProposals *big.Int, Minute
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// CheckProposalCode is a free data retrieval call binding the contract method 0xeceb2945.
|
// CheckProposalCode is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xeceb2945.
|
||||||
//
|
//
|
||||||
// Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut)
|
// Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut)
|
||||||
func (dAO *DAO) PackCheckProposalCode(ProposalNumber *big.Int, Beneficiary common.Address, EtherAmount *big.Int, TransactionBytecode []byte) []byte {
|
func (dAO *DAO) PackCheckProposalCode(ProposalNumber *big.Int, Beneficiary common.Address, EtherAmount *big.Int, TransactionBytecode []byte) []byte {
|
||||||
|
|
@ -90,20 +99,21 @@ func (dAO *DAO) PackCheckProposalCode(ProposalNumber *big.Int, Beneficiary commo
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackCheckProposalCode is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xeceb2945.
|
||||||
|
//
|
||||||
|
// Solidity: function checkProposalCode(uint256 proposalNumber, address beneficiary, uint256 etherAmount, bytes transactionBytecode) returns(bool codeChecksOut)
|
||||||
func (dAO *DAO) UnpackCheckProposalCode(data []byte) (bool, error) {
|
func (dAO *DAO) UnpackCheckProposalCode(data []byte) (bool, error) {
|
||||||
out, err := dAO.abi.Unpack("checkProposalCode", data)
|
out, err := dAO.abi.Unpack("checkProposalCode", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(bool), err
|
return *new(bool), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DebatingPeriodInMinutes is a free data retrieval call binding the contract method 0x69bd3436.
|
// DebatingPeriodInMinutes is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x69bd3436.
|
||||||
//
|
//
|
||||||
// Solidity: function debatingPeriodInMinutes() returns(uint256)
|
// Solidity: function debatingPeriodInMinutes() returns(uint256)
|
||||||
func (dAO *DAO) PackDebatingPeriodInMinutes() []byte {
|
func (dAO *DAO) PackDebatingPeriodInMinutes() []byte {
|
||||||
|
|
@ -114,20 +124,21 @@ func (dAO *DAO) PackDebatingPeriodInMinutes() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDebatingPeriodInMinutes is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x69bd3436.
|
||||||
|
//
|
||||||
|
// Solidity: function debatingPeriodInMinutes() returns(uint256)
|
||||||
func (dAO *DAO) UnpackDebatingPeriodInMinutes(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackDebatingPeriodInMinutes(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("debatingPeriodInMinutes", data)
|
out, err := dAO.abi.Unpack("debatingPeriodInMinutes", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ExecuteProposal is a free data retrieval call binding the contract method 0x237e9492.
|
// ExecuteProposal is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x237e9492.
|
||||||
//
|
//
|
||||||
// Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result)
|
// Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result)
|
||||||
func (dAO *DAO) PackExecuteProposal(ProposalNumber *big.Int, TransactionBytecode []byte) []byte {
|
func (dAO *DAO) PackExecuteProposal(ProposalNumber *big.Int, TransactionBytecode []byte) []byte {
|
||||||
|
|
@ -138,20 +149,21 @@ func (dAO *DAO) PackExecuteProposal(ProposalNumber *big.Int, TransactionBytecode
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackExecuteProposal is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x237e9492.
|
||||||
|
//
|
||||||
|
// Solidity: function executeProposal(uint256 proposalNumber, bytes transactionBytecode) returns(int256 result)
|
||||||
func (dAO *DAO) UnpackExecuteProposal(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackExecuteProposal(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("executeProposal", data)
|
out, err := dAO.abi.Unpack("executeProposal", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MajorityMargin is a free data retrieval call binding the contract method 0xaa02a90f.
|
// MajorityMargin is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xaa02a90f.
|
||||||
//
|
//
|
||||||
// Solidity: function majorityMargin() returns(int256)
|
// Solidity: function majorityMargin() returns(int256)
|
||||||
func (dAO *DAO) PackMajorityMargin() []byte {
|
func (dAO *DAO) PackMajorityMargin() []byte {
|
||||||
|
|
@ -162,20 +174,21 @@ func (dAO *DAO) PackMajorityMargin() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMajorityMargin is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xaa02a90f.
|
||||||
|
//
|
||||||
|
// Solidity: function majorityMargin() returns(int256)
|
||||||
func (dAO *DAO) UnpackMajorityMargin(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackMajorityMargin(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("majorityMargin", data)
|
out, err := dAO.abi.Unpack("majorityMargin", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MemberId is a free data retrieval call binding the contract method 0x39106821.
|
// MemberId is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x39106821.
|
||||||
//
|
//
|
||||||
// Solidity: function memberId(address ) returns(uint256)
|
// Solidity: function memberId(address ) returns(uint256)
|
||||||
func (dAO *DAO) PackMemberId(Arg0 common.Address) []byte {
|
func (dAO *DAO) PackMemberId(Arg0 common.Address) []byte {
|
||||||
|
|
@ -186,20 +199,21 @@ func (dAO *DAO) PackMemberId(Arg0 common.Address) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMemberId is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x39106821.
|
||||||
|
//
|
||||||
|
// Solidity: function memberId(address ) returns(uint256)
|
||||||
func (dAO *DAO) UnpackMemberId(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackMemberId(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("memberId", data)
|
out, err := dAO.abi.Unpack("memberId", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Members is a free data retrieval call binding the contract method 0x5daf08ca.
|
// Members is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x5daf08ca.
|
||||||
//
|
//
|
||||||
// Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince)
|
// Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince)
|
||||||
func (dAO *DAO) PackMembers(Arg0 *big.Int) []byte {
|
func (dAO *DAO) PackMembers(Arg0 *big.Int) []byte {
|
||||||
|
|
@ -210,6 +224,8 @@ func (dAO *DAO) PackMembers(Arg0 *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MembersOutput serves as a container for the return parameters of contract
|
||||||
|
// method Members.
|
||||||
type MembersOutput struct {
|
type MembersOutput struct {
|
||||||
Member common.Address
|
Member common.Address
|
||||||
CanVote bool
|
CanVote bool
|
||||||
|
|
@ -217,27 +233,26 @@ type MembersOutput struct {
|
||||||
MemberSince *big.Int
|
MemberSince *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMembers is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x5daf08ca.
|
||||||
|
//
|
||||||
|
// Solidity: function members(uint256 ) returns(address member, bool canVote, string name, uint256 memberSince)
|
||||||
func (dAO *DAO) UnpackMembers(data []byte) (MembersOutput, error) {
|
func (dAO *DAO) UnpackMembers(data []byte) (MembersOutput, error) {
|
||||||
out, err := dAO.abi.Unpack("members", data)
|
out, err := dAO.abi.Unpack("members", data)
|
||||||
|
|
||||||
outstruct := new(MembersOutput)
|
outstruct := new(MembersOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Member = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
outstruct.Member = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||||
|
|
||||||
outstruct.CanVote = *abi.ConvertType(out[1], new(bool)).(*bool)
|
outstruct.CanVote = *abi.ConvertType(out[1], new(bool)).(*bool)
|
||||||
|
|
||||||
outstruct.Name = *abi.ConvertType(out[2], new(string)).(*string)
|
outstruct.Name = *abi.ConvertType(out[2], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
|
outstruct.MemberSince = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MinimumQuorum is a free data retrieval call binding the contract method 0x8160f0b5.
|
// MinimumQuorum is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x8160f0b5.
|
||||||
//
|
//
|
||||||
// Solidity: function minimumQuorum() returns(uint256)
|
// Solidity: function minimumQuorum() returns(uint256)
|
||||||
func (dAO *DAO) PackMinimumQuorum() []byte {
|
func (dAO *DAO) PackMinimumQuorum() []byte {
|
||||||
|
|
@ -248,20 +263,21 @@ func (dAO *DAO) PackMinimumQuorum() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMinimumQuorum is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x8160f0b5.
|
||||||
|
//
|
||||||
|
// Solidity: function minimumQuorum() returns(uint256)
|
||||||
func (dAO *DAO) UnpackMinimumQuorum(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackMinimumQuorum(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("minimumQuorum", data)
|
out, err := dAO.abi.Unpack("minimumQuorum", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewProposal is a free data retrieval call binding the contract method 0xb1050da5.
|
// NewProposal is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xb1050da5.
|
||||||
//
|
//
|
||||||
// Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID)
|
// Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID)
|
||||||
func (dAO *DAO) PackNewProposal(Beneficiary common.Address, EtherAmount *big.Int, JobDescription string, TransactionBytecode []byte) []byte {
|
func (dAO *DAO) PackNewProposal(Beneficiary common.Address, EtherAmount *big.Int, JobDescription string, TransactionBytecode []byte) []byte {
|
||||||
|
|
@ -272,20 +288,21 @@ func (dAO *DAO) PackNewProposal(Beneficiary common.Address, EtherAmount *big.Int
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackNewProposal is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xb1050da5.
|
||||||
|
//
|
||||||
|
// Solidity: function newProposal(address beneficiary, uint256 etherAmount, string JobDescription, bytes transactionBytecode) returns(uint256 proposalID)
|
||||||
func (dAO *DAO) UnpackNewProposal(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackNewProposal(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("newProposal", data)
|
out, err := dAO.abi.Unpack("newProposal", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NumProposals is a free data retrieval call binding the contract method 0x400e3949.
|
// NumProposals is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x400e3949.
|
||||||
//
|
//
|
||||||
// Solidity: function numProposals() returns(uint256)
|
// Solidity: function numProposals() returns(uint256)
|
||||||
func (dAO *DAO) PackNumProposals() []byte {
|
func (dAO *DAO) PackNumProposals() []byte {
|
||||||
|
|
@ -296,20 +313,21 @@ func (dAO *DAO) PackNumProposals() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackNumProposals is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x400e3949.
|
||||||
|
//
|
||||||
|
// Solidity: function numProposals() returns(uint256)
|
||||||
func (dAO *DAO) UnpackNumProposals(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackNumProposals(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("numProposals", data)
|
out, err := dAO.abi.Unpack("numProposals", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Owner is a free data retrieval call binding the contract method 0x8da5cb5b.
|
// Owner is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x8da5cb5b.
|
||||||
//
|
//
|
||||||
// Solidity: function owner() returns(address)
|
// Solidity: function owner() returns(address)
|
||||||
func (dAO *DAO) PackOwner() []byte {
|
func (dAO *DAO) PackOwner() []byte {
|
||||||
|
|
@ -320,20 +338,21 @@ func (dAO *DAO) PackOwner() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackOwner is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x8da5cb5b.
|
||||||
|
//
|
||||||
|
// Solidity: function owner() returns(address)
|
||||||
func (dAO *DAO) UnpackOwner(data []byte) (common.Address, error) {
|
func (dAO *DAO) UnpackOwner(data []byte) (common.Address, error) {
|
||||||
out, err := dAO.abi.Unpack("owner", data)
|
out, err := dAO.abi.Unpack("owner", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(common.Address), err
|
return *new(common.Address), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Proposals is a free data retrieval call binding the contract method 0x013cf08b.
|
// Proposals is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x013cf08b.
|
||||||
//
|
//
|
||||||
// Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash)
|
// Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash)
|
||||||
func (dAO *DAO) PackProposals(Arg0 *big.Int) []byte {
|
func (dAO *DAO) PackProposals(Arg0 *big.Int) []byte {
|
||||||
|
|
@ -344,6 +363,8 @@ func (dAO *DAO) PackProposals(Arg0 *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ProposalsOutput serves as a container for the return parameters of contract
|
||||||
|
// method Proposals.
|
||||||
type ProposalsOutput struct {
|
type ProposalsOutput struct {
|
||||||
Recipient common.Address
|
Recipient common.Address
|
||||||
Amount *big.Int
|
Amount *big.Int
|
||||||
|
|
@ -356,37 +377,31 @@ type ProposalsOutput struct {
|
||||||
ProposalHash [32]byte
|
ProposalHash [32]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackProposals is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x013cf08b.
|
||||||
|
//
|
||||||
|
// Solidity: function proposals(uint256 ) returns(address recipient, uint256 amount, string description, uint256 votingDeadline, bool executed, bool proposalPassed, uint256 numberOfVotes, int256 currentResult, bytes32 proposalHash)
|
||||||
func (dAO *DAO) UnpackProposals(data []byte) (ProposalsOutput, error) {
|
func (dAO *DAO) UnpackProposals(data []byte) (ProposalsOutput, error) {
|
||||||
out, err := dAO.abi.Unpack("proposals", data)
|
out, err := dAO.abi.Unpack("proposals", data)
|
||||||
|
|
||||||
outstruct := new(ProposalsOutput)
|
outstruct := new(ProposalsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
outstruct.Recipient = *abi.ConvertType(out[0], new(common.Address)).(*common.Address)
|
||||||
|
|
||||||
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Amount = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Description = *abi.ConvertType(out[2], new(string)).(*string)
|
outstruct.Description = *abi.ConvertType(out[2], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.VotingDeadline = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
|
outstruct.VotingDeadline = abi.ConvertType(out[3], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Executed = *abi.ConvertType(out[4], new(bool)).(*bool)
|
outstruct.Executed = *abi.ConvertType(out[4], new(bool)).(*bool)
|
||||||
|
|
||||||
outstruct.ProposalPassed = *abi.ConvertType(out[5], new(bool)).(*bool)
|
outstruct.ProposalPassed = *abi.ConvertType(out[5], new(bool)).(*bool)
|
||||||
|
|
||||||
outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(*big.Int)
|
outstruct.NumberOfVotes = abi.ConvertType(out[6], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(*big.Int)
|
outstruct.CurrentResult = abi.ConvertType(out[7], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.ProposalHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte)
|
outstruct.ProposalHash = *abi.ConvertType(out[8], new([32]byte)).(*[32]byte)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransferOwnership is a free data retrieval call binding the contract method 0xf2fde38b.
|
// TransferOwnership is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xf2fde38b.
|
||||||
//
|
//
|
||||||
// Solidity: function transferOwnership(address newOwner) returns()
|
// Solidity: function transferOwnership(address newOwner) returns()
|
||||||
func (dAO *DAO) PackTransferOwnership(NewOwner common.Address) []byte {
|
func (dAO *DAO) PackTransferOwnership(NewOwner common.Address) []byte {
|
||||||
|
|
@ -397,7 +412,8 @@ func (dAO *DAO) PackTransferOwnership(NewOwner common.Address) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Vote is a free data retrieval call binding the contract method 0xd3c0715b.
|
// Vote is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xd3c0715b.
|
||||||
//
|
//
|
||||||
// Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID)
|
// Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID)
|
||||||
func (dAO *DAO) PackVote(ProposalNumber *big.Int, SupportsProposal bool, JustificationText string) []byte {
|
func (dAO *DAO) PackVote(ProposalNumber *big.Int, SupportsProposal bool, JustificationText string) []byte {
|
||||||
|
|
@ -408,17 +424,17 @@ func (dAO *DAO) PackVote(ProposalNumber *big.Int, SupportsProposal bool, Justifi
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackVote is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xd3c0715b.
|
||||||
|
//
|
||||||
|
// Solidity: function vote(uint256 proposalNumber, bool supportsProposal, string justificationText) returns(uint256 voteID)
|
||||||
func (dAO *DAO) UnpackVote(data []byte) (*big.Int, error) {
|
func (dAO *DAO) UnpackVote(data []byte) (*big.Int, error) {
|
||||||
out, err := dAO.abi.Unpack("vote", data)
|
out, err := dAO.abi.Unpack("vote", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DAOChangeOfRules represents a ChangeOfRules event raised by the DAO contract.
|
// DAOChangeOfRules represents a ChangeOfRules event raised by the DAO contract.
|
||||||
|
|
@ -426,15 +442,21 @@ type DAOChangeOfRules struct {
|
||||||
MinimumQuorum *big.Int
|
MinimumQuorum *big.Int
|
||||||
DebatingPeriodInMinutes *big.Int
|
DebatingPeriodInMinutes *big.Int
|
||||||
MajorityMargin *big.Int
|
MajorityMargin *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DAOChangeOfRulesEventName = "ChangeOfRules"
|
const DAOChangeOfRulesEventName = "ChangeOfRules"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DAOChangeOfRules) ContractEventName() string {
|
func (DAOChangeOfRules) ContractEventName() string {
|
||||||
return DAOChangeOfRulesEventName
|
return DAOChangeOfRulesEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackChangeOfRulesEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event ChangeOfRules(uint256 minimumQuorum, uint256 debatingPeriodInMinutes, int256 majorityMargin)
|
||||||
func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, error) {
|
func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, error) {
|
||||||
event := "ChangeOfRules"
|
event := "ChangeOfRules"
|
||||||
if log.Topics[0] != dAO.abi.Events[event].ID {
|
if log.Topics[0] != dAO.abi.Events[event].ID {
|
||||||
|
|
@ -463,15 +485,21 @@ func (dAO *DAO) UnpackChangeOfRulesEvent(log *types.Log) (*DAOChangeOfRules, err
|
||||||
type DAOMembershipChanged struct {
|
type DAOMembershipChanged struct {
|
||||||
Member common.Address
|
Member common.Address
|
||||||
IsMember bool
|
IsMember bool
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DAOMembershipChangedEventName = "MembershipChanged"
|
const DAOMembershipChangedEventName = "MembershipChanged"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DAOMembershipChanged) ContractEventName() string {
|
func (DAOMembershipChanged) ContractEventName() string {
|
||||||
return DAOMembershipChangedEventName
|
return DAOMembershipChangedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMembershipChangedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event MembershipChanged(address member, bool isMember)
|
||||||
func (dAO *DAO) UnpackMembershipChangedEvent(log *types.Log) (*DAOMembershipChanged, error) {
|
func (dAO *DAO) UnpackMembershipChangedEvent(log *types.Log) (*DAOMembershipChanged, error) {
|
||||||
event := "MembershipChanged"
|
event := "MembershipChanged"
|
||||||
if log.Topics[0] != dAO.abi.Events[event].ID {
|
if log.Topics[0] != dAO.abi.Events[event].ID {
|
||||||
|
|
@ -502,15 +530,21 @@ type DAOProposalAdded struct {
|
||||||
Recipient common.Address
|
Recipient common.Address
|
||||||
Amount *big.Int
|
Amount *big.Int
|
||||||
Description string
|
Description string
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DAOProposalAddedEventName = "ProposalAdded"
|
const DAOProposalAddedEventName = "ProposalAdded"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DAOProposalAdded) ContractEventName() string {
|
func (DAOProposalAdded) ContractEventName() string {
|
||||||
return DAOProposalAddedEventName
|
return DAOProposalAddedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackProposalAddedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event ProposalAdded(uint256 proposalID, address recipient, uint256 amount, string description)
|
||||||
func (dAO *DAO) UnpackProposalAddedEvent(log *types.Log) (*DAOProposalAdded, error) {
|
func (dAO *DAO) UnpackProposalAddedEvent(log *types.Log) (*DAOProposalAdded, error) {
|
||||||
event := "ProposalAdded"
|
event := "ProposalAdded"
|
||||||
if log.Topics[0] != dAO.abi.Events[event].ID {
|
if log.Topics[0] != dAO.abi.Events[event].ID {
|
||||||
|
|
@ -541,15 +575,21 @@ type DAOProposalTallied struct {
|
||||||
Result *big.Int
|
Result *big.Int
|
||||||
Quorum *big.Int
|
Quorum *big.Int
|
||||||
Active bool
|
Active bool
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DAOProposalTalliedEventName = "ProposalTallied"
|
const DAOProposalTalliedEventName = "ProposalTallied"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DAOProposalTallied) ContractEventName() string {
|
func (DAOProposalTallied) ContractEventName() string {
|
||||||
return DAOProposalTalliedEventName
|
return DAOProposalTalliedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackProposalTalliedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event ProposalTallied(uint256 proposalID, int256 result, uint256 quorum, bool active)
|
||||||
func (dAO *DAO) UnpackProposalTalliedEvent(log *types.Log) (*DAOProposalTallied, error) {
|
func (dAO *DAO) UnpackProposalTalliedEvent(log *types.Log) (*DAOProposalTallied, error) {
|
||||||
event := "ProposalTallied"
|
event := "ProposalTallied"
|
||||||
if log.Topics[0] != dAO.abi.Events[event].ID {
|
if log.Topics[0] != dAO.abi.Events[event].ID {
|
||||||
|
|
@ -580,15 +620,21 @@ type DAOVoted struct {
|
||||||
Position bool
|
Position bool
|
||||||
Voter common.Address
|
Voter common.Address
|
||||||
Justification string
|
Justification string
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DAOVotedEventName = "Voted"
|
const DAOVotedEventName = "Voted"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DAOVoted) ContractEventName() string {
|
func (DAOVoted) ContractEventName() string {
|
||||||
return DAOVotedEventName
|
return DAOVotedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackVotedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event Voted(uint256 proposalID, bool position, address voter, string justification)
|
||||||
func (dAO *DAO) UnpackVotedEvent(log *types.Log) (*DAOVoted, error) {
|
func (dAO *DAO) UnpackVotedEvent(log *types.Log) (*DAOVoted, error) {
|
||||||
event := "Voted"
|
event := "Voted"
|
||||||
if log.Topics[0] != dAO.abi.Events[event].ID {
|
if log.Topics[0] != dAO.abi.Events[event].ID {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *DeeplyNestedArray) Instance(backend bind.ContractBackend, addr common.A
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeepUint64Array is a free data retrieval call binding the contract method 0x98ed1856.
|
// DeepUint64Array is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x98ed1856.
|
||||||
//
|
//
|
||||||
// Solidity: function deepUint64Array(uint256 , uint256 , uint256 ) view returns(uint64)
|
// Solidity: function deepUint64Array(uint256 , uint256 , uint256 ) view returns(uint64)
|
||||||
func (deeplyNestedArray *DeeplyNestedArray) PackDeepUint64Array(Arg0 *big.Int, Arg1 *big.Int, Arg2 *big.Int) []byte {
|
func (deeplyNestedArray *DeeplyNestedArray) PackDeepUint64Array(Arg0 *big.Int, Arg1 *big.Int, Arg2 *big.Int) []byte {
|
||||||
|
|
@ -60,20 +63,21 @@ func (deeplyNestedArray *DeeplyNestedArray) PackDeepUint64Array(Arg0 *big.Int, A
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDeepUint64Array is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x98ed1856.
|
||||||
|
//
|
||||||
|
// Solidity: function deepUint64Array(uint256 , uint256 , uint256 ) view returns(uint64)
|
||||||
func (deeplyNestedArray *DeeplyNestedArray) UnpackDeepUint64Array(data []byte) (uint64, error) {
|
func (deeplyNestedArray *DeeplyNestedArray) UnpackDeepUint64Array(data []byte) (uint64, error) {
|
||||||
out, err := deeplyNestedArray.abi.Unpack("deepUint64Array", data)
|
out, err := deeplyNestedArray.abi.Unpack("deepUint64Array", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(uint64), err
|
return *new(uint64), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
|
out0 := *abi.ConvertType(out[0], new(uint64)).(*uint64)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// RetrieveDeepArray is a free data retrieval call binding the contract method 0x8ed4573a.
|
// RetrieveDeepArray is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x8ed4573a.
|
||||||
//
|
//
|
||||||
// Solidity: function retrieveDeepArray() view returns(uint64[3][4][5])
|
// Solidity: function retrieveDeepArray() view returns(uint64[3][4][5])
|
||||||
func (deeplyNestedArray *DeeplyNestedArray) PackRetrieveDeepArray() []byte {
|
func (deeplyNestedArray *DeeplyNestedArray) PackRetrieveDeepArray() []byte {
|
||||||
|
|
@ -84,20 +88,21 @@ func (deeplyNestedArray *DeeplyNestedArray) PackRetrieveDeepArray() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackRetrieveDeepArray is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x8ed4573a.
|
||||||
|
//
|
||||||
|
// Solidity: function retrieveDeepArray() view returns(uint64[3][4][5])
|
||||||
func (deeplyNestedArray *DeeplyNestedArray) UnpackRetrieveDeepArray(data []byte) ([5][4][3]uint64, error) {
|
func (deeplyNestedArray *DeeplyNestedArray) UnpackRetrieveDeepArray(data []byte) ([5][4][3]uint64, error) {
|
||||||
out, err := deeplyNestedArray.abi.Unpack("retrieveDeepArray", data)
|
out, err := deeplyNestedArray.abi.Unpack("retrieveDeepArray", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([5][4][3]uint64), err
|
return *new([5][4][3]uint64), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([5][4][3]uint64)).(*[5][4][3]uint64)
|
out0 := *abi.ConvertType(out[0], new([5][4][3]uint64)).(*[5][4][3]uint64)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// StoreDeepUintArray is a free data retrieval call binding the contract method 0x34424855.
|
// StoreDeepUintArray is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x34424855.
|
||||||
//
|
//
|
||||||
// Solidity: function storeDeepUintArray(uint64[3][4][5] arr) returns()
|
// Solidity: function storeDeepUintArray(uint64[3][4][5] arr) returns()
|
||||||
func (deeplyNestedArray *DeeplyNestedArray) PackStoreDeepUintArray(Arr [5][4][3]uint64) []byte {
|
func (deeplyNestedArray *DeeplyNestedArray) PackStoreDeepUintArray(Arr [5][4][3]uint64) []byte {
|
||||||
|
|
|
||||||
4
accounts/abi/abigen/testdata/v2/empty.go.txt
vendored
4
accounts/abi/abigen/testdata/v2/empty.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -54,15 +56,21 @@ type EventCheckerDynamic struct {
|
||||||
IdxDat common.Hash
|
IdxDat common.Hash
|
||||||
Str string
|
Str string
|
||||||
Dat []byte
|
Dat []byte
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const EventCheckerDynamicEventName = "dynamic"
|
const EventCheckerDynamicEventName = "dynamic"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (EventCheckerDynamic) ContractEventName() string {
|
func (EventCheckerDynamic) ContractEventName() string {
|
||||||
return EventCheckerDynamicEventName
|
return EventCheckerDynamicEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDynamicEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event dynamic(string indexed idxStr, bytes indexed idxDat, string str, bytes dat)
|
||||||
func (eventChecker *EventChecker) UnpackDynamicEvent(log *types.Log) (*EventCheckerDynamic, error) {
|
func (eventChecker *EventChecker) UnpackDynamicEvent(log *types.Log) (*EventCheckerDynamic, error) {
|
||||||
event := "dynamic"
|
event := "dynamic"
|
||||||
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
||||||
|
|
@ -94,10 +102,15 @@ type EventCheckerEmpty struct {
|
||||||
|
|
||||||
const EventCheckerEmptyEventName = "empty"
|
const EventCheckerEmptyEventName = "empty"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (EventCheckerEmpty) ContractEventName() string {
|
func (EventCheckerEmpty) ContractEventName() string {
|
||||||
return EventCheckerEmptyEventName
|
return EventCheckerEmptyEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackEmptyEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event empty()
|
||||||
func (eventChecker *EventChecker) UnpackEmptyEvent(log *types.Log) (*EventCheckerEmpty, error) {
|
func (eventChecker *EventChecker) UnpackEmptyEvent(log *types.Log) (*EventCheckerEmpty, error) {
|
||||||
event := "empty"
|
event := "empty"
|
||||||
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
||||||
|
|
@ -126,15 +139,21 @@ func (eventChecker *EventChecker) UnpackEmptyEvent(log *types.Log) (*EventChecke
|
||||||
type EventCheckerIndexed struct {
|
type EventCheckerIndexed struct {
|
||||||
Addr common.Address
|
Addr common.Address
|
||||||
Num *big.Int
|
Num *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const EventCheckerIndexedEventName = "indexed"
|
const EventCheckerIndexedEventName = "indexed"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (EventCheckerIndexed) ContractEventName() string {
|
func (EventCheckerIndexed) ContractEventName() string {
|
||||||
return EventCheckerIndexedEventName
|
return EventCheckerIndexedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackIndexedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event indexed(address indexed addr, int256 indexed num)
|
||||||
func (eventChecker *EventChecker) UnpackIndexedEvent(log *types.Log) (*EventCheckerIndexed, error) {
|
func (eventChecker *EventChecker) UnpackIndexedEvent(log *types.Log) (*EventCheckerIndexed, error) {
|
||||||
event := "indexed"
|
event := "indexed"
|
||||||
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
||||||
|
|
@ -163,15 +182,21 @@ func (eventChecker *EventChecker) UnpackIndexedEvent(log *types.Log) (*EventChec
|
||||||
type EventCheckerMixed struct {
|
type EventCheckerMixed struct {
|
||||||
Addr common.Address
|
Addr common.Address
|
||||||
Num *big.Int
|
Num *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const EventCheckerMixedEventName = "mixed"
|
const EventCheckerMixedEventName = "mixed"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (EventCheckerMixed) ContractEventName() string {
|
func (EventCheckerMixed) ContractEventName() string {
|
||||||
return EventCheckerMixedEventName
|
return EventCheckerMixedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMixedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event mixed(address indexed addr, int256 num)
|
||||||
func (eventChecker *EventChecker) UnpackMixedEvent(log *types.Log) (*EventCheckerMixed, error) {
|
func (eventChecker *EventChecker) UnpackMixedEvent(log *types.Log) (*EventCheckerMixed, error) {
|
||||||
event := "mixed"
|
event := "mixed"
|
||||||
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
||||||
|
|
@ -200,15 +225,21 @@ func (eventChecker *EventChecker) UnpackMixedEvent(log *types.Log) (*EventChecke
|
||||||
type EventCheckerUnnamed struct {
|
type EventCheckerUnnamed struct {
|
||||||
Arg0 *big.Int
|
Arg0 *big.Int
|
||||||
Arg1 *big.Int
|
Arg1 *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const EventCheckerUnnamedEventName = "unnamed"
|
const EventCheckerUnnamedEventName = "unnamed"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (EventCheckerUnnamed) ContractEventName() string {
|
func (EventCheckerUnnamed) ContractEventName() string {
|
||||||
return EventCheckerUnnamedEventName
|
return EventCheckerUnnamedEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackUnnamedEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event unnamed(uint256 indexed arg0, uint256 indexed arg1)
|
||||||
func (eventChecker *EventChecker) UnpackUnnamedEvent(log *types.Log) (*EventCheckerUnnamed, error) {
|
func (eventChecker *EventChecker) UnpackUnnamedEvent(log *types.Log) (*EventCheckerUnnamed, error) {
|
||||||
event := "unnamed"
|
event := "unnamed"
|
||||||
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
if log.Topics[0] != eventChecker.abi.Events[event].ID {
|
||||||
|
|
|
||||||
18
accounts/abi/abigen/testdata/v2/getter.go.txt
vendored
18
accounts/abi/abigen/testdata/v2/getter.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *Getter) Instance(backend bind.ContractBackend, addr common.Address) *bi
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Getter is a free data retrieval call binding the contract method 0x993a04b7.
|
// Getter is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x993a04b7.
|
||||||
//
|
//
|
||||||
// Solidity: function getter() returns(string, int256, bytes32)
|
// Solidity: function getter() returns(string, int256, bytes32)
|
||||||
func (getter *Getter) PackGetter() []byte {
|
func (getter *Getter) PackGetter() []byte {
|
||||||
|
|
@ -60,26 +63,27 @@ func (getter *Getter) PackGetter() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetterOutput serves as a container for the return parameters of contract
|
||||||
|
// method Getter.
|
||||||
type GetterOutput struct {
|
type GetterOutput struct {
|
||||||
Arg0 string
|
Arg0 string
|
||||||
Arg1 *big.Int
|
Arg1 *big.Int
|
||||||
Arg2 [32]byte
|
Arg2 [32]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGetter is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x993a04b7.
|
||||||
|
//
|
||||||
|
// Solidity: function getter() returns(string, int256, bytes32)
|
||||||
func (getter *Getter) UnpackGetter(data []byte) (GetterOutput, error) {
|
func (getter *Getter) UnpackGetter(data []byte) (GetterOutput, error) {
|
||||||
out, err := getter.abi.Unpack("getter", data)
|
out, err := getter.abi.Unpack("getter", data)
|
||||||
|
|
||||||
outstruct := new(GetterOutput)
|
outstruct := new(GetterOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg2 = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
|
outstruct.Arg2 = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *IdentifierCollision) Instance(backend bind.ContractBackend, addr common
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MyVar is a free data retrieval call binding the contract method 0x4ef1f0ad.
|
// MyVar is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x4ef1f0ad.
|
||||||
//
|
//
|
||||||
// Solidity: function MyVar() view returns(uint256)
|
// Solidity: function MyVar() view returns(uint256)
|
||||||
func (identifierCollision *IdentifierCollision) PackMyVar() []byte {
|
func (identifierCollision *IdentifierCollision) PackMyVar() []byte {
|
||||||
|
|
@ -60,20 +63,21 @@ func (identifierCollision *IdentifierCollision) PackMyVar() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMyVar is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x4ef1f0ad.
|
||||||
|
//
|
||||||
|
// Solidity: function MyVar() view returns(uint256)
|
||||||
func (identifierCollision *IdentifierCollision) UnpackMyVar(data []byte) (*big.Int, error) {
|
func (identifierCollision *IdentifierCollision) UnpackMyVar(data []byte) (*big.Int, error) {
|
||||||
out, err := identifierCollision.abi.Unpack("MyVar", data)
|
out, err := identifierCollision.abi.Unpack("MyVar", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PubVar is a free data retrieval call binding the contract method 0x01ad4d87.
|
// PubVar is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x01ad4d87.
|
||||||
//
|
//
|
||||||
// Solidity: function _myVar() view returns(uint256)
|
// Solidity: function _myVar() view returns(uint256)
|
||||||
func (identifierCollision *IdentifierCollision) PackPubVar() []byte {
|
func (identifierCollision *IdentifierCollision) PackPubVar() []byte {
|
||||||
|
|
@ -84,15 +88,15 @@ func (identifierCollision *IdentifierCollision) PackPubVar() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackPubVar is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x01ad4d87.
|
||||||
|
//
|
||||||
|
// Solidity: function _myVar() view returns(uint256)
|
||||||
func (identifierCollision *IdentifierCollision) UnpackPubVar(data []byte) (*big.Int, error) {
|
func (identifierCollision *IdentifierCollision) UnpackPubVar(data []byte) (*big.Int, error) {
|
||||||
out, err := identifierCollision.abi.Unpack("_myVar", data)
|
out, err := identifierCollision.abi.Unpack("_myVar", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -48,7 +50,8 @@ func (c *InputChecker) Instance(backend bind.ContractBackend, addr common.Addres
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AnonInput is a free data retrieval call binding the contract method 0x3e708e82.
|
// AnonInput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x3e708e82.
|
||||||
//
|
//
|
||||||
// Solidity: function anonInput(string ) returns()
|
// Solidity: function anonInput(string ) returns()
|
||||||
func (inputChecker *InputChecker) PackAnonInput(Arg0 string) []byte {
|
func (inputChecker *InputChecker) PackAnonInput(Arg0 string) []byte {
|
||||||
|
|
@ -59,7 +62,8 @@ func (inputChecker *InputChecker) PackAnonInput(Arg0 string) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// AnonInputs is a free data retrieval call binding the contract method 0x28160527.
|
// AnonInputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x28160527.
|
||||||
//
|
//
|
||||||
// Solidity: function anonInputs(string , string ) returns()
|
// Solidity: function anonInputs(string , string ) returns()
|
||||||
func (inputChecker *InputChecker) PackAnonInputs(Arg0 string, Arg1 string) []byte {
|
func (inputChecker *InputChecker) PackAnonInputs(Arg0 string, Arg1 string) []byte {
|
||||||
|
|
@ -70,7 +74,8 @@ func (inputChecker *InputChecker) PackAnonInputs(Arg0 string, Arg1 string) []byt
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// MixedInputs is a free data retrieval call binding the contract method 0xc689ebdc.
|
// MixedInputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xc689ebdc.
|
||||||
//
|
//
|
||||||
// Solidity: function mixedInputs(string , string str) returns()
|
// Solidity: function mixedInputs(string , string str) returns()
|
||||||
func (inputChecker *InputChecker) PackMixedInputs(Arg0 string, Str string) []byte {
|
func (inputChecker *InputChecker) PackMixedInputs(Arg0 string, Str string) []byte {
|
||||||
|
|
@ -81,7 +86,8 @@ func (inputChecker *InputChecker) PackMixedInputs(Arg0 string, Str string) []byt
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// NamedInput is a free data retrieval call binding the contract method 0x0d402005.
|
// NamedInput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x0d402005.
|
||||||
//
|
//
|
||||||
// Solidity: function namedInput(string str) returns()
|
// Solidity: function namedInput(string str) returns()
|
||||||
func (inputChecker *InputChecker) PackNamedInput(Str string) []byte {
|
func (inputChecker *InputChecker) PackNamedInput(Str string) []byte {
|
||||||
|
|
@ -92,7 +98,8 @@ func (inputChecker *InputChecker) PackNamedInput(Str string) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// NamedInputs is a free data retrieval call binding the contract method 0x63c796ed.
|
// NamedInputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x63c796ed.
|
||||||
//
|
//
|
||||||
// Solidity: function namedInputs(string str1, string str2) returns()
|
// Solidity: function namedInputs(string str1, string str2) returns()
|
||||||
func (inputChecker *InputChecker) PackNamedInputs(Str1 string, Str2 string) []byte {
|
func (inputChecker *InputChecker) PackNamedInputs(Str1 string, Str2 string) []byte {
|
||||||
|
|
@ -103,7 +110,8 @@ func (inputChecker *InputChecker) PackNamedInputs(Str1 string, Str2 string) []by
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// NoInput is a free data retrieval call binding the contract method 0x53539029.
|
// NoInput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x53539029.
|
||||||
//
|
//
|
||||||
// Solidity: function noInput() returns()
|
// Solidity: function noInput() returns()
|
||||||
func (inputChecker *InputChecker) PackNoInput() []byte {
|
func (inputChecker *InputChecker) PackNoInput() []byte {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,6 +51,10 @@ func (c *Interactor) Instance(backend bind.ContractBackend, addr common.Address)
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: constructor(string str) returns()
|
||||||
func (interactor *Interactor) PackConstructor(str string) []byte {
|
func (interactor *Interactor) PackConstructor(str string) []byte {
|
||||||
enc, err := interactor.abi.Pack("", str)
|
enc, err := interactor.abi.Pack("", str)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -57,7 +63,8 @@ func (interactor *Interactor) PackConstructor(str string) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// DeployString is a free data retrieval call binding the contract method 0x6874e809.
|
// DeployString is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x6874e809.
|
||||||
//
|
//
|
||||||
// Solidity: function deployString() returns(string)
|
// Solidity: function deployString() returns(string)
|
||||||
func (interactor *Interactor) PackDeployString() []byte {
|
func (interactor *Interactor) PackDeployString() []byte {
|
||||||
|
|
@ -68,20 +75,21 @@ func (interactor *Interactor) PackDeployString() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDeployString is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x6874e809.
|
||||||
|
//
|
||||||
|
// Solidity: function deployString() returns(string)
|
||||||
func (interactor *Interactor) UnpackDeployString(data []byte) (string, error) {
|
func (interactor *Interactor) UnpackDeployString(data []byte) (string, error) {
|
||||||
out, err := interactor.abi.Unpack("deployString", data)
|
out, err := interactor.abi.Unpack("deployString", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(string), err
|
return *new(string), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transact is a free data retrieval call binding the contract method 0xd736c513.
|
// Transact is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xd736c513.
|
||||||
//
|
//
|
||||||
// Solidity: function transact(string str) returns()
|
// Solidity: function transact(string str) returns()
|
||||||
func (interactor *Interactor) PackTransact(Str string) []byte {
|
func (interactor *Interactor) PackTransact(Str string) []byte {
|
||||||
|
|
@ -92,7 +100,8 @@ func (interactor *Interactor) PackTransact(Str string) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransactString is a free data retrieval call binding the contract method 0x0d86a0e1.
|
// TransactString is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x0d86a0e1.
|
||||||
//
|
//
|
||||||
// Solidity: function transactString() returns(string)
|
// Solidity: function transactString() returns(string)
|
||||||
func (interactor *Interactor) PackTransactString() []byte {
|
func (interactor *Interactor) PackTransactString() []byte {
|
||||||
|
|
@ -103,15 +112,15 @@ func (interactor *Interactor) PackTransactString() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTransactString is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x0d86a0e1.
|
||||||
|
//
|
||||||
|
// Solidity: function transactString() returns(string)
|
||||||
func (interactor *Interactor) UnpackTransactString(data []byte) (string, error) {
|
func (interactor *Interactor) UnpackTransactString(data []byte) (string, error) {
|
||||||
out, err := interactor.abi.Unpack("transactString", data)
|
out, err := interactor.abi.Unpack("transactString", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(string), err
|
return *new(string), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -55,7 +57,8 @@ func (c *NameConflict) Instance(backend bind.ContractBackend, addr common.Addres
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AddRequest is a free data retrieval call binding the contract method 0xcce7b048.
|
// AddRequest is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xcce7b048.
|
||||||
//
|
//
|
||||||
// Solidity: function addRequest((bytes,bytes) req) pure returns()
|
// Solidity: function addRequest((bytes,bytes) req) pure returns()
|
||||||
func (nameConflict *NameConflict) PackAddRequest(Req Oraclerequest) []byte {
|
func (nameConflict *NameConflict) PackAddRequest(Req Oraclerequest) []byte {
|
||||||
|
|
@ -66,7 +69,8 @@ func (nameConflict *NameConflict) PackAddRequest(Req Oraclerequest) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetRequest is a free data retrieval call binding the contract method 0xc2bb515f.
|
// GetRequest is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xc2bb515f.
|
||||||
//
|
//
|
||||||
// Solidity: function getRequest() pure returns((bytes,bytes))
|
// Solidity: function getRequest() pure returns((bytes,bytes))
|
||||||
func (nameConflict *NameConflict) PackGetRequest() []byte {
|
func (nameConflict *NameConflict) PackGetRequest() []byte {
|
||||||
|
|
@ -77,32 +81,38 @@ func (nameConflict *NameConflict) PackGetRequest() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGetRequest is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xc2bb515f.
|
||||||
|
//
|
||||||
|
// Solidity: function getRequest() pure returns((bytes,bytes))
|
||||||
func (nameConflict *NameConflict) UnpackGetRequest(data []byte) (Oraclerequest, error) {
|
func (nameConflict *NameConflict) UnpackGetRequest(data []byte) (Oraclerequest, error) {
|
||||||
out, err := nameConflict.abi.Unpack("getRequest", data)
|
out, err := nameConflict.abi.Unpack("getRequest", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(Oraclerequest), err
|
return *new(Oraclerequest), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(Oraclerequest)).(*Oraclerequest)
|
out0 := *abi.ConvertType(out[0], new(Oraclerequest)).(*Oraclerequest)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NameConflictLog represents a Log event raised by the NameConflict contract.
|
// NameConflictLog represents a Log event raised by the NameConflict contract.
|
||||||
type NameConflictLog struct {
|
type NameConflictLog struct {
|
||||||
Msg *big.Int
|
Msg *big.Int
|
||||||
Msg0 *big.Int
|
Msg0 *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const NameConflictLogEventName = "log"
|
const NameConflictLogEventName = "log"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (NameConflictLog) ContractEventName() string {
|
func (NameConflictLog) ContractEventName() string {
|
||||||
return NameConflictLogEventName
|
return NameConflictLogEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackLogEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event log(int256 msg, int256 _msg)
|
||||||
func (nameConflict *NameConflict) UnpackLogEvent(log *types.Log) (*NameConflictLog, error) {
|
func (nameConflict *NameConflict) UnpackLogEvent(log *types.Log) (*NameConflictLog, error) {
|
||||||
event := "log"
|
event := "log"
|
||||||
if log.Topics[0] != nameConflict.abi.Events[event].ID {
|
if log.Topics[0] != nameConflict.abi.Events[event].ID {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *NumericMethodName) Instance(backend bind.ContractBackend, addr common.A
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// E1test is a free data retrieval call binding the contract method 0xffa02795.
|
// E1test is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xffa02795.
|
||||||
//
|
//
|
||||||
// Solidity: function _1test() pure returns()
|
// Solidity: function _1test() pure returns()
|
||||||
func (numericMethodName *NumericMethodName) PackE1test() []byte {
|
func (numericMethodName *NumericMethodName) PackE1test() []byte {
|
||||||
|
|
@ -60,7 +63,8 @@ func (numericMethodName *NumericMethodName) PackE1test() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// E1test0 is a free data retrieval call binding the contract method 0xd02767c7.
|
// E1test0 is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xd02767c7.
|
||||||
//
|
//
|
||||||
// Solidity: function __1test() pure returns()
|
// Solidity: function __1test() pure returns()
|
||||||
func (numericMethodName *NumericMethodName) PackE1test0() []byte {
|
func (numericMethodName *NumericMethodName) PackE1test0() []byte {
|
||||||
|
|
@ -71,7 +75,8 @@ func (numericMethodName *NumericMethodName) PackE1test0() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// E2test is a free data retrieval call binding the contract method 0x9d993132.
|
// E2test is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x9d993132.
|
||||||
//
|
//
|
||||||
// Solidity: function __2test() pure returns()
|
// Solidity: function __2test() pure returns()
|
||||||
func (numericMethodName *NumericMethodName) PackE2test() []byte {
|
func (numericMethodName *NumericMethodName) PackE2test() []byte {
|
||||||
|
|
@ -85,15 +90,21 @@ func (numericMethodName *NumericMethodName) PackE2test() []byte {
|
||||||
// NumericMethodNameE1TestEvent represents a E1TestEvent event raised by the NumericMethodName contract.
|
// NumericMethodNameE1TestEvent represents a E1TestEvent event raised by the NumericMethodName contract.
|
||||||
type NumericMethodNameE1TestEvent struct {
|
type NumericMethodNameE1TestEvent struct {
|
||||||
Param common.Address
|
Param common.Address
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const NumericMethodNameE1TestEventEventName = "_1TestEvent"
|
const NumericMethodNameE1TestEventEventName = "_1TestEvent"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (NumericMethodNameE1TestEvent) ContractEventName() string {
|
func (NumericMethodNameE1TestEvent) ContractEventName() string {
|
||||||
return NumericMethodNameE1TestEventEventName
|
return NumericMethodNameE1TestEventEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackE1TestEventEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event _1TestEvent(address _param)
|
||||||
func (numericMethodName *NumericMethodName) UnpackE1TestEventEvent(log *types.Log) (*NumericMethodNameE1TestEvent, error) {
|
func (numericMethodName *NumericMethodName) UnpackE1TestEventEvent(log *types.Log) (*NumericMethodNameE1TestEvent, error) {
|
||||||
event := "_1TestEvent"
|
event := "_1TestEvent"
|
||||||
if log.Topics[0] != numericMethodName.abi.Events[event].ID {
|
if log.Topics[0] != numericMethodName.abi.Events[event].ID {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -48,7 +50,8 @@ func (c *OutputChecker) Instance(backend bind.ContractBackend, addr common.Addre
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AnonOutput is a free data retrieval call binding the contract method 0x008bda05.
|
// AnonOutput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x008bda05.
|
||||||
//
|
//
|
||||||
// Solidity: function anonOutput() returns(string)
|
// Solidity: function anonOutput() returns(string)
|
||||||
func (outputChecker *OutputChecker) PackAnonOutput() []byte {
|
func (outputChecker *OutputChecker) PackAnonOutput() []byte {
|
||||||
|
|
@ -59,20 +62,21 @@ func (outputChecker *OutputChecker) PackAnonOutput() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackAnonOutput is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x008bda05.
|
||||||
|
//
|
||||||
|
// Solidity: function anonOutput() returns(string)
|
||||||
func (outputChecker *OutputChecker) UnpackAnonOutput(data []byte) (string, error) {
|
func (outputChecker *OutputChecker) UnpackAnonOutput(data []byte) (string, error) {
|
||||||
out, err := outputChecker.abi.Unpack("anonOutput", data)
|
out, err := outputChecker.abi.Unpack("anonOutput", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(string), err
|
return *new(string), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AnonOutputs is a free data retrieval call binding the contract method 0x3c401115.
|
// AnonOutputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x3c401115.
|
||||||
//
|
//
|
||||||
// Solidity: function anonOutputs() returns(string, string)
|
// Solidity: function anonOutputs() returns(string, string)
|
||||||
func (outputChecker *OutputChecker) PackAnonOutputs() []byte {
|
func (outputChecker *OutputChecker) PackAnonOutputs() []byte {
|
||||||
|
|
@ -83,28 +87,31 @@ func (outputChecker *OutputChecker) PackAnonOutputs() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AnonOutputsOutput serves as a container for the return parameters of contract
|
||||||
|
// method AnonOutputs.
|
||||||
type AnonOutputsOutput struct {
|
type AnonOutputsOutput struct {
|
||||||
Arg0 string
|
Arg0 string
|
||||||
Arg1 string
|
Arg1 string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackAnonOutputs is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x3c401115.
|
||||||
|
//
|
||||||
|
// Solidity: function anonOutputs() returns(string, string)
|
||||||
func (outputChecker *OutputChecker) UnpackAnonOutputs(data []byte) (AnonOutputsOutput, error) {
|
func (outputChecker *OutputChecker) UnpackAnonOutputs(data []byte) (AnonOutputsOutput, error) {
|
||||||
out, err := outputChecker.abi.Unpack("anonOutputs", data)
|
out, err := outputChecker.abi.Unpack("anonOutputs", data)
|
||||||
|
|
||||||
outstruct := new(AnonOutputsOutput)
|
outstruct := new(AnonOutputsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.Arg1 = *abi.ConvertType(out[1], new(string)).(*string)
|
outstruct.Arg1 = *abi.ConvertType(out[1], new(string)).(*string)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// CollidingOutputs is a free data retrieval call binding the contract method 0xeccbc1ee.
|
// CollidingOutputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xeccbc1ee.
|
||||||
//
|
//
|
||||||
// Solidity: function collidingOutputs() returns(string str, string Str)
|
// Solidity: function collidingOutputs() returns(string str, string Str)
|
||||||
func (outputChecker *OutputChecker) PackCollidingOutputs() []byte {
|
func (outputChecker *OutputChecker) PackCollidingOutputs() []byte {
|
||||||
|
|
@ -115,28 +122,31 @@ func (outputChecker *OutputChecker) PackCollidingOutputs() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// CollidingOutputsOutput serves as a container for the return parameters of contract
|
||||||
|
// method CollidingOutputs.
|
||||||
type CollidingOutputsOutput struct {
|
type CollidingOutputsOutput struct {
|
||||||
Str string
|
Str string
|
||||||
Str0 string
|
Str0 string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackCollidingOutputs is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xeccbc1ee.
|
||||||
|
//
|
||||||
|
// Solidity: function collidingOutputs() returns(string str, string Str)
|
||||||
func (outputChecker *OutputChecker) UnpackCollidingOutputs(data []byte) (CollidingOutputsOutput, error) {
|
func (outputChecker *OutputChecker) UnpackCollidingOutputs(data []byte) (CollidingOutputsOutput, error) {
|
||||||
out, err := outputChecker.abi.Unpack("collidingOutputs", data)
|
out, err := outputChecker.abi.Unpack("collidingOutputs", data)
|
||||||
|
|
||||||
outstruct := new(CollidingOutputsOutput)
|
outstruct := new(CollidingOutputsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Str = *abi.ConvertType(out[0], new(string)).(*string)
|
outstruct.Str = *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.Str0 = *abi.ConvertType(out[1], new(string)).(*string)
|
outstruct.Str0 = *abi.ConvertType(out[1], new(string)).(*string)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MixedOutputs is a free data retrieval call binding the contract method 0x21b77b44.
|
// MixedOutputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x21b77b44.
|
||||||
//
|
//
|
||||||
// Solidity: function mixedOutputs() returns(string, string str)
|
// Solidity: function mixedOutputs() returns(string, string str)
|
||||||
func (outputChecker *OutputChecker) PackMixedOutputs() []byte {
|
func (outputChecker *OutputChecker) PackMixedOutputs() []byte {
|
||||||
|
|
@ -147,28 +157,31 @@ func (outputChecker *OutputChecker) PackMixedOutputs() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MixedOutputsOutput serves as a container for the return parameters of contract
|
||||||
|
// method MixedOutputs.
|
||||||
type MixedOutputsOutput struct {
|
type MixedOutputsOutput struct {
|
||||||
Arg0 string
|
Arg0 string
|
||||||
Str string
|
Str string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackMixedOutputs is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x21b77b44.
|
||||||
|
//
|
||||||
|
// Solidity: function mixedOutputs() returns(string, string str)
|
||||||
func (outputChecker *OutputChecker) UnpackMixedOutputs(data []byte) (MixedOutputsOutput, error) {
|
func (outputChecker *OutputChecker) UnpackMixedOutputs(data []byte) (MixedOutputsOutput, error) {
|
||||||
out, err := outputChecker.abi.Unpack("mixedOutputs", data)
|
out, err := outputChecker.abi.Unpack("mixedOutputs", data)
|
||||||
|
|
||||||
outstruct := new(MixedOutputsOutput)
|
outstruct := new(MixedOutputsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
outstruct.Arg0 = *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.Str = *abi.ConvertType(out[1], new(string)).(*string)
|
outstruct.Str = *abi.ConvertType(out[1], new(string)).(*string)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NamedOutput is a free data retrieval call binding the contract method 0x5e632bd5.
|
// NamedOutput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x5e632bd5.
|
||||||
//
|
//
|
||||||
// Solidity: function namedOutput() returns(string str)
|
// Solidity: function namedOutput() returns(string str)
|
||||||
func (outputChecker *OutputChecker) PackNamedOutput() []byte {
|
func (outputChecker *OutputChecker) PackNamedOutput() []byte {
|
||||||
|
|
@ -179,20 +192,21 @@ func (outputChecker *OutputChecker) PackNamedOutput() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackNamedOutput is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x5e632bd5.
|
||||||
|
//
|
||||||
|
// Solidity: function namedOutput() returns(string str)
|
||||||
func (outputChecker *OutputChecker) UnpackNamedOutput(data []byte) (string, error) {
|
func (outputChecker *OutputChecker) UnpackNamedOutput(data []byte) (string, error) {
|
||||||
out, err := outputChecker.abi.Unpack("namedOutput", data)
|
out, err := outputChecker.abi.Unpack("namedOutput", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(string), err
|
return *new(string), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NamedOutputs is a free data retrieval call binding the contract method 0x7970a189.
|
// NamedOutputs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x7970a189.
|
||||||
//
|
//
|
||||||
// Solidity: function namedOutputs() returns(string str1, string str2)
|
// Solidity: function namedOutputs() returns(string str1, string str2)
|
||||||
func (outputChecker *OutputChecker) PackNamedOutputs() []byte {
|
func (outputChecker *OutputChecker) PackNamedOutputs() []byte {
|
||||||
|
|
@ -203,28 +217,31 @@ func (outputChecker *OutputChecker) PackNamedOutputs() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NamedOutputsOutput serves as a container for the return parameters of contract
|
||||||
|
// method NamedOutputs.
|
||||||
type NamedOutputsOutput struct {
|
type NamedOutputsOutput struct {
|
||||||
Str1 string
|
Str1 string
|
||||||
Str2 string
|
Str2 string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackNamedOutputs is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x7970a189.
|
||||||
|
//
|
||||||
|
// Solidity: function namedOutputs() returns(string str1, string str2)
|
||||||
func (outputChecker *OutputChecker) UnpackNamedOutputs(data []byte) (NamedOutputsOutput, error) {
|
func (outputChecker *OutputChecker) UnpackNamedOutputs(data []byte) (NamedOutputsOutput, error) {
|
||||||
out, err := outputChecker.abi.Unpack("namedOutputs", data)
|
out, err := outputChecker.abi.Unpack("namedOutputs", data)
|
||||||
|
|
||||||
outstruct := new(NamedOutputsOutput)
|
outstruct := new(NamedOutputsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Str1 = *abi.ConvertType(out[0], new(string)).(*string)
|
outstruct.Str1 = *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.Str2 = *abi.ConvertType(out[1], new(string)).(*string)
|
outstruct.Str2 = *abi.ConvertType(out[1], new(string)).(*string)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NoOutput is a free data retrieval call binding the contract method 0x625f0306.
|
// NoOutput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x625f0306.
|
||||||
//
|
//
|
||||||
// Solidity: function noOutput() returns()
|
// Solidity: function noOutput() returns()
|
||||||
func (outputChecker *OutputChecker) PackNoOutput() []byte {
|
func (outputChecker *OutputChecker) PackNoOutput() []byte {
|
||||||
|
|
|
||||||
28
accounts/abi/abigen/testdata/v2/overload.go.txt
vendored
28
accounts/abi/abigen/testdata/v2/overload.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *Overload) Instance(backend bind.ContractBackend, addr common.Address) *
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foo is a free data retrieval call binding the contract method 0x04bc52f8.
|
// Foo is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x04bc52f8.
|
||||||
//
|
//
|
||||||
// Solidity: function foo(uint256 i, uint256 j) returns()
|
// Solidity: function foo(uint256 i, uint256 j) returns()
|
||||||
func (overload *Overload) PackFoo(I *big.Int, J *big.Int) []byte {
|
func (overload *Overload) PackFoo(I *big.Int, J *big.Int) []byte {
|
||||||
|
|
@ -60,7 +63,8 @@ func (overload *Overload) PackFoo(I *big.Int, J *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foo0 is a free data retrieval call binding the contract method 0x2fbebd38.
|
// Foo0 is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2fbebd38.
|
||||||
//
|
//
|
||||||
// Solidity: function foo(uint256 i) returns()
|
// Solidity: function foo(uint256 i) returns()
|
||||||
func (overload *Overload) PackFoo0(I *big.Int) []byte {
|
func (overload *Overload) PackFoo0(I *big.Int) []byte {
|
||||||
|
|
@ -73,16 +77,22 @@ func (overload *Overload) PackFoo0(I *big.Int) []byte {
|
||||||
|
|
||||||
// OverloadBar represents a Bar event raised by the Overload contract.
|
// OverloadBar represents a Bar event raised by the Overload contract.
|
||||||
type OverloadBar struct {
|
type OverloadBar struct {
|
||||||
I *big.Int
|
I *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const OverloadBarEventName = "bar"
|
const OverloadBarEventName = "bar"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (OverloadBar) ContractEventName() string {
|
func (OverloadBar) ContractEventName() string {
|
||||||
return OverloadBarEventName
|
return OverloadBarEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBarEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event bar(uint256 i)
|
||||||
func (overload *Overload) UnpackBarEvent(log *types.Log) (*OverloadBar, error) {
|
func (overload *Overload) UnpackBarEvent(log *types.Log) (*OverloadBar, error) {
|
||||||
event := "bar"
|
event := "bar"
|
||||||
if log.Topics[0] != overload.abi.Events[event].ID {
|
if log.Topics[0] != overload.abi.Events[event].ID {
|
||||||
|
|
@ -109,17 +119,23 @@ func (overload *Overload) UnpackBarEvent(log *types.Log) (*OverloadBar, error) {
|
||||||
|
|
||||||
// OverloadBar0 represents a Bar0 event raised by the Overload contract.
|
// OverloadBar0 represents a Bar0 event raised by the Overload contract.
|
||||||
type OverloadBar0 struct {
|
type OverloadBar0 struct {
|
||||||
I *big.Int
|
I *big.Int
|
||||||
J *big.Int
|
J *big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const OverloadBar0EventName = "bar0"
|
const OverloadBar0EventName = "bar0"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (OverloadBar0) ContractEventName() string {
|
func (OverloadBar0) ContractEventName() string {
|
||||||
return OverloadBar0EventName
|
return OverloadBar0EventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBar0Event is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event bar(uint256 i, uint256 j)
|
||||||
func (overload *Overload) UnpackBar0Event(log *types.Log) (*OverloadBar0, error) {
|
func (overload *Overload) UnpackBar0Event(log *types.Log) (*OverloadBar0, error) {
|
||||||
event := "bar0"
|
event := "bar0"
|
||||||
if log.Topics[0] != overload.abi.Events[event].ID {
|
if log.Topics[0] != overload.abi.Events[event].ID {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *RangeKeyword) Instance(backend bind.ContractBackend, addr common.Addres
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// FunctionWithKeywordParameter is a free data retrieval call binding the contract method 0x527a119f.
|
// FunctionWithKeywordParameter is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x527a119f.
|
||||||
//
|
//
|
||||||
// Solidity: function functionWithKeywordParameter(uint256 range) pure returns()
|
// Solidity: function functionWithKeywordParameter(uint256 range) pure returns()
|
||||||
func (rangeKeyword *RangeKeyword) PackFunctionWithKeywordParameter(Arg0 *big.Int) []byte {
|
func (rangeKeyword *RangeKeyword) PackFunctionWithKeywordParameter(Arg0 *big.Int) []byte {
|
||||||
|
|
|
||||||
48
accounts/abi/abigen/testdata/v2/slicer.go.txt
vendored
48
accounts/abi/abigen/testdata/v2/slicer.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *Slicer) Instance(backend bind.ContractBackend, addr common.Address) *bi
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// EchoAddresses is a free data retrieval call binding the contract method 0xbe1127a3.
|
// EchoAddresses is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xbe1127a3.
|
||||||
//
|
//
|
||||||
// Solidity: function echoAddresses(address[] input) returns(address[] output)
|
// Solidity: function echoAddresses(address[] input) returns(address[] output)
|
||||||
func (slicer *Slicer) PackEchoAddresses(Input []common.Address) []byte {
|
func (slicer *Slicer) PackEchoAddresses(Input []common.Address) []byte {
|
||||||
|
|
@ -60,20 +63,21 @@ func (slicer *Slicer) PackEchoAddresses(Input []common.Address) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackEchoAddresses is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xbe1127a3.
|
||||||
|
//
|
||||||
|
// Solidity: function echoAddresses(address[] input) returns(address[] output)
|
||||||
func (slicer *Slicer) UnpackEchoAddresses(data []byte) ([]common.Address, error) {
|
func (slicer *Slicer) UnpackEchoAddresses(data []byte) ([]common.Address, error) {
|
||||||
out, err := slicer.abi.Unpack("echoAddresses", data)
|
out, err := slicer.abi.Unpack("echoAddresses", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([]common.Address), err
|
return *new([]common.Address), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address)
|
out0 := *abi.ConvertType(out[0], new([]common.Address)).(*[]common.Address)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// EchoBools is a free data retrieval call binding the contract method 0xf637e589.
|
// EchoBools is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xf637e589.
|
||||||
//
|
//
|
||||||
// Solidity: function echoBools(bool[] input) returns(bool[] output)
|
// Solidity: function echoBools(bool[] input) returns(bool[] output)
|
||||||
func (slicer *Slicer) PackEchoBools(Input []bool) []byte {
|
func (slicer *Slicer) PackEchoBools(Input []bool) []byte {
|
||||||
|
|
@ -84,20 +88,21 @@ func (slicer *Slicer) PackEchoBools(Input []bool) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackEchoBools is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xf637e589.
|
||||||
|
//
|
||||||
|
// Solidity: function echoBools(bool[] input) returns(bool[] output)
|
||||||
func (slicer *Slicer) UnpackEchoBools(data []byte) ([]bool, error) {
|
func (slicer *Slicer) UnpackEchoBools(data []byte) ([]bool, error) {
|
||||||
out, err := slicer.abi.Unpack("echoBools", data)
|
out, err := slicer.abi.Unpack("echoBools", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([]bool), err
|
return *new([]bool), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool)
|
out0 := *abi.ConvertType(out[0], new([]bool)).(*[]bool)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// EchoFancyInts is a free data retrieval call binding the contract method 0xd88becc0.
|
// EchoFancyInts is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xd88becc0.
|
||||||
//
|
//
|
||||||
// Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output)
|
// Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output)
|
||||||
func (slicer *Slicer) PackEchoFancyInts(Input [23]*big.Int) []byte {
|
func (slicer *Slicer) PackEchoFancyInts(Input [23]*big.Int) []byte {
|
||||||
|
|
@ -108,20 +113,21 @@ func (slicer *Slicer) PackEchoFancyInts(Input [23]*big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackEchoFancyInts is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xd88becc0.
|
||||||
|
//
|
||||||
|
// Solidity: function echoFancyInts(uint24[23] input) returns(uint24[23] output)
|
||||||
func (slicer *Slicer) UnpackEchoFancyInts(data []byte) ([23]*big.Int, error) {
|
func (slicer *Slicer) UnpackEchoFancyInts(data []byte) ([23]*big.Int, error) {
|
||||||
out, err := slicer.abi.Unpack("echoFancyInts", data)
|
out, err := slicer.abi.Unpack("echoFancyInts", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([23]*big.Int), err
|
return *new([23]*big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([23]*big.Int)).(*[23]*big.Int)
|
out0 := *abi.ConvertType(out[0], new([23]*big.Int)).(*[23]*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// EchoInts is a free data retrieval call binding the contract method 0xe15a3db7.
|
// EchoInts is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xe15a3db7.
|
||||||
//
|
//
|
||||||
// Solidity: function echoInts(int256[] input) returns(int256[] output)
|
// Solidity: function echoInts(int256[] input) returns(int256[] output)
|
||||||
func (slicer *Slicer) PackEchoInts(Input []*big.Int) []byte {
|
func (slicer *Slicer) PackEchoInts(Input []*big.Int) []byte {
|
||||||
|
|
@ -132,15 +138,15 @@ func (slicer *Slicer) PackEchoInts(Input []*big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackEchoInts is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xe15a3db7.
|
||||||
|
//
|
||||||
|
// Solidity: function echoInts(int256[] input) returns(int256[] output)
|
||||||
func (slicer *Slicer) UnpackEchoInts(data []byte) ([]*big.Int, error) {
|
func (slicer *Slicer) UnpackEchoInts(data []byte) ([]*big.Int, error) {
|
||||||
out, err := slicer.abi.Unpack("echoInts", data)
|
out, err := slicer.abi.Unpack("echoInts", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([]*big.Int), err
|
return *new([]*big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int)
|
out0 := *abi.ConvertType(out[0], new([]*big.Int)).(*[]*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package v1bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -48,66 +50,67 @@ func NewStructs() *Structs {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Instance creates a wrapper for a deployed contract instance at the given address.
|
// Instance creates a wrapper for a deployed contract instance at the given address.
|
||||||
|
<<<<<<< HEAD
|
||||||
// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc.
|
// Use this to create the instance object passed to abigen v2 library functions Call, Transact, etc.
|
||||||
func (c *Structs) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract {
|
func (c *Structs) Instance(backend bind.ContractBackend, addr common.Address) *bind.BoundContract {
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
|
=======
|
||||||
|
// Use this to create the instance object passed to abigen v2 library functions Call,
|
||||||
|
// Transact, etc.
|
||||||
|
func (c *Structs) Instance(backend bind.ContractBackend, addr common.Address) bind.BoundContract {
|
||||||
|
return bind.NewBoundContract(backend, addr, c.abi)
|
||||||
|
>>>>>>> 854c25e086 (accounts/abi/abigen: improve v2 template)
|
||||||
}
|
}
|
||||||
|
|
||||||
// F is a free data retrieval call binding the contract method 0x28811f59.
|
// F is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x28811f59.
|
||||||
//
|
//
|
||||||
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
|
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
|
||||||
func (structs *Structs) PackF() []byte {
|
func (structs *Structs) PackF() ([]byte, error) {
|
||||||
enc, err := structs.abi.Pack("F")
|
return structs.abi.Pack("F")
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return enc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FOutput serves as a container for the return parameters of contract
|
||||||
|
// method F.
|
||||||
type FOutput struct {
|
type FOutput struct {
|
||||||
A []Struct0
|
A []Struct0
|
||||||
C []*big.Int
|
C []*big.Int
|
||||||
D []bool
|
D []bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (structs *Structs) UnpackF(data []byte) (FOutput, error) {
|
// UnpackF is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x28811f59.
|
||||||
|
//
|
||||||
|
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
|
||||||
|
func (structs *Structs) UnpackF(data []byte) (*FOutput, error) {
|
||||||
out, err := structs.abi.Unpack("F", data)
|
out, err := structs.abi.Unpack("F", data)
|
||||||
|
|
||||||
outstruct := new(FOutput)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
ret := new(FOutput)
|
||||||
outstruct.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
ret.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
||||||
|
ret.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int)
|
||||||
outstruct.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int)
|
ret.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool)
|
||||||
|
return ret, nil
|
||||||
outstruct.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool)
|
|
||||||
|
|
||||||
return *outstruct, err
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// G is a free data retrieval call binding the contract method 0x6fecb623.
|
// G is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x6fecb623.
|
||||||
//
|
//
|
||||||
// Solidity: function G() view returns((bytes32)[] a)
|
// Solidity: function G() view returns((bytes32)[] a)
|
||||||
func (structs *Structs) PackG() []byte {
|
func (structs *Structs) PackG() ([]byte, error) {
|
||||||
enc, err := structs.abi.Pack("G")
|
return structs.abi.Pack("G")
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return enc
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (structs *Structs) UnpackG(data []byte) ([]Struct0, error) {
|
// UnpackG is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x6fecb623.
|
||||||
|
//
|
||||||
|
// Solidity: function G() view returns((bytes32)[] a)
|
||||||
|
func (structs *Structs) UnpackG(data []byte) (*[]Struct0, error) {
|
||||||
out, err := structs.abi.Unpack("G", data)
|
out, err := structs.abi.Unpack("G", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([]Struct0), err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
||||||
|
return &out0, nil
|
||||||
return out0, err
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
29
accounts/abi/abigen/testdata/v2/structs.go.txt
vendored
29
accounts/abi/abigen/testdata/v2/structs.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -54,7 +56,8 @@ func (c *Structs) Instance(backend bind.ContractBackend, addr common.Address) *b
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// F is a free data retrieval call binding the contract method 0x28811f59.
|
// F is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x28811f59.
|
||||||
//
|
//
|
||||||
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
|
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
|
||||||
func (structs *Structs) PackF() []byte {
|
func (structs *Structs) PackF() []byte {
|
||||||
|
|
@ -65,31 +68,33 @@ func (structs *Structs) PackF() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FOutput serves as a container for the return parameters of contract
|
||||||
|
// method F.
|
||||||
type FOutput struct {
|
type FOutput struct {
|
||||||
A []Struct0
|
A []Struct0
|
||||||
C []*big.Int
|
C []*big.Int
|
||||||
D []bool
|
D []bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackF is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x28811f59.
|
||||||
|
//
|
||||||
|
// Solidity: function F() view returns((bytes32)[] a, uint256[] c, bool[] d)
|
||||||
func (structs *Structs) UnpackF(data []byte) (FOutput, error) {
|
func (structs *Structs) UnpackF(data []byte) (FOutput, error) {
|
||||||
out, err := structs.abi.Unpack("F", data)
|
out, err := structs.abi.Unpack("F", data)
|
||||||
|
|
||||||
outstruct := new(FOutput)
|
outstruct := new(FOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
outstruct.A = *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
||||||
|
|
||||||
outstruct.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int)
|
outstruct.C = *abi.ConvertType(out[1], new([]*big.Int)).(*[]*big.Int)
|
||||||
|
|
||||||
outstruct.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool)
|
outstruct.D = *abi.ConvertType(out[2], new([]bool)).(*[]bool)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// G is a free data retrieval call binding the contract method 0x6fecb623.
|
// G is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x6fecb623.
|
||||||
//
|
//
|
||||||
// Solidity: function G() view returns((bytes32)[] a)
|
// Solidity: function G() view returns((bytes32)[] a)
|
||||||
func (structs *Structs) PackG() []byte {
|
func (structs *Structs) PackG() []byte {
|
||||||
|
|
@ -100,15 +105,15 @@ func (structs *Structs) PackG() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackG is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x6fecb623.
|
||||||
|
//
|
||||||
|
// Solidity: function G() view returns((bytes32)[] a)
|
||||||
func (structs *Structs) UnpackG(data []byte) ([]Struct0, error) {
|
func (structs *Structs) UnpackG(data []byte) ([]Struct0, error) {
|
||||||
out, err := structs.abi.Unpack("G", data)
|
out, err := structs.abi.Unpack("G", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([]Struct0), err
|
return *new([]Struct0), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
out0 := *abi.ConvertType(out[0], new([]Struct0)).(*[]Struct0)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
107
accounts/abi/abigen/testdata/v2/token.go.txt
vendored
107
accounts/abi/abigen/testdata/v2/token.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,6 +51,10 @@ func (c *Token) Instance(backend bind.ContractBackend, addr common.Address) *bin
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: constructor(uint256 initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol) returns()
|
||||||
func (token *Token) PackConstructor(initialSupply *big.Int, tokenName string, decimalUnits uint8, tokenSymbol string) []byte {
|
func (token *Token) PackConstructor(initialSupply *big.Int, tokenName string, decimalUnits uint8, tokenSymbol string) []byte {
|
||||||
enc, err := token.abi.Pack("", initialSupply, tokenName, decimalUnits, tokenSymbol)
|
enc, err := token.abi.Pack("", initialSupply, tokenName, decimalUnits, tokenSymbol)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -57,7 +63,8 @@ func (token *Token) PackConstructor(initialSupply *big.Int, tokenName string, de
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e.
|
// Allowance is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xdd62ed3e.
|
||||||
//
|
//
|
||||||
// Solidity: function allowance(address , address ) returns(uint256)
|
// Solidity: function allowance(address , address ) returns(uint256)
|
||||||
func (token *Token) PackAllowance(Arg0 common.Address, Arg1 common.Address) []byte {
|
func (token *Token) PackAllowance(Arg0 common.Address, Arg1 common.Address) []byte {
|
||||||
|
|
@ -68,20 +75,21 @@ func (token *Token) PackAllowance(Arg0 common.Address, Arg1 common.Address) []by
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackAllowance is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xdd62ed3e.
|
||||||
|
//
|
||||||
|
// Solidity: function allowance(address , address ) returns(uint256)
|
||||||
func (token *Token) UnpackAllowance(data []byte) (*big.Int, error) {
|
func (token *Token) UnpackAllowance(data []byte) (*big.Int, error) {
|
||||||
out, err := token.abi.Unpack("allowance", data)
|
out, err := token.abi.Unpack("allowance", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ApproveAndCall is a free data retrieval call binding the contract method 0xcae9ca51.
|
// ApproveAndCall is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xcae9ca51.
|
||||||
//
|
//
|
||||||
// Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)
|
// Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)
|
||||||
func (token *Token) PackApproveAndCall(Spender common.Address, Value *big.Int, ExtraData []byte) []byte {
|
func (token *Token) PackApproveAndCall(Spender common.Address, Value *big.Int, ExtraData []byte) []byte {
|
||||||
|
|
@ -92,20 +100,21 @@ func (token *Token) PackApproveAndCall(Spender common.Address, Value *big.Int, E
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackApproveAndCall is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xcae9ca51.
|
||||||
|
//
|
||||||
|
// Solidity: function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns(bool success)
|
||||||
func (token *Token) UnpackApproveAndCall(data []byte) (bool, error) {
|
func (token *Token) UnpackApproveAndCall(data []byte) (bool, error) {
|
||||||
out, err := token.abi.Unpack("approveAndCall", data)
|
out, err := token.abi.Unpack("approveAndCall", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(bool), err
|
return *new(bool), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// BalanceOf is a free data retrieval call binding the contract method 0x70a08231.
|
// BalanceOf is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x70a08231.
|
||||||
//
|
//
|
||||||
// Solidity: function balanceOf(address ) returns(uint256)
|
// Solidity: function balanceOf(address ) returns(uint256)
|
||||||
func (token *Token) PackBalanceOf(Arg0 common.Address) []byte {
|
func (token *Token) PackBalanceOf(Arg0 common.Address) []byte {
|
||||||
|
|
@ -116,20 +125,21 @@ func (token *Token) PackBalanceOf(Arg0 common.Address) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBalanceOf is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x70a08231.
|
||||||
|
//
|
||||||
|
// Solidity: function balanceOf(address ) returns(uint256)
|
||||||
func (token *Token) UnpackBalanceOf(data []byte) (*big.Int, error) {
|
func (token *Token) UnpackBalanceOf(data []byte) (*big.Int, error) {
|
||||||
out, err := token.abi.Unpack("balanceOf", data)
|
out, err := token.abi.Unpack("balanceOf", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Decimals is a free data retrieval call binding the contract method 0x313ce567.
|
// Decimals is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x313ce567.
|
||||||
//
|
//
|
||||||
// Solidity: function decimals() returns(uint8)
|
// Solidity: function decimals() returns(uint8)
|
||||||
func (token *Token) PackDecimals() []byte {
|
func (token *Token) PackDecimals() []byte {
|
||||||
|
|
@ -140,20 +150,21 @@ func (token *Token) PackDecimals() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDecimals is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x313ce567.
|
||||||
|
//
|
||||||
|
// Solidity: function decimals() returns(uint8)
|
||||||
func (token *Token) UnpackDecimals(data []byte) (uint8, error) {
|
func (token *Token) UnpackDecimals(data []byte) (uint8, error) {
|
||||||
out, err := token.abi.Unpack("decimals", data)
|
out, err := token.abi.Unpack("decimals", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(uint8), err
|
return *new(uint8), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
|
out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Name is a free data retrieval call binding the contract method 0x06fdde03.
|
// Name is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x06fdde03.
|
||||||
//
|
//
|
||||||
// Solidity: function name() returns(string)
|
// Solidity: function name() returns(string)
|
||||||
func (token *Token) PackName() []byte {
|
func (token *Token) PackName() []byte {
|
||||||
|
|
@ -164,20 +175,21 @@ func (token *Token) PackName() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackName is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x06fdde03.
|
||||||
|
//
|
||||||
|
// Solidity: function name() returns(string)
|
||||||
func (token *Token) UnpackName(data []byte) (string, error) {
|
func (token *Token) UnpackName(data []byte) (string, error) {
|
||||||
out, err := token.abi.Unpack("name", data)
|
out, err := token.abi.Unpack("name", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(string), err
|
return *new(string), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SpentAllowance is a free data retrieval call binding the contract method 0xdc3080f2.
|
// SpentAllowance is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xdc3080f2.
|
||||||
//
|
//
|
||||||
// Solidity: function spentAllowance(address , address ) returns(uint256)
|
// Solidity: function spentAllowance(address , address ) returns(uint256)
|
||||||
func (token *Token) PackSpentAllowance(Arg0 common.Address, Arg1 common.Address) []byte {
|
func (token *Token) PackSpentAllowance(Arg0 common.Address, Arg1 common.Address) []byte {
|
||||||
|
|
@ -188,20 +200,21 @@ func (token *Token) PackSpentAllowance(Arg0 common.Address, Arg1 common.Address)
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackSpentAllowance is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xdc3080f2.
|
||||||
|
//
|
||||||
|
// Solidity: function spentAllowance(address , address ) returns(uint256)
|
||||||
func (token *Token) UnpackSpentAllowance(data []byte) (*big.Int, error) {
|
func (token *Token) UnpackSpentAllowance(data []byte) (*big.Int, error) {
|
||||||
out, err := token.abi.Unpack("spentAllowance", data)
|
out, err := token.abi.Unpack("spentAllowance", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Symbol is a free data retrieval call binding the contract method 0x95d89b41.
|
// Symbol is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x95d89b41.
|
||||||
//
|
//
|
||||||
// Solidity: function symbol() returns(string)
|
// Solidity: function symbol() returns(string)
|
||||||
func (token *Token) PackSymbol() []byte {
|
func (token *Token) PackSymbol() []byte {
|
||||||
|
|
@ -212,20 +225,21 @@ func (token *Token) PackSymbol() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackSymbol is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x95d89b41.
|
||||||
|
//
|
||||||
|
// Solidity: function symbol() returns(string)
|
||||||
func (token *Token) UnpackSymbol(data []byte) (string, error) {
|
func (token *Token) UnpackSymbol(data []byte) (string, error) {
|
||||||
out, err := token.abi.Unpack("symbol", data)
|
out, err := token.abi.Unpack("symbol", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(string), err
|
return *new(string), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
out0 := *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Transfer is a free data retrieval call binding the contract method 0xa9059cbb.
|
// Transfer is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xa9059cbb.
|
||||||
//
|
//
|
||||||
// Solidity: function transfer(address _to, uint256 _value) returns()
|
// Solidity: function transfer(address _to, uint256 _value) returns()
|
||||||
func (token *Token) PackTransfer(To common.Address, Value *big.Int) []byte {
|
func (token *Token) PackTransfer(To common.Address, Value *big.Int) []byte {
|
||||||
|
|
@ -236,7 +250,8 @@ func (token *Token) PackTransfer(To common.Address, Value *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// TransferFrom is a free data retrieval call binding the contract method 0x23b872dd.
|
// TransferFrom is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x23b872dd.
|
||||||
//
|
//
|
||||||
// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)
|
// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)
|
||||||
func (token *Token) PackTransferFrom(From common.Address, To common.Address, Value *big.Int) []byte {
|
func (token *Token) PackTransferFrom(From common.Address, To common.Address, Value *big.Int) []byte {
|
||||||
|
|
@ -247,17 +262,17 @@ func (token *Token) PackTransferFrom(From common.Address, To common.Address, Val
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTransferFrom is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x23b872dd.
|
||||||
|
//
|
||||||
|
// Solidity: function transferFrom(address _from, address _to, uint256 _value) returns(bool success)
|
||||||
func (token *Token) UnpackTransferFrom(data []byte) (bool, error) {
|
func (token *Token) UnpackTransferFrom(data []byte) (bool, error) {
|
||||||
out, err := token.abi.Unpack("transferFrom", data)
|
out, err := token.abi.Unpack("transferFrom", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(bool), err
|
return *new(bool), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
out0 := *abi.ConvertType(out[0], new(bool)).(*bool)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TokenTransfer represents a Transfer event raised by the Token contract.
|
// TokenTransfer represents a Transfer event raised by the Token contract.
|
||||||
|
|
@ -265,15 +280,21 @@ type TokenTransfer struct {
|
||||||
From common.Address
|
From common.Address
|
||||||
To common.Address
|
To common.Address
|
||||||
Value *big.Int
|
Value *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const TokenTransferEventName = "Transfer"
|
const TokenTransferEventName = "Transfer"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (TokenTransfer) ContractEventName() string {
|
func (TokenTransfer) ContractEventName() string {
|
||||||
return TokenTransferEventName
|
return TokenTransferEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTransferEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event Transfer(address indexed from, address indexed to, uint256 value)
|
||||||
func (token *Token) UnpackTransferEvent(log *types.Log) (*TokenTransfer, error) {
|
func (token *Token) UnpackTransferEvent(log *types.Log) (*TokenTransfer, error) {
|
||||||
event := "Transfer"
|
event := "Transfer"
|
||||||
if log.Topics[0] != token.abi.Events[event].ID {
|
if log.Topics[0] != token.abi.Events[event].ID {
|
||||||
|
|
|
||||||
50
accounts/abi/abigen/testdata/v2/tuple.go.txt
vendored
50
accounts/abi/abigen/testdata/v2/tuple.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -74,7 +76,8 @@ func (c *Tuple) Instance(backend bind.ContractBackend, addr common.Address) *bin
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Func1 is a free data retrieval call binding the contract method 0x443c79b4.
|
// Func1 is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x443c79b4.
|
||||||
//
|
//
|
||||||
// Solidity: function func1((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) pure returns((uint256,uint256[],(uint256,uint256)[]), (uint256,uint256)[2][], (uint256,uint256)[][2], (uint256,uint256[],(uint256,uint256)[])[], uint256[])
|
// Solidity: function func1((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) pure returns((uint256,uint256[],(uint256,uint256)[]), (uint256,uint256)[2][], (uint256,uint256)[][2], (uint256,uint256[],(uint256,uint256)[])[], uint256[])
|
||||||
func (tuple *Tuple) PackFunc1(A TupleS, B [][2]TupleT, C [2][]TupleT, D []TupleS, E []*big.Int) []byte {
|
func (tuple *Tuple) PackFunc1(A TupleS, B [][2]TupleT, C [2][]TupleT, D []TupleS, E []*big.Int) []byte {
|
||||||
|
|
@ -85,6 +88,8 @@ func (tuple *Tuple) PackFunc1(A TupleS, B [][2]TupleT, C [2][]TupleT, D []TupleS
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Func1Output serves as a container for the return parameters of contract
|
||||||
|
// method Func1.
|
||||||
type Func1Output struct {
|
type Func1Output struct {
|
||||||
Arg0 TupleS
|
Arg0 TupleS
|
||||||
Arg1 [][2]TupleT
|
Arg1 [][2]TupleT
|
||||||
|
|
@ -93,29 +98,27 @@ type Func1Output struct {
|
||||||
Arg4 []*big.Int
|
Arg4 []*big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackFunc1 is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x443c79b4.
|
||||||
|
//
|
||||||
|
// Solidity: function func1((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) pure returns((uint256,uint256[],(uint256,uint256)[]), (uint256,uint256)[2][], (uint256,uint256)[][2], (uint256,uint256[],(uint256,uint256)[])[], uint256[])
|
||||||
func (tuple *Tuple) UnpackFunc1(data []byte) (Func1Output, error) {
|
func (tuple *Tuple) UnpackFunc1(data []byte) (Func1Output, error) {
|
||||||
out, err := tuple.abi.Unpack("func1", data)
|
out, err := tuple.abi.Unpack("func1", data)
|
||||||
|
|
||||||
outstruct := new(Func1Output)
|
outstruct := new(Func1Output)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = *abi.ConvertType(out[0], new(TupleS)).(*TupleS)
|
outstruct.Arg0 = *abi.ConvertType(out[0], new(TupleS)).(*TupleS)
|
||||||
|
|
||||||
outstruct.Arg1 = *abi.ConvertType(out[1], new([][2]TupleT)).(*[][2]TupleT)
|
outstruct.Arg1 = *abi.ConvertType(out[1], new([][2]TupleT)).(*[][2]TupleT)
|
||||||
|
|
||||||
outstruct.Arg2 = *abi.ConvertType(out[2], new([2][]TupleT)).(*[2][]TupleT)
|
outstruct.Arg2 = *abi.ConvertType(out[2], new([2][]TupleT)).(*[2][]TupleT)
|
||||||
|
|
||||||
outstruct.Arg3 = *abi.ConvertType(out[3], new([]TupleS)).(*[]TupleS)
|
outstruct.Arg3 = *abi.ConvertType(out[3], new([]TupleS)).(*[]TupleS)
|
||||||
|
|
||||||
outstruct.Arg4 = *abi.ConvertType(out[4], new([]*big.Int)).(*[]*big.Int)
|
outstruct.Arg4 = *abi.ConvertType(out[4], new([]*big.Int)).(*[]*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Func2 is a free data retrieval call binding the contract method 0xd0062cdd.
|
// Func2 is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xd0062cdd.
|
||||||
//
|
//
|
||||||
// Solidity: function func2((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) returns()
|
// Solidity: function func2((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e) returns()
|
||||||
func (tuple *Tuple) PackFunc2(A TupleS, B [][2]TupleT, C [2][]TupleT, D []TupleS, E []*big.Int) []byte {
|
func (tuple *Tuple) PackFunc2(A TupleS, B [][2]TupleT, C [2][]TupleT, D []TupleS, E []*big.Int) []byte {
|
||||||
|
|
@ -126,7 +129,8 @@ func (tuple *Tuple) PackFunc2(A TupleS, B [][2]TupleT, C [2][]TupleT, D []TupleS
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Func3 is a free data retrieval call binding the contract method 0xe4d9a43b.
|
// Func3 is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xe4d9a43b.
|
||||||
//
|
//
|
||||||
// Solidity: function func3((uint16,uint16)[] ) pure returns()
|
// Solidity: function func3((uint16,uint16)[] ) pure returns()
|
||||||
func (tuple *Tuple) PackFunc3(Arg0 []TupleQ) []byte {
|
func (tuple *Tuple) PackFunc3(Arg0 []TupleQ) []byte {
|
||||||
|
|
@ -139,20 +143,26 @@ func (tuple *Tuple) PackFunc3(Arg0 []TupleQ) []byte {
|
||||||
|
|
||||||
// TupleTupleEvent represents a TupleEvent event raised by the Tuple contract.
|
// TupleTupleEvent represents a TupleEvent event raised by the Tuple contract.
|
||||||
type TupleTupleEvent struct {
|
type TupleTupleEvent struct {
|
||||||
A TupleS
|
A TupleS
|
||||||
B [][2]TupleT
|
B [][2]TupleT
|
||||||
C [2][]TupleT
|
C [2][]TupleT
|
||||||
D []TupleS
|
D []TupleS
|
||||||
E []*big.Int
|
E []*big.Int
|
||||||
|
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const TupleTupleEventEventName = "TupleEvent"
|
const TupleTupleEventEventName = "TupleEvent"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (TupleTupleEvent) ContractEventName() string {
|
func (TupleTupleEvent) ContractEventName() string {
|
||||||
return TupleTupleEventEventName
|
return TupleTupleEventEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTupleEventEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event TupleEvent((uint256,uint256[],(uint256,uint256)[]) a, (uint256,uint256)[2][] b, (uint256,uint256)[][2] c, (uint256,uint256[],(uint256,uint256)[])[] d, uint256[] e)
|
||||||
func (tuple *Tuple) UnpackTupleEventEvent(log *types.Log) (*TupleTupleEvent, error) {
|
func (tuple *Tuple) UnpackTupleEventEvent(log *types.Log) (*TupleTupleEvent, error) {
|
||||||
event := "TupleEvent"
|
event := "TupleEvent"
|
||||||
if log.Topics[0] != tuple.abi.Events[event].ID {
|
if log.Topics[0] != tuple.abi.Events[event].ID {
|
||||||
|
|
@ -180,15 +190,21 @@ func (tuple *Tuple) UnpackTupleEventEvent(log *types.Log) (*TupleTupleEvent, err
|
||||||
// TupleTupleEvent2 represents a TupleEvent2 event raised by the Tuple contract.
|
// TupleTupleEvent2 represents a TupleEvent2 event raised by the Tuple contract.
|
||||||
type TupleTupleEvent2 struct {
|
type TupleTupleEvent2 struct {
|
||||||
Arg0 []TupleP
|
Arg0 []TupleP
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const TupleTupleEvent2EventName = "TupleEvent2"
|
const TupleTupleEvent2EventName = "TupleEvent2"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (TupleTupleEvent2) ContractEventName() string {
|
func (TupleTupleEvent2) ContractEventName() string {
|
||||||
return TupleTupleEvent2EventName
|
return TupleTupleEvent2EventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTupleEvent2Event is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event TupleEvent2((uint8,uint8)[] arg0)
|
||||||
func (tuple *Tuple) UnpackTupleEvent2Event(log *types.Log) (*TupleTupleEvent2, error) {
|
func (tuple *Tuple) UnpackTupleEvent2Event(log *types.Log) (*TupleTupleEvent2, error) {
|
||||||
event := "TupleEvent2"
|
event := "TupleEvent2"
|
||||||
if log.Topics[0] != tuple.abi.Events[event].ID {
|
if log.Topics[0] != tuple.abi.Events[event].ID {
|
||||||
|
|
|
||||||
18
accounts/abi/abigen/testdata/v2/tupler.go.txt
vendored
18
accounts/abi/abigen/testdata/v2/tupler.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *Tupler) Instance(backend bind.ContractBackend, addr common.Address) *bi
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tuple is a free data retrieval call binding the contract method 0x3175aae2.
|
// Tuple is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x3175aae2.
|
||||||
//
|
//
|
||||||
// Solidity: function tuple() returns(string a, int256 b, bytes32 c)
|
// Solidity: function tuple() returns(string a, int256 b, bytes32 c)
|
||||||
func (tupler *Tupler) PackTuple() []byte {
|
func (tupler *Tupler) PackTuple() []byte {
|
||||||
|
|
@ -60,26 +63,27 @@ func (tupler *Tupler) PackTuple() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TupleOutput serves as a container for the return parameters of contract
|
||||||
|
// method Tuple.
|
||||||
type TupleOutput struct {
|
type TupleOutput struct {
|
||||||
A string
|
A string
|
||||||
B *big.Int
|
B *big.Int
|
||||||
C [32]byte
|
C [32]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackTuple is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x3175aae2.
|
||||||
|
//
|
||||||
|
// Solidity: function tuple() returns(string a, int256 b, bytes32 c)
|
||||||
func (tupler *Tupler) UnpackTuple(data []byte) (TupleOutput, error) {
|
func (tupler *Tupler) UnpackTuple(data []byte) (TupleOutput, error) {
|
||||||
out, err := tupler.abi.Unpack("tuple", data)
|
out, err := tupler.abi.Unpack("tuple", data)
|
||||||
|
|
||||||
outstruct := new(TupleOutput)
|
outstruct := new(TupleOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.A = *abi.ConvertType(out[0], new(string)).(*string)
|
outstruct.A = *abi.ConvertType(out[0], new(string)).(*string)
|
||||||
|
|
||||||
outstruct.B = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.B = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.C = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
|
outstruct.C = *abi.ConvertType(out[2], new([32]byte)).(*[32]byte)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
106
accounts/abi/abigen/testdata/v2/underscorer.go.txt
vendored
106
accounts/abi/abigen/testdata/v2/underscorer.go.txt
vendored
|
|
@ -1,9 +1,10 @@
|
||||||
// Code generated via abigen V2 - DO NOT EDIT.
|
// Code generated via abigen V2 - DO NOT EDIT.
|
||||||
// This file is a generated binding and any manual changes will be lost.
|
// This file is a generated binding and any manual changes will be lost.
|
||||||
|
|
||||||
package convertedv1bindtests
|
package bindtests
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *Underscorer) Instance(backend bind.ContractBackend, addr common.Address
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// AllPurelyUnderscoredOutput is a free data retrieval call binding the contract method 0xb564b34d.
|
// AllPurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xb564b34d.
|
||||||
//
|
//
|
||||||
// Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
|
// Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
|
||||||
func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte {
|
func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte {
|
||||||
|
|
@ -60,28 +63,31 @@ func (underscorer *Underscorer) PackAllPurelyUnderscoredOutput() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AllPurelyUnderscoredOutputOutput serves as a container for the return parameters of contract
|
||||||
|
// method AllPurelyUnderscoredOutput.
|
||||||
type AllPurelyUnderscoredOutputOutput struct {
|
type AllPurelyUnderscoredOutputOutput struct {
|
||||||
Arg0 *big.Int
|
Arg0 *big.Int
|
||||||
Arg1 *big.Int
|
Arg1 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackAllPurelyUnderscoredOutput is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xb564b34d.
|
||||||
|
//
|
||||||
|
// Solidity: function AllPurelyUnderscoredOutput() view returns(int256 _, int256 __)
|
||||||
func (underscorer *Underscorer) UnpackAllPurelyUnderscoredOutput(data []byte) (AllPurelyUnderscoredOutputOutput, error) {
|
func (underscorer *Underscorer) UnpackAllPurelyUnderscoredOutput(data []byte) (AllPurelyUnderscoredOutputOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("AllPurelyUnderscoredOutput", data)
|
out, err := underscorer.abi.Unpack("AllPurelyUnderscoredOutput", data)
|
||||||
|
|
||||||
outstruct := new(AllPurelyUnderscoredOutputOutput)
|
outstruct := new(AllPurelyUnderscoredOutputOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LowerLowerCollision is a free data retrieval call binding the contract method 0xe409ca45.
|
// LowerLowerCollision is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xe409ca45.
|
||||||
//
|
//
|
||||||
// Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
|
// Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
|
||||||
func (underscorer *Underscorer) PackLowerLowerCollision() []byte {
|
func (underscorer *Underscorer) PackLowerLowerCollision() []byte {
|
||||||
|
|
@ -92,28 +98,31 @@ func (underscorer *Underscorer) PackLowerLowerCollision() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LowerLowerCollisionOutput serves as a container for the return parameters of contract
|
||||||
|
// method LowerLowerCollision.
|
||||||
type LowerLowerCollisionOutput struct {
|
type LowerLowerCollisionOutput struct {
|
||||||
Res *big.Int
|
Res *big.Int
|
||||||
Res0 *big.Int
|
Res0 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackLowerLowerCollision is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xe409ca45.
|
||||||
|
//
|
||||||
|
// Solidity: function LowerLowerCollision() view returns(int256 _res, int256 res)
|
||||||
func (underscorer *Underscorer) UnpackLowerLowerCollision(data []byte) (LowerLowerCollisionOutput, error) {
|
func (underscorer *Underscorer) UnpackLowerLowerCollision(data []byte) (LowerLowerCollisionOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("LowerLowerCollision", data)
|
out, err := underscorer.abi.Unpack("LowerLowerCollision", data)
|
||||||
|
|
||||||
outstruct := new(LowerLowerCollisionOutput)
|
outstruct := new(LowerLowerCollisionOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// LowerUpperCollision is a free data retrieval call binding the contract method 0x03a59213.
|
// LowerUpperCollision is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x03a59213.
|
||||||
//
|
//
|
||||||
// Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
|
// Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
|
||||||
func (underscorer *Underscorer) PackLowerUpperCollision() []byte {
|
func (underscorer *Underscorer) PackLowerUpperCollision() []byte {
|
||||||
|
|
@ -124,28 +133,31 @@ func (underscorer *Underscorer) PackLowerUpperCollision() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LowerUpperCollisionOutput serves as a container for the return parameters of contract
|
||||||
|
// method LowerUpperCollision.
|
||||||
type LowerUpperCollisionOutput struct {
|
type LowerUpperCollisionOutput struct {
|
||||||
Res *big.Int
|
Res *big.Int
|
||||||
Res0 *big.Int
|
Res0 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackLowerUpperCollision is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x03a59213.
|
||||||
|
//
|
||||||
|
// Solidity: function LowerUpperCollision() view returns(int256 _res, int256 Res)
|
||||||
func (underscorer *Underscorer) UnpackLowerUpperCollision(data []byte) (LowerUpperCollisionOutput, error) {
|
func (underscorer *Underscorer) UnpackLowerUpperCollision(data []byte) (LowerUpperCollisionOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("LowerUpperCollision", data)
|
out, err := underscorer.abi.Unpack("LowerUpperCollision", data)
|
||||||
|
|
||||||
outstruct := new(LowerUpperCollisionOutput)
|
outstruct := new(LowerUpperCollisionOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// PurelyUnderscoredOutput is a free data retrieval call binding the contract method 0x9df48485.
|
// PurelyUnderscoredOutput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x9df48485.
|
||||||
//
|
//
|
||||||
// Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
|
// Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
|
||||||
func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte {
|
func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte {
|
||||||
|
|
@ -156,28 +168,31 @@ func (underscorer *Underscorer) PackPurelyUnderscoredOutput() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PurelyUnderscoredOutputOutput serves as a container for the return parameters of contract
|
||||||
|
// method PurelyUnderscoredOutput.
|
||||||
type PurelyUnderscoredOutputOutput struct {
|
type PurelyUnderscoredOutputOutput struct {
|
||||||
Arg0 *big.Int
|
Arg0 *big.Int
|
||||||
Res *big.Int
|
Res *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackPurelyUnderscoredOutput is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x9df48485.
|
||||||
|
//
|
||||||
|
// Solidity: function PurelyUnderscoredOutput() view returns(int256 _, int256 res)
|
||||||
func (underscorer *Underscorer) UnpackPurelyUnderscoredOutput(data []byte) (PurelyUnderscoredOutputOutput, error) {
|
func (underscorer *Underscorer) UnpackPurelyUnderscoredOutput(data []byte) (PurelyUnderscoredOutputOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("PurelyUnderscoredOutput", data)
|
out, err := underscorer.abi.Unpack("PurelyUnderscoredOutput", data)
|
||||||
|
|
||||||
outstruct := new(PurelyUnderscoredOutputOutput)
|
outstruct := new(PurelyUnderscoredOutputOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Res = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnderscoredOutput is a free data retrieval call binding the contract method 0x67e6633d.
|
// UnderscoredOutput is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x67e6633d.
|
||||||
//
|
//
|
||||||
// Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
|
// Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
|
||||||
func (underscorer *Underscorer) PackUnderscoredOutput() []byte {
|
func (underscorer *Underscorer) PackUnderscoredOutput() []byte {
|
||||||
|
|
@ -188,28 +203,31 @@ func (underscorer *Underscorer) PackUnderscoredOutput() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnderscoredOutputOutput serves as a container for the return parameters of contract
|
||||||
|
// method UnderscoredOutput.
|
||||||
type UnderscoredOutputOutput struct {
|
type UnderscoredOutputOutput struct {
|
||||||
Int *big.Int
|
Int *big.Int
|
||||||
String string
|
String string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackUnderscoredOutput is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x67e6633d.
|
||||||
|
//
|
||||||
|
// Solidity: function UnderscoredOutput() view returns(int256 _int, string _string)
|
||||||
func (underscorer *Underscorer) UnpackUnderscoredOutput(data []byte) (UnderscoredOutputOutput, error) {
|
func (underscorer *Underscorer) UnpackUnderscoredOutput(data []byte) (UnderscoredOutputOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("UnderscoredOutput", data)
|
out, err := underscorer.abi.Unpack("UnderscoredOutput", data)
|
||||||
|
|
||||||
outstruct := new(UnderscoredOutputOutput)
|
outstruct := new(UnderscoredOutputOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Int = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.String = *abi.ConvertType(out[1], new(string)).(*string)
|
outstruct.String = *abi.ConvertType(out[1], new(string)).(*string)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpperLowerCollision is a free data retrieval call binding the contract method 0xaf7486ab.
|
// UpperLowerCollision is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xaf7486ab.
|
||||||
//
|
//
|
||||||
// Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
|
// Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
|
||||||
func (underscorer *Underscorer) PackUpperLowerCollision() []byte {
|
func (underscorer *Underscorer) PackUpperLowerCollision() []byte {
|
||||||
|
|
@ -220,28 +238,31 @@ func (underscorer *Underscorer) PackUpperLowerCollision() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpperLowerCollisionOutput serves as a container for the return parameters of contract
|
||||||
|
// method UpperLowerCollision.
|
||||||
type UpperLowerCollisionOutput struct {
|
type UpperLowerCollisionOutput struct {
|
||||||
Res *big.Int
|
Res *big.Int
|
||||||
Res0 *big.Int
|
Res0 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackUpperLowerCollision is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xaf7486ab.
|
||||||
|
//
|
||||||
|
// Solidity: function UpperLowerCollision() view returns(int256 _Res, int256 res)
|
||||||
func (underscorer *Underscorer) UnpackUpperLowerCollision(data []byte) (UpperLowerCollisionOutput, error) {
|
func (underscorer *Underscorer) UnpackUpperLowerCollision(data []byte) (UpperLowerCollisionOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("UpperLowerCollision", data)
|
out, err := underscorer.abi.Unpack("UpperLowerCollision", data)
|
||||||
|
|
||||||
outstruct := new(UpperLowerCollisionOutput)
|
outstruct := new(UpperLowerCollisionOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UpperUpperCollision is a free data retrieval call binding the contract method 0xe02ab24d.
|
// UpperUpperCollision is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xe02ab24d.
|
||||||
//
|
//
|
||||||
// Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
|
// Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
|
||||||
func (underscorer *Underscorer) PackUpperUpperCollision() []byte {
|
func (underscorer *Underscorer) PackUpperUpperCollision() []byte {
|
||||||
|
|
@ -252,28 +273,31 @@ func (underscorer *Underscorer) PackUpperUpperCollision() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpperUpperCollisionOutput serves as a container for the return parameters of contract
|
||||||
|
// method UpperUpperCollision.
|
||||||
type UpperUpperCollisionOutput struct {
|
type UpperUpperCollisionOutput struct {
|
||||||
Res *big.Int
|
Res *big.Int
|
||||||
Res0 *big.Int
|
Res0 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackUpperUpperCollision is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xe02ab24d.
|
||||||
|
//
|
||||||
|
// Solidity: function UpperUpperCollision() view returns(int256 _Res, int256 Res)
|
||||||
func (underscorer *Underscorer) UnpackUpperUpperCollision(data []byte) (UpperUpperCollisionOutput, error) {
|
func (underscorer *Underscorer) UnpackUpperUpperCollision(data []byte) (UpperUpperCollisionOutput, error) {
|
||||||
out, err := underscorer.abi.Unpack("UpperUpperCollision", data)
|
out, err := underscorer.abi.Unpack("UpperUpperCollision", data)
|
||||||
|
|
||||||
outstruct := new(UpperUpperCollisionOutput)
|
outstruct := new(UpperUpperCollisionOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Res = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Res0 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnderScoredFunc is a free data retrieval call binding the contract method 0x46546dbe.
|
// UnderScoredFunc is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x46546dbe.
|
||||||
//
|
//
|
||||||
// Solidity: function _under_scored_func() view returns(int256 _int)
|
// Solidity: function _under_scored_func() view returns(int256 _int)
|
||||||
func (underscorer *Underscorer) PackUnderScoredFunc() []byte {
|
func (underscorer *Underscorer) PackUnderScoredFunc() []byte {
|
||||||
|
|
@ -284,15 +308,15 @@ func (underscorer *Underscorer) PackUnderScoredFunc() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackUnderScoredFunc is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x46546dbe.
|
||||||
|
//
|
||||||
|
// Solidity: function _under_scored_func() view returns(int256 _int)
|
||||||
func (underscorer *Underscorer) UnpackUnderScoredFunc(data []byte) (*big.Int, error) {
|
func (underscorer *Underscorer) UnpackUnderScoredFunc(data []byte) (*big.Int, error) {
|
||||||
out, err := underscorer.abi.Unpack("_under_scored_func", data)
|
out, err := underscorer.abi.Unpack("_under_scored_func", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
package db
|
package db
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -56,7 +58,8 @@ func (c *DB) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get is a free data retrieval call binding the contract method 0x9507d39a.
|
// Get is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x9507d39a.
|
||||||
//
|
//
|
||||||
// Solidity: function get(uint256 k) returns(uint256)
|
// Solidity: function get(uint256 k) returns(uint256)
|
||||||
func (dB *DB) PackGet(K *big.Int) []byte {
|
func (dB *DB) PackGet(K *big.Int) []byte {
|
||||||
|
|
@ -67,20 +70,21 @@ func (dB *DB) PackGet(K *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGet is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x9507d39a.
|
||||||
|
//
|
||||||
|
// Solidity: function get(uint256 k) returns(uint256)
|
||||||
func (dB *DB) UnpackGet(data []byte) (*big.Int, error) {
|
func (dB *DB) UnpackGet(data []byte) (*big.Int, error) {
|
||||||
out, err := dB.abi.Unpack("get", data)
|
out, err := dB.abi.Unpack("get", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetNamedStatParams is a free data retrieval call binding the contract method 0xe369ba3b.
|
// GetNamedStatParams is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xe369ba3b.
|
||||||
//
|
//
|
||||||
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
|
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
|
||||||
func (dB *DB) PackGetNamedStatParams() []byte {
|
func (dB *DB) PackGetNamedStatParams() []byte {
|
||||||
|
|
@ -91,31 +95,33 @@ func (dB *DB) PackGetNamedStatParams() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetNamedStatParamsOutput serves as a container for the return parameters of contract
|
||||||
|
// method GetNamedStatParams.
|
||||||
type GetNamedStatParamsOutput struct {
|
type GetNamedStatParamsOutput struct {
|
||||||
Gets *big.Int
|
Gets *big.Int
|
||||||
Inserts *big.Int
|
Inserts *big.Int
|
||||||
Mods *big.Int
|
Mods *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGetNamedStatParams is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xe369ba3b.
|
||||||
|
//
|
||||||
|
// Solidity: function getNamedStatParams() view returns(uint256 gets, uint256 inserts, uint256 mods)
|
||||||
func (dB *DB) UnpackGetNamedStatParams(data []byte) (GetNamedStatParamsOutput, error) {
|
func (dB *DB) UnpackGetNamedStatParams(data []byte) (GetNamedStatParamsOutput, error) {
|
||||||
out, err := dB.abi.Unpack("getNamedStatParams", data)
|
out, err := dB.abi.Unpack("getNamedStatParams", data)
|
||||||
|
|
||||||
outstruct := new(GetNamedStatParamsOutput)
|
outstruct := new(GetNamedStatParamsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Gets = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Gets = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Inserts = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Inserts = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Mods = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
outstruct.Mods = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetStatParams is a free data retrieval call binding the contract method 0x6fcb9c70.
|
// GetStatParams is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x6fcb9c70.
|
||||||
//
|
//
|
||||||
// Solidity: function getStatParams() view returns(uint256, uint256, uint256)
|
// Solidity: function getStatParams() view returns(uint256, uint256, uint256)
|
||||||
func (dB *DB) PackGetStatParams() []byte {
|
func (dB *DB) PackGetStatParams() []byte {
|
||||||
|
|
@ -126,31 +132,33 @@ func (dB *DB) PackGetStatParams() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetStatParamsOutput serves as a container for the return parameters of contract
|
||||||
|
// method GetStatParams.
|
||||||
type GetStatParamsOutput struct {
|
type GetStatParamsOutput struct {
|
||||||
Arg0 *big.Int
|
Arg0 *big.Int
|
||||||
Arg1 *big.Int
|
Arg1 *big.Int
|
||||||
Arg2 *big.Int
|
Arg2 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGetStatParams is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x6fcb9c70.
|
||||||
|
//
|
||||||
|
// Solidity: function getStatParams() view returns(uint256, uint256, uint256)
|
||||||
func (dB *DB) UnpackGetStatParams(data []byte) (GetStatParamsOutput, error) {
|
func (dB *DB) UnpackGetStatParams(data []byte) (GetStatParamsOutput, error) {
|
||||||
out, err := dB.abi.Unpack("getStatParams", data)
|
out, err := dB.abi.Unpack("getStatParams", data)
|
||||||
|
|
||||||
outstruct := new(GetStatParamsOutput)
|
outstruct := new(GetStatParamsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetStatsStruct is a free data retrieval call binding the contract method 0xee8161e0.
|
// GetStatsStruct is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xee8161e0.
|
||||||
//
|
//
|
||||||
// Solidity: function getStatsStruct() view returns((uint256,uint256,uint256))
|
// Solidity: function getStatsStruct() view returns((uint256,uint256,uint256))
|
||||||
func (dB *DB) PackGetStatsStruct() []byte {
|
func (dB *DB) PackGetStatsStruct() []byte {
|
||||||
|
|
@ -161,20 +169,21 @@ func (dB *DB) PackGetStatsStruct() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGetStatsStruct is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xee8161e0.
|
||||||
|
//
|
||||||
|
// Solidity: function getStatsStruct() view returns((uint256,uint256,uint256))
|
||||||
func (dB *DB) UnpackGetStatsStruct(data []byte) (DBStats, error) {
|
func (dB *DB) UnpackGetStatsStruct(data []byte) (DBStats, error) {
|
||||||
out, err := dB.abi.Unpack("getStatsStruct", data)
|
out, err := dB.abi.Unpack("getStatsStruct", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(DBStats), err
|
return *new(DBStats), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(DBStats)).(*DBStats)
|
out0 := *abi.ConvertType(out[0], new(DBStats)).(*DBStats)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert is a free data retrieval call binding the contract method 0x1d834a1b.
|
// Insert is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x1d834a1b.
|
||||||
//
|
//
|
||||||
// Solidity: function insert(uint256 k, uint256 v) returns(uint256)
|
// Solidity: function insert(uint256 k, uint256 v) returns(uint256)
|
||||||
func (dB *DB) PackInsert(K *big.Int, V *big.Int) []byte {
|
func (dB *DB) PackInsert(K *big.Int, V *big.Int) []byte {
|
||||||
|
|
@ -185,17 +194,17 @@ func (dB *DB) PackInsert(K *big.Int, V *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackInsert is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x1d834a1b.
|
||||||
|
//
|
||||||
|
// Solidity: function insert(uint256 k, uint256 v) returns(uint256)
|
||||||
func (dB *DB) UnpackInsert(data []byte) (*big.Int, error) {
|
func (dB *DB) UnpackInsert(data []byte) (*big.Int, error) {
|
||||||
out, err := dB.abi.Unpack("insert", data)
|
out, err := dB.abi.Unpack("insert", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DBInsert represents a Insert event raised by the DB contract.
|
// DBInsert represents a Insert event raised by the DB contract.
|
||||||
|
|
@ -203,15 +212,21 @@ type DBInsert struct {
|
||||||
Key *big.Int
|
Key *big.Int
|
||||||
Value *big.Int
|
Value *big.Int
|
||||||
Length *big.Int
|
Length *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DBInsertEventName = "Insert"
|
const DBInsertEventName = "Insert"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DBInsert) ContractEventName() string {
|
func (DBInsert) ContractEventName() string {
|
||||||
return DBInsertEventName
|
return DBInsertEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackInsertEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event Insert(uint256 key, uint256 value, uint256 length)
|
||||||
func (dB *DB) UnpackInsertEvent(log *types.Log) (*DBInsert, error) {
|
func (dB *DB) UnpackInsertEvent(log *types.Log) (*DBInsert, error) {
|
||||||
event := "Insert"
|
event := "Insert"
|
||||||
if log.Topics[0] != dB.abi.Events[event].ID {
|
if log.Topics[0] != dB.abi.Events[event].ID {
|
||||||
|
|
@ -240,15 +255,21 @@ func (dB *DB) UnpackInsertEvent(log *types.Log) (*DBInsert, error) {
|
||||||
type DBKeyedInsert struct {
|
type DBKeyedInsert struct {
|
||||||
Key *big.Int
|
Key *big.Int
|
||||||
Value *big.Int
|
Value *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const DBKeyedInsertEventName = "KeyedInsert"
|
const DBKeyedInsertEventName = "KeyedInsert"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (DBKeyedInsert) ContractEventName() string {
|
func (DBKeyedInsert) ContractEventName() string {
|
||||||
return DBKeyedInsertEventName
|
return DBKeyedInsertEventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackKeyedInsertEvent is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event KeyedInsert(uint256 indexed key, uint256 value)
|
||||||
func (dB *DB) UnpackKeyedInsertEvent(log *types.Log) (*DBKeyedInsert, error) {
|
func (dB *DB) UnpackKeyedInsertEvent(log *types.Log) (*DBKeyedInsert, error) {
|
||||||
event := "KeyedInsert"
|
event := "KeyedInsert"
|
||||||
if log.Topics[0] != dB.abi.Events[event].ID {
|
if log.Topics[0] != dB.abi.Events[event].ID {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
package events
|
package events
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -55,7 +57,8 @@ func (c *C) Instance(backend bind.ContractBackend, addr common.Address) *bind.Bo
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// DoSomethingWithManyArgs is a free data retrieval call binding the contract method 0x6fd8b968.
|
// DoSomethingWithManyArgs is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x6fd8b968.
|
||||||
//
|
//
|
||||||
// Solidity: function DoSomethingWithManyArgs() pure returns(uint256, uint256, uint256, bool)
|
// Solidity: function DoSomethingWithManyArgs() pure returns(uint256, uint256, uint256, bool)
|
||||||
func (c *C) PackDoSomethingWithManyArgs() []byte {
|
func (c *C) PackDoSomethingWithManyArgs() []byte {
|
||||||
|
|
@ -66,6 +69,8 @@ func (c *C) PackDoSomethingWithManyArgs() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DoSomethingWithManyArgsOutput serves as a container for the return parameters of contract
|
||||||
|
// method DoSomethingWithManyArgs.
|
||||||
type DoSomethingWithManyArgsOutput struct {
|
type DoSomethingWithManyArgsOutput struct {
|
||||||
Arg0 *big.Int
|
Arg0 *big.Int
|
||||||
Arg1 *big.Int
|
Arg1 *big.Int
|
||||||
|
|
@ -73,27 +78,26 @@ type DoSomethingWithManyArgsOutput struct {
|
||||||
Arg3 bool
|
Arg3 bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDoSomethingWithManyArgs is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x6fd8b968.
|
||||||
|
//
|
||||||
|
// Solidity: function DoSomethingWithManyArgs() pure returns(uint256, uint256, uint256, bool)
|
||||||
func (c *C) UnpackDoSomethingWithManyArgs(data []byte) (DoSomethingWithManyArgsOutput, error) {
|
func (c *C) UnpackDoSomethingWithManyArgs(data []byte) (DoSomethingWithManyArgsOutput, error) {
|
||||||
out, err := c.abi.Unpack("DoSomethingWithManyArgs", data)
|
out, err := c.abi.Unpack("DoSomethingWithManyArgs", data)
|
||||||
|
|
||||||
outstruct := new(DoSomethingWithManyArgsOutput)
|
outstruct := new(DoSomethingWithManyArgsOutput)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
}
|
}
|
||||||
|
|
||||||
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
outstruct.Arg0 = abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
outstruct.Arg1 = abi.ConvertType(out[1], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
outstruct.Arg2 = abi.ConvertType(out[2], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
outstruct.Arg3 = *abi.ConvertType(out[3], new(bool)).(*bool)
|
outstruct.Arg3 = *abi.ConvertType(out[3], new(bool)).(*bool)
|
||||||
|
|
||||||
return *outstruct, err
|
return *outstruct, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// DoSomethingWithPoint is a free data retrieval call binding the contract method 0xedcdc894.
|
// DoSomethingWithPoint is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xedcdc894.
|
||||||
//
|
//
|
||||||
// Solidity: function DoSomethingWithPoint((uint256,uint256) p) pure returns((uint256,uint256))
|
// Solidity: function DoSomethingWithPoint((uint256,uint256) p) pure returns((uint256,uint256))
|
||||||
func (c *C) PackDoSomethingWithPoint(P CPoint) []byte {
|
func (c *C) PackDoSomethingWithPoint(P CPoint) []byte {
|
||||||
|
|
@ -104,20 +108,21 @@ func (c *C) PackDoSomethingWithPoint(P CPoint) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDoSomethingWithPoint is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xedcdc894.
|
||||||
|
//
|
||||||
|
// Solidity: function DoSomethingWithPoint((uint256,uint256) p) pure returns((uint256,uint256))
|
||||||
func (c *C) UnpackDoSomethingWithPoint(data []byte) (CPoint, error) {
|
func (c *C) UnpackDoSomethingWithPoint(data []byte) (CPoint, error) {
|
||||||
out, err := c.abi.Unpack("DoSomethingWithPoint", data)
|
out, err := c.abi.Unpack("DoSomethingWithPoint", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new(CPoint), err
|
return *new(CPoint), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new(CPoint)).(*CPoint)
|
out0 := *abi.ConvertType(out[0], new(CPoint)).(*CPoint)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitMulti is a free data retrieval call binding the contract method 0xcb493749.
|
// EmitMulti is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xcb493749.
|
||||||
//
|
//
|
||||||
// Solidity: function EmitMulti() returns()
|
// Solidity: function EmitMulti() returns()
|
||||||
func (c *C) PackEmitMulti() []byte {
|
func (c *C) PackEmitMulti() []byte {
|
||||||
|
|
@ -128,7 +133,8 @@ func (c *C) PackEmitMulti() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// EmitOne is a free data retrieval call binding the contract method 0xe8e49a71.
|
// EmitOne is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xe8e49a71.
|
||||||
//
|
//
|
||||||
// Solidity: function EmitOne() returns()
|
// Solidity: function EmitOne() returns()
|
||||||
func (c *C) PackEmitOne() []byte {
|
func (c *C) PackEmitOne() []byte {
|
||||||
|
|
@ -143,15 +149,21 @@ func (c *C) PackEmitOne() []byte {
|
||||||
type CBasic1 struct {
|
type CBasic1 struct {
|
||||||
Id *big.Int
|
Id *big.Int
|
||||||
Data *big.Int
|
Data *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const CBasic1EventName = "basic1"
|
const CBasic1EventName = "basic1"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (CBasic1) ContractEventName() string {
|
func (CBasic1) ContractEventName() string {
|
||||||
return CBasic1EventName
|
return CBasic1EventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBasic1Event is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event basic1(uint256 indexed id, uint256 data)
|
||||||
func (c *C) UnpackBasic1Event(log *types.Log) (*CBasic1, error) {
|
func (c *C) UnpackBasic1Event(log *types.Log) (*CBasic1, error) {
|
||||||
event := "basic1"
|
event := "basic1"
|
||||||
if log.Topics[0] != c.abi.Events[event].ID {
|
if log.Topics[0] != c.abi.Events[event].ID {
|
||||||
|
|
@ -180,15 +192,21 @@ func (c *C) UnpackBasic1Event(log *types.Log) (*CBasic1, error) {
|
||||||
type CBasic2 struct {
|
type CBasic2 struct {
|
||||||
Flag bool
|
Flag bool
|
||||||
Data *big.Int
|
Data *big.Int
|
||||||
Raw *types.Log // Blockchain specific contextual infos
|
|
||||||
|
Raw *types.Log // Blockchain specific contextual infos
|
||||||
}
|
}
|
||||||
|
|
||||||
const CBasic2EventName = "basic2"
|
const CBasic2EventName = "basic2"
|
||||||
|
|
||||||
|
// ContractEventName returns the user-defined event name.
|
||||||
func (CBasic2) ContractEventName() string {
|
func (CBasic2) ContractEventName() string {
|
||||||
return CBasic2EventName
|
return CBasic2EventName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBasic2Event is the Go binding that unpacks the event data emitted
|
||||||
|
// by contract.
|
||||||
|
//
|
||||||
|
// Solidity: event basic2(bool indexed flag, uint256 data)
|
||||||
func (c *C) UnpackBasic2Event(log *types.Log) (*CBasic2, error) {
|
func (c *C) UnpackBasic2Event(log *types.Log) (*CBasic2, error) {
|
||||||
event := "basic2"
|
event := "basic2"
|
||||||
if log.Topics[0] != c.abi.Events[event].ID {
|
if log.Topics[0] != c.abi.Events[event].ID {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
package nested_libraries
|
package nested_libraries
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -53,6 +55,10 @@ func (c *C1) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: constructor(uint256 v1, uint256 v2) returns()
|
||||||
func (c1 *C1) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
|
func (c1 *C1) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
|
||||||
enc, err := c1.abi.Pack("", v1, v2)
|
enc, err := c1.abi.Pack("", v1, v2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -61,7 +67,8 @@ func (c1 *C1) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256 res)
|
// Solidity: function Do(uint256 val) pure returns(uint256 res)
|
||||||
func (c1 *C1) PackDo(Val *big.Int) []byte {
|
func (c1 *C1) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -72,17 +79,17 @@ func (c1 *C1) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256 res)
|
||||||
func (c1 *C1) UnpackDo(data []byte) (*big.Int, error) {
|
func (c1 *C1) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := c1.abi.Unpack("Do", data)
|
out, err := c1.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// C2MetaData contains all meta data concerning the C2 contract.
|
// C2MetaData contains all meta data concerning the C2 contract.
|
||||||
|
|
@ -116,6 +123,10 @@ func (c *C2) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PackConstructor is the Go binding used to pack the parameters required for
|
||||||
|
// contract deployment.
|
||||||
|
//
|
||||||
|
// Solidity: constructor(uint256 v1, uint256 v2) returns()
|
||||||
func (c2 *C2) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
|
func (c2 *C2) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
|
||||||
enc, err := c2.abi.Pack("", v1, v2)
|
enc, err := c2.abi.Pack("", v1, v2)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -124,7 +135,8 @@ func (c2 *C2) PackConstructor(v1 *big.Int, v2 *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256 res)
|
// Solidity: function Do(uint256 val) pure returns(uint256 res)
|
||||||
func (c2 *C2) PackDo(Val *big.Int) []byte {
|
func (c2 *C2) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -135,17 +147,17 @@ func (c2 *C2) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256 res)
|
||||||
func (c2 *C2) UnpackDo(data []byte) (*big.Int, error) {
|
func (c2 *C2) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := c2.abi.Unpack("Do", data)
|
out, err := c2.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L1MetaData contains all meta data concerning the L1 contract.
|
// L1MetaData contains all meta data concerning the L1 contract.
|
||||||
|
|
@ -175,7 +187,8 @@ func (c *L1) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256)
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l1 *L1) PackDo(Val *big.Int) []byte {
|
func (l1 *L1) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -186,17 +199,17 @@ func (l1 *L1) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l1 *L1) UnpackDo(data []byte) (*big.Int, error) {
|
func (l1 *L1) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := l1.abi.Unpack("Do", data)
|
out, err := l1.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L2MetaData contains all meta data concerning the L2 contract.
|
// L2MetaData contains all meta data concerning the L2 contract.
|
||||||
|
|
@ -229,7 +242,8 @@ func (c *L2) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256)
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l2 *L2) PackDo(Val *big.Int) []byte {
|
func (l2 *L2) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -240,17 +254,17 @@ func (l2 *L2) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l2 *L2) UnpackDo(data []byte) (*big.Int, error) {
|
func (l2 *L2) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := l2.abi.Unpack("Do", data)
|
out, err := l2.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L2bMetaData contains all meta data concerning the L2b contract.
|
// L2bMetaData contains all meta data concerning the L2b contract.
|
||||||
|
|
@ -283,7 +297,8 @@ func (c *L2b) Instance(backend bind.ContractBackend, addr common.Address) *bind.
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256)
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l2b *L2b) PackDo(Val *big.Int) []byte {
|
func (l2b *L2b) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -294,17 +309,17 @@ func (l2b *L2b) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l2b *L2b) UnpackDo(data []byte) (*big.Int, error) {
|
func (l2b *L2b) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := l2b.abi.Unpack("Do", data)
|
out, err := l2b.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L3MetaData contains all meta data concerning the L3 contract.
|
// L3MetaData contains all meta data concerning the L3 contract.
|
||||||
|
|
@ -334,7 +349,8 @@ func (c *L3) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256)
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l3 *L3) PackDo(Val *big.Int) []byte {
|
func (l3 *L3) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -345,17 +361,17 @@ func (l3 *L3) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l3 *L3) UnpackDo(data []byte) (*big.Int, error) {
|
func (l3 *L3) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := l3.abi.Unpack("Do", data)
|
out, err := l3.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L4MetaData contains all meta data concerning the L4 contract.
|
// L4MetaData contains all meta data concerning the L4 contract.
|
||||||
|
|
@ -389,7 +405,8 @@ func (c *L4) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256)
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l4 *L4) PackDo(Val *big.Int) []byte {
|
func (l4 *L4) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -400,17 +417,17 @@ func (l4 *L4) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l4 *L4) UnpackDo(data []byte) (*big.Int, error) {
|
func (l4 *L4) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := l4.abi.Unpack("Do", data)
|
out, err := l4.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// L4bMetaData contains all meta data concerning the L4b contract.
|
// L4bMetaData contains all meta data concerning the L4b contract.
|
||||||
|
|
@ -443,7 +460,8 @@ func (c *L4b) Instance(backend bind.ContractBackend, addr common.Address) *bind.
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do is a free data retrieval call binding the contract method 0x2ad11272.
|
// Do is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0x2ad11272.
|
||||||
//
|
//
|
||||||
// Solidity: function Do(uint256 val) pure returns(uint256)
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l4b *L4b) PackDo(Val *big.Int) []byte {
|
func (l4b *L4b) PackDo(Val *big.Int) []byte {
|
||||||
|
|
@ -454,15 +472,15 @@ func (l4b *L4b) PackDo(Val *big.Int) []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackDo is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0x2ad11272.
|
||||||
|
//
|
||||||
|
// Solidity: function Do(uint256 val) pure returns(uint256)
|
||||||
func (l4b *L4b) UnpackDo(data []byte) (*big.Int, error) {
|
func (l4b *L4b) UnpackDo(data []byte) (*big.Int, error) {
|
||||||
out, err := l4b.abi.Unpack("Do", data)
|
out, err := l4b.abi.Unpack("Do", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return new(big.Int), err
|
return new(big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
out0 := abi.ConvertType(out[0], new(big.Int)).(*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
package solc_errors
|
package solc_errors
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *C) Instance(backend bind.ContractBackend, addr common.Address) *bind.Bo
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bar is a free data retrieval call binding the contract method 0xb0a378b0.
|
// Bar is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xb0a378b0.
|
||||||
//
|
//
|
||||||
// Solidity: function Bar() pure returns()
|
// Solidity: function Bar() pure returns()
|
||||||
func (c *C) PackBar() []byte {
|
func (c *C) PackBar() []byte {
|
||||||
|
|
@ -60,7 +63,8 @@ func (c *C) PackBar() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foo is a free data retrieval call binding the contract method 0xbfb4ebcf.
|
// Foo is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xbfb4ebcf.
|
||||||
//
|
//
|
||||||
// Solidity: function Foo() pure returns()
|
// Solidity: function Foo() pure returns()
|
||||||
func (c *C) PackFoo() []byte {
|
func (c *C) PackFoo() []byte {
|
||||||
|
|
@ -71,19 +75,16 @@ func (c *C) PackFoo() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *C) UnpackError(raw []byte) any {
|
// UnpackError attempts to decode the provided error data using user-defined
|
||||||
// TODO: we should be able to discern the error type from the selector, instead of trying each possible type
|
// error definitions.
|
||||||
// strip off the error type selector
|
func (c *C) UnpackError(raw []byte) (any, error) {
|
||||||
raw = raw[4:]
|
if bytes.Equal(raw[:4], c.abi.Errors["BadThing"].ID.Bytes()[:4]) {
|
||||||
|
return c.UnpackBadThingError(raw[4:])
|
||||||
if val, err := c.UnpackBadThingError(raw); err == nil {
|
|
||||||
return val
|
|
||||||
|
|
||||||
} else if val, err := c.UnpackBadThing2Error(raw); err == nil {
|
|
||||||
return val
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil
|
if bytes.Equal(raw[:4], c.abi.Errors["BadThing2"].ID.Bytes()[:4]) {
|
||||||
|
return c.UnpackBadThing2Error(raw[4:])
|
||||||
|
}
|
||||||
|
return nil, errors.New("Unknown error")
|
||||||
}
|
}
|
||||||
|
|
||||||
// CBadThing represents a BadThing error raised by the C contract.
|
// CBadThing represents a BadThing error raised by the C contract.
|
||||||
|
|
@ -94,14 +95,20 @@ type CBadThing struct {
|
||||||
Arg4 bool
|
Arg4 bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ErrorID returns the hash of canonical representation of the error's signature.
|
||||||
|
//
|
||||||
|
// Solidity: error BadThing(uint256 arg1, uint256 arg2, uint256 arg3, bool arg4)
|
||||||
func CBadThingErrorID() common.Hash {
|
func CBadThingErrorID() common.Hash {
|
||||||
return common.HexToHash("0xbb6a82f123854747ef4381e30e497f934a3854753fec99a69c35c30d4b46714d")
|
return common.HexToHash("0xbb6a82f123854747ef4381e30e497f934a3854753fec99a69c35c30d4b46714d")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBadThingError is the Go binding used to decode the provided
|
||||||
|
// error data into the corresponding Go error struct.
|
||||||
|
//
|
||||||
|
// Solidity: error BadThing(uint256 arg1, uint256 arg2, uint256 arg3, bool arg4)
|
||||||
func (c *C) UnpackBadThingError(raw []byte) (*CBadThing, error) {
|
func (c *C) UnpackBadThingError(raw []byte) (*CBadThing, error) {
|
||||||
errName := "BadThing"
|
|
||||||
out := new(CBadThing)
|
out := new(CBadThing)
|
||||||
if err := c.abi.UnpackIntoInterface(out, errName, raw); err != nil {
|
if err := c.abi.UnpackIntoInterface(out, "BadThing", raw); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
|
|
@ -115,14 +122,20 @@ type CBadThing2 struct {
|
||||||
Arg4 *big.Int
|
Arg4 *big.Int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ErrorID returns the hash of canonical representation of the error's signature.
|
||||||
|
//
|
||||||
|
// Solidity: error BadThing2(uint256 arg1, uint256 arg2, uint256 arg3, uint256 arg4)
|
||||||
func CBadThing2ErrorID() common.Hash {
|
func CBadThing2ErrorID() common.Hash {
|
||||||
return common.HexToHash("0xd233a24f02271fe7c9470e060d0fda6447a142bf12ab31fed7ab65affd546175")
|
return common.HexToHash("0xd233a24f02271fe7c9470e060d0fda6447a142bf12ab31fed7ab65affd546175")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBadThing2Error is the Go binding used to decode the provided
|
||||||
|
// error data into the corresponding Go error struct.
|
||||||
|
//
|
||||||
|
// Solidity: error BadThing2(uint256 arg1, uint256 arg2, uint256 arg3, uint256 arg4)
|
||||||
func (c *C) UnpackBadThing2Error(raw []byte) (*CBadThing2, error) {
|
func (c *C) UnpackBadThing2Error(raw []byte) (*CBadThing2, error) {
|
||||||
errName := "BadThing2"
|
|
||||||
out := new(CBadThing2)
|
out := new(CBadThing2)
|
||||||
if err := c.abi.UnpackIntoInterface(out, errName, raw); err != nil {
|
if err := c.abi.UnpackIntoInterface(out, "BadThing2", raw); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
|
|
@ -155,7 +168,8 @@ func (c *C2) Instance(backend bind.ContractBackend, addr common.Address) *bind.B
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Foo is a free data retrieval call binding the contract method 0xbfb4ebcf.
|
// Foo is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xbfb4ebcf.
|
||||||
//
|
//
|
||||||
// Solidity: function Foo() pure returns()
|
// Solidity: function Foo() pure returns()
|
||||||
func (c2 *C2) PackFoo() []byte {
|
func (c2 *C2) PackFoo() []byte {
|
||||||
|
|
@ -166,16 +180,13 @@ func (c2 *C2) PackFoo() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c2 *C2) UnpackError(raw []byte) any {
|
// UnpackError attempts to decode the provided error data using user-defined
|
||||||
// TODO: we should be able to discern the error type from the selector, instead of trying each possible type
|
// error definitions.
|
||||||
// strip off the error type selector
|
func (c2 *C2) UnpackError(raw []byte) (any, error) {
|
||||||
raw = raw[4:]
|
if bytes.Equal(raw[:4], c2.abi.Errors["BadThing"].ID.Bytes()[:4]) {
|
||||||
|
return c2.UnpackBadThingError(raw[4:])
|
||||||
if val, err := c2.UnpackBadThingError(raw); err == nil {
|
|
||||||
return val
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil, errors.New("Unknown error")
|
||||||
}
|
}
|
||||||
|
|
||||||
// C2BadThing represents a BadThing error raised by the C2 contract.
|
// C2BadThing represents a BadThing error raised by the C2 contract.
|
||||||
|
|
@ -186,14 +197,20 @@ type C2BadThing struct {
|
||||||
Arg4 bool
|
Arg4 bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ErrorID returns the hash of canonical representation of the error's signature.
|
||||||
|
//
|
||||||
|
// Solidity: error BadThing(uint256 arg1, uint256 arg2, uint256 arg3, bool arg4)
|
||||||
func C2BadThingErrorID() common.Hash {
|
func C2BadThingErrorID() common.Hash {
|
||||||
return common.HexToHash("0xbb6a82f123854747ef4381e30e497f934a3854753fec99a69c35c30d4b46714d")
|
return common.HexToHash("0xbb6a82f123854747ef4381e30e497f934a3854753fec99a69c35c30d4b46714d")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackBadThingError is the Go binding used to decode the provided
|
||||||
|
// error data into the corresponding Go error struct.
|
||||||
|
//
|
||||||
|
// Solidity: error BadThing(uint256 arg1, uint256 arg2, uint256 arg3, bool arg4)
|
||||||
func (c2 *C2) UnpackBadThingError(raw []byte) (*C2BadThing, error) {
|
func (c2 *C2) UnpackBadThingError(raw []byte) (*C2BadThing, error) {
|
||||||
errName := "BadThing"
|
|
||||||
out := new(C2BadThing)
|
out := new(C2BadThing)
|
||||||
if err := c2.abi.UnpackIntoInterface(out, errName, raw); err != nil {
|
if err := c2.abi.UnpackIntoInterface(out, "BadThing", raw); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
return out, nil
|
return out, nil
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
package uint256arrayreturn
|
package uint256arrayreturn
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -15,6 +16,7 @@ import (
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
var (
|
var (
|
||||||
|
_ = bytes.Equal
|
||||||
_ = errors.New
|
_ = errors.New
|
||||||
_ = big.NewInt
|
_ = big.NewInt
|
||||||
_ = common.Big1
|
_ = common.Big1
|
||||||
|
|
@ -49,7 +51,8 @@ func (c *MyContract) Instance(backend bind.ContractBackend, addr common.Address)
|
||||||
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
return bind.NewBoundContract(addr, c.abi, backend, backend, backend)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetNums is a free data retrieval call binding the contract method 0xbd6d1007.
|
// GetNums is the Go binding used to pack the parameters required for calling
|
||||||
|
// the contract method 0xbd6d1007.
|
||||||
//
|
//
|
||||||
// Solidity: function GetNums() pure returns(uint256[5])
|
// Solidity: function GetNums() pure returns(uint256[5])
|
||||||
func (myContract *MyContract) PackGetNums() []byte {
|
func (myContract *MyContract) PackGetNums() []byte {
|
||||||
|
|
@ -60,15 +63,15 @@ func (myContract *MyContract) PackGetNums() []byte {
|
||||||
return enc
|
return enc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UnpackGetNums is the Go binding that unpacks the parameters returned
|
||||||
|
// from invoking the contract method with ID 0xbd6d1007.
|
||||||
|
//
|
||||||
|
// Solidity: function GetNums() pure returns(uint256[5])
|
||||||
func (myContract *MyContract) UnpackGetNums(data []byte) ([5]*big.Int, error) {
|
func (myContract *MyContract) UnpackGetNums(data []byte) ([5]*big.Int, error) {
|
||||||
out, err := myContract.abi.Unpack("GetNums", data)
|
out, err := myContract.abi.Unpack("GetNums", data)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return *new([5]*big.Int), err
|
return *new([5]*big.Int), err
|
||||||
}
|
}
|
||||||
|
|
||||||
out0 := *abi.ConvertType(out[0], new([5]*big.Int)).(*[5]*big.Int)
|
out0 := *abi.ConvertType(out[0], new([5]*big.Int)).(*[5]*big.Int)
|
||||||
|
|
||||||
return out0, err
|
return out0, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -330,8 +330,8 @@ func TestErrors(t *testing.T) {
|
||||||
if !hasRevertErrorData {
|
if !hasRevertErrorData {
|
||||||
t.Fatalf("expected call error to contain revert error data.")
|
t.Fatalf("expected call error to contain revert error data.")
|
||||||
}
|
}
|
||||||
rawUnpackedErr := c.UnpackError(raw)
|
rawUnpackedErr, err := c.UnpackError(raw)
|
||||||
if rawUnpackedErr == nil {
|
if err != nil {
|
||||||
t.Fatalf("expected to unpack error")
|
t.Fatalf("expected to unpack error")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue