|
|
@ -179,9 +179,6 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty |
|
|
|
return Type{}, errors.New("abi: purely anonymous or underscored field is not supported") |
|
|
|
return Type{}, errors.New("abi: purely anonymous or underscored field is not supported") |
|
|
|
} |
|
|
|
} |
|
|
|
fieldName := ResolveNameConflict(name, func(s string) bool { return used[s] }) |
|
|
|
fieldName := ResolveNameConflict(name, func(s string) bool { return used[s] }) |
|
|
|
if err != nil { |
|
|
|
|
|
|
|
return Type{}, err |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
used[fieldName] = true |
|
|
|
used[fieldName] = true |
|
|
|
if !isValidFieldName(fieldName) { |
|
|
|
if !isValidFieldName(fieldName) { |
|
|
|
return Type{}, fmt.Errorf("field %d has invalid name", idx) |
|
|
|
return Type{}, fmt.Errorf("field %d has invalid name", idx) |
|
|
|