@@ -168,7 +168,7 @@ ostream& operator<<(ostream& _out, CompilerOutputs const& _selection)
168
168
if (_selection.*component)
169
169
serializedSelection.push_back (CompilerOutputs::componentName (component));
170
170
171
- return _out << joinHumanReadable (serializedSelection, " ," );
171
+ return _out << util:: joinHumanReadable (serializedSelection, " ," );
172
172
}
173
173
174
174
string const & CompilerOutputs::componentName (bool CompilerOutputs::* _component)
@@ -199,7 +199,7 @@ ostream& operator<<(ostream& _out, CombinedJsonRequests const& _requests)
199
199
if (_requests.*component)
200
200
serializedRequests.push_back (CombinedJsonRequests::componentName (component));
201
201
202
- return _out << joinHumanReadable (serializedRequests, " ," );
202
+ return _out << util:: joinHumanReadable (serializedRequests, " ," );
203
203
}
204
204
205
205
string const & CombinedJsonRequests::componentName (bool CombinedJsonRequests::* _component)
@@ -347,17 +347,17 @@ void CommandLineParser::parseLibraryOption(string const& _input)
347
347
try
348
348
{
349
349
if (fs::is_regular_file (_input))
350
- data = readFileAsString (_input);
350
+ data = util:: readFileAsString (_input);
351
351
}
352
352
catch (fs::filesystem_error const &)
353
353
{
354
354
// Thrown e.g. if path is too long.
355
355
}
356
- catch (FileNotFound const &)
356
+ catch (util:: FileNotFound const &)
357
357
{
358
358
// Should not happen if `fs::is_regular_file` is correct.
359
359
}
360
- catch (NotAFile const &)
360
+ catch (util:: NotAFile const &)
361
361
{
362
362
// Should not happen if `fs::is_regular_file` is correct.
363
363
}
@@ -422,15 +422,15 @@ void CommandLineParser::parseLibraryOption(string const& _input)
422
422
" Invalid length for address for library \" " + libName + " \" : " +
423
423
to_string (addrString.length ()) + " instead of 40 characters."
424
424
);
425
- if (!passesAddressChecksum (addrString, false ))
425
+ if (!util:: passesAddressChecksum (addrString, false ))
426
426
solThrow (
427
427
CommandLineValidationError,
428
428
" Invalid checksum on address for library \" " + libName + " \" : " + addrString + " \n "
429
- " The correct checksum is " + getChecksummedAddress (addrString)
429
+ " The correct checksum is " + util:: getChecksummedAddress (addrString)
430
430
);
431
- bytes binAddr = fromHex (addrString);
432
- h160 address (binAddr, h160::AlignRight);
433
- if (binAddr.size () > 20 || address == h160 ())
431
+ bytes binAddr = util:: fromHex (addrString);
432
+ util:: h160 address (binAddr, util:: h160::AlignRight);
433
+ if (binAddr.size () > 20 || address == util:: h160 ())
434
434
solThrow (
435
435
CommandLineValidationError,
436
436
" Invalid address for library \" " + libName + " \" : " + addrString
@@ -595,15 +595,15 @@ General Information)").c_str(),
595
595
)
596
596
(
597
597
g_strRevertStrings.c_str (),
598
- po::value<string>()->value_name (joinHumanReadable (g_revertStringsArgs, " ," )),
598
+ po::value<string>()->value_name (util:: joinHumanReadable (g_revertStringsArgs, " ," )),
599
599
" Strip revert (and require) reason strings or add additional debugging information."
600
600
)
601
601
(
602
602
g_strDebugInfo.c_str (),
603
- po::value<string>()->default_value (toString (DebugInfoSelection::Default ())),
603
+ po::value<string>()->default_value (util:: toString (DebugInfoSelection::Default ())),
604
604
(" Debug info components to be included in the produced EVM assembly and Yul code. "
605
605
" Value can be all, none or a comma-separated list containing one or more of the "
606
- " following components: " + joinHumanReadable (DebugInfoSelection::componentMap () | ranges::views::keys) + " ." ).c_str ()
606
+ " following components: " + util:: joinHumanReadable (DebugInfoSelection::componentMap () | ranges::views::keys) + " ." ).c_str ()
607
607
)
608
608
(
609
609
g_strStopAfter.c_str (),
@@ -665,12 +665,12 @@ General Information)").c_str(),
665
665
assemblyModeOptions.add_options ()
666
666
(
667
667
g_strMachine.c_str (),
668
- po::value<string>()->value_name (joinHumanReadable (g_machineArgs, " ," )),
668
+ po::value<string>()->value_name (util:: joinHumanReadable (g_machineArgs, " ," )),
669
669
" Target machine in assembly or Yul mode."
670
670
)
671
671
(
672
672
g_strYulDialect.c_str (),
673
- po::value<string>()->value_name (joinHumanReadable (g_yulDialectArgs, " ," )),
673
+ po::value<string>()->value_name (util:: joinHumanReadable (g_yulDialectArgs, " ," )),
674
674
" Input dialect to use in assembly or yul mode."
675
675
)
676
676
;
@@ -743,7 +743,7 @@ General Information)").c_str(),
743
743
)
744
744
(
745
745
g_strCombinedJson.c_str (),
746
- po::value<string>()->value_name (joinHumanReadable (CombinedJsonRequests::componentMap () | ranges::views::keys, " ," )),
746
+ po::value<string>()->value_name (util:: joinHumanReadable (CombinedJsonRequests::componentMap () | ranges::views::keys, " ," )),
747
747
" Output a single json document containing the specified information."
748
748
)
749
749
;
@@ -753,7 +753,7 @@ General Information)").c_str(),
753
753
metadataOptions.add_options ()
754
754
(
755
755
g_strMetadataHash.c_str (),
756
- po::value<string>()->value_name (joinHumanReadable (g_metadataHashArgs, " ," )),
756
+ po::value<string>()->value_name (util:: joinHumanReadable (g_metadataHashArgs, " ," )),
757
757
" Choose hash method for the bytecode metadata or disable it."
758
758
)
759
759
(
@@ -1047,11 +1047,11 @@ void CommandLineParser::processArgs()
1047
1047
1048
1048
if (m_args.count (g_strPrettyJson) > 0 )
1049
1049
{
1050
- m_options.formatting .json .format = JsonFormat::Pretty;
1050
+ m_options.formatting .json .format = util:: JsonFormat::Pretty;
1051
1051
}
1052
1052
if (!m_args[g_strJsonIndent].defaulted ())
1053
1053
{
1054
- m_options.formatting .json .format = JsonFormat::Pretty;
1054
+ m_options.formatting .json .format = util:: JsonFormat::Pretty;
1055
1055
m_options.formatting .json .indent = m_args[g_strJsonIndent].as <uint32_t >();
1056
1056
}
1057
1057
@@ -1329,7 +1329,7 @@ size_t CommandLineParser::countEnabledOptions(vector<string> const& _optionNames
1329
1329
1330
1330
string CommandLineParser::joinOptionNames (vector<string> const & _optionNames, string _separator)
1331
1331
{
1332
- return joinHumanReadable (
1332
+ return util:: joinHumanReadable (
1333
1333
_optionNames | ranges::views::transform ([](string const & _option){ return " --" + _option; }),
1334
1334
_separator
1335
1335
);
0 commit comments