-
Notifications
You must be signed in to change notification settings - Fork 555
Solidity SDK ERC1155 #206
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
Solidity SDK ERC1155 #206
Conversation
uint256 nextIdToMint = nextTokenIdToMint(); | ||
uint256 startNextIdToMint = nextIdToMint; | ||
|
||
uint256 numOfNewNFTs; |
Check warning
Code scanning / Slither
Uninitialized local variables
STATE VARIABLES | ||
//////////////////////////////////////////////////////////////*/ | ||
|
||
uint256 internal nextTokenIdToMint_; |
Check warning
Code scanning / Slither
Unused state variable
* @param _amount The amount of the NFT to burn. | ||
*/ | ||
function burn( | ||
address _owner, |
Check notice
Code scanning / Slither
Local variable shadowing
* @param _amounts The amounts of the NFTs to burn. | ||
*/ | ||
function burnBatch( | ||
address _owner, |
Check notice
Code scanning / Slither
Local variable shadowing
) private { | ||
if (to.code.length > 0) { | ||
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( | ||
bytes4 response |
Check warning
Code scanning / Slither
Uninitialized local variables
if (response != IERC1155Receiver.onERC1155Received.selector) { | ||
revert("TOKENS_REJECTED"); | ||
} | ||
} catch Error(string memory reason) { |
Check warning
Code scanning / Slither
Uninitialized local variables
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { | ||
revert("TOKENS_REJECTED"); | ||
} | ||
} catch Error(string memory reason) { |
Check warning
Code scanning / Slither
Uninitialized local variables
bytes memory data | ||
) private { | ||
if (to.code.length > 0) { | ||
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { |
Check warning
Code scanning / Slither
Uninitialized local variables
function _doSafeTransferAcceptanceCheck( | ||
address operator, | ||
address from, | ||
address to, | ||
uint256 id, | ||
uint256 amount, | ||
bytes memory data | ||
) private { | ||
if (to.code.length > 0) { | ||
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { | ||
if (response != IERC1155Receiver.onERC1155Received.selector) { | ||
revert("TOKENS_REJECTED"); | ||
} | ||
} catch Error(string memory reason) { | ||
revert(reason); | ||
} catch { | ||
revert("!ERC1155RECEIVER"); | ||
} | ||
} | ||
} |
Check warning
Code scanning / Slither
Unused return
function _doSafeBatchTransferAcceptanceCheck( | ||
address operator, | ||
address from, | ||
address to, | ||
uint256[] memory ids, | ||
uint256[] memory amounts, | ||
bytes memory data | ||
) private { | ||
if (to.code.length > 0) { | ||
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( | ||
bytes4 response | ||
) { | ||
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { | ||
revert("TOKENS_REJECTED"); | ||
} | ||
} catch Error(string memory reason) { | ||
revert(reason); | ||
} catch { | ||
revert("!ERC1155RECEIVER"); | ||
} | ||
} | ||
} |
Check warning
Code scanning / Slither
Unused return
if (response != IERC1155Receiver.onERC1155Received.selector) { | ||
revert("TOKENS_REJECTED"); | ||
} | ||
} catch Error(string memory reason) { |
Check notice
Code scanning / Slither
Pre-declaration usage of local variables
bytes memory data | ||
) private { | ||
if (to.code.length > 0) { | ||
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { |
Check notice
Code scanning / Slither
Pre-declaration usage of local variables
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { | ||
revert("TOKENS_REJECTED"); | ||
} | ||
} catch Error(string memory reason) { |
Check notice
Code scanning / Slither
Pre-declaration usage of local variables
) private { | ||
if (to.code.length > 0) { | ||
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( | ||
bytes4 response |
Check notice
Code scanning / Slither
Pre-declaration usage of local variables
No description provided.