StarknetByExample icon indicating copy to clipboard operation
StarknetByExample copied to clipboard

feat: SRC5 Interface detection

Open julio4 opened this issue 2 years ago • 8 comments

Reference: https://github.com/starknet-io/SNIPs/blob/main/SNIPS/snip-5.md

julio4 avatar Nov 10 '23 06:11 julio4

@julio4 can you give more context to this

mubarak23 avatar Apr 06 '24 11:04 mubarak23

@julio4 can you give more context to this

Show an example of how a contract can implement the ISRC5 trait to comply with SRC-5 for interfaces detection.

julio4 avatar Apr 07 '24 01:04 julio4

from the above docs shared, we are implementing a trait function that check this interface_id == 0x3f918d17e5ee77373b56385708f855659a07f75997f365cf87748628532a055

mubarak23 avatar Apr 07 '24 04:04 mubarak23

from the above docs shared, we are implementing a trait function that check this interface_id == 0x3f918d17e5ee77373b56385708f855659a07f75997f365cf87748628532a055

Not exactly, this specific interface_id is only an example. SRC5 is a standard that define how to generate interface ids and how a contract can publish what interfaces it implements in order to allow anyone to query if the contract implement it. You can take a look at the OZ implementation for an example here

julio4 avatar Apr 07 '24 06:04 julio4

this OpenZeppelin implementation is somewhat same thing we are going to do here

mubarak23 avatar Apr 07 '24 11:04 mubarak23

this OpenZeppelin implementation is somewhat same thing we are going to do here

Yes but not as a component (atleast for now), we only want to demonstrate how one contract can implement the trait to return true for a specific interface id. So developers can quickly understand without having to read all the SNIP!

julio4 avatar Apr 07 '24 14:04 julio4

Alright @julio4 kindly assign this to me, i will work on it

mubarak23 avatar Apr 07 '24 16:04 mubarak23

i would love to work on this issue @julio4

Jemiiah avatar Jun 26 '24 18:06 Jemiiah