Skip to content

Commit 0cc9409

Browse files
authored
Merge pull request ethereum#3648 from bas-vk/abigen
cmd/abigen: parse contract name as abi identifier
2 parents 6dd27e7 + d0eeb3e commit 0cc9409

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/abigen/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ func main() {
9494
abi, _ := json.Marshal(contract.Info.AbiDefinition) // Flatten the compiler parse
9595
abis = append(abis, string(abi))
9696
bins = append(bins, contract.Code)
97-
types = append(types, name)
97+
98+
nameParts := strings.Split(name, ":")
99+
types = append(types, nameParts[len(nameParts)-1])
98100
}
99101
} else {
100102
// Otherwise load up the ABI, optional bytecode and type name from the parameters

0 commit comments

Comments
 (0)