35 Transaction tr(
fromHex(
"0xf86d800182521c94095e7baea6a6c7c4c2dfeb977efac326af552d870a8e0358ac39584bc98a7c979f984b031ba048b55bfa915ac795c431978d8a6a992b628d557da5ff759b307d495a36649353a0efffd310ac743f371de3b9f7f9cb56c0b28ad43601b4ab949f53faa07bd2c804"),
CheckTransaction::None);
41 std::stringstream buffer;
49 BOOST_CHECK_MESSAGE(buffer.str() ==
"{12345, a94f5374fce5edbc8e2a8697c15331677e6ebf0b, 001122334455}",
"Error ExecutionResultOutput");
54 std::stringstream buffer;
56 BOOST_CHECK_MESSAGE(buffer.str() ==
"BadInstruction",
"Error output TransactionException::BadInstruction");
57 buffer.str(std::string());
60 BOOST_CHECK_MESSAGE(buffer.str() ==
"None",
"Error output TransactionException::None");
61 buffer.str(std::string());
64 BOOST_CHECK_MESSAGE(buffer.str() ==
"BadRLP",
"Error output TransactionException::BadRLP");
65 buffer.str(std::string());
68 BOOST_CHECK_MESSAGE(buffer.str() ==
"InvalidFormat",
"Error output TransactionException::InvalidFormat");
69 buffer.str(std::string());
72 BOOST_CHECK_MESSAGE(buffer.str() ==
"OutOfGasIntrinsic",
"Error output TransactionException::OutOfGasIntrinsic");
73 buffer.str(std::string());
76 BOOST_CHECK_MESSAGE(buffer.str() ==
"InvalidSignature",
"Error output TransactionException::InvalidSignature");
77 buffer.str(std::string());
80 BOOST_CHECK_MESSAGE(buffer.str() ==
"InvalidNonce",
"Error output TransactionException::InvalidNonce");
81 buffer.str(std::string());
84 BOOST_CHECK_MESSAGE(buffer.str() ==
"NotEnoughCash",
"Error output TransactionException::NotEnoughCash");
85 buffer.str(std::string());
88 BOOST_CHECK_MESSAGE(buffer.str() ==
"OutOfGasBase",
"Error output TransactionException::OutOfGasBase");
89 buffer.str(std::string());
92 BOOST_CHECK_MESSAGE(buffer.str() ==
"BlockGasLimitReached",
"Error output TransactionException::BlockGasLimitReached");
93 buffer.str(std::string());
96 BOOST_CHECK_MESSAGE(buffer.str() ==
"BadInstruction",
"Error output TransactionException::BadInstruction");
97 buffer.str(std::string());
100 BOOST_CHECK_MESSAGE(buffer.str() ==
"BadJumpDestination",
"Error output TransactionException::BadJumpDestination");
101 buffer.str(std::string());
104 BOOST_CHECK_MESSAGE(buffer.str() ==
"OutOfGas",
"Error output TransactionException::OutOfGas");
105 buffer.str(std::string());
108 BOOST_CHECK_MESSAGE(buffer.str() ==
"OutOfStack",
"Error output TransactionException::OutOfStack");
109 buffer.str(std::string());
112 BOOST_CHECK_MESSAGE(buffer.str() ==
"StackUnderflow",
"Error output TransactionException::StackUnderflow");
113 buffer.str(std::string());
116 BOOST_CHECK_MESSAGE(buffer.str() ==
"Unknown",
"Error output TransactionException::StackUnderflow");
117 buffer.str(std::string());
Too little gas to pay for the base transaction cost.
Adapted from code found on http://stackoverflow.com/questions/180947/base64-decode-snippet-in-c Origi...
h160 Address
An Ethereum address: 20 bytes.
int64_t baseGasRequired(EVMSchedule const &_es) const
Ran out of stack executing code of the transaction.
Description of the result of executing a transaction.
BOOST_AUTO_TEST_CASE(TransactionGasRequired)
Ran out of gas executing code of the transaction.
bytes fromHex(std::string const &_s, WhenError _throw=WhenError::DontThrow)
Base class for all exceptions.
boost::multiprecision::number< boost::multiprecision::cpp_int_backend< 256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void >> u256
Encodes a transaction, ready to be exported to or freshly imported from RLP.
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_CHECK_EQUAL(v1, v2)
Base class for all RLP exceptions.
#define BOOST_AUTO_TEST_SUITE_END()
Too little gas to pay for the base transaction cost.
Helper functions to work with json::spirit and test files.
TransactionException toTransactionException(Exception const &_e)