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
23 reactions

m4rio pfp
m4rio
@m4rio
using storage variables instead of copying everything to memory. 🤌
1 reply
0 recast
1 reaction

horsefacts pfp
horsefacts
@horsefacts.eth
tell me more about this one…
2 replies
0 recast
0 reaction

m4rio pfp
m4rio
@m4rio
It’s something I was always finding peculiar, but not declaring all the variables in memory, e.g. You have a struct and a mapping, instead of copying that element in mem, you just access it. It’s more expensive on usage but less on storage.
1 reply
0 recast
1 reaction

Spencer Graham 🧢 pfp
Spencer Graham 🧢
@spengrah.eth
This is because when you declare a storage variable for a struct, you’re just loading the storage pointer. You can then use that pointer to load the members of that struct individually. Unless you end up loading all the members of the struct, you’ll save some SLOADs. Doesn’t change the bytecode size, tho
0 reply
0 recast
1 reaction