From d0eeb3ebdcb58f62ab4c542aef9e865c10797175 Mon Sep 17 00:00:00 2001 From: Bas van Kervel Date: Mon, 6 Feb 2017 18:16:56 +0100 Subject: [PATCH] cmd/abigen: parse contract name as abi identifier --- cmd/abigen/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go index dfbd025dad..3a1ae6f4c3 100644 --- a/cmd/abigen/main.go +++ b/cmd/abigen/main.go @@ -94,7 +94,9 @@ func main() { abi, _ := json.Marshal(contract.Info.AbiDefinition) // Flatten the compiler parse abis = append(abis, string(abi)) bins = append(bins, contract.Code) - types = append(types, name) + + nameParts := strings.Split(name, ":") + types = append(types, nameParts[len(nameParts)-1]) } } else { // Otherwise load up the ABI, optional bytecode and type name from the parameters