-
Notifications
You must be signed in to change notification settings - Fork 358
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
SNIP12: Incorrect use of u64 in docs example #1273
Comments
trishtzy
changed the title
SNIP12: Incorrect use of u64 in document example
SNIP12: Incorrect use of u64 in docs example
Dec 24, 2024
Thanks, @trishtzy! Yeah, feel free to open a PR fixing this. Note though that we keep the actual struct member as type It's probably helpful to leave a comment regarding
|
4 tasks
andrew-fleming
pushed a commit
that referenced
this issue
Jan 2, 2025
github-project-automation
bot
moved this from 📋 Backlog
to ✅ Resolved
in Contracts for Cairo
Jan 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
📝 Details
The example in SNIP12 incorrectly uses
u64
for theexpiry
field, which is not a supported data type from the official SNIP12 specification.https://github.com/OpenZeppelin/cairo-contracts/blob/v0.20.0/docs/modules/ROOT/pages/guides/snip12.adoc?plain=1#L76
When trying to re-create the Message struct for off-chain signing using Golang or Python, it results in compilation errors when hashing the Typed Message.
🔢 Code to reproduce bug
Running the Go script results in
panic: fail to unmarshal TypedData: can't parse type u64
Could I open a pull request to update the example?
The text was updated successfully, but these errors were encountered: