CRuzylo / BlackDiamond

MIT License
0 stars 1 forks source link

BlackDiamond

10% > Reflection / 2% > Liquidity Pool on all transactions.

Based off the SafeMoon fork, UltraSafe, Contract. Removed key vulnerability in SafeMoon contract :

//Locks the contract for owner for the amount of time provided
function lock(uint256 time) public virtual onlyOwner {
    _previousOwner = _owner;
    _owner = address(0);
    _lockTime = now + time;
    emit OwnershipTransferred(_owner, address(0));
}

//Unlocks the contract for owner when _lockTime is exceeds
function unlock() public virtual {
    require(_previousOwner == msg.sender, "You don't have permission to unlock");
    require(now > _lockTime , "Contract is locked until 7 days");
    emit OwnershipTransferred(_owner, _previousOwner);
    _owner = _previousOwner;
}