chore(deployments): create txtx Runbook to upgrade L1/L2 deployments #441
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I'm Micaiah! 👋
After spending some years shipping developer tools at ConsenSys, I joined @lgalabru in creating txtx.
tl;dr
We're working to improve deployments & operations of smart contracts across the web3 ecosystem. We'd love for you to be a part of it.
This PR implements a smart contract Runbooks for the farcaster contracts. A tour of the Runbooks can be found here:
Motivation
We're working on developer tooling that aims to improve the deployments & operations lifecycle of smart contracts.
We see ourselves as the perfect companion for Hardhat and Foundry.
We've worked with teams to ease the burden of deploying contracts to the ever-growing list of L2s and to improve the security of their deployments by enabling multisig and hardware wallet signing of deployment transactions.
We're doing this through a new concept called "Smart Contract Runbooks". These Runbooks borrow heavily from Terraform; they provide a declarative way to describe your deployments & operations - allowing you to describe the "what" without having to worry about the "how". Txtx is a CLI tool that can be used to execute these Runbooks.
We're currently looking to onboard additional users. We have so many ideas for ways to continue improving the deployment & operations process, and we'd love to work with more teams like Farcaster to have feedback on the next features!
This PR creates Runbooks that replace the existing
DeployL1.s.sol
andDeployL2.s.sol
scripts. The new Runbooks offer a few advantages over the existing scripts:Simplicity
Txtx allows for removal of the logic that needs to be managed in the scripts.
For example, the L2 deployment script has logic to check if setup of contracts needs to occur based on if a new contract was deployed. Txtx, however, manages a state for your deployments, allowing it to automatically detect if contracts have changed since your last deployment. If no changes were made to your contracts, your deployments won't event be re-executed in the first place. If a contract is updated, only that contract and it's dependencies will be redeployed.
Security
Txtx allows you to specify a web wallet to sign all transactions, so you can stop copy/pasting your keys.
Dependency Analysis
Txtx uses your Runbook to create a graph of your contracts, so it can automatically detect what contracts need to be redeployed if an upstream contract is updated.
More to Come
We have so many ideas on improving the deployments & operations phase of development - cost analysis, wallet provisioning, alternate signer types (secure enclaves, keystores, etc), CI integrations, etc, etc.
We'd love for your team to be a part of what's next!
A tour of Txtx and your Runbooks can be found here.
Change Summary
Improve the farcaster contracts deployment process by implementing txtx runbooks.
Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewPR-Codex overview
This PR focuses on enhancing the deployment runbooks for the
Farcaster Protocol
, adding detailed outputs and variables for contract addresses, and clarifying environment-specific configurations fordevnet
andmainnet
.Detailed summary
network.devnet.tx
andnetwork.mainnet.tx
to clarify environment-specific file usage.outputs.tx
for contract addresses.immutable_factory_abi
invariables.tx
for the Immutable Create2 Factory.deploy-l2/variables.tx
.grant-role.tx
with new variable definitions and actions for granting roles.deploy-l1/main.tx
anddeploy-l2/main.tx
with actions for deploying contracts and managing roles.txtx.yml
with detailed environment configurations fordevnet
andmainnet
.