Calculating Buffer Size
Last updated
Last updated
ScriptyBuilder
depends on to assemble fetched scripts.
The main intention of DynamicBuffer
is to get rid of the repeated usage of abi.encodePacked
(or similar) when stitching together scripts. To achieve this, scripty.sol needs to allocate enough space in memory.
Therefore, you need to know the size of stored scripts before requesting them. Good news is,ScriptyBuilder
provides methods that you can use to find exact size of stored scripts:
These methods are intendend to be used off-chain
You can check to see how you can fetch the size of stored scripts.