Fix use of const ref in Abiv2 and other proto fuzzers.

This commit is contained in:
Bhargava Shastry 2021-04-07 12:22:21 +02:00
parent f188f3d9ed
commit b1392ac988
4 changed files with 10 additions and 7 deletions

View File

@ -58,8 +58,9 @@ DEFINE_PROTO_FUZZER(Contract const& _contract)
// We target the default EVM which is the latest
langutil::EVMVersion version;
EVMHost hostContext(version, evmone);
string contractName = ":C";
CompilerInput cInput(version, {{"test.sol", contractSource}}, contractName, OptimiserSettings::minimal(), {});
string contractName = "C";
StringMap source({{"test.sol", contractSource}});
CompilerInput cInput(version, source, contractName, OptimiserSettings::minimal(), {});
EvmoneUtility evmoneUtil(
hostContext,
cInput,

View File

@ -61,7 +61,7 @@ struct CompilerInput
langutil::EVMVersion evmVersion;
/// Source code to be compiled
StringMap const& sourceCode;
/// Contract name
/// Contract name without a colon prefix
std::string contractName;
/// Optimiser setting to be used during compilation
frontend::OptimiserSettings optimiserSettings;

View File

@ -48,9 +48,10 @@ DEFINE_PROTO_FUZZER(Contract const& _input)
// We target the default EVM which is the latest
langutil::EVMVersion version;
EVMHost hostContext(version, evmone);
string contractName = ":C";
string contractName = "C";
string methodName = "test()";
CompilerInput cInput(version, {{"test.sol", contract_source}}, contractName, OptimiserSettings::minimal(), {});
StringMap source({{"test.sol", contract_source}});
CompilerInput cInput(version, source, contractName, OptimiserSettings::minimal(), {});
EvmoneUtility evmoneUtil(
hostContext,
cInput,

View File

@ -66,10 +66,11 @@ DEFINE_PROTO_FUZZER(Program const& _input)
// We target the default EVM which is the latest
langutil::EVMVersion version;
EVMHost hostContext(version, evmone);
string contractName = ":C";
string contractName = "C";
string libraryName = converter.libraryTest() ? converter.libraryName() : "";
string methodName = "test()";
CompilerInput cInput(version, {{"test.sol", sol_source}}, contractName, OptimiserSettings::minimal(), {});
StringMap source({{"test.sol", sol_source}});
CompilerInput cInput(version, source, contractName, OptimiserSettings::minimal(), {});
EvmoneUtility evmoneUtil(
hostContext,
cInput,