1
0
forked from mico/idle_moloch

reg price aligned, withdraw refactor

This commit is contained in:
yellow 2024-10-29 19:35:26 +01:00
parent 52aec1ae9d
commit 81170fd8ec

View File

@ -10,7 +10,7 @@ import "../src/Constants.sol";
contract RaidGeld is ERC20, Ownable, Constants { contract RaidGeld is ERC20, Ownable, Constants {
uint256 public constant MANTISSA = 1e4; uint256 public constant MANTISSA = 1e4;
uint256 public constant BUY_IN_AMOUNT = 0.0005 ether; uint256 public constant BUY_IN_AMOUNT = 0.00005 ether;
uint256 public immutable BUY_IN_DAO_TOKEN_AMOUNT; uint256 public immutable BUY_IN_DAO_TOKEN_AMOUNT;
uint256 public constant INITIAL_GELD = 500 * MANTISSA; uint256 public constant INITIAL_GELD = 500 * MANTISSA;
mapping(address => Player) private players; mapping(address => Player) private players;
@ -118,8 +118,7 @@ contract RaidGeld is ERC20, Ownable, Constants {
// Allows the owner to withdraw DAO tokens // Allows the owner to withdraw DAO tokens
function withdraw() external onlyOwner { function withdraw() external onlyOwner {
uint256 amount = daoToken.balanceOf(address(this)); uint256 amount = daoToken.balanceOf(address(this));
daoToken.approve(address(this), amount); daoToken.transfer(owner(), amount);
daoToken.transferFrom(address(this), owner(), amount);
} }
// Manual minting for itchy fingers // Manual minting for itchy fingers