aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface/CompilerStack.cpp
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-07-19 17:43:19 +0800
committerGitHub <noreply@github.com>2017-07-19 17:43:19 +0800
commit2a46e1b0e23b57f9333d4bf2fe0f402795581d61 (patch)
treed611ac556b46c9baa2dd4d85148cff61d29400a2 /libsolidity/interface/CompilerStack.cpp
parentb2879c18768f25d46595be5ca0d41b3c69835223 (diff)
parent6d8929a71aa5cecb6f4a1aa15a2a5db640a62631 (diff)
downloaddexon-solidity-2a46e1b0e23b57f9333d4bf2fe0f402795581d61.tar.gz
dexon-solidity-2a46e1b0e23b57f9333d4bf2fe0f402795581d61.tar.zst
dexon-solidity-2a46e1b0e23b57f9333d4bf2fe0f402795581d61.zip
Merge pull request #2589 from ethereum/rename-onchainmetadata
Rename onChainMetadata to metadata
Diffstat (limited to 'libsolidity/interface/CompilerStack.cpp')
-rw-r--r--libsolidity/interface/CompilerStack.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp
index 8b08377b..7a87875c 100644
--- a/libsolidity/interface/CompilerStack.cpp
+++ b/libsolidity/interface/CompilerStack.cpp
@@ -476,12 +476,12 @@ Json::Value CompilerStack::methodIdentifiers(string const& _contractName) const
return methodIdentifiers;
}
-string const& CompilerStack::onChainMetadata(string const& _contractName) const
+string const& CompilerStack::metadata(string const& _contractName) const
{
if (m_stackState != CompilationSuccessful)
BOOST_THROW_EXCEPTION(CompilerError() << errinfo_comment("Compilation was not successful."));
- return contract(_contractName).onChainMetadata;
+ return contract(_contractName).metadata;
}
Scanner const& CompilerStack::scanner(string const& _sourceName) const
@@ -675,11 +675,11 @@ void CompilerStack::compileContract(
shared_ptr<Compiler> compiler = make_shared<Compiler>(m_optimize, m_optimizeRuns);
Contract& compiledContract = m_contracts.at(_contract.fullyQualifiedName());
- string onChainMetadata = createOnChainMetadata(compiledContract);
+ string metadata = createMetadata(compiledContract);
bytes cborEncodedMetadata =
- // CBOR-encoding of {"bzzr0": dev::swarmHash(onChainMetadata)}
+ // CBOR-encoding of {"bzzr0": dev::swarmHash(metadata)}
bytes{0xa1, 0x65, 'b', 'z', 'z', 'r', '0', 0x58, 0x20} +
- dev::swarmHash(onChainMetadata).asBytes();
+ dev::swarmHash(metadata).asBytes();
solAssert(cborEncodedMetadata.size() <= 0xffff, "Metadata too large");
// 16-bit big endian length
cborEncodedMetadata += toCompactBigEndian(cborEncodedMetadata.size(), 2);
@@ -712,7 +712,7 @@ void CompilerStack::compileContract(
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment("Assembly exception for deployed bytecode"));
}
- compiledContract.onChainMetadata = onChainMetadata;
+ compiledContract.metadata = metadata;
_compiledContracts[compiledContract.contract] = &compiler->assembly();
try
@@ -773,7 +773,7 @@ CompilerStack::Source const& CompilerStack::source(string const& _sourceName) co
return it->second;
}
-string CompilerStack::createOnChainMetadata(Contract const& _contract) const
+string CompilerStack::createMetadata(Contract const& _contract) const
{
Json::Value meta;
meta["version"] = 1;