I am attempting a proposal upgrade and it seems like the documentation here https://docs.openzeppelin.com/defender/v1/guide-upgrades is grossly out of date, I was able to figure out the changes to the upgrades object in hardhat but I keep hitting the following error.
DefenderApiResponseError: Request failed with status code 403
request: { path: '/deployment/deployments', method: 'POST' },
response: {
status: 403,
statusText: 'Forbidden',
data: { Message: 'User is not authorized to access this resource' }
}
Environment
Details
The defender/platform key and secret is correctly gotten from OpenZeppelin's defender interface and I'm not sure if private key is required to run the script but the private key is the same as the deployer private key. The proxyAdmin and proxy have also had their ownership transferred to a MultiSig.
Code to reproduce
const { upgrades, platform } = require("hardhat");
async function main() {
const proxyAddress = process.env.CONTRACT;
const Vault = await ethers.getContractFactory("Vault");
console.log("Preparing proposal...");
const proposal = await platform.proposeUpgrade(proxyAddress, Vault, {
description: "Proposing upgrade using multisig",
multisig: process.env.MULTISIG,
multisigType: 'Gnosis Safe',
title: "Optional title here",
});
console.log("Upgrade proposal created at:", proposal.url);
}
main()
.then(() => process.exit(0))
.catch(error => {
console.error(error);
process.exit(1);
})