NEWTON
Asked
9 months ago
19
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
9 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 am I having trouble deploying my Cairo contract?
Cairo Passing Functions
What is the expected blocktime for starknet mainnet?
What libraries are secure to use in Cairo?
How to use multicall with protostar 0.9.0?
How to install Nethermind's Solidity to Cairo transpiler without an error "command not found: warp"?
Cairo: Cannot unpack multiplication error