NEWTON
Asked
4 months ago
12
views
0
I am getting the following error: Cannot unpack the return value of 'is_le'. The return type is not a tuple.
This code was working for Cairo 0.9.1 but is not working any more:
let (is_negative : felt) = is_le(x, -1)
Does anyone know what this issue is about?
ㅤ This question was originally posted on Triality
1
With the update to Cairo 0.10.0, is_le
now returns a felt not a tuple as it did before.
Previously the signature looked like:
func is_le{range_check_ptr}(a, b) -> (res: felt):
Now it looks like:
func is_le{range_check_ptr}(a, b) -> felt {
with this in mind make sure you do not unpack the result of function that return a felt. You should have your code like:
let is_negative : felt = is_le(x, -1);
ㅤ This answer was originally posted on Triality
answered
4 months ago
Cairo: Cannot unpack error
Cairo: Cannot unpack multiplication error
Writing a "not" operation in Cairo
How to write "and" conditional logic in Cairo?
Cairo error: Accessing struct/tuple members for r-value structs is not supported yet
Cairo: Getting the zero address
Cairo Error: 'range_check_ptr' cannot be used as an implicit return value. Consider using a 'with' statement.
Why there is no fee for deploying an account contract (creating account)?
What are Event Indexers in Cairo lang? What is a StarkNet indexer?
How to protect my contract from reentrancy in Cairo Language / StarkNet?
Is there a cheatsheet somewhere will all the most usefull commands
Can I transpile any solidity version?
Cairo: let vs tempvar what is the difference?
Is there a threshold of optimum transaction speed/cost in L2s?