foundry icon indicating copy to clipboard operation
foundry copied to clipboard

`forge deploy` feature wishlist

Open tynes opened this issue 2 years ago • 8 comments

Component

Forge

Describe the feature you would like

It would be nice to have a higher level command on top of forge script that is specifically designed to facilitate the management and deployment of complex smart contract systems. hardhat-deploy has over 20k repos that are using it on Github but it only receives a few commits per month and is missing certain features that would make it much easier to use.

The main feature that forge script is missing that would make it ideal for using for deployments is the way that the deployment artifacts are maintained

Desired features:

  • There is a single artifact file per deployed contract
  • This file contains all of the information required to interact with the contract as well as verify it
  • Any language could have a library to read in the artifact and build a Contract object/struct, so that its easy to interact with the contracts, including forge script
  • hardhat deploy does not work well with hardware wallets, forcing insane hacks at deploy time to get it to work. Should be able to use hardware wallets at any derivation path
  • Idempotency, don't redeploy things if the code in the local workspace matches the code referenced in the deploy artifact (allows easy resumes of deployments)
  • Be able to reference deployment artifacts in remote locations (filesystem, URI), to be able to interact with those contracts (could be done via cheatcode)
  • The artifacts should be namespaced by network, something like deployments/{mainnet,goerli}
  • Automatically use chain id to know which network's artifacts to use
  • If the namespacing is canonical, then a network of deployment artifacts will make it really easy to interact with different contracts from different projects across chains
  • A way to manage a contract dependency graph at deploy time

Additional context

No response

tynes avatar Dec 19 '22 17:12 tynes