Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

feat: in declare_v1 transaction, compute class_hash from contract_class #302

Closed
Eikix opened this issue Apr 26, 2023 · 15 comments
Closed

feat: in declare_v1 transaction, compute class_hash from contract_class #302

Eikix opened this issue Apr 26, 2023 · 15 comments
Assignees
Labels
enhancement New feature or request stale

Comments

@Eikix
Copy link
Contributor

Eikix commented Apr 26, 2023

Feature Request

In starknet pallet, declare v1, we currently accept the contract class hash as part of the payload.
It'd be sounder to compute it inside the declare v1 scope.

As per: https://docs.starknet.io/documentation/architecture_and_concepts/Blocks/transactions/#declare_v1, user does need to provide the class hash (otherwise we'd need to check it matches the contract class, thus recomputing it)
image

Describe the Feature Request

From the ContractClass struct, create a method called compute_class_hash that takes a non mutable ref to self and returns the class_hash as per declare v1 -> https://docs.starknet.io/documentation/architecture_and_concepts/Contracts/class-hash/

image

@Eikix Eikix added the enhancement New feature or request label Apr 26, 2023
@Eikix
Copy link
Contributor Author

Eikix commented Apr 26, 2023

Additional comment, if test PR is done -> update declare tests to not include contract class hash anymore

@Eikix
Copy link
Contributor Author

Eikix commented Apr 26, 2023

@marioiordanov
Copy link
Contributor

marioiordanov commented May 5, 2023

Those changes have a PR starkware-libs/starknet-api#42.

@marioiordanov
Copy link
Contributor

I want to work on this issue

@EvolveArt
Copy link
Collaborator

Those changes have a PR starkware-libs/starknet-api#42.

Hello @marioiordanov ! Great to see your PR making progress on their repo! Do you think you'd be able to tackle this one next which should be quite straightforward once your PRs merged in starknet-api

@marioiordanov
Copy link
Contributor

marioiordanov commented May 5, 2023

Hello @EvolveArt not sure, when the PR is going to be merged. Also I see that Madara is using a fork of the starknet_api, which I can't tell how often is being synced with the starknet_api repo. Aside from that I think it would be easy to be implemented.

@EvolveArt
Copy link
Collaborator

Not sure, when the PR is going to be merged. Also I see that Madara is using a fork of the starknet_api, which I can't tell how often is being synced with the starknet_api repo. Aside from that I think it would be easy to be implemented.

Great, well will check that and try to push for it to be merged

@AbdelStark
Copy link
Contributor

@marioiordanov @EvolveArt can we move forward on this ? even if not merged in starknet_api I mean ?

@marioiordanov
Copy link
Contributor

@abdelhamidbakhta you mean to move the implementation from starknet_api to the Madara project, or make the changes to starknet-api fork of tdelabro

@AbdelStark
Copy link
Contributor

@abdelhamidbakhta you mean to move the implementation from starknet_api to the Madara project, or make the changes to starknet-api fork of tdelabro

I mean make the changes to starknet-api fork of tdelabro

@EvolveArt
Copy link
Collaborator

@abdelhamidbakhta you mean to move the implementation from starknet_api to the Madara project, or make the changes to starknet-api fork of tdelabro

I mean make the changes to starknet-api fork of tdelabro

Ok @marioiordanov can you make your PR to the fork so we can finish this ?

@marioiordanov
Copy link
Contributor

marioiordanov commented May 25, 2023

@abdelhamidbakhta you mean to move the implementation from starknet_api to the Madara project, or make the changes to starknet-api fork of tdelabro

I mean make the changes to starknet-api fork of tdelabro

Ok @marioiordanov can you make your PR to the fork so we can finish this ?

@EvolveArt yeah sure, please assign it to myself

@AbdelStark
Copy link
Contributor

@abdelhamidbakhta you mean to move the implementation from starknet_api to the Madara project, or make the changes to starknet-api fork of tdelabro

I mean make the changes to starknet-api fork of tdelabro

Ok @marioiordanov can you make your PR to the fork so we can finish this ?

@EvolveArt yeah sure, please assign it to myself

Assigned it to you

@github-actions
Copy link

github-actions bot commented Jul 1, 2023

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.
Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a 👍
Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs.
Thank you for your contributions!

@github-actions github-actions bot added the stale label Jul 1, 2023
@github-actions github-actions bot closed this as completed Jul 8, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

5 participants