MultiRaffle icon indicating copy to clipboard operation
MultiRaffle copied to clipboard

NFT distribution with (1) randomized, multi-winner raffles and (2) bulk on-chain metadata generation.

Results 10 MultiRaffle issues
Sort by recently updated
recently updated
newest added

clearRaffle was defining a bunch of variables in your loop unchecked lowers gas on iteration, while loop with pre defined limits lowers gas costs etc

Hey nice stuff! uint256 winningTickets = nftCount - tmpCount; ``` if (winningTickets != tickets.length) { // Payout value equal to number of bought tickets - paid for winning tickets (bool...

here are the reported gas numbers from the dapp-tools test suite if you run the specs around this method: ``` Running 5 tests for src/test/Benchmark.t.sol:MultiRaffleBenchmark [PASS] testShuffleOneThousand() (gas: 231041478) [PASS]...

When minting token id starts from 1, not 0: https://github.com/Anish-Agnihotri/MultiRaffle/blob/a468d0029138ec0166e9e43697c4053c340d7e13/src/MultiRaffle.sol#L223 functions that depend on tokenId, e.g. tokenURI will return unrevealed data for id 0.

Thanks for sharing this @Anish-Agnihotri - really great ideas and helpful examples. My question: The design of the `claimRaffle` function seems to require the caller to know where their entry...

https://github.com/Anish-Agnihotri/MultiRaffle/blob/55c4c4af14ab06f795b564ed42f569ea420e1d4f/src/MultiRaffle.sol#L223 What do you think about `_safeMint(msg.sender, ticket[i])` instead? Currently, if there's any value in a low `tokenId` then there's an incentive for gas wars / people gaming the system,...

- Break search of metadata to reduce gas usage. - Owner can customize the LINK fee in case a different value will be required in the future. - Error message:...

I love the batched reveal idea, but it's not clear to me how you would go from a single random number (`entropy`) for a batch of tokens to a unique...

This is a great initiative, thanks for starting it. Your Fisher–Yates implementation biases selection of early entrants by use of modulus ([Wiki explanation](https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#Modulo_bias)). https://github.com/Anish-Agnihotri/MultiRaffle/blob/55c4c4af14ab06f795b564ed42f569ea420e1d4f/src/MultiRaffle.sol#L177 I suspect that reuse of the...

Probably want to add `LINK_TOKEN.transfer(msg.sender, LINK_TOKEN.balanceOf(address(this)));` to `withdrawRaffleProceeds()` or some other helper. There's all kinds of scenarios where we end up with $LINK trapped in the contract after it's no...