Timeline for For Loops in transfer function - lottery management function gas usage
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 16, 2022 at 6:53 | vote | accept | BigDommo | ||
Mar 16, 2022 at 6:53 | comment | added | BigDommo | 100% not safe is 200% not good. Thanks Iain. | |
Mar 15, 2022 at 21:08 | comment | added | phaze | I repeat that, this is 100% not safe, even if they didn't know their address array number of whatever you are referring to. They can simply check their balance. You can even simply read contract storage, even if it is private. Everything is public. If this answer helped, please mark it. | |
Mar 15, 2022 at 12:33 | comment | added | BigDommo | "PS: You should be careful when using random numbers that can be influenced by the user, since they can simply:..." - I'm being a bit simple, I think. As they wouldn't know their address array number, I couldn't see how they could manipulate the outcome to their favour. | |
Mar 15, 2022 at 12:13 | comment | added | BigDommo | Thanks for you reply Iain. This does replace the _transfer function. The transfer function separates into _transferNormal and _transferNoFees with this being the former and main function. I wanted the contract to manage the lottery function with each transfer: contract receives a tx fee to fund the lottery, if a set txnum is hit then it distributes the jackpot to the drawn array item. | |
Mar 15, 2022 at 11:48 | history | answered | phaze | CC BY-SA 4.0 |