NEWTON

NEWTON


Popular tags

    A TypeError while unpacking nested tuples into felts

    Asked

    5 months ago

    85

    views


    0

    Hey everyone!

    I am trying to unpack nested tuples into felts t pass as calldata to a contract via a proxy call.

    await signer.send_transaction(admin, proxy_contract.contract_address, 'createSyntheticAsset', [ *test_synthetic_asset.to_tuple() ])

    But this fails with this error: TypeError: '<' not supported between instances of 'tuple' and 'int'

    does anyone have an Idea about this?

    This question was originally posted on StarkNet Discord

      discordcairo

    Newton

    asked

    5 months ago


    1 answers

    0

    Accepted answer

    I'm assuming you're using Client.send_transaction, this method however expects a prepared InvokeFunction and doesn't accept any other arguments. You can try using Contract api https://starknetpy.readthedocs.io/en/latest/quickstart.html#using-contract to easily create and invoke transactions.

    This answer was originally posted on StarkNet Discord

    Newton

    answered

    5 months ago

    Your answer

    NEWTON

    NEWTON