Contract 0xB058057bd93B38BB55092e84775967cE8BA8d78D 2

 
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2a9f025a1bc395865550c69ec9a96a111a9d2f496c30908d7c307b6742f267d7Deposit119721802021-10-21 18:51:1310 mins ago0x3f6ae5501939bf3745f09522cb3f9d6451f4224d IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00044829
0x68d5c2e023816b2ea6f7a351d200ceb499be5306acb19b21d3b827c926b2814dClaim119721142021-10-21 18:47:5514 mins ago0x47eac3fb0ae8615a0f6310379df752e925bd77b8 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0x3ee97887bbeac4c1780669a2dcaef261507db7a15cb83a8ae5ec76828603de0bClaim119720992021-10-21 18:47:1014 mins ago0x3f6ae5501939bf3745f09522cb3f9d6451f4224d IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0xe9704b3e51547d47eb00f06a4c9e7364f4cb43cae47a1dd64027226c6d00de67Claim119709892021-10-21 17:51:401 hr 10 mins ago0x2c2e84b3bdf6c4d4a8232bd6c5006484b0dce81b IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00136541
0xdbc09b71212b1785134ff5cf2c0d5b5e419179e1e22483b3c9af754633e069c7Deposit119707692021-10-21 17:40:401 hr 21 mins ago0xa069f2204cab4862c861925ad40b113d158a5e2f IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00044835
0x18addda1b9b10970257db22b907248dff3f5fce78ce7a6d5fe5a5677aa0f10e9Deposit119703572021-10-21 17:19:471 hr 42 mins ago0x7e054f9d2ed69d5ef45d4c912f64c40076181152 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00037335
0xb72b2a06353b82896f6ef3325d510bce81f446b04aaed157781f7887a24ded2dClaim119702892021-10-21 17:16:231 hr 45 mins ago0xa069f2204cab4862c861925ad40b113d158a5e2f IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00136541
0xf9bd06e1b32f0fc0b7af7ad0a5d22185661719a2da98617a08ee7d7a6fb75ce9Claim119700942021-10-21 17:06:381 hr 55 mins ago0xdbec81b4eab0b5234dbd9ff7c456bf750d7a9086 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0x2fbe4de1a90bf13471d59234c50288d01373e4451799dcc3b75f93814d8658ffClaim119700162021-10-21 17:02:441 hr 59 mins ago0xfcd76d7929dcb381c47d2f162e7d264a36861c63 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00136541
0x1c60aed81bab99ef655a9cd8c7e798a95fe808fcb4769505de61d410e436abd9Claim119698862021-10-21 16:56:142 hrs 5 mins ago0x66e086c039c5ef99e6789d68baf9e200c06ecd85 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00136541
0x0740ee57488a141550758322f73fa7c97e64c46f1f77fca6bf969838d9e15e9dClaim119692312021-10-21 16:23:102 hrs 38 mins ago0x701e6fd0d200a9914420d11744381b2fc291320a IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00136541
0x8229fd70b1aa2476436a4ade533529ef5740cf5ab3a03f2ebfa96f39dce95217Claim119691362021-10-21 16:18:252 hrs 43 mins ago0x9296860be849ff833014cdb95f9b9427bb58139f IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0x59cddd7665c5caf13c410fdf16df612157034a363f85fd2890b2510d1f38f353Claim119690102021-10-21 16:12:072 hrs 49 mins ago0xfc56fb18ae3b89729624799bd06c303a55cb9a11 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0xe0bf53aa5cd0d254c0452b16a84b9466d52ef9ef8ef78d37431d06cd767bb44dDeposit119689422021-10-21 16:08:432 hrs 53 mins ago0x7e054f9d2ed69d5ef45d4c912f64c40076181152 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00037329
0x1b5db9d40f6c3e0f9851d5393df67df27f4cf3589b0fcdb8dba6192c18b386ceClaim119681492021-10-21 15:27:063 hrs 34 mins ago0x1a8fd7df93a2d2b0c7322729d7f6c2400129284e IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0x1adf86a5a2f35157217a8da430edb7340128c46b98217f6bf52a1af0a5682d67Deposit119673602021-10-21 14:46:424 hrs 15 mins ago0xbc037ef9bf0d1088602a2a8833a6567306af02e5 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00044829
0x29097435fea53e48eaa480d19fbdad95c923c8716b02fd9ca2ef3d680d9596a6Claim119672862021-10-21 14:43:004 hrs 19 mins ago0xbc037ef9bf0d1088602a2a8833a6567306af02e5 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00136541
0xcc2c90f3a67eac4db214f08c7caba0af1dc6da97a9294016e1c2fd2cac08c68aClaim119665592021-10-21 14:02:194 hrs 59 mins ago0xcbbe075a84604c84381a4929df42d12e75422aab IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.001348495
0x144d424306c74e911e1aa27cac637c7a622465d8d94b1d14fd977ac27c5c6a69Deposit119665492021-10-21 14:01:475 hrs ago0x94600a92aee474358d18741e9d8d9fed2209b979 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00048447
0xd40412e8350619130fb93af8d6400ba7f78b52ce256b7d393f82c13f66fa0c1fClaim119664462021-10-21 13:55:455 hrs 6 mins ago0x8cc904b15ccff28bf9a112c26243b0dcdf777b6f IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0x3060214b1c9a563d288cd9d6b937f782d5644df884467e49cace2cd4d39a166dClaim119657592021-10-21 13:18:425 hrs 43 mins ago0xa7f95397d4df35f6b7f4536cf3e9e0b26c6320b6 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0xa849c12b5196da13e585f94f25a2b8e095543de4380fa913d4b6b3f28e4f46d1Deposit119654292021-10-21 12:59:496 hrs 2 mins ago0x856a03179f04a2c027d50ed4bcf8f823e00e9e15 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00037329
0x6a4639388abb1bd05efcf632d1b6436746199f4c29a32261cb3de4a56c2c5c84Claim119650422021-10-21 12:40:276 hrs 21 mins ago0xd0e07a4a1d4375a2e13c17c858c48b5e8f7627e0 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0x4888181cc3fc7690583c4006bafdc5cc8ef6aaf58f22b374901e785e365b3c3eClaim119647942021-10-21 12:28:026 hrs 34 mins ago0x4909d663806994ce0d02c7d222028b5c77946847 IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
0xca2c3d84e6ec6bf5906315b7c07caa4a7753b0f0512d839208c7fc52be22ed21Claim119644972021-10-21 12:13:116 hrs 48 mins ago0x9296860be849ff833014cdb95f9b9427bb58139f IN  0xb058057bd93b38bb55092e84775967ce8ba8d78d0 BNB0.00141941
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TrustPadStaking

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 6 : TrustPadStaking.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

