Skip to content

Commit

Permalink
add DexAMM constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 5, 2022
1 parent 5d83c6b commit 5faea7c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contracts/SoulFactory.sol
Expand Up @@ -41,15 +41,19 @@ contract SoulFactory is DexAMM, Pausable, AccessControl {
/// @param _defaultStableCoin Default stable coin to pay the fee in (USDC)
/// @param _utilityToken Utility token to pay the fee in ($CORN)
/// @param _reserveWallet Wallet that will receive the fee
/// @param _swapRouter Swap router address
/// @param _wrappedNativeToken Wrapped native token address
constructor(
address owner,
SoulboundIdentity _soulBoundIdentity,
uint256 _mintingIdentityPrice,
uint256 _mintingNamePrice,
address _defaultStableCoin,
address _utilityToken,
address _reserveWallet
) {
address _reserveWallet,
address _swapRouter,
address _wrappedNativeToken
) DexAMM(_swapRouter, _wrappedNativeToken) {
require(_reserveWallet != address(0), "ZERO_ADDRESS");
require(address(_soulBoundIdentity) != address(0), "ZERO_ADDRESS");

Expand Down
13 changes: 13 additions & 0 deletions contracts/dex/DexAMM.sol
Expand Up @@ -18,6 +18,19 @@ abstract contract DexAMM {

/* ========== INITIALIZE ================================================ */

/// @notice Creates a new Dex AMM
/// @dev Creates a new Decentralized automated market maker (AMM) smart contract,
// that will call the Uniswap Router interface
/// @param _swapRouter Swap router address
/// @param _wrappedNativeToken Wrapped native token address
constructor(address _swapRouter, address _wrappedNativeToken) {
require(_swapRouter != address(0), "ZERO_ADDRESS");
require(_wrappedNativeToken != address(0), "ZERO_ADDRESS");

swapRouter = _swapRouter;
wrappedNativeToken = _wrappedNativeToken;
}

/* ========== RESTRICTED FUNCTIONS ====================================== */

/* ========== MUTATIVE FUNCTIONS ======================================== */
Expand Down

0 comments on commit 5faea7c

Please sign in to comment.