diff options
author | chriseth <c@ethdev.com> | 2016-12-13 23:36:01 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-12-13 23:37:48 +0800 |
commit | 56a027bedc88305fe05b09859cbab408d44a0106 (patch) | |
tree | c34f60f8dbb32c4fa49fc2324afd027d8ca87271 /libsolidity/interface/CompilerStack.cpp | |
parent | 9d60734549f6188884bec278208cab0af9c9735e (diff) | |
download | dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.gz dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.zst dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.zip |
Use multiple URLs for metadata.
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index 0b8cecc7..4095844f 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -694,8 +694,10 @@ string CompilerStack::createOnChainMetadata(Contract const& _contract) const solAssert(s.second.scanner, "Scanner not available"); meta["sources"][s.first]["keccak256"] = "0x" + toHex(dev::keccak256(s.second.scanner->source()).asBytes()); - meta["sources"][s.first]["url"] = - "bzzr://" + toHex(dev::swarmHash(s.second.scanner->source()).asBytes()); + meta["sources"][s.first]["urls"] = Json::arrayValue; + meta["sources"][s.first]["urls"].append( + "bzzr://" + toHex(dev::swarmHash(s.second.scanner->source()).asBytes()) + ); } meta["settings"]["optimizer"]["enabled"] = m_optimize; meta["settings"]["optimizer"]["runs"] = m_optimizeRuns; |