diff --git a/packages/smart-contracts/scripts-create2/constructor-args.ts b/packages/smart-contracts/scripts-create2/constructor-args.ts index 808b10df2..c1ad4e414 100644 --- a/packages/smart-contracts/scripts-create2/constructor-args.ts +++ b/packages/smart-contracts/scripts-create2/constructor-args.ts @@ -76,7 +76,7 @@ export const getConstructorArgs = ( const ethereumFeeProxy = artifacts.ethereumFeeProxyArtifact; const ethereumFeeProxyAddress = ethereumFeeProxy.getAddress(network); - return [ethereumFeeProxyAddress, erc20FeeProxyAddress]; + return [ethereumFeeProxyAddress, erc20FeeProxyAddress, getAdminWalletAddress(contract)]; } default: return []; diff --git a/packages/smart-contracts/scripts-create2/verify.ts b/packages/smart-contracts/scripts-create2/verify.ts index b128b711f..59f42d082 100644 --- a/packages/smart-contracts/scripts-create2/verify.ts +++ b/packages/smart-contracts/scripts-create2/verify.ts @@ -47,7 +47,8 @@ export async function VerifyCreate2FromList(hre: HardhatRuntimeEnvironmentExtend case 'Erc20ConversionProxy': case 'ERC20EscrowToPay': case 'BatchConversionPayments': - case 'ERC20TransferableReceivable': { + case 'ERC20TransferableReceivable': + case 'SingleRequestProxyFactory': { const network = hre.config.xdeploy.networks[0]; EvmChains.assertChainSupported(network); const constructorArgs = getConstructorArgs(contract, network); diff --git a/packages/smart-contracts/src/contracts/SingleRequestProxyFactory.sol b/packages/smart-contracts/src/contracts/SingleRequestProxyFactory.sol index 9d621ab37..441e3739e 100644 --- a/packages/smart-contracts/src/contracts/SingleRequestProxyFactory.sol +++ b/packages/smart-contracts/src/contracts/SingleRequestProxyFactory.sol @@ -34,11 +34,13 @@ contract SingleRequestProxyFactory is Ownable { event ERC20FeeProxyUpdated(address indexed newERC20FeeProxy); event EthereumFeeProxyUpdated(address indexed newEthereumFeeProxy); - constructor(address _ethereumFeeProxy, address _erc20FeeProxy) { + constructor(address _ethereumFeeProxy, address _erc20FeeProxy, address _owner) { require(_ethereumFeeProxy != address(0), 'EthereumFeeProxy address cannot be zero'); require(_erc20FeeProxy != address(0), 'ERC20FeeProxy address cannot be zero'); + require(_owner != address(0), 'Owner address cannot be zero'); ethereumFeeProxy = _ethereumFeeProxy; erc20FeeProxy = _erc20FeeProxy; + transferOwnership(_owner); } /** diff --git a/packages/smart-contracts/test/contracts/SingleRequestProxyFactory.test.ts b/packages/smart-contracts/test/contracts/SingleRequestProxyFactory.test.ts index cf3630e46..707e5db21 100644 --- a/packages/smart-contracts/test/contracts/SingleRequestProxyFactory.test.ts +++ b/packages/smart-contracts/test/contracts/SingleRequestProxyFactory.test.ts @@ -48,6 +48,7 @@ describe('contract: SingleRequestProxyFactory', () => { singleRequestProxyFactory = await SingleRequestProxyFactoryFactory.deploy( ethereumFeeProxy.address, erc20FeeProxy.address, + ownerAddress, ); await singleRequestProxyFactory.deployed();