Skip to content

Commit

Permalink
implement purchaseIdentityInfo() and purchaseNameInfo()
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 5, 2022
1 parent d3d5518 commit bceb27a
Showing 1 changed file with 22 additions and 6 deletions.
28 changes: 22 additions & 6 deletions contracts/SoulFactory.sol
Expand Up @@ -233,9 +233,17 @@ contract SoulFactory is DexAMM, Pausable, AccessControl {
)
{
priceInStableCoin = mintingIdentityPrice;
// TODO: get swapped price in ETH and $CORN
priceInETH = 0;
priceInUtilityToken = 0;
// get swapped price in ETH and $CORN
priceInETH = estimateSwapAmount(
wrappedNativeToken,
stableCoin,
mintingIdentityPrice
);
priceInUtilityToken = estimateSwapAmount(
utilityToken,
stableCoin,
mintingIdentityPrice
);
}

/// @notice Returns the price of the name minting
Expand All @@ -253,9 +261,17 @@ contract SoulFactory is DexAMM, Pausable, AccessControl {
)
{
priceInStableCoin = mintingNamePrice;
// TODO: get swapped price in ETH and $CORN
priceInETH = 0;
priceInUtilityToken = 0;
// get swapped price in ETH and $CORN
priceInETH = estimateSwapAmount(
wrappedNativeToken,
stableCoin,
mintingNamePrice
);
priceInUtilityToken = estimateSwapAmount(
utilityToken,
stableCoin,
mintingNamePrice
);
}

/* ========== PRIVATE FUNCTIONS ========== */
Expand Down

0 comments on commit bceb27a

Please sign in to comment.