Skip to content

Commit

Permalink
feat: adding BCoWHelper to deployment script and registry
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed Jul 23, 2024
1 parent de2e91d commit e8d7a34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pragma solidity 0.8.25;

import {BCoWFactory} from 'contracts/BCoWFactory.sol';
import {BCoWHelper} from 'contracts/BCoWHelper.sol';
import {BFactory} from 'contracts/BFactory.sol';
import {IBFactory} from 'interfaces/IBFactory.sol';

Expand Down Expand Up @@ -36,5 +37,7 @@ contract DeployBCoWFactory is DeployBaseFactory {
solutionSettler: _bCoWFactoryDeploymentParams.settlement,
appData: _bCoWFactoryDeploymentParams.appData
});

new BCoWHelper(address(bFactory));
}
}
7 changes: 7 additions & 0 deletions script/Registry.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pragma solidity 0.8.25;

import {BCoWFactory} from 'contracts/BCoWFactory.sol';
import {BCoWHelper} from 'contracts/BCoWHelper.sol';
import {BFactory} from 'contracts/BFactory.sol';

import {Params} from 'script/Params.s.sol';
Expand All @@ -12,17 +13,23 @@ abstract contract Registry is Params {
BFactory public bFactory;
/// @notice Balancer CoW Pool Factory
BCoWFactory public bCoWFactory;
/// @notice Balancer CoW Helper
BCoWHelper public bCoWHelper;

constructor(uint256 chainId) Params(chainId) {
// TODO: redeploy
if (chainId == 1) {
// Ethereum Mainnet
bFactory = BFactory(0xaD0447be7BDC80cf2e6DA20B13599E5dc859b667);
bCoWFactory = BCoWFactory(0x21Cd97D70f8475DF3d62917880aF9f41D9a9dCeF);
bCoWHelper = BCoWHelper(0xE50481D88f147B8b4aaCdf9a1B7b7bA44F87823f);
} else if (chainId == 11_155_111) {
// Ethereum Sepolia [Testnet]
bFactory = BFactory(0x2bfA24B26B85DD812b2C69E3B1cb4C85C886C8E2);
bCoWFactory = BCoWFactory(0xe8587525430fFC9193831e1113a672f3133C1B8A);
bCoWHelper = BCoWHelper(0x0fd365F9Ed185512536E7dbfc7a8DaE43cD3CA09);
} else {
// TODO: add Gnosis chain
revert('Registry: unknown chain ID');
}
}
Expand Down

0 comments on commit e8d7a34

Please sign in to comment.