-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e2890c
commit f60fbf1
Showing
3 changed files
with
13 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,20 +12,18 @@ import {IERC721} from "@openzeppelin/[email protected]/interfaces/IERC721.sol"; | |
* @dev Adheres to ERC-20 token standard and uses the ERC-4626 tokenized vault interface for bonding curve operations. | ||
*/ | ||
contract Solaxy is ERC20ABC, ISolaxy { | ||
address public immutable FEE_ADDRESS; | ||
UD60x18 public constant SLOPE = UD60x18.wrap(0.0025e18); | ||
UD60x18 public constant HALF_SLOPE = UD60x18.wrap(0.00125e18); | ||
ERC20 public constant SDAI = ERC20(0xaf204776c7245bF4147c2612BF6e5972Ee483701); | ||
address public constant FEE_ACCOUNT = 0xbCFeFea1e83060DbCEf2Ed0513755D049fDE952C; // TODO: fee Address | ||
IERC721 public constant M3TER = IERC721(0xbCFeFea1e83060DbCEf2Ed0513755D049fDE952C); // TODO: M3ter Address | ||
ERC20 public constant SDAI = ERC20(0xaf204776c7245bF4147c2612BF6e5972Ee483701); | ||
UD60x18 public constant HALF_SLOPE = UD60x18.wrap(0.00125e18); | ||
UD60x18 public constant SLOPE = UD60x18.wrap(0.0025e18); | ||
|
||
/** | ||
* @dev Constructs the Solaxy contract, initializing the sDAI token and the fee address. | ||
* @param feeAccount The address where fees will be sent to. | ||
* @dev Constructs the Solaxy contract, checks the sDAI token address and the fee account address. | ||
*/ | ||
constructor(address feeAccount) ERC20("Solaxy", "SLX") ERC20Permit("Solaxy") { | ||
constructor() ERC20("Solaxy", "SLX") ERC20Permit("Solaxy") { | ||
if (address(SDAI) == address(0)) revert CannotBeZero(); | ||
if (feeAccount == address(0)) revert CannotBeZero(); | ||
FEE_ADDRESS = feeAccount; | ||
if (FEE_ACCOUNT == address(0)) revert CannotBeZero(); | ||
} | ||
|
||
/** | ||
|
@@ -310,7 +308,7 @@ contract Solaxy is ERC20ABC, ISolaxy { | |
} | ||
_burn(owner, shares); | ||
|
||
if (!transfer(FEE_ADDRESS, fee)) revert TransferError(); | ||
if (!transfer(FEE_ACCOUNT, fee)) revert TransferError(); | ||
if (!SDAI.transfer(receiver, assets)) revert TransferError(); | ||
emit Withdraw(msg.sender, receiver, owner, assets, shares); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters