diff options
author | Gav Wood <i@gavwood.com> | 2015-01-16 02:59:35 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-01-16 02:59:35 +0800 |
commit | 911916beb7d8fd9c318d43fdf137727d364a95d2 (patch) | |
tree | 21ab383a6cc9e08247085146e6936668c6a98a03 /ExpressionCompiler.cpp | |
parent | 80eec8b308e8af3b742e3da47ded927e4e4b388d (diff) | |
download | dexon-solidity-911916beb7d8fd9c318d43fdf137727d364a95d2.tar.gz dexon-solidity-911916beb7d8fd9c318d43fdf137727d364a95d2.tar.zst dexon-solidity-911916beb7d8fd9c318d43fdf137727d364a95d2.zip |
Add blockhash to Solidity.
Autopadding fix.
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r-- | ExpressionCompiler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp index 1c02f4f3..29338b69 100644 --- a/ExpressionCompiler.cpp +++ b/ExpressionCompiler.cpp @@ -282,6 +282,13 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall) m_context << u256(32) << u256(0) << eth::logInstruction(logNumber); break; } + case Location::BLOCKHASH: + { + arguments[0]->accept(*this); + appendTypeConversion(*arguments[0]->getType(), *function.getParameterTypes()[0], true); + m_context << eth::Instruction::BLOCKHASH; + break; + } case Location::ECRECOVER: case Location::SHA256: case Location::RIPEMD160: |