aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-12-13 23:36:01 +0800
committerchriseth <c@ethdev.com>2016-12-13 23:37:48 +0800
commit56a027bedc88305fe05b09859cbab408d44a0106 (patch)
treec34f60f8dbb32c4fa49fc2324afd027d8ca87271 /libsolidity
parent9d60734549f6188884bec278208cab0af9c9735e (diff)
downloaddexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar
dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.gz
dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.bz2
dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.lz
dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.xz
dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.tar.zst
dexon-solidity-56a027bedc88305fe05b09859cbab408d44a0106.zip
Use multiple URLs for metadata.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/interface/CompilerStack.cpp6
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;