File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -461,15 +461,22 @@ void ConstantEvaluator::endVisit(FunctionCall const& _functionCall)
461461 8248_error,
462462 _functionCall.location (),
463463 fmt::format (
464- " erc7201 builtin function expects 1 parameter, but {} were given." ,
464+ " erc7201 function expects 1 parameter, but {} were given." ,
465465 _functionCall.arguments ().size ()
466466 )
467467 );
468468 return ;
469469 }
470470 auto stringArg = evaluate (*(_functionCall.arguments ()[0 ].get ()));
471471 if (!std::holds_alternative<std::string>(stringArg.value ))
472+ {
473+ m_errorReporter.typeError (
474+ 9796_error,
475+ _functionCall.arguments ()[0 ]->location (),
476+ " Invalid argument type for erc7201 function. Expected literal or constant string."
477+ );
472478 return ;
479+ }
473480
474481 h256 innerKeccak = keccak256 (std::get<std::string>(stringArg.value ));
475482 h256 outerKeccak = keccak256 (h256 (u256 (innerKeccak) - 1 ));
You can’t perform that action at this time.
0 commit comments