-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add solidity like bytes which supports keccak and sha256 #184
Conversation
Thank you for this PR this looks extreeeemely useful |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First review
@LucasLvy Thanks for your review. I have fixed the problems above. |
@LucasLvy Sorry for the codes likes |
Note that this will be redundant with bytes 31 at some point |
hey @zkcarter can you register on https://app.onlydust.xyz/ so i can pay for your contribution ? (can you also tell me how many hours/days you spent on this pr plz) |
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
bytes
is an implementation similar to Solidity bytes written in Cairo 1.It is notable for its built-in implementation of
Keccak
andSha256
hash functions, offering convenience for migrating EVM Contracts written in Solidity to the Starknet ecosystem.Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information
The implementation of
bytes
differs frombyte_array
in corelib. Each bytes array element stores 16 bytes and is designed to calculate byte stream hashes more quickly by trading more space for less computational cost.