Skip to content

Commit

Permalink
refactor: prepare SingleRequestFactory for deployment with Request …
Browse files Browse the repository at this point in the history
…Deployer (#1473)
  • Loading branch information
aimensahnoun authored Oct 22, 2024
1 parent 0abba7f commit 66a6e15
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 [];
Expand Down
3 changes: 2 additions & 1 deletion packages/smart-contracts/scripts-create2/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ describe('contract: SingleRequestProxyFactory', () => {
singleRequestProxyFactory = await SingleRequestProxyFactoryFactory.deploy(
ethereumFeeProxy.address,
erc20FeeProxy.address,
ownerAddress,
);
await singleRequestProxyFactory.deployed();

Expand Down

0 comments on commit 66a6e15

Please sign in to comment.