ReseedBarn.init()
deploys Fertilizer contract and mints Fertilizer ids to all the current holders during migration:
All tokens must be minted in one transaction because it deploys Fertilizer contract.
I researched and found that at the moment of report writing there are 1101 unique entries owner-tokenId. Gist with performed script
Here is analysis with gas consumption of function mintFertilizers()
. It minted each of 100 FertilizerIds to 10 different owners, result is 33M gas.
https://gist.github.com/T1MOH593/024dda0357660dc366d62f25ee0caced
33M gas cannot be operated in some L2s, for example Optimism stack has 30M gasLimit in block, Polygon has 30M gasLimit too.
Migration won't succeed on some L2s because all fertilizer ids cannot be minted in single transaction.
Manual Review
Refactor ReseedBarn to mint fertilizer ids in batches.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.