Improving the EVM deployment experience #23
Replies: 1 comment 4 replies
-
I think this a great idea. Advantages are very clear to me.
We should not rely on precompiles for deployments. Using precompiles assume that the same foundry configurations would work across all the chains, which is not true. For example, Linea requires a different value for optimizer runs. Therefore, a more robust approach would be to have build settings specified in this repo. This would allow us to have a good control over multichain deployments.
We should keep Solana deployments in a separate repo and once that repo is matured enough, then we should look into merging the two together. This would be the most convenient way to unify all Sablier related deployments. There will be many unknowns in the Solana deployment process which we are not aware of at the moment and having it in a separate repo will make it agile without having to worry about following this repo's structure.
Same argument as Solana deployment. I would suggest to have PS: I haven't had a look at Uniswap's repo yet but its on my to read list. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
(This idea came prior to this discussion)
Beyond the information (ABIs, contract addresses, broadcasts, etc.) that this repo will provide, I think we could take this even further. What if we make this repo a central point for everything related to deployments across all protocols—including the deployment scripts themselves (which means we’d need to add a
foundry.toml
file).We’d also be installing all protocol repos (
lockup
,flow
,airdrops
, etc.) here viapackage.json
, so we can implement a unifiedDeployProtocol
script to handle all contract deployments in one go. It doesn't mean we can't have individual scripts as well, i.e.DeployLockup
orDeployLockupNFTDescriptor
.One potential problem is dealing with different deployment profiles—for example,
lockup
requires feweroptimizer_runs
, while airdrops can use a much higher value. But we can handle this by:precompiles
in the protocols reposDeployOptimized
testing utils to contain the bytecode directly instead of reading it fromout-optimized
initcode
.If we add the precompiles here
foundry.toml
script/Precompiles.sol
script/DeployProtocol.s.sol
Main benefits of this approach:
deployments
NFTDescriptor
without storing them in the repoI really think centralizing everything here is the right call in terms of maintenance costs and ease of use (deploying a lot of contracts over the past year 😆). The idea is mainly inspired by how Uniswap handles it (they have a single repo for all contract deployments), v2/v3/v4/permit2 and so on, and their new v4-core doesn’t even contain any deployment scripts.
Questions
evm-deployments
—and keep Solana-related broadcasts in thesolsal
repo, as I initially suggested. (we won't have to deal with multichains there, so it makes sense to keep there).multichain-deployer
logic into this repo. That way, we could repurpose the current repo into something else—maybe amulti-scripts
repo—and use it for scripts like this one.@sablier-labs/evm RFF — I tried to keep my message concise here, but I highly recommend checking out Uniswap's repo. Not necessarily to do a deep dive, but just to get a general sense of how they’re structuring things and what patterns they're following.
Beta Was this translation helpful? Give feedback.
All reactions