aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityExecutionFramework.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-06-14 06:12:13 +0800
committerchriseth <c@ethdev.com>2016-06-29 05:18:54 +0800
commitce2258b71e632e01b3f50d47704352065cb01b5d (patch)
tree411df1ffa3165770f3dedb867f716237a8299028 /test/libsolidity/SolidityExecutionFramework.cpp
parent966709b7d7ee70cfc550923e22e17a22556609a4 (diff)
downloaddexon-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.cpp10
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;
+}