2019-02-06 11:10:05 +00:00
|
|
|
/*
|
|
|
|
This file is part of solidity.
|
|
|
|
solidity is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
solidity is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with solidity. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <test/libsolidity/SemanticTest.h>
|
2020-05-11 07:26:27 +00:00
|
|
|
#include <libsolutil/Whiskers.h>
|
|
|
|
#include <libyul/Exceptions.h>
|
2020-01-14 16:48:17 +00:00
|
|
|
#include <test/Common.h>
|
2019-02-06 11:10:05 +00:00
|
|
|
#include <boost/algorithm/string.hpp>
|
|
|
|
#include <boost/algorithm/string/predicate.hpp>
|
|
|
|
#include <boost/algorithm/string/trim.hpp>
|
|
|
|
#include <boost/throw_exception.hpp>
|
|
|
|
|
|
|
|
#include <algorithm>
|
|
|
|
#include <cctype>
|
|
|
|
#include <fstream>
|
|
|
|
#include <memory>
|
|
|
|
#include <stdexcept>
|
|
|
|
|
|
|
|
using namespace std;
|
2019-12-23 15:50:30 +00:00
|
|
|
using namespace solidity;
|
2020-05-11 07:26:27 +00:00
|
|
|
using namespace solidity::yul;
|
2019-12-23 15:50:30 +00:00
|
|
|
using namespace solidity::util;
|
|
|
|
using namespace solidity::util::formatting;
|
|
|
|
using namespace solidity::frontend::test;
|
2019-02-06 11:10:05 +00:00
|
|
|
using namespace boost;
|
|
|
|
using namespace boost::algorithm;
|
|
|
|
using namespace boost::unit_test;
|
2019-02-06 11:10:48 +00:00
|
|
|
namespace fs = boost::filesystem;
|
2019-02-06 11:10:05 +00:00
|
|
|
|
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
SemanticTest::SemanticTest(string const& _filename, langutil::EVMVersion _evmVersion, vector<boost::filesystem::path> const& _vmPaths, bool enforceViaYul):
|
|
|
|
SolidityExecutionFramework(_evmVersion, _vmPaths),
|
2020-04-17 20:24:33 +00:00
|
|
|
EVMVersionRestrictedTestCase(_filename),
|
2020-06-18 10:31:55 +00:00
|
|
|
m_sources(m_reader.sources()),
|
|
|
|
m_lineOffset(m_reader.lineNumber()),
|
2020-04-17 20:24:33 +00:00
|
|
|
m_enforceViaYul(enforceViaYul)
|
2019-02-06 11:10:05 +00:00
|
|
|
{
|
2020-07-20 12:52:10 +00:00
|
|
|
string choice = m_reader.stringSetting("compileViaYul", "default");
|
2020-03-19 01:48:42 +00:00
|
|
|
if (choice == "also")
|
2019-03-27 18:45:53 +00:00
|
|
|
{
|
2020-03-19 01:48:42 +00:00
|
|
|
m_runWithYul = true;
|
|
|
|
m_runWithoutYul = true;
|
2020-02-04 15:01:30 +00:00
|
|
|
}
|
2020-03-19 01:48:42 +00:00
|
|
|
else if (choice == "true")
|
|
|
|
{
|
|
|
|
m_runWithYul = true;
|
|
|
|
m_runWithoutYul = false;
|
|
|
|
}
|
|
|
|
else if (choice == "false")
|
|
|
|
{
|
|
|
|
m_runWithYul = false;
|
|
|
|
m_runWithoutYul = true;
|
2020-06-02 17:55:33 +00:00
|
|
|
// Do not try to run via yul if explicitly denied.
|
|
|
|
m_enforceViaYul = false;
|
2020-03-19 01:48:42 +00:00
|
|
|
}
|
2020-07-20 12:52:10 +00:00
|
|
|
else if (choice == "default")
|
|
|
|
{
|
|
|
|
m_runWithYul = false;
|
|
|
|
m_runWithoutYul = true;
|
|
|
|
}
|
2020-03-19 01:48:42 +00:00
|
|
|
else
|
|
|
|
BOOST_THROW_EXCEPTION(runtime_error("Invalid compileViaYul value: " + choice + "."));
|
2020-01-22 14:48:56 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
string compileToEwasm = m_reader.stringSetting("compileToEwasm", "false");
|
|
|
|
if (compileToEwasm == "also")
|
|
|
|
m_runWithEwasm = true;
|
|
|
|
else if (compileToEwasm == "false")
|
|
|
|
m_runWithEwasm = false;
|
|
|
|
else
|
|
|
|
BOOST_THROW_EXCEPTION(runtime_error("Invalid compileToEwasm value: " + compileToEwasm + "."));
|
|
|
|
|
|
|
|
if (m_runWithEwasm && !m_runWithYul)
|
|
|
|
BOOST_THROW_EXCEPTION(runtime_error("Invalid compileToEwasm value: " + compileToEwasm + ", compileViaYul need to be enabled."));
|
|
|
|
|
|
|
|
// run ewasm tests only, if an ewasm evmc vm was defined
|
|
|
|
if (m_runWithEwasm && !m_supportsEwasm)
|
|
|
|
m_runWithEwasm = false;
|
|
|
|
|
2020-03-06 00:22:51 +00:00
|
|
|
m_runWithABIEncoderV1Only = m_reader.boolSetting("ABIEncoderV1Only", false);
|
2020-02-18 16:13:13 +00:00
|
|
|
if (m_runWithABIEncoderV1Only && solidity::test::CommonOptions::get().useABIEncoderV2)
|
|
|
|
m_shouldRun = false;
|
|
|
|
|
2020-03-06 00:22:51 +00:00
|
|
|
auto revertStrings = revertStringsFromString(m_reader.stringSetting("revertStrings", "default"));
|
|
|
|
soltestAssert(revertStrings, "Invalid revertStrings setting.");
|
|
|
|
m_revertStrings = revertStrings.value();
|
2020-01-22 14:48:56 +00:00
|
|
|
|
2020-03-06 00:22:51 +00:00
|
|
|
m_allowNonExistingFunctions = m_reader.boolSetting("allowNonExistingFunctions", false);
|
2020-02-12 17:28:30 +00:00
|
|
|
|
2020-03-06 00:22:51 +00:00
|
|
|
parseExpectations(m_reader.stream());
|
2019-08-01 12:02:33 +00:00
|
|
|
soltestAssert(!m_tests.empty(), "No tests specified in " + _filename);
|
2019-02-06 11:10:05 +00:00
|
|
|
}
|
|
|
|
|
2019-05-07 13:33:22 +00:00
|
|
|
TestCase::TestResult SemanticTest::run(ostream& _stream, string const& _linePrefix, bool _formatted)
|
2019-02-06 11:10:05 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
TestResult result = TestResult::Success;
|
|
|
|
bool compileViaYul = m_runWithYul || m_enforceViaYul;
|
|
|
|
|
|
|
|
if (m_runWithoutYul)
|
|
|
|
result = runTest(_stream, _linePrefix, _formatted, false, false);
|
2019-05-15 10:01:14 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
if (compileViaYul && result == TestResult::Success)
|
|
|
|
result = runTest(_stream, _linePrefix, _formatted, true, false);
|
|
|
|
|
|
|
|
if (m_runWithEwasm && result == TestResult::Success)
|
|
|
|
result = runTest(_stream, _linePrefix, _formatted, true, true);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
TestCase::TestResult SemanticTest::runTest(ostream& _stream, string const& _linePrefix, bool _formatted, bool _compileViaYul, bool _compileToEwasm)
|
|
|
|
{
|
|
|
|
try
|
2020-04-17 20:24:33 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
if (_compileViaYul && _compileToEwasm)
|
|
|
|
selectVM(evmc_capabilities::EVMC_CAPABILITY_EWASM);
|
|
|
|
else
|
|
|
|
selectVM(evmc_capabilities::EVMC_CAPABILITY_EVM1);
|
|
|
|
|
|
|
|
reset();
|
|
|
|
|
|
|
|
m_compileViaYul = _compileViaYul;
|
|
|
|
if (_compileToEwasm)
|
2020-04-17 20:24:33 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
soltestAssert(m_compileViaYul, "");
|
|
|
|
m_compileToEwasm = _compileToEwasm;
|
|
|
|
}
|
2019-02-06 11:10:05 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
m_compileViaYulCanBeSet = false;
|
2019-02-06 11:10:05 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
if (_compileViaYul)
|
|
|
|
AnsiColorized(_stream, _formatted, {BOLD, CYAN}) << _linePrefix << "Running via Yul:" << endl;
|
2019-11-12 13:13:57 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
for (auto& test: m_tests)
|
|
|
|
test.reset();
|
2019-11-12 13:13:57 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
map<string, solidity::test::Address> libraries;
|
2019-05-15 10:01:14 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
bool constructed = false;
|
2019-05-15 10:24:23 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
for (auto& test: m_tests)
|
|
|
|
{
|
|
|
|
if (constructed)
|
|
|
|
{
|
2020-10-28 18:04:24 +00:00
|
|
|
soltestAssert(test.call().kind != FunctionCall::Kind::Library, "Libraries have to be deployed before any other call.");
|
2020-06-05 23:10:48 +00:00
|
|
|
soltestAssert(
|
2020-10-28 18:04:24 +00:00
|
|
|
test.call().kind != FunctionCall::Kind::Constructor,
|
2020-06-05 23:10:48 +00:00
|
|
|
"Constructor has to be the first function call expect for library deployments.");
|
|
|
|
}
|
2020-10-28 18:04:24 +00:00
|
|
|
else if (test.call().kind == FunctionCall::Kind::Library)
|
2020-06-05 23:10:48 +00:00
|
|
|
{
|
|
|
|
soltestAssert(
|
|
|
|
deploy(test.call().signature, 0, {}, libraries) && m_transactionSuccessful,
|
|
|
|
"Failed to deploy library " + test.call().signature);
|
|
|
|
libraries[test.call().signature] = m_contractAddress;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
else
|
2019-06-06 16:02:48 +00:00
|
|
|
{
|
2020-10-28 18:04:24 +00:00
|
|
|
if (test.call().kind == FunctionCall::Kind::Constructor)
|
2020-06-05 23:10:48 +00:00
|
|
|
deploy("", test.call().value.value, test.call().arguments.rawBytes(), libraries);
|
2020-04-17 20:24:33 +00:00
|
|
|
else
|
2020-06-05 23:10:48 +00:00
|
|
|
soltestAssert(deploy("", 0, bytes(), libraries), "Failed to deploy contract.");
|
|
|
|
constructed = true;
|
2019-06-06 16:02:48 +00:00
|
|
|
}
|
2020-04-17 20:24:33 +00:00
|
|
|
|
2020-10-28 18:48:16 +00:00
|
|
|
if (test.call().kind == FunctionCall::Kind::Storage)
|
|
|
|
{
|
|
|
|
test.setFailure(false);
|
|
|
|
bytes result(1, !storageEmpty(m_contractAddress));
|
|
|
|
test.setRawBytes(result);
|
|
|
|
soltestAssert(test.call().expectations.rawBytes().size() == 1, "");
|
|
|
|
if (test.call().expectations.rawBytes() != result)
|
|
|
|
success = false;
|
|
|
|
}
|
|
|
|
else if (test.call().kind == FunctionCall::Kind::Constructor)
|
2019-06-06 16:02:48 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
if (m_transactionSuccessful == test.call().expectations.failure)
|
|
|
|
success = false;
|
2020-04-17 20:24:33 +00:00
|
|
|
|
2020-06-05 23:10:48 +00:00
|
|
|
test.setFailure(!m_transactionSuccessful);
|
|
|
|
test.setRawBytes(bytes());
|
|
|
|
}
|
|
|
|
else
|
2019-06-06 16:02:48 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
bytes output;
|
2020-10-28 18:04:24 +00:00
|
|
|
if (test.call().kind == FunctionCall::Kind::LowLevel)
|
2020-06-05 23:10:48 +00:00
|
|
|
output = callLowLevel(test.call().arguments.rawBytes(), test.call().value.value);
|
|
|
|
else
|
2020-04-17 20:24:33 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
soltestAssert(
|
2020-10-28 18:04:24 +00:00
|
|
|
m_allowNonExistingFunctions ||
|
|
|
|
m_compiler.methodIdentifiers(m_compiler.lastContractName()).isMember(test.call().signature),
|
|
|
|
"The function " + test.call().signature + " is not known to the compiler"
|
|
|
|
);
|
2020-06-05 23:10:48 +00:00
|
|
|
|
|
|
|
output = callContractFunctionWithValueNoEncoding(
|
2020-10-28 18:04:24 +00:00
|
|
|
test.call().signature,
|
|
|
|
test.call().value.value,
|
|
|
|
test.call().arguments.rawBytes()
|
2020-06-05 23:10:48 +00:00
|
|
|
);
|
2020-04-17 20:24:33 +00:00
|
|
|
}
|
2020-06-05 23:10:48 +00:00
|
|
|
|
2020-10-14 18:05:57 +00:00
|
|
|
bool outputMismatch = (output != test.call().expectations.rawBytes());
|
|
|
|
// Pre byzantium, it was not possible to return failure data, so we disregard
|
|
|
|
// output mismatch for those EVM versions.
|
|
|
|
if (test.call().expectations.failure && !m_transactionSuccessful && !m_evmVersion.supportsReturndata())
|
|
|
|
outputMismatch = false;
|
|
|
|
if (m_transactionSuccessful != !test.call().expectations.failure || outputMismatch)
|
2020-06-05 23:10:48 +00:00
|
|
|
success = false;
|
|
|
|
|
|
|
|
test.setFailure(!m_transactionSuccessful);
|
|
|
|
test.setRawBytes(std::move(output));
|
|
|
|
test.setContractABI(m_compiler.contractABI(m_compiler.lastContractName()));
|
2019-06-06 16:02:48 +00:00
|
|
|
}
|
2020-04-17 20:24:33 +00:00
|
|
|
}
|
2020-06-05 23:10:48 +00:00
|
|
|
|
|
|
|
if (success && !m_runWithYul && _compileViaYul)
|
2020-05-11 07:26:27 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
m_compileViaYulCanBeSet = true;
|
|
|
|
AnsiColorized(_stream, _formatted, {BOLD, YELLOW}) <<
|
|
|
|
_linePrefix << endl <<
|
|
|
|
_linePrefix << "Test can pass via Yul and marked with compileViaYul: false." << endl;
|
|
|
|
return TestResult::Failure;
|
2020-05-11 07:26:27 +00:00
|
|
|
}
|
2020-06-05 23:10:48 +00:00
|
|
|
|
|
|
|
if (!success && (m_runWithYul || !_compileViaYul))
|
2020-05-11 07:26:27 +00:00
|
|
|
{
|
2020-06-05 23:10:48 +00:00
|
|
|
AnsiColorized(_stream, _formatted, {BOLD, CYAN}) << _linePrefix << "Expected result:" << endl;
|
|
|
|
for (auto const& test: m_tests)
|
|
|
|
{
|
|
|
|
ErrorReporter errorReporter;
|
|
|
|
_stream << test.format(errorReporter, _linePrefix, false, _formatted) << endl;
|
|
|
|
_stream << errorReporter.format(_linePrefix, _formatted);
|
|
|
|
}
|
|
|
|
_stream << endl;
|
|
|
|
AnsiColorized(_stream, _formatted, {BOLD, CYAN}) << _linePrefix << "Obtained result:" << endl;
|
|
|
|
for (auto const& test: m_tests)
|
|
|
|
{
|
|
|
|
ErrorReporter errorReporter;
|
|
|
|
_stream << test.format(errorReporter, _linePrefix, true, _formatted) << endl;
|
|
|
|
_stream << errorReporter.format(_linePrefix, _formatted);
|
|
|
|
}
|
|
|
|
AnsiColorized(_stream, _formatted, {BOLD, RED})
|
|
|
|
<< _linePrefix << endl
|
|
|
|
<< _linePrefix << "Attention: Updates on the test will apply the detected format displayed." << endl;
|
|
|
|
if (_compileViaYul && m_runWithoutYul)
|
|
|
|
{
|
|
|
|
_stream << _linePrefix << endl << _linePrefix;
|
|
|
|
AnsiColorized(_stream, _formatted, {RED_BACKGROUND}) << "Note that the test passed without Yul.";
|
|
|
|
_stream << endl;
|
|
|
|
}
|
|
|
|
else if (!_compileViaYul && m_runWithYul)
|
|
|
|
AnsiColorized(_stream, _formatted, {BOLD, YELLOW})
|
|
|
|
<< _linePrefix << endl
|
|
|
|
<< _linePrefix << "Note that the test also has to pass via Yul." << endl;
|
|
|
|
return TestResult::Failure;
|
2020-05-11 07:26:27 +00:00
|
|
|
}
|
2020-06-05 23:10:48 +00:00
|
|
|
}
|
|
|
|
catch (WhiskersError const&)
|
|
|
|
{
|
|
|
|
// this is an error in Whiskers template, so should be thrown anyway
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
catch (YulException const&)
|
|
|
|
{
|
|
|
|
// this should be an error in yul compilation or translation
|
|
|
|
throw;
|
|
|
|
}
|
|
|
|
catch (boost::exception const&)
|
|
|
|
{
|
|
|
|
if (!_compileViaYul || m_runWithYul)
|
2020-04-17 20:24:33 +00:00
|
|
|
throw;
|
2020-06-05 23:10:48 +00:00
|
|
|
}
|
|
|
|
catch (std::exception const&)
|
|
|
|
{
|
|
|
|
if (!_compileViaYul || m_runWithYul)
|
2020-04-17 20:24:33 +00:00
|
|
|
throw;
|
2020-06-05 23:10:48 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
if (!_compileViaYul || m_runWithYul)
|
2020-04-17 20:24:33 +00:00
|
|
|
throw;
|
2019-02-06 11:10:05 +00:00
|
|
|
}
|
2019-06-06 16:02:48 +00:00
|
|
|
|
2019-05-07 13:33:22 +00:00
|
|
|
return TestResult::Success;
|
2019-02-06 11:10:05 +00:00
|
|
|
}
|
|
|
|
|
2020-06-18 10:31:55 +00:00
|
|
|
void SemanticTest::printSource(ostream& _stream, string const& _linePrefix, bool _formatted) const
|
2019-02-06 11:10:05 +00:00
|
|
|
{
|
2020-06-18 10:31:55 +00:00
|
|
|
if (m_sources.sources.empty())
|
|
|
|
return;
|
|
|
|
|
|
|
|
bool outputNames = (m_sources.sources.size() != 1 || !m_sources.sources.begin()->first.empty());
|
|
|
|
|
|
|
|
for (auto const& [name, source]: m_sources.sources)
|
|
|
|
if (_formatted)
|
|
|
|
{
|
|
|
|
if (source.empty())
|
|
|
|
continue;
|
|
|
|
|
|
|
|
if (outputNames)
|
|
|
|
_stream << _linePrefix << formatting::CYAN << "==== Source: " << name << " ====" << formatting::RESET << endl;
|
|
|
|
vector<char const*> sourceFormatting(source.length(), formatting::RESET);
|
|
|
|
|
|
|
|
_stream << _linePrefix << sourceFormatting.front() << source.front();
|
|
|
|
for (size_t i = 1; i < source.length(); i++)
|
|
|
|
{
|
|
|
|
if (sourceFormatting[i] != sourceFormatting[i - 1])
|
|
|
|
_stream << sourceFormatting[i];
|
|
|
|
if (source[i] != '\n')
|
|
|
|
_stream << source[i];
|
|
|
|
else
|
|
|
|
{
|
|
|
|
_stream << formatting::RESET << endl;
|
|
|
|
if (i + 1 < source.length())
|
|
|
|
_stream << _linePrefix << sourceFormatting[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_stream << formatting::RESET;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (outputNames)
|
|
|
|
_stream << _linePrefix << "==== Source: " + name << " ====" << endl;
|
|
|
|
stringstream stream(source);
|
|
|
|
string line;
|
|
|
|
while (getline(stream, line))
|
|
|
|
_stream << _linePrefix << line << endl;
|
|
|
|
}
|
2019-02-06 11:10:05 +00:00
|
|
|
}
|
|
|
|
|
2019-02-06 11:10:48 +00:00
|
|
|
void SemanticTest::printUpdatedExpectations(ostream& _stream, string const&) const
|
2019-02-06 11:10:05 +00:00
|
|
|
{
|
|
|
|
for (auto const& test: m_tests)
|
2019-02-21 00:50:41 +00:00
|
|
|
_stream << test.format("", true, false) << endl;
|
2019-02-06 11:10:05 +00:00
|
|
|
}
|
|
|
|
|
2020-04-17 20:24:33 +00:00
|
|
|
void SemanticTest::printUpdatedSettings(ostream& _stream, string const& _linePrefix)
|
|
|
|
{
|
|
|
|
auto& settings = m_reader.settings();
|
|
|
|
if (settings.empty() && !m_compileViaYulCanBeSet)
|
|
|
|
return;
|
|
|
|
|
|
|
|
_stream << _linePrefix << "// ====" << endl;
|
|
|
|
if (m_compileViaYulCanBeSet)
|
|
|
|
_stream << _linePrefix << "// compileViaYul: also\n";
|
|
|
|
for (auto const& setting: settings)
|
|
|
|
if (!m_compileViaYulCanBeSet || setting.first != "compileViaYul")
|
|
|
|
_stream << _linePrefix << "// " << setting.first << ": " << setting.second << endl;
|
|
|
|
}
|
|
|
|
|
2019-02-06 11:10:05 +00:00
|
|
|
void SemanticTest::parseExpectations(istream& _stream)
|
|
|
|
{
|
|
|
|
TestFileParser parser{_stream};
|
2019-07-13 10:04:22 +00:00
|
|
|
auto functionCalls = parser.parseFunctionCalls(m_lineOffset);
|
2019-03-27 18:45:53 +00:00
|
|
|
std::move(functionCalls.begin(), functionCalls.end(), back_inserter(m_tests));
|
2019-02-06 11:10:05 +00:00
|
|
|
}
|
|
|
|
|
2019-12-23 15:50:30 +00:00
|
|
|
bool SemanticTest::deploy(string const& _contractName, u256 const& _value, bytes const& _arguments, map<string, solidity::test::Address> const& _libraries)
|
2019-02-06 11:10:05 +00:00
|
|
|
{
|
2020-06-18 10:31:55 +00:00
|
|
|
auto output = compileAndRunWithoutCheck(m_sources.sources, _value, _contractName, _arguments, _libraries);
|
2019-02-06 11:10:05 +00:00
|
|
|
return !output.empty() && m_transactionSuccessful;
|
|
|
|
}
|