mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
accounts/abi: typo
This commit is contained in:
parent
02478bf727
commit
97974281da
2 changed files with 6 additions and 6 deletions
|
|
@ -56,7 +56,7 @@ type Type struct {
|
|||
TupleRawName string // Raw struct name defined in source code, may be empty.
|
||||
TupleElems []*Type // Type information of all tuple fields
|
||||
TupleRawNames []string // Raw field name of all tuple fields
|
||||
TupelType reflect.Type // Underlying struct of the tuple
|
||||
TupleType reflect.Type // Underlying struct of the tuple
|
||||
}
|
||||
|
||||
var (
|
||||
|
|
@ -185,7 +185,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
|
|||
}
|
||||
expression += ")"
|
||||
|
||||
typ.TupelType = reflect.StructOf(fields)
|
||||
typ.TupleType = reflect.StructOf(fields)
|
||||
typ.TupleElems = elems
|
||||
typ.TupleRawNames = names
|
||||
typ.T = TupleTy
|
||||
|
|
@ -226,7 +226,7 @@ func (t Type) getType() reflect.Type {
|
|||
case ArrayTy:
|
||||
return reflect.ArrayOf(t.Size, t.Elem.getType())
|
||||
case TupleTy:
|
||||
return t.TupelType
|
||||
return t.TupleType
|
||||
case AddressTy:
|
||||
return reflect.TypeOf(common.Address{})
|
||||
case FixedBytesTy:
|
||||
|
|
|
|||
|
|
@ -95,11 +95,11 @@ func TestTypeRegexp(t *testing.T) {
|
|||
// {"fixed[2]", nil, Type{}},
|
||||
// {"fixed128x128[]", nil, Type{}},
|
||||
// {"fixed128x128[2]", nil, Type{}},
|
||||
{"tuple", []ArgumentMarshaling{{Name: "a", Type: "int64"}}, Type{T: TupleTy, TupelType: reflect.TypeOf(struct {
|
||||
{"tuple", []ArgumentMarshaling{{Name: "a", Type: "int64"}}, Type{T: TupleTy, TupleType: reflect.TypeOf(struct {
|
||||
A int64 `json:"a"`
|
||||
}{}), stringKind: "(int64)",
|
||||
TupleElems: []*Type{{T: IntTy, Size: 64, stringKind: "int64"}}, TupleRawNames: []string{"a"}}},
|
||||
{"tuple with long name", []ArgumentMarshaling{{Name: "aTypicalParamName", Type: "int64"}}, Type{T: TupleTy, TupelType: reflect.TypeOf(struct {
|
||||
{"tuple with long name", []ArgumentMarshaling{{Name: "aTypicalParamName", Type: "int64"}}, Type{T: TupleTy, TupleType: reflect.TypeOf(struct {
|
||||
ATypicalParamName int64 `json:"aTypicalParamName"`
|
||||
}{}), stringKind: "(int64)",
|
||||
TupleElems: []*Type{{T: IntTy, Size: 64, stringKind: "int64"}}, TupleRawNames: []string{"aTypicalParamName"}}},
|
||||
|
|
@ -312,7 +312,7 @@ func TestInternalType(t *testing.T) {
|
|||
internalType := "struct a.b[]"
|
||||
kind := Type{
|
||||
T: TupleTy,
|
||||
TupelType: reflect.TypeOf(struct {
|
||||
TupleType: reflect.TypeOf(struct {
|
||||
A int64 `json:"a"`
|
||||
}{}),
|
||||
stringKind: "(int64)",
|
||||
|
|
|
|||
Loading…
Reference in a new issue