Replies: 2 comments 6 replies
-
Hi @bal7hazar, answering your question, the ID is changing with Cairo (actually Starknet) versions because updates to the base protocol require updates to the account interface. With Cairo 0.10 _validate_, and _validate_declare_ entry points were added to this interface for protocol level requirements, and this interface is yet likely to change with future protocol upgrades. Accounts need to be upgraded to continue being compatible with the chain (old accounts won't work eventually), and this ID must be updated from the new interface after the upgrade to comply with ERC-165. Then this ID solves both differentiation and compatibility. |
Beta Was this translation helpful? Give feedback.
-
Hello guys, to compute the interfaces ID like in the ERC-165 spec, can you confirm that the algorithm you are using is:
Is that correct? And it's only on methods (and not also events like the ERC721 proposes) as only methods are supported in interface. Am I correct? EDIT So one must convert types from interfaces into solidity type to have the interface ID? It could be great if we can compute an interface ID from pure Starknet point of view. Thanks a lot for the clarification. (Just seen the SNIP and the post on the forum) |
Beta Was this translation helpful? Give feedback.
-
Hello, I hope this is the right place to discuss about account stuff.
I understand quite well why we need an ID for accounts to help contracts differentiate between the Contracts and the Accounts, especially with StarkNet specities. With the new version of Cairo (0.10.x) and the according modification in OZ cairo contracts, the
ACCOUNT_ID
const has also been updated.My interogation is about why this ID is changing with cairo versions?
The likely reason I see could be to help/force contracts to interact with accounts with a similar version of OZ contracts (aka compiled with the same version of OZ contracts dependency). In that case, it is quite unconfortable to solve "differentiation" and "compatibility" with a single ID since we could want to keep differentiation feature and leave compatibility aside
Note: The documentation explains well the first understanding "differentiation" point, but I didn't see any information about "compatibility" concern.
Beta Was this translation helpful? Give feedback.
All reactions