Modifiers are used when there is same checks/logic usage in different functions. Regarding requires at the beginning, the idea is to spend as less gas as possible on a failing tx. There's difference in gas usage as well, so choose whichever one is optimal for your usecase
May 5, 2023, 12:20 PM
thanks.
actually found a stackexchange question about it, for everyone interested:
https://ethereum.stackexchange.com/questions/67520/is-there-a-widely-accepted-convention-for-when-to-use-a-modifier-and-when-to-use
actually found a stackexchange question about it, for everyone interested:
https://ethereum.stackexchange.com/questions/67520/is-there-a-widely-accepted-convention-for-when-to-use-a-modifier-and-when-to-use
May 5, 2023, 12:42 PM