MCPcopy Create free account
hub / github.com/LUX-Core/lux / eth_signTransaction

Method eth_signTransaction

src/cpp-ethereum/libweb3jsonrpc/Eth.cpp:291–313  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291string Eth::eth_signTransaction(Json::Value const& _json)
292{
293 try
294 {
295 TransactionSkeleton t = toTransactionSkeleton(_json);
296 setTransactionDefaults(t);
297 TransactionNotification n = m_ethAccounts.authenticate(t);
298 switch (n.r)
299 {
300 case TransactionRepercussion::Success:
301 return toJS(n.hash);
302 case TransactionRepercussion::ProxySuccess:
303 return toJS(n.hash);// TODO: give back something more useful than an empty hash.
304 default:
305 // TODO: provide more useful information in the exception.
306 BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS));
307 }
308 }
309 catch (...)
310 {
311 BOOST_THROW_EXCEPTION(JsonRpcException(Errors::ERROR_RPC_INVALID_PARAMS));
312 }
313}
314
315Json::Value Eth::eth_inspectTransaction(std::string const& _rlp)
316{

Callers 1

eth_signTransactionIMethod · 0.45

Calls 3

toTransactionSkeletonFunction · 0.85
toJSFunction · 0.85
authenticateMethod · 0.45

Tested by

no test coverage detected