NEWTON
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?
Newton
asked
1 month ago
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
Cairo: How do I initialize an array in cairo
ApeWorX: How do I call an account while trying to test a function?
when to use tail call optimization in a cairo smartcontract
How can I use dynamic allocation in Cairo?
storage for array
Cairo: are builtins always needed to be expressed in function signature?
how I could read a felt* from ap in Cairo lang?
Is Kakarot zkEVM a blockchain?
Cairo OR operator
How to transpile multiple contracts at once using warp?
How to create Structs in Cairo Lang for StarkNet?
How to write "and" conditional logic in Cairo?
An error “AssertionError: Sender must be passed explicitly when making a direct declaration using —no_wallet.” using the new nile?
How to generate a proof for a Cairo program and verify it?[StackOverflow]