properties icon indicating copy to clipboard operation
properties copied to clipboard

Added ERC1155 properties

Open the-caliber opened this issue 2 years ago • 1 comments

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/.

the-caliber avatar Jun 14 '23 20:06 the-caliber

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

montyly avatar Jun 29 '23 13:06 montyly