30 #include <boost/test/unit_test.hpp> 42 namespace dev {
namespace test {
61 void set(
Address _a,
u256 _myBalance,
u256 _myNonce, std::map<u256, u256>
const& _storage,
bytes const& _code);
62 void reset(
u256 _myBalance,
u256 _myNonce, std::map<u256, u256>
const& _storage);
75 std::map<Address, std::tuple<u256, u256, std::map<u256, u256>,
bytes>>
addresses;
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
static dev::eth::EnvInfo importEnv(json_spirit::mObject &_o)
virtual u256 store(u256 _n) override
Read storage location.
virtual size_t codeSizeAt(Address _a) override
std::vector< Transaction > Transactions
Nice name for vector of Transaction.
json_spirit::mObject exportExec()
void importState(json_spirit::mObject &_object)
virtual u256 balance(Address _a) override
Read address's balance.
virtual bool exists(Address _a) override
Does the account exist?
virtual void suicide(Address _a) override
Suicide the associated contract and give proceeds to the given address.
void importCallCreates(json_spirit::mArray &_callcreates)
json_spirit::mObject exportEnv()
mConfig::Array_type mArray
json_spirit::mObject exportState()
std::map< Address, std::tuple< u256, u256, std::map< u256, u256 >, bytes > > addresses
virtual boost::optional< eth::owning_bytes_ref > call(eth::CallParameters &) override
Make a new message call.
std::vector< byte > bytes
Fixed-size raw-byte array container type, with an API optimised for storing hashes.
std::function< void(uint64_t, uint64_t, Instruction, bigint, bigint, bigint, VM *, ExtVMFace const *)> OnOpFunc
eth::Transactions callcreates
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
eth::OnOpFunc simpleTrace() const
mConfig::Object_type mObject
Interface and null implementation of the class for specifying VM externalities.
Address myAddress
Address associated with executing code (a contract, or contract-to-be).
uint8_t const size_t const size
void setContract(Address _myAddress, u256 _myBalance, u256 _myNonce, std::map< u256, u256 > const &_storage, bytes const &_code)
virtual bytes const & codeAt(Address _a) override
Read address's code.
void importExec(json_spirit::mObject &_o)
virtual void setStore(u256 _n, u256 _v) override
Write a value in storage.
json_spirit::mArray exportCallCreates()
void reset(u256 _myBalance, u256 _myNonce, std::map< u256, u256 > const &_storage)
virtual h160 create(u256 _endowment, u256 &io_gas, bytesConstRef _init, eth::OnOpFunc const &) override
Create a new (contract) account.
Helper functions to work with json::spirit and test files.
void setTransaction(Address _caller, u256 _value, u256 _gasPrice, bytes const &_data)