save a lil gas

master
lza_menace 1 year ago
parent a1b12dcd6b
commit e93e6d482e

@ -72,10 +72,12 @@ contract Unaboomer is ERC721, Owned {
function radicalize(address _to, uint256 _amount) external payable onlyMain {
require(minted + _amount <= MAX_SUPPLY, "supply reached");
unchecked {
uint256 startToken = minted + 1;
for (uint256 i; i < _amount; i++) {
minted++;
_mint(_to, minted);
_mint(_to, startToken);
startToken += 1;
}
minted += _amount;
}
}

@ -45,7 +45,7 @@ contract UnaboomerTest is Test {
assertEq(bomb.balanceOf(t2, 1), 40);
// sending bombs should change supplies
hoax(t1);
(bool[] memory res, uint256[] memory killed) = main.sendBombs(60);
main.sendBombs(60);
// for (uint256 i; i < res.length; i++) {
// console.log(res[i]);
// console.log(killed[i]);

Loading…
Cancel
Save