Deploying upgradable contracts using relayers

Is it possible to deploy a UUPS upgradable contract using Open Zeppelin relayers? I'm having some trouble figuring this out.

const { DefenderRelayProvider, DefenderRelaySigner } = require('defender-relay-client/lib/ethers');
const { ethers, upgrades } = require('hardhat');

async function main() {
  const credentials = {apiKey: process.env.RELAYER_KEY, apiSecret: process.env.RELAYER_SECRET};

  const provider = new DefenderRelayProvider(credentials);
  const relaySigner = new DefenderRelaySigner(credentials, provider, { speed: 'fast' });

  const TestCoin = await ethers.getContractFactory('TestCoin', relaySigner);
  const testCoin = await upgrades.deployProxy(
    TestCoin, [], { kind: 'uups' }
  ).then((f: { deployed: () => any; }) => f.deployed());
  console.log(`TestCoin: ${testCoin.address}`);

if (require.main === module) {
  main().then(() => process.exit(0))
    .catch(error => { console.error(error); process.exit(1); });

This fails for me on running.

Error: Timed out waiting for implementation contract deployment to address X with transaction Y

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.

The failed transaction Y mentioned in the error above actually succeeded and is shown on etherscan.

I tried adding timeout and pollingInterval options but it just hangs indefinitely. I'm not sure what I'm doing wrong. Any pointers? I was using the Ropsten testnet.

I tried today with a infura signer and it worked fine. Not sure what the issue is with using a relayer as a signer :slightly_frowning_face:

Found the issue. The relayer was on ropsten but when I was running the deploy script I wasn't passing in the --network parameter pointing to ropsten.