sstore2
sstore2 copied to clipboard
A few low-level gas optimizations.
Changes to contracts/utils/Bytecode.sol:
-
creationCodeForhas been changed to usePUSH2instead ofPUSH4since there is a max contract size limit of24576 byteswhich is less than2^16 = 65536 (uint16). AlsoPUSH1 0instructions have been changed toRETURNDATASIZE. -
codeAthas been changed so that only one subtraction is used to calculatesizeand also an extra addition in theassemblyblock has been removed to replace0x20 + 0x1fwith0x3f.
All tests are passing.