Skip to content

Commit

Permalink
change variable declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
RenanSouza2 committed Jun 2, 2023
1 parent ba81ae9 commit 7849191
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions contracts/token/ERC1155/ERC1155.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
function _safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) internal {
require(to != address(0), "ERC1155: transfer to the zero address");
require(from != address(0), "ERC1155: transfer from the zero address");
uint256[] memory ids;
uint256[] memory amounts;
(ids, amounts) = _asSingletonArrays(id, amount);
(uint256[] memory ids, uint256[] memory amounts) = _asSingletonArrays(id, amount);
_update(from, to, ids, amounts, data);
}

Expand Down Expand Up @@ -270,9 +268,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
*/
function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal {
require(to != address(0), "ERC1155: mint to the zero address");
uint256[] memory ids;
uint256[] memory amounts;
(ids, amounts) = _asSingletonArrays(id, amount);
(uint256[] memory ids, uint256[] memory amounts) = _asSingletonArrays(id, amount);
_update(address(0), to, ids, amounts, data);
}

Expand Down Expand Up @@ -304,9 +300,7 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
*/
function _burn(address from, uint256 id, uint256 amount) internal {
require(from != address(0), "ERC1155: burn from the zero address");
uint256[] memory ids;
uint256[] memory amounts;
(ids, amounts) = _asSingletonArrays(id, amount);
(uint256[] memory ids, uint256[] memory amounts) = _asSingletonArrays(id, amount);
_update(from, address(0), ids, amounts, "");
}

Expand Down

0 comments on commit 7849191

Please # to comment.