Platform: Code4rena
Start Date: 20/09/2022
Pot Size: $100,000 USDC
Total HM: 4
Participants: 109
Period: 7 days
Judge: GalloDaSballo
Id: 163
League: ETH
Rank: 103/109
Findings: 1
Award: $55.20
🌟 Selected for report: 0
🚀 Solo Findings: 0
🌟 Selected for report: IllIllI
Also found by: 0x1f8b, 0x4non, 0x52, 0x5rings, 0xNazgul, 0xRobocop, 0xSmartContract, 0xdeadbeef, 0xsanson, 8olidity, Amithuddar, Aymen0909, B2, B353N, CertoraInc, Ch_301, Chom, CodingNameKiki, Deivitto, ElKu, Funen, JC, JohnnyTime, Kresh, Lambda, Noah3o6, RaymondFam, ReyAdmirado, RockingMiles, Rolezn, Sm4rty, SuldaanBeegsi, Tadashi, TomJ, Tomio, V_B, Waze, __141345__, a12jmx, ak1, arcoun, asutorufos, aviggiano, berndartmueller, bharg4v, bin2chen, brgltd, bulej93, c3phas, catchup, cccz, ch0bu, cryptonue, cryptphi, csanuragjain, delfin454000, devtooligan, djxploit, durianSausage, eighty, erictee, exd0tpy, fatherOfBlocks, giovannidisiena, hansfriese, ignacio, joestakey, ladboy233, lukris02, m9800, malinariy, martin, minhtrng, obront, oyc_109, pedr02b2, pedroais, pfapostol, philogy, prasantgupta52, rbserver, ronnyx2017, rotcivegaf, rvierdiiev, sach1r0, shung, simon135, throttle, tnevler, tonisives, wagmi, yixxas, zkhorse, zzykxx, zzzitron
55.1985 USDC - $55.20
Inside the code:
diff --git a/src/ArtGobblers.sol b/src/ArtGobblers.sol index 0d413c0..b16aea5 100644 --- a/src/ArtGobblers.sol +++ b/src/ArtGobblers.sol @@ -60,7 +60,7 @@ pragma solidity >=0.8.0; %@&%%#/***********./////(((((((####%%&&@@@@@@@@@@@@@@&@@@@@@@@@@@@@@@@&&%%%%%%%%#((((((((%@&#(((((#%@%/*******************./*/ import {Owned} from "solmate/auth/Owned.sol"; -import {ERC721} from "solmate/tokens/ERC721.sol"; +import {ERC721, ERC721TokenReceiver} from "solmate/tokens/ERC721.sol"; import {LibString} from "solmate/utils/LibString.sol"; import {MerkleProofLib} from "solmate/utils/MerkleProofLib.sol"; import {FixedPointMathLib} from "solmate/utils/FixedPointMathLib.sol"; @@ -80,7 +80,7 @@ import {Pages} from "./Pages.sol"; /// @author FrankieIsLost <frankie@paradigm.xyz> /// @author transmissions11 <t11s@paradigm.xyz> /// @notice An experimental decentralized art factory by Justin Roiland and Paradigm. -contract ArtGobblers is GobblersERC721, LogisticVRGDA, Owned, ERC1155TokenReceiver { +contract ArtGobblers is GobblersERC721, LogisticVRGDA, Owned, ERC721TokenReceiver, ERC1155TokenReceiver { using LibString for uint256; using FixedPointMathLib for uint256; @@ -745,7 +745,7 @@ contract ArtGobblers is GobblersERC721, LogisticVRGDA, Owned, ERC1155TokenReceiv isERC1155 ? ERC1155(nft).safeTransferFrom(msg.sender, address(this), id, 1, "") - : ERC721(nft).transferFrom(msg.sender, address(this), id); + : ERC721(nft).safeTransferFrom(msg.sender, address(this), id); } /*////////////////////////////////////////////////////////////// diff --git a/src/utils/GobblerReserve.sol b/src/utils/GobblerReserve.sol index da32f9e..7699a69 100644 --- a/src/utils/GobblerReserve.sol +++ b/src/utils/GobblerReserve.sol @@ -35,7 +35,7 @@ contract GobblerReserve is Owned { // This is quite inefficient, but it's okay because this is not a hot path. unchecked { for (uint256 i = 0; i < ids.length; i++) { - artGobblers.transferFrom(address(this), to, ids[i]); + artGobblers.safeTransferFrom(address(this), to, ids[i]); } } }
Inside the code (e.g.):
diff --git a/src/ArtGobblers.sol b/src/ArtGobblers.sol index 0d413c0..446f6ff 100644 --- a/src/ArtGobblers.sol +++ b/src/ArtGobblers.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity >=0.8.0; +pragma solidity =0.8.13; /* **,/*, *%@&%#/*,,..........,/(%&@@#*
#0 - GalloDaSballo
2022-10-06T00:16:55Z
SafeTransfer -> L
1L 1NC