Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deployments): add txtx runbooks to enhance protocol deployment #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MicaiahReid
Copy link
Member

@MicaiahReid MicaiahReid commented Oct 25, 2024

Txtx

Hi, I'm Micaiah! 👋

After spending some years shipping developer tools at ConsenSys, I created txtx to fix some problems I've seen in the current Ethereum development workflow.

Note: This runbook is focusing on your EVM deployments but can also support SVM.

Summary

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 FiatTokenV2_2/FiatTokenCeloV2_2 contracts. A tour of the Runbooks can be found here. If this upgrade is interesting to you, we can implement similar Runbooks for the deploy-fee-adapter.s.sol, deploy-impl-and-upgrader.s.sol, and deploy-master-minter.s.sol scripts.

Detail

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 primitive 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 Circle to have feedback on the next features!

This PR creates Runbooks that replace the existing deploy-fiat-token-celo.s.sol and deploy-fiat-token.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 existing scripts have logic to deploy the token contracts if an address(0) is passed into the function, and to return the existing contract otherwise. This same logic is applied for the fiat token and Celo contracts, though the actual contract calls are nearly identical for each.

With txtx, that logic is easily abstracted away with environments - certain environments will deploy the dependencies for you, and others will use the pre-deployed contracts. This allows for the removal of a lot of duplicate code.

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.

Testing

See the video for details, but in short:

brew tap txtx/txtx
brew install txtx
txtx run deploy --env fiat-devnet -u

Requested Reviewers: @mention

@lgalabru
Copy link
Member

lgalabru commented Nov 1, 2024

Looking good, however the link is pointing to Farcaster, do we already have a screencast for Circle? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants