Add support to create proposals through the OpenZeppelin Defender within a Foundry project


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.

You can check it here:

Looking forward to your feedback!

Hey Gabriel,

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.

Hi @zanbel ,

Thanks for your feedback. Sounds great! Looking forward to giving it a try once it's ready. Best of luck with it!

+1 here, the ability to deploy smart contracts with a Foundry script using a relayer would be very useful, same with proposing upgrades/actions.

Is there an ETA on these features? even approx?


We've made an initial preview available of deployments from Foundry scripts using Defender, see

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 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.

At the moment, the Foundry Upgrades plugin includes support for the following with OpenZeppelin Defender:

  • Deploying upgradeable contracts (proxies and implementations)
  • Deploying non-upgradeable contracts
  • Proposing an upgrade through Defender

You can find the latest documentation here:

@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: , 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 Thanks for the feedback, I've opened to improve the docs to make this clearer.

@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 :slight_smile:

Hope that helps, and thanks for the feedback!