Skip to content
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

refactor(target_chains/starknet): use felt252 instead of bytes31 in ByteArray #1663

Merged
merged 1 commit into from
Jun 6, 2024

Conversation

Riateche
Copy link
Contributor

@Riateche Riateche commented Jun 6, 2024

I faced an issue when testing our contract with starknet-js. Looks like when we use bytes31, in starknet-js we're only able to pass an ASCII string that's converted to cairo short string encoding. This is not what we want and it's not compatible with our use case (arbitrary binary data). Thus, I'm switching the storage type to felt252, which has much more straightforward semantics in starknet-js (any number-like value is passed as the corresponding felt252 value).

Copy link

vercel bot commented Jun 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
xc-admin-frontend ⬜️ Ignored (Inspect) Visit Preview Jun 6, 2024 10:06am

@Riateche Riateche merged commit 84e5ae6 into main Jun 6, 2024
5 checks passed
@Riateche Riateche deleted the starknet-no-bytes31 branch June 6, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants