accounts/abi: set stringKind for contract-typed arguments

Contract parameters are mapped to AddressTy, but stringKind was left as
the raw type string. Set it to "address" so Type.String() yields the
correct ABI signature.
This commit is contained in:
Weixie Cui 2026-07-11 19:30:33 +08:00
parent 3ab52d837d
commit 13e3226b9f

View file

@ -222,6 +222,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
if strings.HasPrefix(internalType, "contract ") {
typ.Size = 20
typ.T = AddressTy
typ.stringKind = "address"
} else {
return Type{}, fmt.Errorf("unsupported arg type: %s", t)
}