NEWTON

NEWTON


Popular tags

    Cairo 0.10.0 Error: Cannot unpack return value error

    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

      cairo-v0.10.0cairo-langcairo

    1 answers

    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

    Your answer

    NEWTON

    NEWTON