diff options
author | chriseth <c@ethdev.com> | 2016-06-14 06:12:13 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-06-29 05:18:54 +0800 |
commit | ce2258b71e632e01b3f50d47704352065cb01b5d (patch) | |
tree | 411df1ffa3165770f3dedb867f716237a8299028 /test/libsolidity/SolidityExecutionFramework.cpp | |
parent | 966709b7d7ee70cfc550923e22e17a22556609a4 (diff) | |
download | dexon-solidity-ce2258b71e632e01b3f50d47704352065cb01b5d.tar.gz dexon-solidity-ce2258b71e632e01b3f50d47704352065cb01b5d.tar.zst dexon-solidity-ce2258b71e632e01b3f50d47704352065cb01b5d.zip |
Balance and storage.
Diffstat (limited to 'test/libsolidity/SolidityExecutionFramework.cpp')
-rw-r--r-- | test/libsolidity/SolidityExecutionFramework.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityExecutionFramework.cpp b/test/libsolidity/SolidityExecutionFramework.cpp index 871c0eba..db48c3a1 100644 --- a/test/libsolidity/SolidityExecutionFramework.cpp +++ b/test/libsolidity/SolidityExecutionFramework.cpp @@ -83,3 +83,13 @@ void ExecutionFramework::sendMessage(bytes const& _data, bool _isCreation, u256 m_logs.push_back(entry); } } + +u256 ExecutionFramework::balanceAt(Address const& _addr) +{ + return u256(m_rpc.eth_getBalance(toString(_addr), "latest")); +} + +bool ExecutionFramework::storageEmpty(Address const& _addr) +{ + return h256(m_rpc.eth_getStorageRoot(toString(_addr), "latest")) == EmptySHA3; +} |