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
Remove dualcase SRC5 #882
Remove dualcase SRC5 #882
Conversation
@martriay what would be the best way to test this removal feature on a public network? |
maybe for this module we don't need that |
@martriay i don't know why, but after removing dualSRC5, i get a new class hash for ERC721 (which is expected), but i get the same class hash for Account. Is this the normal behaviour? Account also exposes SRC5Impl, the class hash shoud also be modified, no? |
mmh actually it seems neither ERC721 nor Account exposes SRC5Camel, this means the class hash shouldn't change for both? |
update: now i get it . I changed |
Then we should test those presets onchain. |
How should i test that? Deploying the ERC721 preset and check that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR is looking good! Yes, we need to test the callback works properly, and we wanted to go the extra mile we could also test that it does not work for camelCase ERC721Receivers, although that's very complex to set up, not really needed I guess.
@martriay ok now i found out the issue : removing dualcase SRC5 will break compatibility in some cases. I cannot send ERC721 tokens to a Braavos Goerli wallet cairo0, because it only implements camelCase Braavos account contract are still in cairo 0 on mainnet, with only camelCase impl for Here is the goerli address of the ERC721 contract i deployed, minting 1 token to the deployer. And the tx hash of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Left a couple of comments and we still need to remove the supportsInterface
method from ABIs like the Account and the EDRC721 ones in the interface files.
With dualcase SRC5 they shouldn't work either, because the interface used in Cairo 0 was ERC165 like, not the one we are using with SRC5 nowadays. |
@ericnordelo oh ok thank you very much for these informations! |
…airo-contracts into remove_src5_dualcase
@ericnordelo i think we should also remove all the |
@ericnordelo pr updated. There are still some mentions to camelCase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up, @TAdev0! I left a couple comments, but we're looking good so far.
There are still some mentions to camelCase supportsInterface in various files (mocks especially), but i think these ones shouldn't be removed?
I think they can be removed. The camelCase supportsInterface
was only there to support the dual casings and I don't see why we should keep them. This also includes removing the supportsInterface
fallback from the dual case modules (example here). The try_selector_with_fallback
should be replaced with the standard call_contract_syscall
. Correct me if I'm wrong @martriay @ericnordelo
@andrew-fleming just updated the PR. Now There is just one mention, still, in erc1155.doc. But there is no snake case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is just one mention, still, in erc1155.doc. But there is no snake case supports_interface (its erc165 compliant) so i guess we should leave it like this ?
Yeah, the erc1155 doc is from cairo v0, so no need to worry about that here. LGTM! Thanks again for picking this up 🙏
Thanks again for taking the time @TAdev0. After solving the conflicts, we can merge this to main already. |
…nto remove_src5_dualcase
…airo-contracts into remove_src5_dualcase
@ericnordelo @andrew-fleming i resolved conflicts and updated the code for ERC1155 which used again the DualCaseSRC5 interface. For now, i'm having issues declaring the contracts on a testnet, i don"t know why. ERC721 and ERC1155 class hashes still need to be updated, can you take care of it? I can try again tomorrow but sncast seems not to be working on sepolia |
The RPC probably hasn't updated to Sierra 1.5 yet. I switched to blast and declared/deployed the relevant presets in this PR on sepolia. ERC721
ERC1155
The class hashes are only going to be updated during releases from now on, so we don't have to worry about that anymore. And I think we're good to go :) thanks, @TAdev0! |
great! thank you :) |
Fixes #841
PR Checklist