Closed tabaktoni closed 10 months ago
address_len is considered as part of an array. Valid for Cairo 0 contract, but not for Cairo 1. I will see how to discriminate both cases.
I would like to use cairo.isCairo1type()
to identify a Cairo 1 contract,
but I am not sure that type.includes('core::')
is covering 100% of cases.
In the new ArgentX account contract, I have found :
{
"type": "function",
"name": "execute_from_outside",
"inputs": [
{
"name": "outside_execution",
"type": "lib::outside_execution::OutsideExecution"
},
{
"name": "signature",
"type": "core::array::Array::<core::felt252>"
}
],
"outputs": [
{
"type": "core::array::Array::<core::array::Span::<core::felt252>>"
}
],
"state_mutability": "external"
}
outside_execution
hasn't a type including core::
Should we change to include only ::
?
Yea it is edge case with _len reserved namind for cairo0 but should be used in Cairo1 Yes i think matcher for ``::*`` will be good
We can close this one as it should be resolved
Describe the bug Populate lose one parameter, also check codebase for other potential issues.
This result in calldata
[ '1' ]
instead of['1', '20']
To Reproduce Minimal test ABI
Additional context last version of StarknetJS