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
|
|
|
|
2020-01-06 10:52:23 +00:00
|
|
|
#include <libsolutil/Keccak256.h>
|
2019-05-15 19:09:44 +00:00
|
|
|
|
2019-12-23 15:50:30 +00:00
|
|
|
namespace solidity::test::abiv2fuzzer
|
2019-05-15 19:09:44 +00:00
|
|
|
{
|
2019-12-23 15:50:30 +00:00
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
class SolidityCompilationFramework
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit SolidityCompilationFramework(langutil::EVMVersion _evmVersion = {});
|
|
|
|
|
|
|
|
Json::Value getMethodIdentifiers()
|
|
|
|
{
|
|
|
|
return m_compiler.methodIdentifiers(m_compiler.lastContractName());
|
|
|
|
}
|
2019-12-23 15:50:30 +00:00
|
|
|
bytes compileContract(
|
2019-05-15 19:09:44 +00:00
|
|
|
std::string const& _sourceCode,
|
|
|
|
std::string const& _contractName = {}
|
|
|
|
);
|
|
|
|
protected:
|
2019-12-23 15:50:30 +00:00
|
|
|
frontend::CompilerStack m_compiler;
|
2019-05-15 19:09:44 +00:00
|
|
|
langutil::EVMVersion m_evmVersion;
|
2019-12-23 15:50:30 +00:00
|
|
|
frontend::OptimiserSettings m_optimiserSettings = frontend::OptimiserSettings::none();
|
2019-05-15 19:09:44 +00:00
|
|
|
};
|
2019-12-23 15:50:30 +00:00
|
|
|
|
2019-05-15 19:09:44 +00:00
|
|
|
}
|