Balance and storage.

This commit is contained in:
chriseth
2016-06-28 23:18:54 +02:00
parent 966709b7d7
commit ce2258b71e
5 changed files with 82 additions and 65 deletions
@@ -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;
}