aboutsummaryrefslogtreecommitdiffstats
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
parent296450451b090393b2dd11d057c5b72cb4d92356 (diff)
downloadgo-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar
go-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.gz
go-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.bz2
go-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.lz
go-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.xz
go-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.tar.zst
go-tangerine-d0eeb3ebdcb58f62ab4c542aef9e865c10797175.zip
cmd/abigen: parse contract name as abi identifier
-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