NEWTON
Asked
6 months ago
18
views
0
What is the proper way to declare a string in Cairo?
ㅤ This question was originally posted on Triality
0
Cairo supports short strings up to 31 characters https://www.cairo-lang.org/docs/how_cairo_works/consts.html#short-string-literals. If you want to work with more than that, there's a library you can use https://github.com/topology-gg/caistring. Essentialy, it creates a Str
type as a struct that has a length and a pointer to an array of short strings.
struct Str:
member arr_len : felt
member arr : felt*
end
ㅤ This answer was originally posted on Triality
answered
6 months ago
caigo error: undefined: contracts.CounterCompiled
Cairo Error calling function: Expected 'function_name' to be a struct. Found: 'function'.
What are multi-calls in Account Abstraction? What will it bring to the UX?
How large can addresses be in Cairo?
A plan to get better visibility when a transaction got received but not placed into a block?
Is there something going on the testnet StarkNet?
StarkNet Faucet: How can I get a Goerli-2 eth faucet tokens (StarkNet)?