Some internals of Starknet expect some string
as the parameter.
error: Plugin diagnostic:
selector
macro argument must be a string
When heaving inputs serialized into type, which has property of felt252
for shortString (which should be enough) I'm struggling to find way of converting shortString into expected string
here.
Q1: What type of the property for selector!()
can I specify to make it properly work?
Q2: If above is not possible - is there a way of selecting contract ABI for call_contract_syscall()
's parameter from felt252
string?
As it turned out
starknet::call_contract_syscall()
's second parameter IS indeedfelt252
and the macroselector!()
transforms "string" into felt252 shortString. So the answer to my Q2 is to use shortString directly. Q1 is still remain if anyone's looking for that...