contract TrustPadStaking is Ownable {
    using SafeERC20 for IERC20;

    struct UserInfo {
        uint256 amount;
        uint256 rewardDebt;
        uint256 pendingRewards;
    }

    struct PoolInfo {
        IERC20 stakingToken;
        uint256 lastRewardBlock;
        uint256 accRewardPerShare;
    }

    IERC20 public rewardToken;
    uint256 public rewardPerBlock = 1 * 1e9; // 1 token

    // base 1000, value * % / 100
    uint256 public feePercent = 0;
    uint256 public collectedFees;

    PoolInfo public liquidityMining;
    mapping(address => UserInfo) public userInfo;

    event Deposit(address indexed user, uint256 amount);
    event Withdraw(address indexed user, uint256 amount);
    event Claim(address indexed user, uint256 amount);

    function setPoolInfo(IERC20 _rewardToken, IERC20 _stakingToken) external onlyOwner {
        require(address(rewardToken) == address(0) && address(liquidityMining.stakingToken) == address(0), 'Token is already set');
        rewardToken = _rewardToken;
        liquidityMining = PoolInfo({stakingToken : _stakingToken, lastRewardBlock : 0, accRewardPerShare : 0});
    }

    function startMining(uint256 startBlock) external onlyOwner {
        require(liquidityMining.lastRewardBlock == 0, 'Mining already started');
        liquidityMining.lastRewardBlock = startBlock;
    }

    function pendingRewards(address _user) external view returns (uint256) {
        if (liquidityMining.lastRewardBlock == 0 || block.number < liquidityMining.lastRewardBlock) {
            return 0;
        }

        UserInfo storage user = userInfo[_user];
        uint256 accRewardPerShare = liquidityMining.accRewardPerShare;
        uint256 stakingTokenSupply = liquidityMining.stakingToken.balanceOf(address(this));

        if (block.number > liquidityMining.lastRewardBlock && stakingTokenSupply != 0) {
            uint256 perBlock = rewardPerBlock;
            uint256 multiplier = block.number - liquidityMining.lastRewardBlock;
            uint256 reward = multiplier * perBlock;
            accRewardPerShare = accRewardPerShare + (reward * 1e12 / stakingTokenSupply);
        }

        return (user.amount * accRewardPerShare / 1e12) - user.rewardDebt + user.pendingRewards;
    }

    function updatePool() internal {
        require(liquidityMining.lastRewardBlock > 0 && block.number >= liquidityMining.lastRewardBlock, 'Mining not yet started');
        if (block.number <= liquidityMining.lastRewardBlock) {
            return;
        }
        uint256 stakingTokenSupply = liquidityMining.stakingToken.balanceOf(address(this));
        if (stakingTokenSupply == 0) {
            liquidityMining.lastRewardBlock = block.number;
            return;
        }
        uint256 multiplier = block.number - liquidityMining.lastRewardBlock;
        uint256 tokensReward = multiplier * rewardPerBlock;
        liquidityMining.accRewardPerShare = liquidityMining.accRewardPerShare + (tokensReward * 1e12 / stakingTokenSupply);
        liquidityMining.lastRewardBlock = block.number;
    }

    function deposit(uint256 amount) external {
        UserInfo storage user = userInfo[msg.sender];
        updatePool();

        uint256 accRewardPerShare = liquidityMining.accRewardPerShare;

        if (user.amount > 0) {
            uint256 pending = (user.amount * accRewardPerShare / 1e12) - user.rewardDebt;
            if (pending > 0) {
                user.pendingRewards = user.pendingRewards + pending;
            }
        }
        if (amount > 0) {
            liquidityMining.stakingToken.safeTransferFrom(address(msg.sender), address(this), amount);

            if (feePercent > 0) {
                uint256 fee = amount * feePercent / 1000;
                amount = amount - fee;
                collectedFees = collectedFees + fee;
            }

            user.amount = user.amount + amount;
        }
        user.rewardDebt = user.amount * accRewardPerShare / 1e12;
        emit Deposit(msg.sender, amount);
    }

    function withdraw(uint256 amount) external {
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= amount, "Withdrawing more than you have!");
        updatePool();

        uint256 accRewardPerShare = liquidityMining.accRewardPerShare;

        uint256 pending = (user.amount * accRewardPerShare / 1e12) - user.rewardDebt;
        if (pending > 0) {
            user.pendingRewards = user.pendingRewards + pending;
        }
        if (amount > 0) {
            user.amount = user.amount - amount;

            if (feePercent > 0) {
                uint256 fee = amount * feePercent / 1000;
                amount = amount - fee;
                collectedFees = collectedFees + fee;
            }

            liquidityMining.stakingToken.safeTransfer(address(msg.sender), amount);
        }
        user.rewardDebt = user.amount * accRewardPerShare / 1e12;
        emit Withdraw(msg.sender, amount);
    }

    function claim() external {
        UserInfo storage user = userInfo[msg.sender];
        updatePool();

        uint256 accRewardPerShare = liquidityMining.accRewardPerShare;

        uint256 pending = (user.amount * accRewardPerShare / 1e12) - user.rewardDebt;
        if (pending > 0 || user.pendingRewards > 0) {
            user.pendingRewards = user.pendingRewards + pending;
            uint256 claimedAmount = safeRewardTransfer(msg.sender, user.pendingRewards);
            emit Claim(msg.sender, claimedAmount);
            user.pendingRewards = user.pendingRewards - claimedAmount;
        }
        user.rewardDebt = user.amount * accRewardPerShare / 1e12;
    }

    function safeRewardTransfer(address to, uint256 amount) internal returns (uint256) {
        uint256 balance = rewardToken.balanceOf(address(this));
        require(amount > 0, 'Reward amount must be more than zero');
        require(balance > 0, 'Not enough reward tokens for transfer');
        if (amount > balance) {
            rewardToken.transfer(to, balance);
            return balance;
        }

        rewardToken.transfer(to, amount);
        return amount;
    }

    function setRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner {
        require(_rewardPerBlock > 0, "Reward per block should be greater than 0");
        rewardPerBlock = _rewardPerBlock;
    }

    function setFee(uint256 fee) external onlyOwner {
        require(fee >= 0, 'Fee is too small');
        require(fee <= 50, 'Fee is too big');
        feePercent = fee;
    }

    function withdrawFees(address payable withdrawalAddress) external onlyOwner {
        liquidityMining.stakingToken.safeTransfer(withdrawalAddress, collectedFees);
        collectedFees = 0;
    }
}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 6 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
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));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        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));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 6 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    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");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 6 of 6 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {
    "": {}
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityMining","outputs":[{"internalType":"contract IERC20","name":"stakingToken","type":"address"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"contract IERC20","name":"_stakingToken","type":"address"}],"name":"setPoolInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"setRewardPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"startMining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"pendingRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"withdrawalAddress","type":"address"}],"name":"withdrawFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052633b9aca00600255600060035534801561001d57600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506114cb8061006e6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80637fd6f15c116100a25780639003adfe116100715780639003adfe14610273578063b6b55f251461027c578063bb872b4a1461028f578063f2fde38b146102a2578063f7c618c1146102b557600080fd5b80637fd6f15c146101fc57806385b2d535146102055780638ae39cac146102455780638da5cb5b1461024e57600080fd5b806347b272c0116100e957806347b272c0146101b35780634e71d92d146101c657806369fe0e2d146101ce578063715018a6146101e1578063789513ec146101e957600080fd5b8063164e68de1461011b5780631959a002146101305780632e1a7d4d1461017f57806331d7a26214610192575b600080fd5b61012e6101293660046112a5565b6102c8565b005b61015f61013e3660046112a5565b60086020526000908152604090208054600182015460029092015490919083565b604080519384526020840192909252908201526060015b60405180910390f35b61012e61018d366004611319565b610320565b6101a56101a03660046112a5565b6104aa565b604051908152602001610176565b61012e6101c1366004611319565b610606565b61012e61067e565b61012e6101dc366004611319565b610782565b61012e6107f3565b61012e6101f73660046112e1565b610867565b6101a560035481565b600554600654600754610220926001600160a01b0316919083565b604080516001600160a01b039094168452602084019290925290820152606001610176565b6101a560025481565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610176565b6101a560045481565b61012e61028a366004611319565b61094d565b61012e61029d366004611319565b610a90565b61012e6102b03660046112a5565b610b21565b60015461025b906001600160a01b031681565b6000546001600160a01b031633146102fb5760405162461bcd60e51b81526004016102f290611398565b60405180910390fd5b600454600554610318916001600160a01b03909116908390610c0b565b506000600455565b33600090815260086020526040902080548211156103805760405162461bcd60e51b815260206004820152601f60248201527f5769746864726177696e67206d6f7265207468616e20796f752068617665210060448201526064016102f2565b610388610c73565b600754600182015482546000919064e8d4a51000906103a8908590611405565b6103b291906113e5565b6103bc9190611424565b905080156103da578083600201546103d491906113cd565b60028401555b831561044c5782546103ed908590611424565b8355600354156104355760006103e86003548661040a9190611405565b61041491906113e5565b90506104208186611424565b94508060045461043091906113cd565b600455505b60055461044c906001600160a01b03163386610c0b565b825464e8d4a5100090610460908490611405565b61046a91906113e5565b600184015560405184815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a250505050565b60065460009015806104bd575060065443105b156104ca57506000919050565b6001600160a01b0382811660009081526008602052604080822060075460055492516370a0823160e01b8152306004820152919490939216906370a082319060240160206040518083038186803b15801561052457600080fd5b505afa158015610538573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055c9190611331565b6006549091504311801561056f57508015155b156105c1576002546006546000906105879043611424565b905060006105958383611405565b9050836105a78264e8d4a51000611405565b6105b191906113e5565b6105bb90866113cd565b94505050505b60028301546001840154845464e8d4a51000906105df908690611405565b6105e991906113e5565b6105f39190611424565b6105fd91906113cd565b95945050505050565b6000546001600160a01b031633146106305760405162461bcd60e51b81526004016102f290611398565b600654156106795760405162461bcd60e51b8152602060048201526016602482015275135a5b9a5b99c8185b1c9958591e481cdd185c9d195960521b60448201526064016102f2565b600655565b336000908152600860205260409020610695610c73565b600754600182015482546000919064e8d4a51000906106b5908590611405565b6106bf91906113e5565b6106c99190611424565b905060008111806106de575060008360020154115b15610757578083600201546106f391906113cd565b60028401819055600090610708903390610db7565b60405181815290915033907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d49060200160405180910390a28084600201546107509190611424565b6002850155505b825464e8d4a510009061076b908490611405565b61077591906113e5565b8360010181905550505050565b6000546001600160a01b031633146107ac5760405162461bcd60e51b81526004016102f290611398565b60328111156107ee5760405162461bcd60e51b815260206004820152600e60248201526d46656520697320746f6f2062696760901b60448201526064016102f2565b600355565b6000546001600160a01b0316331461081d5760405162461bcd60e51b81526004016102f290611398565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108915760405162461bcd60e51b81526004016102f290611398565b6001546001600160a01b03161580156108b357506005546001600160a01b0316155b6108f65760405162461bcd60e51b8152602060048201526014602482015273151bdad95b881a5cc8185b1c9958591e481cd95d60621b60448201526064016102f2565b600180546001600160a01b039384166001600160a01b031991821617909155604080516060810182529290931680835260006020840181905292909301829052600580549091169092179091556006819055600755565b336000908152600860205260409020610964610c73565b6007548154156109bf576000826001015464e8d4a5100083856000015461098b9190611405565b61099591906113e5565b61099f9190611424565b905080156109bd578083600201546109b791906113cd565b60028401555b505b8215610a33576005546109dd906001600160a01b031633308661101b565b60035415610a235760006103e8600354856109f89190611405565b610a0291906113e5565b9050610a0e8185611424565b935080600454610a1e91906113cd565b600455505b8154610a309084906113cd565b82555b815464e8d4a5100090610a47908390611405565b610a5191906113e5565b600183015560405183815233907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c9060200160405180910390a2505050565b6000546001600160a01b03163314610aba5760405162461bcd60e51b81526004016102f290611398565b60008111610b1c5760405162461bcd60e51b815260206004820152602960248201527f5265776172642070657220626c6f636b2073686f756c6420626520677265617460448201526806572207468616e20360bc1b60648201526084016102f2565b600255565b6000546001600160a01b03163314610b4b5760405162461bcd60e51b81526004016102f290611398565b6001600160a01b038116610bb05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102f2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b038316602482015260448101829052610c6e90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611059565b505050565b60065415801590610c8657506006544310155b610ccb5760405162461bcd60e51b8152602060048201526016602482015275135a5b9a5b99c81b9bdd081e595d081cdd185c9d195960521b60448201526064016102f2565b6006544311610cd657565b6005546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610d1a57600080fd5b505afa158015610d2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d529190611331565b905080610d60575043600655565b600654600090610d709043611424565b9050600060025482610d829190611405565b905082610d948264e8d4a51000611405565b610d9e91906113e5565b600754610dab91906113cd565b60075550504360065550565b6001546040516370a0823160e01b815230600482015260009182916001600160a01b03909116906370a082319060240160206040518083038186803b158015610dff57600080fd5b505afa158015610e13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e379190611331565b905060008311610e955760405162461bcd60e51b8152602060048201526024808201527f52657761726420616d6f756e74206d757374206265206d6f7265207468616e206044820152637a65726f60e01b60648201526084016102f2565b60008111610ef35760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f7567682072657761726420746f6b656e7320666f72207472616044820152643739b332b960d91b60648201526084016102f2565b80831115610f895760015460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015610f4957600080fd5b505af1158015610f5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8191906112c1565b509050611015565b60015460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529091169063a9059cbb90604401602060405180830381600087803b158015610fd757600080fd5b505af1158015610feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100f91906112c1565b50829150505b92915050565b6040516001600160a01b03808516602483015283166044820152606481018290526110539085906323b872dd60e01b90608401610c37565b50505050565b60006110ae826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661112b9092919063ffffffff16565b805190915015610c6e57808060200190518101906110cc91906112c1565b610c6e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016102f2565b606061113a8484600085611144565b90505b9392505050565b6060824710156111a55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016102f2565b843b6111f35760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016102f2565b600080866001600160a01b0316858760405161120f9190611349565b60006040518083038185875af1925050503d806000811461124c576040519150601f19603f3d011682016040523d82523d6000602084013e611251565b606091505b509150915061126182828661126c565b979650505050505050565b6060831561127b57508161113d565b82511561128b5782518084602001fd5b8160405162461bcd60e51b81526004016102f29190611365565b6000602082840312156112b6578081fd5b813561113d8161147d565b6000602082840312156112d2578081fd5b8151801515811461113d578182fd5b600080604083850312156112f3578081fd5b82356112fe8161147d565b9150602083013561130e8161147d565b809150509250929050565b60006020828403121561132a578081fd5b5035919050565b600060208284031215611342578081fd5b5051919050565b6000825161135b81846020870161143b565b9190910192915050565b602081526000825180602084015261138481604085016020870161143b565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082198211156113e0576113e0611467565b500190565b60008261140057634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561141f5761141f611467565b500290565b60008282101561143657611436611467565b500390565b60005b8381101561145657818101518382015260200161143e565b838111156110535750506000910152565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461149257600080fd5b5056fea26469706673582212207309f175ef7bcd1abc26880beca76a98aa446526d0a541d6958af3ed26c2fd2c64736f6c63430008040033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.