diff options
author | chriseth <chris@ethereum.org> | 2016-10-11 03:23:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-11 03:23:27 +0800 |
commit | 0b1d449057af86f58c7fed87712f99616ed246f1 (patch) | |
tree | eba62ad13a8e688b41c51fb3226ac47369e7cea3 /libsolidity | |
parent | 119bd4addc20498d41d92109e1332a37e6fcd2d8 (diff) | |
parent | f77a4585ec0d4f13b6d672095cc242f59a79c65a (diff) | |
download | dexon-solidity-0b1d449057af86f58c7fed87712f99616ed246f1.tar.gz dexon-solidity-0b1d449057af86f58c7fed87712f99616ed246f1.tar.zst dexon-solidity-0b1d449057af86f58c7fed87712f99616ed246f1.zip |
Merge pull request #1168 from ethereum/rename-dev-sha3
Rename dev::sha3 to dev::keccak256
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/ast/AST.cpp | 2 | ||||
-rw-r--r-- | libsolidity/ast/Types.cpp | 2 | ||||
-rw-r--r-- | libsolidity/codegen/ExpressionCompiler.cpp | 2 | ||||
-rw-r--r-- | libsolidity/interface/CompilerStack.cpp | 2 | ||||
-rw-r--r-- | libsolidity/interface/GasEstimator.cpp | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/ast/AST.cpp b/libsolidity/ast/AST.cpp index 294daa13..cca19a4e 100644 --- a/libsolidity/ast/AST.cpp +++ b/libsolidity/ast/AST.cpp @@ -151,7 +151,7 @@ vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::inter if (signaturesSeen.count(functionSignature) == 0) { signaturesSeen.insert(functionSignature); - FixedHash<4> hash(dev::sha3(functionSignature)); + FixedHash<4> hash(dev::keccak256(functionSignature)); m_interfaceFunctionList->push_back(make_pair(hash, fun)); } } diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp index 4b5f12ce..6d1af534 100644 --- a/libsolidity/ast/Types.cpp +++ b/libsolidity/ast/Types.cpp @@ -2033,7 +2033,7 @@ string FunctionType::externalSignature() const u256 FunctionType::externalIdentifier() const { - return FixedHash<4>::Arith(FixedHash<4>(dev::sha3(externalSignature()))); + return FixedHash<4>::Arith(FixedHash<4>(dev::keccak256(externalSignature()))); } TypePointers FunctionType::parseElementaryTypeVector(strings const& _types) diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index 26acd8a4..3d05edd3 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -670,7 +670,7 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) } if (!event.isAnonymous()) { - m_context << u256(h256::Arith(dev::sha3(function.externalSignature()))); + m_context << u256(h256::Arith(dev::keccak256(function.externalSignature()))); ++numIndexed; } solAssert(numIndexed <= 4, "Too many indexed arguments."); diff --git a/libsolidity/interface/CompilerStack.cpp b/libsolidity/interface/CompilerStack.cpp index ec6b5d2e..476721db 100644 --- a/libsolidity/interface/CompilerStack.cpp +++ b/libsolidity/interface/CompilerStack.cpp @@ -302,7 +302,7 @@ dev::h256 CompilerStack::contractCodeHash(string const& _contractName) const if (obj.bytecode.empty() || !obj.linkReferences.empty()) return dev::h256(); else - return dev::sha3(obj.bytecode); + return dev::keccak256(obj.bytecode); } Json::Value CompilerStack::streamAssembly(ostream& _outStream, string const& _contractName, StringMap _sourceCodes, bool _inJsonFormat) const diff --git a/libsolidity/interface/GasEstimator.cpp b/libsolidity/interface/GasEstimator.cpp index 99ed75bc..1c804b78 100644 --- a/libsolidity/interface/GasEstimator.cpp +++ b/libsolidity/interface/GasEstimator.cpp @@ -136,7 +136,7 @@ GasEstimator::GasConsumption GasEstimator::functionalEstimation( ExpressionClasses& classes = state->expressionClasses(); using Id = ExpressionClasses::Id; using Ids = vector<Id>; - Id hashValue = classes.find(u256(FixedHash<4>::Arith(FixedHash<4>(dev::sha3(_signature))))); + Id hashValue = classes.find(u256(FixedHash<4>::Arith(FixedHash<4>(dev::keccak256(_signature))))); Id calldata = classes.find(Instruction::CALLDATALOAD, Ids{classes.find(u256(0))}); classes.forceEqual(hashValue, Instruction::DIV, Ids{ calldata, |