Error when attempting to deploy - upgrade approval process not found

I run through all of the steps on Defender Deploy and this is what I get:

gerald@gk-hardhat:~/deploy-tutorial$ npx hardhat run --network sepolia scripts/deploy.ts
DefenderApiResponseError: Request failed with status code 400
    at rejectWithDefenderApiError (/home/gerald/deploy-tutorial/node_modules/@openzeppelin/defender-sdk-base-client/lib/api/api.js:10:27)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Axios.request (/home/gerald/deploy-tutorial/node_modules/axios/lib/core/Axios.js:40:14)

Can you help me get this contract deployed?

Can anyone help? Please?

BUMP. Can anyone help? Please.

Adding picture to help.

Hi @iamgk3 , can you ensure that you have a Default Upgrade Approval Process set for your Sepolia environment, according to the Environment Setup steps of the tutorial?

For example, when you click Configure in your Test Environment, it should look something like this:

There are no instructions on this page for Default Upgrade Approval Process. Securely deploy and upgrade a smart contract - OpenZeppelin Docs

So how should I set that up?

It's in step 5 when creating the environment, but since you already have the environment created, you would need to create an approval process from Manage > Approval Processes > Create Approval Process, using type Multisig:

Then go back to your Test Environment Configuration, and set the newly created approval process as the Default Upgrade Approval Process.

OK, were do I get these two addresses from?

The first address should be your (Gnosis) Safe address from this step: https://docs.openzeppelin.com/defender/v2/tutorial/deploy#safe_wallet

The second address should be one of the addresses that owns the Safe.

Please go through these steps as you are having me do…it does NOT ADD UP…when you aren’t an expert in this field. I see no where in the documentation link you just sent me where GNOSIS is mentioned.

As you can see, I am on this page and there is no mention of GNOSIS.

The proper term should be "Safe wallet". I was referring to the following steps:

In step 3 of this screenshot, that address is your Safe wallet address. Specify that address as your Multisig address.

In step 2 of this screenshot, when you followed the steps to "Create new account" on Safe app, you added 1 or more addresses to be owners of the Safe. Specify 1 of those addresses as the "Multisig Sender Address".

OK, here is a video of me trying to accomplish this…from here you can see I cannot add the default upgrade approval. I add, save, close out, re-open, and the upgrade approval does not save.

https://drive.google.com/file/d/1seovzPXdW_iYma-_L7TJvtNpurwdrhGT/view?usp=sharing

Hi @iamgk3 I'm with the Defender Support team. Thank you for providing us with this video! Could you please provide your account's tenantId so I can look into this issue further?

Here is our tenant ID: ccb00a42-92d2-4efc-96b6-a775cb48d114

I will say, I deleted the relays I set up…thinking I had done it all wrong, but I followed instructions…Instructions just aren’t very clear.

Please help!

Gotcha, from the video it appears that you set up everything correctly. Unfortunately, I won't be able to confirm this as the records were deleted. However, I will say it looks like there's some UI bug that is making it seem as though something is broken. Please try going through those steps again and then using the deploy function from the tutorial and let me know if the deploy worked as expected.

Now I am getting this when I try to deploy the contract, after completing removing the relays and approval process, recreating them:

gerald@gk-hardhat:~$ cd deploy-tutorial

gerald@gk-hardhat:~/deploy-tutorial$ npx hardhat run --network sepolia scripts/deploy.ts

NotAuthorizedException: Incorrect username or password.

at /home/gerald/deploy-tutorial/node_modules/amazon-cognito-identity-js/lib/Client.js:128:19

at processTicksAndRejections (node:internal/process/task_queues:95:5) {

code: 'NotAuthorizedException'

}

gerald@gk-hardhat:~/deploy-tutorial$

Then I invoke command as “su” and this is what I get:

gerald@gk-hardhat:~/deploy-tutorial$ sudo su

root@gk-hardhat:/home/gerald/deploy-tutorial# npx hardhat run --network sepolia scripts/upgrade.ts

Error HH601: Script scripts/upgrade.ts doesn't exist.

HardhatError: HH601: Script scripts/upgrade.ts doesn't exist.

at SimpleTaskDefinition.action (/home/gerald/deploy-tutorial/node_modules/hardhat/src/builtin-tasks/run.ts:25:15)

at async Environment._runTaskDefinition (/home/gerald/deploy-tutorial/node_modules/hardhat/src/internal/core/runtime-environment.ts:359:14)

at async Environment.run (/home/gerald/deploy-tutorial/node_modules/hardhat/src/internal/core/runtime-environment.ts:192:14)

at async main (/home/gerald/deploy-tutorial/node_modules/hardhat/src/internal/cli/cli.ts:323:7)

root@gk-hardhat:/home/gerald/deploy-tutorial#

Hi @iamgk3 the NotAuthorizedException: Incorrect username or password error is commonly associated with incorrect API keys or API Secrets. Please ensure that these have been updated in your new deploy instance.