You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I'm interested in the simplicity of pure solidity scripting for deployment and other network calls.
I'm finding myself wondering if I am reinventing the wheel in some cases, and also wondering what is possible more generally. I'd love to see examples of how you all do things (either as responses here or links to great repos).
Examples of what I'm looking for:
Environment variables and run() args?
I've been pulling in env variables to configure scripts:
Maybe there's a cleaner way to do this? Also I'd be curious to see how you all are using hardware wallets and/or processes for preparing transactions for contract wallet execution.
Upgrade patterns?
How are you all managing upgrades? Do you have patterns for detecting bytecode changes and deploying idempotently?
Executing on multiple networks?
I'd love to see examples of efficiently executing scripts and deploying with CREATE2 (or CREATE3 with lightweight clone?) across multiple networks.
I'm familiar with the salt call option that uses the CREATE2_FACTORY under the hood:
new MyContract{salt: salt}();
Are you managing the salt like a secret? In an env variable or some other way?
Testing scripts?
I've been invoking scripts from tests in setUp() in my tests, similar to hardhat-deploy's fixtures pattern. Should I also be tracking what was / wasn't broadcast?
Wrapping forge script calls in other scripts?
How do you manage complexity of environment variables, args, etc? Do you compose smaller scripts into other foundry scripts? Or do you use a separate scripting language?
How do you use the broadcast artifacts?
I've been committing them to my repo (but .gitignoring the local runs), but I'm wondering if there are ways to use these beyond just consulting them to remember what happened when?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I'm interested in the simplicity of pure solidity scripting for deployment and other network calls.
I'm finding myself wondering if I am reinventing the wheel in some cases, and also wondering what is possible more generally. I'd love to see examples of how you all do things (either as responses here or links to great repos).
Examples of what I'm looking for:
Environment variables and
run()
args?I've been pulling in env variables to configure scripts:
But I recently learned about the
cast
-style use of args:Using args makes the scripts composable, so I might switch to that. Any patterns here you've found yourself using?
Key/account management: deployers, hardware wallets, multisigs
I'm currently using a limited deployer private key in an env variable, then transferring ownership. It's not pretty but something like this:
Maybe there's a cleaner way to do this? Also I'd be curious to see how you all are using hardware wallets and/or processes for preparing transactions for contract wallet execution.
Upgrade patterns?
How are you all managing upgrades? Do you have patterns for detecting bytecode changes and deploying idempotently?
Executing on multiple networks?
I'd love to see examples of efficiently executing scripts and deploying with CREATE2 (or CREATE3 with lightweight clone?) across multiple networks.
I'm familiar with the
salt
call option that uses the CREATE2_FACTORY under the hood:Are you managing the salt like a secret? In an env variable or some other way?
Testing scripts?
I've been invoking scripts from tests in
setUp()
in my tests, similar tohardhat-deploy
's fixtures pattern. Should I also be tracking what was / wasn't broadcast?Wrapping forge script calls in other scripts?
How do you manage complexity of environment variables, args, etc? Do you compose smaller scripts into other foundry scripts? Or do you use a separate scripting language?
How do you use the broadcast artifacts?
I've been committing them to my repo (but .gitignoring the local runs), but I'm wondering if there are ways to use these beyond just consulting them to remember what happened when?
Beta Was this translation helpful? Give feedback.
All reactions