Skip to content

Commit

Permalink
fix: token ownership in gateway factory
Browse files Browse the repository at this point in the history
  • Loading branch information
0x31 committed Jun 24, 2021
1 parent 2fdd0dd commit d2f8c3d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions contracts/Gateway/GatewayFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ contract GatewayFactory is Claimable {
uint8 _decimals
) public onlyOwner {
RenERC20LogicV1 token = new RenERC20LogicV1();
MintGatewayLogicV2 gateway = new MintGatewayLogicV2();

token.initialize(
1, // ChainID
owner(), // Token owner
address(gateway), // Token owner
1000000000000000000, // Token rate
"1", // Token version
_name,
_symbol,
_decimals
);

MintGatewayLogicV2 gateway = new MintGatewayLogicV2();
gateway.initialize(
token,
owner(), // Fee recipient
Expand All @@ -50,9 +51,6 @@ contract GatewayFactory is Claimable {
keccak256(abi.encodePacked(_symbol, "/to", chainName))
);

token.transferOwnership(address(gateway));
gateway.claimTokenOwnership();

registry.setGateway(_symbol, address(token), address(gateway));
}

Expand Down

0 comments on commit d2f8c3d

Please sign in to comment.