Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
@0x/contracts-utils: Add UniswapV2 to DeploymentConstants.
Browse files Browse the repository at this point in the history
  • Loading branch information
merklejerk committed Jun 3, 2020
1 parent 98a99d9 commit 429f2bb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contracts/utils/CHANGELOG.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
{
"note": "Add more solidity 0.6 contracts",
"pr": 2545
},
{
"note": "Add UniswapV2 addresses to `DeploymentConstants`",
"pr": "TODO"
}
]
},
Expand Down
14 changes: 14 additions & 0 deletions contracts/utils/contracts/src/DeploymentConstants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ contract DeploymentConstants {
address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95;
// /// @dev Kovan address of the `UniswapExchangeFactory` contract.
// address constant private UNISWAP_EXCHANGE_FACTORY_ADDRESS = 0xD3E51Ef092B2845f10401a0159B2B96e8B6c3D30;
/// @dev Mainnet address of the `IIUniswapV2Router` contract.
address constant private UNISWAP_V2_ROUTER_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;
// /// @dev Kovan address of the `IIUniswapV2Router` contract.
// address constant private UNISWAP_V2_ROUTER_ADDRESS = 0xf164fC0Ec4E93095b804a4795bBe1e041497b92a;
/// @dev Mainnet address of the Eth2Dai `MatchingMarket` contract.
address constant private ETH2DAI_ADDRESS = 0x794e6e91555438aFc3ccF1c5076A74F42133d08D;
// /// @dev Kovan address of the Eth2Dai `MatchingMarket` contract.
Expand Down Expand Up @@ -93,6 +97,16 @@ contract DeploymentConstants {
return UNISWAP_EXCHANGE_FACTORY_ADDRESS;
}

/// @dev Overridable way to get the `IUniswapV2Router` address.
/// @return uniswapRouterAddress The `IUniswapV2Router` address.
function _getUniswapV2RouterAddress()
internal
view
returns (address uniswapRouterAddress)
{
return UNISWAP_V2_ROUTER_ADDRESS;
}

/// @dev An overridable way to retrieve the Eth2Dai `MatchingMarket` contract.
/// @return eth2daiAddress The Eth2Dai `MatchingMarket` contract.
function _getEth2DaiAddress()
Expand Down

0 comments on commit 429f2bb

Please sign in to comment.