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

[Feature]: Add Missing Erc1155 E2E Tests #482

Closed
1 of 7 tasks
0xNeshi opened this issue Jan 10, 2025 · 3 comments
Closed
1 of 7 tasks

[Feature]: Add Missing Erc1155 E2E Tests #482

0xNeshi opened this issue Jan 10, 2025 · 3 comments
Assignees
Labels
effort: low Easy or tiny task that takes less than a day. good first issue Good for newcomers. priority: 1 We will do our best to deal with this. type: test Changes to the testing suite.

Comments

@0xNeshi
Copy link
Collaborator

0xNeshi commented Jan 10, 2025

What is the feature you would like to see?

  • Add missing receiver-related tests for _burn and _burn_batch:

    • errors_when_receiver_reverts_with_reason
    • errors_when_receiver_reverts_without_reason
    • errors_when_receiver_panics
    • errors_when_invalid_receiver_contract
  • Double-check for any other missing tests

https://github.com/OpenZeppelin/rust-contracts-stylus/blob/main/examples/erc1155/tests/erc1155.rs

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines
@0xNeshi 0xNeshi added priority: 1 We will do our best to deal with this. type: test Changes to the testing suite. good first issue Good for newcomers. effort: low Easy or tiny task that takes less than a day. labels Jan 10, 2025
@bidzyyys bidzyyys added this to the Release v0.2.0 milestone Jan 10, 2025
@MukulKolpe
Copy link
Contributor

Hey @0xNeshi, @bidzyyys. Can I work on this issue?

@bidzyyys
Copy link
Collaborator

Hey @MukulKolpe! Thank you for your interest in contributing to our library, but I believe this issue is almost solved by @Dhanraj30 in #488.

@MukulKolpe feel free to find another issue that you may be interested and go ahead! 🚀

@bidzyyys bidzyyys moved this from Todo to In Progress in Rust Contracts Stylus Jan 12, 2025
@bidzyyys bidzyyys self-assigned this Jan 12, 2025
@0xNeshi
Copy link
Collaborator Author

0xNeshi commented Jan 13, 2025

Closing this, as we actually don't need to test burn and burn_batch for reverts in ERC1155Receiver.
Here's why: both functions use _update_with_acceptance_check internally, which doesn't do anything with the ERC1155Receiver contract when to is Address::ZERO - which is always the case for burns.

@0xNeshi 0xNeshi closed this as completed Jan 13, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Rust Contracts Stylus Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: low Easy or tiny task that takes less than a day. good first issue Good for newcomers. priority: 1 We will do our best to deal with this. type: test Changes to the testing suite.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants