-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix for #257; Add small ERC1155 macro * Fix failing tests
- Loading branch information
Showing
92 changed files
with
3,408 additions
and
3,382 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
erc1155: | ||
variables: | ||
properties: | ||
safeTransferFrom(from, to, tokenId, value, data): | ||
- msg: "Cannot transfer to 0 address" | ||
prop: "#if_succeeds to != address(0);" | ||
- msg: "sender must have sufficient balance" | ||
prop: "#if_succeeds old(balanceOf(from, tokenId)) >= value;" | ||
- msg: "Sender must be properly authorized to transfer" | ||
prop: "#if_succeeds msg.sender == from || old(isApprovedForAll(from, msg.sender));" | ||
- msg: "Sender lost value tokens" | ||
prop: "#if_succeeds balanceOf(from, tokenId) == old(balanceOf(from, tokenId)) - value;" | ||
- msg: "Recipient gained value tokens (assuming non-deflationary tokens)" | ||
prop: "#if_succeeds balanceOf(to, tokenId) == old(balanceOf(to, tokenId)) + value;" | ||
safeBatchTransferFrom(from, to, ids, values, data): | ||
- msg: "Cannot transfer to 0 address" | ||
prop: "#if_succeeds to != address(0);" | ||
- msg: "Ids and values must have equal length" | ||
prop: "#if_succeeds values.length == ids.length;" | ||
- msg: "sender must have sufficient balance" | ||
prop: "#if_succeeds old(forall(uint i in ids) balanceOf(from, ids[i]) >= values[i]);" | ||
- msg: "Sender must be properly authorized to transfer" | ||
prop: "#if_succeeds msg.sender == from || old(isApprovedForAll(from, msg.sender));" | ||
setApprovalForAll(operator, approved): | ||
- msg: "setApprovalForAll worked correctly" | ||
prop: "#if_succeeds approved == isApprovedForAll(msg.sender, operator);" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.