aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-12-15 00:22:25 +0800
committerGitHub <noreply@github.com>2016-12-15 00:22:25 +0800
commite97ba77a45b871e7404d8ff5b6432b2f7090dc61 (patch)
treebdf8c1915840e070ba5f72a4340ace8f032bb6c4 /libsolidity
parent18f8f29c0a3ed9404f2950c11d77f85d0117c6d5 (diff)
parent56a027bedc88305fe05b09859cbab408d44a0106 (diff)
downloaddexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.tar
dexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.tar.gz
dexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.tar.bz2
dexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.tar.lz
dexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.tar.xz
dexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.tar.zst
dexon-solidity-e97ba77a45b871e7404d8ff5b6432b2f7090dc61.zip
Merge pull request #1508 from ethereum/multiurls
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;