I was searching for way to create proposals (e.g. upgrade proposals) that require approval from a multisig wallet through the OpenZeppelin Defender on a Foundry project but couldn't find anything out there.
Opened an issue on the openzeppelin-foundry-upgrades, as I thought that's the best place to add it, with two examples of how it's currently integrated on a Hardhat project.
Thanks for submitting the issue in the Github repo. Similar to what is currently supported for Hardhat, which I see you're already using based on the links provided, we will be looking to add the option to deploy and upgrade through Defender shortly.
This is limited at the moment to non-upgradeable contracts without constructor arguments, but we will be adding enhancements soon to expand upon this. Any feedback would be welcome.
Very interested in hearing the latest state of Defender integration with Foundry and Solidity scripting via the openzeppelin-foundry-upgrades library.
During my attempt to deploy via Defender from a basic Foundry project, the UUPS proxy example code from the DEFENDER.md page results in NotAuthorizedException auth errors, despite API keys being passed via .env, or sourced into the local shell. (I suppose this could be its own Github issue). At the very least more documentation addressing Foundry use and examples would be beneficial.
@excalq-thr For the auth error that you are encountering, ensure you are using an API key that allows deployments. Follow the Environment Setup steps here: https://docs.openzeppelin.com/defender/v2/tutorial/deploy#environment_setup , and use the API key and secret that you get from those steps. The rest of that tutorial is for Hardhat, but we are looking into adding similar tutorial content for Foundry.
Looks like my issue was using the relayer's API keys, rather than those of the "Test Environment". (It'd be nice to have multiple test environments, as the original API secret was no longer available.)
The term "Team API Key" is used for both the Environment API and the global API, adding somewhat to the confusion.
@excalq-thr Deployment envs API keys are just like any other Team API key, they are generated during the deploy environment creation wizard for convenience, but you can go and generate a new one under Team API keys and it will work the same, just make sure to include deployment permissions
About docs, we definitely should improve the documentation about this