mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 19:30:44 +00:00
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:
parent
3ab52d837d
commit
13e3226b9f
1 changed files with 1 additions and 0 deletions
|
|
@ -222,6 +222,7 @@ func NewType(t string, internalType string, components []ArgumentMarshaling) (ty
|
||||||
if strings.HasPrefix(internalType, "contract ") {
|
if strings.HasPrefix(internalType, "contract ") {
|
||||||
typ.Size = 20
|
typ.Size = 20
|
||||||
typ.T = AddressTy
|
typ.T = AddressTy
|
||||||
|
typ.stringKind = "address"
|
||||||
} else {
|
} else {
|
||||||
return Type{}, fmt.Errorf("unsupported arg type: %s", t)
|
return Type{}, fmt.Errorf("unsupported arg type: %s", t)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue