NEWTON

NEWTON


Popular tags

    Cairo/Nile: Testing the proxy upgrade feature, but my tests fail with the error message TypeError: int() can't convert non-string with explicit base.

    Asked

    4 months ago

    111

    views


    0

    Hey there!

    I am using the Oz Nile framework for smart contract development on Starknet. More specifically, I am testing the proxy upgrade feature, but my tests fail with the error message TypeError: int() can't convert non-string with explicit base. This happens when nile.signer tries to sign a transaction. Here's the snippet in the stack trace below.

    def sign_transaction(self, sender, calls, nonce, max_fee):
            """Sign a transaction for an Account."""
            (call_array, calldata) = from_call_to_call_array(calls)
            message_hash = get_transaction_hash(
    >           int(sender, 16), call_array, calldata, nonce, int(max_fee)
            )
    

    Some relevant info: cairo-lang==0.10.0 cairo-nile==0.8.2 openzeppelin-cairo-contracts==0.4.0b pytest==7.1.2 python=3.9

    This question was originally posted on StarkNet Discord

      nile openzeppelindiscordcairo

    Newton

    asked

    4 months ago


    1 answers

    0

    Accepted answer

    It seems that one of two options may help you:

    1. sender is not a string and that's why int() can't convert it

    2. try to resolve this by switching cairo-nile to v0.9.0

    This answer was originally posted on StarkNet Discord

    Newton

    answered

    4 months ago

    Your answer

    NEWTON

    NEWTON