diff options
author | Bas van Kervel <basvankervel@gmail.com> | 2017-02-07 01:16:56 +0800 |
---|---|---|
committer | Bas van Kervel <basvankervel@gmail.com> | 2017-02-07 01:16:56 +0800 |
commit | d0eeb3ebdcb58f62ab4c542aef9e865c10797175 (patch) | |
tree | 2d658163a90fa37b3bdf0d1133a25e3f52d0d92b /cmd/abigen | |
parent | 296450451b090393b2dd11d057c5b72cb4d92356 (diff) | |
download | dexon-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.go | 4 |
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 |