Content pfp
Content
@
0 reply
0 recast
2 reactions

horsefacts pfp
horsefacts
@horsefacts.eth
- Keep all strings under 32 bytes - Replace modifiers with internal functions - Linked libraries 😈 (cc @maks) https://warpcast.com/maks/0xb0fda8ff
7 replies
3 recasts
24 reactions

Kevin pfp
Kevin
@typedarray.eth
What's the explanation for modifiers vs interval functions? I (naively) figured modifiers were syntactic sugar for functions.
1 reply
0 recast
1 reaction

horsefacts pfp
horsefacts
@horsefacts.eth
They're more like macros: they're inlined, so it's like copy-pasting the modifier code anywhere it's applied. https://github.com/ethereum/solidity/issues/6584
4 replies
0 recast
3 reactions

Kevin pfp
Kevin
@typedarray.eth
Checks out, thanks for sharing. They seem... strictly worse than internal functions then, other than perhaps a readability improvement?
1 reply
0 recast
1 reaction

Matt Solomon pfp
Matt Solomon
@msolomon.eth
Worth noting that with via-ir internal functions might also get inlined to save gas. I'm not sure offhand if there's an easy way to know when it decides to do this, or if there's a dedicated flag to enable/disable this feature
0 reply
0 recast
1 reaction

Jeff Lau pfp
Jeff Lau
@jefflau.eth
Very interesting, thanks for sharing!
0 reply
0 recast
0 reaction

Poison Ivy pfp
Poison Ivy
@ivy
ooooh this is very good to know!!
0 reply
0 recast
0 reaction