Platform: Code4rena
Start Date: 11/08/2022
Pot Size: $40,000 USDC
Total HM: 8
Participants: 108
Period: 4 days
Judge: hickuphh3
Total Solo HM: 2
Id: 152
League: ETH
Rank: 105/108
Findings: 1
Award: $20.60
๐ Selected for report: 0
๐ Solo Findings: 0
๐ Selected for report: Dravee
Also found by: 0x040, 0x1f8b, 0xDjango, 0xHarry, 0xNazgul, 0xSmartContract, 0xbepresent, 0xkatana, Amithuddar, Aymen0909, Bnke0x0, Chom, CodingNameKiki, Deivitto, DevABDee, Diraco, ElKu, Fitraldys, Funen, IllIllI, JC, LeoS, Metatron, MiloTruck, Noah3o6, ReyAdmirado, Rohan16, Rolezn, Saw-mon_and_Natalie, Sm4rty, SpaceCake, TomJ, Tomio, Trabajo_de_mates, Waze, Yiko, __141345__, ajtra, apostle0x01, bobirichman, brgltd, bulej93, c3phas, cRat1st0s, carlitox477, d3e4, durianSausage, erictee, fatherOfBlocks, gerdusx, gogo, hakerbaya, ignacio, jag, joestakey, ladboy233, medikko, mics, newfork01, oyc_109, pfapostol, robee, rvierdiiev, sach1r0, saian, samruna, sikorico, simon135, wagmi, zeesaw, zkhorse, zuhaibmohd
20.5997 USDC - $20.60
Change string
to byteX
if possible
https://github.com/code-423n4/2022-08-foundation/blob/main/contracts/NFTCollectionFactory.sol#L258
The string type is basically equal to bytes so that we can use bytesX as alternative of string. Itโs better to covert string to bytesX from efficiency perspective, as long as the string length is less than 32.
Please see the bellow comparison. When we convert the string โhello world!โ to bytes, the gas cost becomes nearly 3 times chipper than using string.
change from string
to byteX
#0 - HardlyDifficult
2022-08-19T16:23:49Z
Valid suggestion... but for flexibility we are currently leaning towards keeping them as strings just in case a creator would like to use a long value here. Will consider this suggestion.