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

dev: use sol abi traits #128

Merged
merged 4 commits into from
Mar 21, 2024

Conversation

thomas192
Copy link
Contributor

Updated use of append_X to sol_abi's encode_packed.

Copy link

vercel bot commented Mar 21, 2024

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
blobstream-starknet ⬜️ Ignored (Inspect) Visit Preview Mar 21, 2024 6:32pm

Copy link
Contributor

@b-j-roberts b-j-roberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is great, just the mutable variables should probably be changed now.

let mut data_root_bytes = BytesTrait::new_empty();
data_root_bytes.append_felt252(data_root.height);
data_root_bytes.append_u256(data_root.data_root);
let mut data_root_bytes = BytesTrait::new_empty()
Copy link
Contributor

@b-j-roberts b-j-roberts Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these variables don't need to be mut anymore with this setup. Hope that's not too much to change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed they don't!

Copy link
Contributor

@b-j-roberts b-j-roberts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool to see this being used!

@b-j-roberts b-j-roberts merged commit 7702154 into keep-starknet-strange:main Mar 21, 2024
5 checks passed
@thomas192
Copy link
Contributor Author

Cool to see this being used!

It's more intuitive. You know at a glance whether it's packed or not

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.

None yet

2 participants