编译器
0.8.20+commit.a1b79de6
文件 1 的 7:Address.sol
pragma solidity ^0.8.1;
library Address {
function isContract(address account) internal view returns (bool) {
return account.code.length > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResult(success, returndata, errorMessage);
}
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 2 的 7:BubsyStaking.sol
pragma solidity 0.8.20;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
modifier nonReentrant() {
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
_status = _ENTERED;
_;
_status = _NOT_ENTERED;
}
}
contract BubsyStaking is Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
address public BUBSY;
uint256 public precisionFactor;
uint256 public undistributedReward;
bool public contractStatus;
bool public rewardStatus;
uint256[3] public poolDuration;
uint256[3] public poolMultiplier;
uint256[3] public BUBSYStaked;
uint256[3] public minStaking;
uint256[3] public rewardPerShare;
uint256[3] public rewardDistributedPerPool;
struct StakingInfo {
uint256 stakedBUBSY;
uint256 startTime;
uint256 endTime;
bool unstaked;
uint256 pool;
uint256 rewardClaimed;
uint256 claimedETH;
uint256 rewardUnclaimed;
}
mapping(address => mapping(uint256 => StakingInfo)) public mapStakingInfo;
mapping(address => uint256) public stakingCount;
mapping(address => bool) public isWhitelistForSendFund;
event Staked(address staker, uint256 amount);
event Unstaked(address staker, uint256 amount, uint256 reward);
event PoolUpdated(uint256 amount);
event RewardClaimed(address staker, uint256 amount);
event ContractStatusUpdated(bool status);
event RewardStatusUpdated(bool status);
event PoolDurationUpdated(uint256 pool1, uint256 pool2, uint256 pool3);
event PoolMultiplierUpdated(uint256 pool1Multiplier, uint256 pool2Multiplier, uint256 pool3Multiplier);
event WhitelistStatusUpdated(address wallet, bool status);
event ETHRescueFromContract(address receiver, uint256 amount);
constructor(address _owner) {
require(_owner != address(0), "Owner:: zero address");
minStaking = [1 * 10**18, 1 * 10**18, 1 * 10**18];
poolDuration = [15 days, 90 days, 365 days];
poolMultiplier = [100, 125, 200];
BUBSY = address(0xD699B83e43415B774B6ed4ce9999680F049aF2ab);
precisionFactor = 1 * 10**18;
_transferOwnership(address(_owner));
}
receive() external payable {}
function updateContractStatus(bool status) external onlyOwner {
require(contractStatus != status, "Same status already active");
contractStatus = status;
emit ContractStatusUpdated(status);
}
function updateRewardStatus(bool status) external onlyOwner {
require(rewardStatus != status, "Same status already active");
rewardStatus = status;
if(rewardStatus && undistributedReward > 0)
{
_distributeReward(undistributedReward);
undistributedReward = 0;
}
emit RewardStatusUpdated(status);
}
function updatePoolDuration(uint256[3] calldata newPoolDuration) external onlyOwner {
require(newPoolDuration[0] > 0 && newPoolDuration[1] > 0 && newPoolDuration[2] > 0, "Staking duration is not correct");
poolDuration[0] = newPoolDuration[0];
poolDuration[1] = newPoolDuration[1];
poolDuration[2] = newPoolDuration[2];
emit PoolDurationUpdated(newPoolDuration[0], newPoolDuration[1], newPoolDuration[2]);
}
function updatePoolMultiplier(uint256[3] calldata newMultiplier) external onlyOwner {
require(newMultiplier[0] > 0 && newMultiplier[1] > 0 && newMultiplier[2] > 0, "Pool multiplier amount is not correct");
poolMultiplier[0] = newMultiplier[0];
poolMultiplier[1] = newMultiplier[1];
poolMultiplier[2] = newMultiplier[2];
emit PoolMultiplierUpdated(newMultiplier[0], newMultiplier[1], newMultiplier[2]);
}
function whitelistFundWallet(address wallet, bool status) external onlyOwner {
require(address(wallet) != address(0), "Zero address");
require(isWhitelistForSendFund[address(wallet)] != status, "Wallet is already the value of 'status'");
isWhitelistForSendFund[address(wallet)] = status;
emit WhitelistStatusUpdated(address(wallet), status);
}
function rescueETH(address receiver, uint256 amount) external onlyOwner {
require(address(receiver) != address(0), "Zero address");
require(address(this).balance >= amount, "Insufficient ETH balance in contract");
payable(address(receiver)).transfer(amount);
emit ETHRescueFromContract(address(receiver), amount);
}
function stake(uint256 amount, uint256 pool) external {
require(contractStatus, "Contract is not enabled");
require(IERC20(BUBSY).balanceOf(address(msg.sender)) >= amount, "Balance not available for staking");
require(poolDuration.length > pool, "Staking pool is not correct");
require(amount >= minStaking[pool], "Stake amount is less than required amount");
uint256 count = stakingCount[address(msg.sender)];
IERC20(BUBSY).safeTransferFrom(address(msg.sender), address(this), amount);
BUBSYStaked[pool] += amount;
stakingCount[address(msg.sender)] += 1;
mapStakingInfo[address(msg.sender)][count].stakedBUBSY = amount;
mapStakingInfo[address(msg.sender)][count].startTime = block.timestamp;
mapStakingInfo[address(msg.sender)][count].endTime = block.timestamp + poolDuration[pool];
mapStakingInfo[address(msg.sender)][count].pool = pool;
mapStakingInfo[address(msg.sender)][count].rewardClaimed = (amount * rewardPerShare[pool]) / precisionFactor;
emit Staked(address(msg.sender), amount);
}
function unstake(address staker, uint256 count) external onlyOwner nonReentrant {
require(mapStakingInfo[address(staker)][count].unstaked == false, "Staking already unstaked");
require(stakingCount[address(staker)] > count, "Staking not found");
uint256 pending = pendingReward(address(msg.sender), count);
uint256 amount = mapStakingInfo[address(msg.sender)][count].stakedBUBSY;
uint256 pool = mapStakingInfo[address(msg.sender)][count].pool;
BUBSYStaked[pool] -= amount;
mapStakingInfo[address(msg.sender)][count].unstaked = true;
mapStakingInfo[address(msg.sender)][count].rewardUnclaimed = pending;
IERC20(BUBSY).safeTransfer(address(msg.sender), amount);
emit Unstaked(address(msg.sender), amount, pending);
}
function unstake(uint256 count) external nonReentrant {
require(contractStatus, "Contract is not enabled");
require(mapStakingInfo[address(msg.sender)][count].unstaked == false, "Staking already unstaked");
require(mapStakingInfo[address(msg.sender)][count].endTime <= block.timestamp, "Staking time is not over");
require(stakingCount[address(msg.sender)] > count, "Staking not found");
uint256 pending = pendingReward(address(msg.sender), count);
uint256 amount = mapStakingInfo[address(msg.sender)][count].stakedBUBSY;
uint256 pool = mapStakingInfo[address(msg.sender)][count].pool;
BUBSYStaked[pool] -= amount;
mapStakingInfo[address(msg.sender)][count].unstaked = true;
if(pending > 0 && address(this).balance >= pending)
{
payable(address(msg.sender)).transfer(pending);
mapStakingInfo[address(msg.sender)][count].claimedETH += pending;
}
IERC20(BUBSY).safeTransfer(address(msg.sender), amount);
emit Unstaked(address(msg.sender), amount, pending);
}
function claimReward(uint256 count) external nonReentrant{
require(stakingCount[address(msg.sender)] > count, "Staking not found");
require(contractStatus, "Contract is not enabled");
uint256 pending = pendingReward(address(msg.sender), count);
if(pending > 0 && address(this).balance >= pending)
{
payable(address(msg.sender)).transfer(pending);
uint256 pool = mapStakingInfo[address(msg.sender)][count].pool;
uint256 amount = mapStakingInfo[address(msg.sender)][count].stakedBUBSY;
mapStakingInfo[address(msg.sender)][count].rewardClaimed = (amount * rewardPerShare[pool]) / precisionFactor;
mapStakingInfo[address(msg.sender)][count].claimedETH += pending;
emit RewardClaimed(address(msg.sender), pending);
}
}
function pendingReward(address staker, uint256 count) public view returns (uint256) {
if(mapStakingInfo[address(staker)][count].stakedBUBSY > 0 && !mapStakingInfo[address(staker)][count].unstaked && stakingCount[address(staker)] > count)
{
uint256 pool = mapStakingInfo[address(staker)][count].pool;
uint256 amount = mapStakingInfo[address(staker)][count].stakedBUBSY;
uint256 claimed = mapStakingInfo[address(staker)][count].rewardClaimed;
uint256 pending = ((amount * rewardPerShare[pool]) / precisionFactor) - (claimed);
return pending;
}
else
{
return 0;
}
}
function updatePool() external payable nonReentrant {
require(isWhitelistForSendFund[address(msg.sender)], "Sender is not whitelisted for add fund");
if(rewardStatus)
{
_distributeReward(msg.value);
}
else
{
undistributedReward += msg.value;
}
emit PoolUpdated(msg.value);
}
function _distributeReward(uint256 amount) internal {
uint256 pool0StakedBUBSY = ((BUBSYStaked[0] * poolMultiplier[0]) / 100);
uint256 pool1StakedBUBSY = ((BUBSYStaked[1] * poolMultiplier[1]) / 100);
uint256 pool2StakedBUBSY = ((BUBSYStaked[2] * poolMultiplier[2]) / 100);
uint256 totalStakedBUBSY = (pool0StakedBUBSY + pool1StakedBUBSY + pool2StakedBUBSY);
if(totalStakedBUBSY > 0)
{
uint256 pool0Share = ((amount * pool0StakedBUBSY) / totalStakedBUBSY);
uint256 pool1Share = ((amount * pool1StakedBUBSY) / totalStakedBUBSY);
uint256 pool2Share = amount - pool0Share - pool1Share;
rewardPerShare[0] += ((pool0Share * precisionFactor) / BUBSYStaked[0]);
rewardPerShare[1] += ((pool1Share * precisionFactor) / BUBSYStaked[1]);
rewardPerShare[2] += ((pool2Share * precisionFactor) / BUBSYStaked[2]);
rewardDistributedPerPool[0] += pool0Share;
rewardDistributedPerPool[1] += pool1Share;
rewardDistributedPerPool[2] += pool2Share;
}
else
{
undistributedReward += amount;
}
}
}
文件 3 的 7:Context.sol
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
文件 4 的 7:IERC20.sol
pragma solidity ^0.8.0;
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
文件 5 的 7:Ownable.sol
pragma solidity ^0.8.0;
import "../utils/Context.sol";
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
modifier onlyOwner() {
_checkOwner();
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
文件 6 的 7:SafeERC20.sol
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
function _callOptionalReturn(IERC20 token, bytes memory data) private {
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
文件 7 的 7:draft-IERC20Permit.sol
pragma solidity ^0.8.0;
interface IERC20Permit {
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
function nonces(address owner) external view returns (uint256);
function DOMAIN_SEPARATOR() external view returns (bytes32);
}
{
"compilationTarget": {
"contracts/BubsyStaking.sol": "BubsyStaking"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"ContractStatusUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHRescueFromContract","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pool1","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pool2","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pool3","type":"uint256"}],"name":"PoolDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pool1Multiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pool2Multiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"pool3Multiplier","type":"uint256"}],"name":"PoolMultiplierUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PoolUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"RewardStatusUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"Unstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"WhitelistStatusUpdated","type":"event"},{"inputs":[],"name":"BUBSY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"BUBSYStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelistForSendFund","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"mapStakingInfo","outputs":[{"internalType":"uint256","name":"stakedBUBSY","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bool","name":"unstaked","type":"bool"},{"internalType":"uint256","name":"pool","type":"uint256"},{"internalType":"uint256","name":"rewardClaimed","type":"uint256"},{"internalType":"uint256","name":"claimedETH","type":"uint256"},{"internalType":"uint256","name":"rewardUnclaimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minStaking","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"precisionFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardDistributedPerPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardPerShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"pool","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"stakingCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"undistributedReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"staker","type":"address"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"updateContractStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"newPoolDuration","type":"uint256[3]"}],"name":"updatePoolDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"newMultiplier","type":"uint256[3]"}],"name":"updatePoolMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"status","type":"bool"}],"name":"updateRewardStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"whitelistFundWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]