Skip to content

Commit

Permalink
Remove overly cautious checks in claimDomainFunds
Browse files Browse the repository at this point in the history
  • Loading branch information
area committed Sep 26, 2024
1 parent 60923d4 commit c978a65
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions contracts/colonyNetwork/ColonyNetworkDeployer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -270,20 +270,12 @@ contract ColonyNetworkDeployer is ColonyNetworkStorage {
// when it was created via a cross-chain call (to an as-yet unwritten function).
bytes32 salt = getColonyCreationSalt();
// EtherRouter etherRouter = new EtherRouter();
EtherRouter etherRouter = EtherRouter(
payable(
ICreateX(CREATEX_ADDRESS).deployCreate3AndInit(
salt,
type(EtherRouterCreate3).creationCode,
abi.encodeWithSignature("setOwner(address)", (address(this))),
ICreateX.Values(0, 0)
)
)
);
address colonyAddress = deployEtherRouterViaCreateX(salt);

IColony colony = IColony(address(etherRouter));
IColony colony = IColony(colonyAddress);

address resolverForColonyVersion = colonyVersionResolver[_version]; // ignore-swc-107
EtherRouter etherRouter = EtherRouter(payable(colonyAddress));
etherRouter.setResolver(resolverForColonyVersion); // ignore-swc-113

// Creating new instance of colony's authority
Expand Down Expand Up @@ -326,4 +318,18 @@ contract ColonyNetworkDeployer is ColonyNetworkStorage {
DSAuth dsauth = DSAuth(_colonyAddress);
dsauth.setOwner(address(0x0));
}

function deployEtherRouterViaCreateX(bytes32 _salt) internal returns (address) {
EtherRouter etherRouter = EtherRouter(
payable(
ICreateX(CREATEX_ADDRESS).deployCreate3AndInit(
_salt,
type(EtherRouterCreate3).creationCode,
abi.encodeWithSignature("setOwner(address)", (address(this))),
ICreateX.Values(0, 0)
)
)
);
return address(etherRouter);
}
}

0 comments on commit c978a65

Please sign in to comment.