Update accounts/abi/type.go

This commit is contained in:
Martin HS 2024-08-19 13:40:16 +02:00 committed by GitHub
parent f9176955a3
commit dd8b5f1a96
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -219,7 +219,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
typ.T = FunctionTy typ.T = FunctionTy
typ.Size = 24 typ.Size = 24
default: default:
if strings.Contains(internalType, "contract") { if strings.HasPrefix(internalType, "contract ") {
typ.Size = 20 typ.Size = 20
typ.T = AddressTy typ.T = AddressTy
} else { } else {