aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/abigen
diff options
context:
space:
mode:
authorBas van Kervel <basvankervel@gmail.com>2017-02-07 01:16:56 +0800
committerBas van Kervel <basvankervel@gmail.com>2017-02-07 01:16:56 +0800
commitd0eeb3ebdcb58f62ab4c542aef9e865c10797175 (patch)
tree2d658163a90fa37b3bdf0d1133a25e3f52d0d92b /cmd/abigen
parent296450451b090393b2dd11d057c5b72cb4d92356 (diff)
downloaddexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar
dexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.gz
dexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.bz2
dexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.lz
dexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.xz
dexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.zst
dexon-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.zip
cmd/abigen: parse contract name as abi identifier
Diffstat (limited to 'cmd/abigen')
-rw-r--r--cmd/abigen/main.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/abigen/main.go b/cmd/abigen/main.go
index dfbd025da..3a1ae6f4c 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