Skip to content

Commit

Permalink
Add migrator field in UniswapV2Factory
Browse files Browse the repository at this point in the history
  • Loading branch information
chefnomi committed Aug 25, 2020
1 parent 4c4bf55 commit fb01d84
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contracts/uniswapv2/UniswapV2Factory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import './UniswapV2Pair.sol';
contract UniswapV2Factory is IUniswapV2Factory {
address public feeTo;
address public feeToSetter;
address public migrator;

mapping(address => mapping(address => address)) public getPair;
address[] public allPairs;
Expand Down Expand Up @@ -42,8 +43,14 @@ contract UniswapV2Factory is IUniswapV2Factory {
feeTo = _feeTo;
}

function setMigrator(address _migrator) external {
require(msg.sender == feeToSetter, 'UniswapV2: FORBIDDEN');
migrator = _migrator;
}

function setFeeToSetter(address _feeToSetter) external {
require(msg.sender == feeToSetter, 'UniswapV2: FORBIDDEN');
feeToSetter = _feeToSetter;
}

}

0 comments on commit fb01d84

Please sign in to comment.