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

Added ERC1155 properties #35

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

the-caliber
Copy link

It includes following ERC1155 internal and external properties:

Basic properties

  • balanceOf() should revert on address zero
  • balanceOfBatch Works as expected
  • safeTransferFrom() should revert while transferring unapproved token
  • safeTransferFrom() correctly update balances
  • safeTransferFrom() should revert if from is the zero address
  • safeTransferFrom() should revert if to is the zero address
  • safeTransferFrom() to self should not break accounting
  • safeBatchTransferFrom() to self should not break accounting
  • safeBatchTransferFrom() correctly update balances
  • safeTransferFrom() should revert if the receiver is a contract that does not implement onERC1155Received()
  • safeBatchTransferFrom() should revert if the receiver is a contract that does not implement onERC1155Received()

Burnable properties

  • burn() destroys token(s)
  • burn() destroys token(s) from approved address
  • burnBatch() destroys token(s)
  • burnBatch() destroys token(s) from approved address
  • cannot transfer a burned token
  • burned token(s) should not be transferrable when burned with burnBatch

Mintable properties

  • Should mint tokens and should increase balance
  • Should mint tokens in batch and should increase balance

This doesn't include properites/test for erc1155 properties but it includes contracts/ERC1155/external/test/ and contracts/ERC1155/internal/test/.

@montyly
Copy link
Member

montyly commented Jun 29, 2023

This is great, thanks @the-caliber. We will review it asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants