MCPcopy Create free account
hub / github.com/argotorg/solidity / sendEther

Method sendEther

test/ExecutionFramework.cpp:217–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void ExecutionFramework::sendEther(h160 const& _addr, u256 const& _amount)
218{
219 m_evmcHost->newBlock();
220
221 if (m_showMessages)
222 {
223 std::cout << "SEND_ETHER " << m_sender.hex() << " -> " << _addr.hex() << ":" << std::endl;
224 if (_amount > 0)
225 std::cout << " value: " << _amount << std::endl;
226 }
227 evmc_message message{};
228 message.sender = EVMHost::convertToEVMC(m_sender);
229 message.value = EVMHost::convertToEVMC(_amount);
230 message.kind = EVMC_CALL;
231 message.recipient = EVMHost::convertToEVMC(_addr);
232 message.code_address = message.recipient;
233 message.gas = InitialGas.convert_to<int64_t>();
234
235 m_evmcHost->call(message);
236}
237
238size_t ExecutionFramework::currentTimestamp()
239{

Callers

nothing calls this directly

Calls 3

newBlockMethod · 0.80
hexMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected