2019-05-15 19:09:44 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <libsolidity/interface/CompilerStack.h>
|
2019-07-16 09:11:20 +00:00
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
#include <libyul/AssemblyStack.h>
|
2019-07-16 09:11:20 +00:00
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
#include <liblangutil/Exceptions.h>
|
|
|
|
#include <liblangutil/SourceReferenceFormatter.h>
|
2019-07-16 09:11:20 +00:00
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
#include <libdevcore/Keccak256.h>
|
|
|
|
|
|
|
|
namespace dev
|
|
|
|
{
|
|
|
|
namespace test
|
|
|
|
{
|
|
|
|
namespace abiv2fuzzer
|
|
|
|
{
|
|
|
|
class SolidityCompilationFramework
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit SolidityCompilationFramework(langutil::EVMVersion _evmVersion = {});
|
|
|
|
|
|
|
|
Json::Value getMethodIdentifiers()
|
|
|
|
{
|
|
|
|
return m_compiler.methodIdentifiers(m_compiler.lastContractName());
|
|
|
|
}
|
|
|
|
dev::bytes compileContract(
|
|
|
|
std::string const& _sourceCode,
|
|
|
|
std::string const& _contractName = {}
|
|
|
|
);
|
|
|
|
protected:
|
|
|
|
dev::solidity::CompilerStack m_compiler;
|
|
|
|
langutil::EVMVersion m_evmVersion;
|
2019-07-08 14:04:52 +00:00
|
|
|
dev::solidity::OptimiserSettings m_optimiserSettings = dev::solidity::OptimiserSettings::none();
|
2019-05-15 19:09:44 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|