aboutsummaryrefslogtreecommitdiffstats
path: root/common/compiler/solidity.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/compiler/solidity.go')
-rw-r--r--common/compiler/solidity.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/compiler/solidity.go b/common/compiler/solidity.go
index 7ed9c2633..56e01ee33 100644
--- a/common/compiler/solidity.go
+++ b/common/compiler/solidity.go
@@ -39,6 +39,7 @@ type solcOutput struct {
BinRuntime string `json:"bin-runtime"`
SrcMapRuntime string `json:"srcmap-runtime"`
Bin, SrcMap, Abi, Devdoc, Userdoc, Metadata string
+ Hashes map[string]string
}
Version string
}
@@ -49,7 +50,7 @@ func (s *Solidity) makeArgs() []string {
"--optimize", // code optimizer switched on
}
if s.Major > 0 || s.Minor > 4 || s.Patch > 6 {
- p[1] += ",metadata"
+ p[1] += ",metadata,hashes"
}
return p
}
@@ -161,6 +162,7 @@ func ParseCombinedJSON(combinedJSON []byte, source string, languageVersion strin
contracts[name] = &Contract{
Code: "0x" + info.Bin,
RuntimeCode: "0x" + info.BinRuntime,
+ Hashes: info.Hashes,
Info: ContractInfo{
Source: source,
Language: "Solidity",