Use precompiles to write a protocol deployment script
Closed this issue · 6 comments
Write a deployment script that uses the V2 Core precompiles to deploy the entire Sablier V2 protocol (V2 Core + V2 Periphery).
This is possible to do now because the precompiles are part of the @sablier/v2-core
npm package (in the test/utils
package).
Note: there is an appearance of misuse by importing production code from test/utils.
As explained here, we should consider moving the precompiles - perhaps in script
, or in artifacts
, or in `src.
Related: #91 (comment)
perhaps in script, or in artifacts, or in `src.
in script
makes the most sense
Then, we need to include script
in the npm package.
i think it would be unnecessary to include all script
dir, we should include only that specific deployment script
Yep, that's what I was referring to.
@PaulRBerg, a script to deploy the entire V2 protocol does not make sense because it exceeds the EVM gas limit. As discussed here, the gas usage of this script is ~100M which is not feasible in production.
For the purpose of testing, we have added a function in periphery precompiles that can be used to deploy code + periphery.
Oh, I didn't take the EVM gas limit into consideration when I created this issue.
Closing this, it's an obvious conclusion.
For the purpose of testing, we have added a function
Good stuff