Timed out waiting for implementation with custom JsonRpcProvider

I am getting the same error but with a strange behaviour.

I am able to successfully deploy the contracts when I provide --network parameter while running the deploy but if I try to provide setup a JsonRpcNetwork I am getting "Timed out waiting for implementation contract deployment to address"

e.g.

const arbSepoliaProvider = new ethers.JsonRpcProvider("https://sepolia-rollup.arbitrum.io/rpc");

I am able to deploy the Proxy but not the implementation with above custom JsonRpcProvider.

Exact Error:

Run the function again to continue waiting for the transaction confirmation. If the problem persists, adjust the polling parameters with the timeout and pollingInterval options.
    at waitAndValidateDeployment (/Users/hbksagar/bhavish/novastro-contracts/node_modules/@openzeppelin/upgrades-core/src/deployment.ts:239:17)
    at async fetchOrDeployGeneric (/Users/hbksagar/bhavish/novastro-contracts/node_modules/@openzeppelin/upgrades-core/src/impl-store.ts:86:5)
    at async deployImpl (/Users/hbksagar/bhavish/novastro-contracts/node_modules/@openzeppelin/hardhat-upgrades/src/utils/deploy-impl.ts:109:22)
    at async deployProxyImpl (/Users/hbksagar/bhavish/novastro-contracts/node_modules/@openzeppelin/hardhat-upgrades/src/utils/deploy-impl.ts:77:9)
    at async Proxy.deployProxy (/Users/hbksagar/bhavish/novastro-contracts/node_modules/@openzeppelin/hardhat-upgrades/src/deploy-proxy.ts:48:28)
    at async Object.func (/Users/hbksagar/bhavish/novastro-contracts/deploy/001_deployNovastroL2L3Contracts.ts:76:26)
    at async DeploymentsManager.executeDeployScripts (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1212:22)
    at async DeploymentsManager.runDeploy (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1061:5)
    at async SimpleTaskDefinition.action (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/index.ts:450:5)
    at async Environment._runTaskDefinition (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
    at DeploymentsManager.executeDeployScripts (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1215:19)
    at async DeploymentsManager.runDeploy (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1061:5)
    at async SimpleTaskDefinition.action (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/index.ts:450:5)
    at async Environment._runTaskDefinition (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
    at async Environment.run (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
    at async SimpleTaskDefinition.action (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/index.ts:601:32)
    at async Environment._runTaskDefinition (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)
    at async Environment.run (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:191:14)
    at async SimpleTaskDefinition.action (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat-deploy/src/index.ts:690:5)
    at async Environment._runTaskDefinition (/Users/hbksagar/bhavish/novastro-contracts/node_modules/hardhat/src/internal/core/runtime-environment.ts:358:14)

@KRUPA_SAGAR The Hardhat Upgrades plugin uses the provider object from the Hardhat Runtime Environment's network for various purposes such as to check deployment statuses, so you would need to provide the --network parameter in order for it to use the correct network.

Hi @ericglau, Thank you for the response. I have already mentioned that it works with --network parameter. But I am trying to deploy cross-chain contracts within a single deploy script by using multiple providers.

The main concern is I am able to deploy only the proxy contract with the changed provider but while deploying implementation contract I am getting the mentioned error. If I try to deploy only for individual network it works with --network parameter.

P.S: I am using ethers V6.

The plugin does not support connecting to a network without the --network parameter.