NEWTON
Asked
6 months ago
24
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
6 months 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
6 months 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
how I could read a felt* from ap in Cairo lang?
Cairo: are builtins always needed to be expressed in function signature?
Did you change the factory/create2 part (to compute pool addresses)?
Does cross-chain bridge produce its own block? Or it only verify the blocks from A/B chain?
ApeWorX: Why do I need to fund a Starknet account before deploying it?
How to protect my contract from reentrancy in Cairo Language / StarkNet?
Questions about useStarknetExecute. Do we update the transaction manager on our end? [StarkNet/Cairo]
I'm currently trying to transpile an ERC 721 contract I have that uses openzeppelin libraries, is that possible?
What are the efficiency gains of direct Cairo vs. transpiling with warp?