-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Modify Test Setup to use op-deployer
rather than Deploy.s.sol
(OPCM - Upgrade 13)
#13331
Comments
I am generally not in favor of reading in the state from a json file for the solidity unit tests. This is going to cause a massive devex headache, needing to regenerate the state dump before every little test. This is going to surprise solidity developers as its a very non standard flow. The abstractions should be set up so that whatever solidity file |
I tend to agree that resorting to FFI to call a go util is poor devex. Something that I'm starting to land on that might be a good middle ground: My thinking is that So what we can do is implement similar logic in solidity, which handles those scripts in a similar way by:
This keeps the deploy/upgrade dev fully in solidity, while making it safe and easy to add new bootstrap commands. |
It could be way less work than it is to implement similar logic in solidity |
I don't think the Solidity should call out to OP Deployer at all. Instead, we should compose the various scripts that OP Deployer uses under the hood to create networks for the purpose of testing. |
op-deployer
rather than Deploy.s.sol
op-deployer
rather than Deploy.s.sol
(Upgrade 12)
op-deployer
rather than Deploy.s.sol
(Upgrade 12)op-deployer
rather than Deploy.s.sol
(Upgrade 13)
op-deployer
rather than Deploy.s.sol
(Upgrade 13)op-deployer
rather than Deploy.s.sol
(OPCM - Upgrade 13)
In order to standardize on the use of
op-deployer
for deployment, we should enshrine in our test setup as the method for deploying contracts.The invocation of
op-deployer
could be done in one of two ways:just test
command.Deploy.s.sol
.My instinct is that the first will be cleaner.
Either way, the deployed contracts will then need to be saved by reading from the resulting
state.json
file created byop-deployer
, and writing to thedeploymentOutFile
.If the first option is chosen, then it should be possible to generate the
deploymentOutfile
usingjq
directly.Otherwise that work will need to be done using forge-std's json parsing and fs utilities. An example of the latter approach (solidity driven), can be seen in #13323.
The text was updated successfully, but these errors were encountered: