🐺 Cairo wishlist 🦀 #1714
Replies: 57 comments 66 replies
-
Add DescriptionThe is_some and is_none methods return true if the Option is Some or None, respectively. PropositionProposed signature for fn is_some() -> bool Proposed signature for fn is_none() -> bool |
Beta Was this translation helpful? Give feedback.
-
Less verbose/cheaper struct storage updates DescriptionTo read single attribute full struct needs to be read into memory, to update single struct attribute full struct needs to be rewritten. It is both more verbose than necessary and probably (depending on implementation) inefficient. More in depth problem description is here: https://hackmd.io/@RoboTeddy/BJZFu56wF#Concisely-update-large-structs. |
Beta Was this translation helpful? Give feedback.
-
Automaticaly generate trivial view functions for storage variables DescriptionTrivial storage related view functions take a lot of space and make contracts diffucult to read and understand. It should be possible to mark storage variables as public (similar to Solidity PropositionInstead of:
use
|
Beta Was this translation helpful? Give feedback.
-
DescriptionWhen working on cross chain apps, Cairo short strings are very inconvenient. Felt based short strings and their solidity counterpart PropositionThere should be a See: https://docs.soliditylang.org/en/v0.8.17/types.html#fixed-size-byte-arrays |
Beta Was this translation helpful? Give feedback.
-
I would love to have /* */ multi-line commenting as I often need to add large blocks of text to contextualize the code I write. |
Beta Was this translation helpful? Give feedback.
-
Support structs as DescriptionCurrently when, for example Uint256 is send from l1 to l2 it needs to be manually converted to the desired type:
When there are more than one struct the code gets noisy. PropositionWhen structs are supported as
|
Beta Was this translation helpful? Give feedback.
-
It would be nice if we can have a float type. I know it's not as easy as people think to create but it would help a lot programmers 🚀 |
Beta Was this translation helpful? Give feedback.
-
It's functionality can be improve |
Beta Was this translation helpful? Give feedback.
-
It would be awesome to have a cairo plugin for Intellij. |
Beta Was this translation helpful? Give feedback.
-
StarkNet Cairo should allow function overloading. To make this possible, we will need to modify the function selector calculation to include the input types and the function name. |
Beta Was this translation helpful? Give feedback.
-
Adding an is_empty() fn on Array Trait could be very handy |
Beta Was this translation helpful? Give feedback.
-
add DescriptionCurrently
PropositionThere should be an
|
Beta Was this translation helpful? Give feedback.
-
Optimize usage of storageLet's assume I have a struct: It should underneath be all contained in one felt rather than 3 separate felts to use the less possible storage on L1. |
Beta Was this translation helpful? Give feedback.
-
What do you think about providing access the contract context inside of starknets It would allow us to add access control directly at the storage level, which seems much more robust and less error prone. One approach could be a |
Beta Was this translation helpful? Give feedback.
-
Support for |
Beta Was this translation helpful? Give feedback.
-
Arrays can be defined in the constant pool and support initialization data. DescriptionWe are using Cairo to rewrite a Solidity ERC721 contract. This contract defines five arrays, each containing 30 to 60 different short strings. In the contract functions, a random string from each array is selected and concatenated to form a complete name. In Cairo, we cannot define and initialize arrays directly in the contract. Currently, we are manually writing indexes using LegacyMap to achieve this. PropositionWe want to directly define string array data in the contract. |
Beta Was this translation helpful? Give feedback.
-
I want a map-like data structure (Array or Dict) that supports multiple levels of nesting, random write and can be used in memory, without relying on |
Beta Was this translation helpful? Give feedback.
-
Sorry I left some confusing things there. Actually I want a structure like 'Array<Array<T>>' that I can directly change the elements of whichever index I choose.
Cause Array just supports append() and pop() now due to the unchanged memory, so I mention the dict implements the mutable feature there.
And it is good enough that it can support the memory I think.
So kind of you, have a good day!
Get Outlook for iOS<https://aka.ms/o0ukef>
…________________________________
From: Milan Cermak ***@***.***>
Sent: Monday, September 11, 2023 10:01:46 PM
To: starkware-libs/cairo ***@***.***>
Cc: Ryan ***@***.***>; Comment ***@***.***>
Subject: Re: [starkware-libs/cairo] 🐺 Cairo wishlist 🦀 (Discussion #1714)
map-like data structure (Array or Dict)
So an array or a dict?
Do you want to manipulate data only in memory or should it support contract storage?
—
Reply to this email directly, view it on GitHub<#1714 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AJX3WXT6MDVD5J4XMJPGBGLXZ4KUVANCNFSM6AAAAAATVSDLAA>.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I want '<<' and '>>' Operators. They provide left shift and right shift features with less gas cost. |
Beta Was this translation helpful? Give feedback.
-
In solidity contract, we can user block.number to get current block number, but i do not know how to get block number in cairo contract. |
Beta Was this translation helpful? Give feedback.
-
I know i can use get_caller_address() to get like msg.sender. but how can i get msg.value in cairo? |
Beta Was this translation helpful? Give feedback.
-
how can i remove a element in Array by index? I can not find this method. |
Beta Was this translation helpful? Give feedback.
-
if we write legacyMap use the same key, whether will replace the value?? |
Beta Was this translation helpful? Give feedback.
-
Proof verification within a cairo program would be a massive step forward in building fully decentralized state machines! |
Beta Was this translation helpful? Give feedback.
-
I want Base64 utils that could support type like |
Beta Was this translation helpful? Give feedback.
-
i wanna deploy contract on remix easily |
Beta Was this translation helpful? Give feedback.
-
Make it possible to store functions inside variables. This will make it possible to, among other things, support more functional programming paradigms:
|
Beta Was this translation helpful? Give feedback.
-
Big DEV QOL improvement would be the possibility to make mutation testing. |
Beta Was this translation helpful? Give feedback.
-
Hey guys! Does the VSCode extension works on Windows? I'm struggling to make it work on Windows but it doesn't work. Someone use it on Windows? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hey Cairo builders 🐺, let's discuss about what you would like to see for Cairo.
It can be:
Ultimately we would need to create issues for feature requests, but for the moment we don't have a clear process on how to handle external demands. So let's discuss those here and we will try to review / filter the requests and see if we can integrate some of them in the roadmap.
We appreciate your feedback and we will try to do our best to fit your needs!
Beta Was this translation helpful? Give feedback.
All reactions