async function devDeployReplicaProxy(
  upgradeBeaconAddress,
  remote,
  isTestDeploy,
) {
  const contractStr = isTestDeploy ? 'TestReplica' : 'Replica';

  // Construct initialize args
  const {
    domain,
    updater,
    currentRoot,
    nextToProcessIndex,
    optimisticSeconds,
  } = remote;
  const proxyInitializeArgs = [
    domain,
    updater,
    currentRoot,
    optimisticSeconds,
    nextToProcessIndex,
  ];

  // Deploy Proxy Contract and initialize
  const {
    proxy,
    proxyWithImplementation,
  } = await optics.deployProxyWithImplementation(
    upgradeBeaconAddress,
    contractStr,
    proxyInitializeArgs,
    'initialize(uint32, address, bytes32, uint256, uint256)',
  );

  const contracts = {
    proxy,
    proxyWithImplementation,
  };

  return contracts;
}
/*
 * Deploy the Replica Proxy which points to the given UpgradeBeacon
 * and "listens" to the given remote chain
 *
 * @param upgradeBeaconAddress - address of the Replica Upgrade Beacon contract
 * @param remote - ChainConfig for the remote chain that the Replica will receive updates from
 * @param isTestDeploy - boolean, true to deploy the test contract, false otherwise
 *
 * @return contracts - UpgradableProxy type
 */
Deploy the Replica Proxy which points to the given UpgradeBeacon
and "listens" to the given remote chain

@param upgradeBeaconAddress - address of the Replica Upgrade Beacon contract
@param remote - ChainConfig for the remote chain that the Replica will receive updates from
@param isTestDeploy - boolean, true to deploy the test contract, false otherwise

@return contracts - UpgradableProxy type
Deploy the Replica Proxy which points to the given UpgradeBeacon and " listens " to the given remote chain @param upgradeBeaconAddress - address of the Replica Upgrade Beacon contract @param remote - ChainConfig for the remote chain that the Replica will receive updates from @param isTestDeploy - boolean true to deploy the test contract false otherwise @return contracts - UpgradableProxy type
async function devDeployReplicaProxy(
  upgradeBeaconAddress,
  remote,
  isTestDeploy,
) {
  const contractStr = isTestDeploy ? 'TestReplica' : 'Replica';
  const {
    domain,
    updater,
    currentRoot,
    nextToProcessIndex,
    optimisticSeconds,
  } = remote;
  const proxyInitializeArgs = [
    domain,
    updater,
    currentRoot,
    optimisticSeconds,
    nextToProcessIndex,
  ];
  const {
    proxy,
    proxyWithImplementation,
  } = await optics.deployProxyWithImplementation(
    upgradeBeaconAddress,
    contractStr,
    proxyInitializeArgs,
    'initialize(uint32, address, bytes32, uint256, uint256)',
  );
  const contracts = {
    proxy,
    proxyWithImplementation,
  };
  return contracts;
}
async function devDeployReplicaProxy ( upgradeBeaconAddress , remote , isTestDeploy , ) { const contractStr = isTestDeploy ? 'TestReplica' : 'Replica' ; const { domain , updater , currentRoot , nextToProcessIndex , optimisticSeconds , } = remote ; const proxyInitializeArgs = [ domain , updater , currentRoot , optimisticSeconds , nextToProcessIndex , ] ; const { proxy , proxyWithImplementation , } = await optics . deployProxyWithImplementation ( upgradeBeaconAddress , contractStr , proxyInitializeArgs , 'initialize(uint32, address, bytes32, uint256, uint256)' , ) ; const contracts = { proxy , proxyWithImplementation , } ; return contracts ; }
Deploy the Replica Proxy which points to the given UpgradeBeacon
 and "listens" to the given remote chain
Deploy the Replica Proxy which points to the given UpgradeBeacon and " listens " to the given remote chain
// Construct initialize args // Deploy Proxy Contract and initialize