remove getTokens from the factory
This commit is contained in:
@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user