NEWTON

NEWTON


Popular tags

    How can I pass an array of felt to call with Nile in StarkNet?

    Asked

    1 month ago

    15

    views


    0

    I'm trying to use Nile (StarkNet). I send this function call :

    func setBaseURI{pedersen_ptr: HashBuiltin*, syscall_ptr: felt*, range_check_ptr}( baseUri_len: felt, baseUri: felt* )

    The only thing that would get processed is

    nile send account mycontract setBaseURI 3 1 1 1
    

    but I don't think that's the right way. How do you pass an array of felt to call with Nile?

      starknetnilediscord

    Newton

    asked

    1 month ago


    1 answers

    1

    Accepted answer

    I suspect it will be similar to cairo-lang's CLI where you provide first the length of the array (baseUri_len) and then all the felts that represent 31 characters chunks of the baseUri. Those felts have to be passed in order,does it make sense?


    this article might help you understand how would you do that with cairo-lang, nile is a wrapper for cairo-lang so it should work the same way: https://david-barreto.com/starknet-erc721-workshop-exercise-7/

    Newton

    answered

    1 month ago

    Your answer

    NEWTON

    NEWTON