Skip to content

Commit d0eeb3e

Browse files
committed
cmd/abigen: parse contract name as abi identifier
1 parent 2964504 commit d0eeb3e

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)