Commit ba77c8d6 by github-actions

Transpile 070d42d9

parent 21276a48
...@@ -57,7 +57,13 @@ abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable ...@@ -57,7 +57,13 @@ abstract contract ERC1155SupplyUpgradeable is Initializable, ERC1155Upgradeable
if (to == address(0)) { if (to == address(0)) {
for (uint256 i = 0; i < ids.length; ++i) { for (uint256 i = 0; i < ids.length; ++i) {
_totalSupply[ids[i]] -= amounts[i]; uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 supply = _totalSupply[id];
require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
unchecked {
_totalSupply[id] = supply - amount;
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment