fix: correct regex group index in ABI type size parsing

This commit is contained in:
Alex Pikme 2025-11-17 11:14:31 +01:00 committed by GitHub
parent 5e6f7374de
commit 01d8e2d966
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -126,7 +126,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
var varSize int
if len(parsedType[3]) > 0 {
var err error
varSize, err = strconv.Atoi(parsedType[2])
varSize, err = strconv.Atoi(parsedType[3])
if err != nil {
return Type{}, fmt.Errorf("abi: error parsing variable size: %v", err)
}