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

feat: foundry support for missing test and deployment script #45

Merged
merged 3 commits into from
Oct 17, 2024

Conversation

petrovska-petro
Copy link
Collaborator

No description provided.

solc = '0.8.25'

[fmt]
ignore = ['./contracts/**/*']
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@note here i'm opting to avoid linting the contracts all together. it can be something to consider tho once all issues/prs are close

@petrovska-petro petrovska-petro marked this pull request as ready for review October 11, 2024 17:00
@petrovska-petro
Copy link
Collaborator Author

it covers the test for the factory and reverts that were uncovered initially and we touched upon in the issues. Also it includes scripts for deployment to run a dry run for testing purposes and a multichain script which will deploy at once in all target chains.

for running the tests: forge test (also make sure you got in your .env the polygon rpc)

for running the scripts you can use the make command as following:

make deployMultiChainDry or,
make deployPolygonDry

similarly for the actual broadcasting and verification of contracts, before triggering those make sure that you have set properly all the vars in the .env file


// @note the array can be updated depending on your target chains to deploy
// @note by default the script will deploy in all chains available in the toml file
Chains[] memory targetDeploymentChains = new Chains[](6);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here you can target the specifics chains which you will like to deploy at once, remove as you may see fit, but also remember to adapt the length of the array

forge script foundry_scripts/InjectorInfraMultiChainDeployment.s.sol \
--rpc-url polygon \
--slow \
-- multi \
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@note here that this flag --multi it is for multichain deployments

--multi
          If present, --resume or --verify will be assumed to be a multi chain
          deployment

@Tritium-VLK
Copy link
Member

Tritium-VLK commented Oct 15, 2024

@petrovska-petro LGTM. Let's go ahead and merge this + #46 , then lint (feel free to do so), and if we are finished wrap it up and I can go ahead and deploy.

We've already deployed a test version to AVAX for the team to get a feel for it.
https://snowtrace.io/address/0x01b1ECB65125E12BCB22614504526F328e0c060b/contract/43114/writeContract?chainid=43114

Not the very most recent version, but after all functional changes.

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