remove getTokens from the factory

This commit is contained in:
Noah Zinsmeister
2019-12-30 13:30:15 -05:00
parent e98b353c46
commit e9e087c328
4 changed files with 1 additions and 9 deletions

View File

@ -9,7 +9,6 @@ contract UniswapV2Factory is IUniswapV2Factory {
address public feeRecipient;
mapping (address => mapping(address => address)) private _getExchange;
mapping (address => address[2]) private _getTokens;
address[] public exchanges;
event ExchangeCreated(address indexed token0, address indexed token1, address exchange, uint);
@ -29,10 +28,6 @@ contract UniswapV2Factory is IUniswapV2Factory {
return _getExchange[token0][token1];
}
function getTokens(address exchange) external view returns (address token0, address token1) {
return (_getTokens[exchange][0], _getTokens[exchange][1]);
}
function exchangesCount() external view returns (uint) {
return exchanges.length;
}
@ -49,7 +44,6 @@ contract UniswapV2Factory is IUniswapV2Factory {
}
IUniswapV2(exchange).initialize(token0, token1);
_getExchange[token0][token1] = exchange;
_getTokens[exchange] = [token0, token1];
emit ExchangeCreated(token0, token1, exchange, exchanges.push(exchange));
}