Contract 0xb956B861BD97bf5195Eb4AA09d5c5EAD1B2e4514 1

 
 
Txn Hash
Method
Block
From
To
Value [Txn Fee]
0x2aca1c7361e95809363d12420552f9ba10070a0e0f5365826b9e7b7d491c9335Claim366234042022-12-09 15:41:45109 days 18 hrs ago0x8e0a1f10022498eb54465b91d627eadf423a27f4 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.010008098854 122.543147481
0xcbaff25fbb521b9b5e52f6d3b6d6bcaa9967aa63c10bfbbe81cf952c16118e29Claim355482692022-11-13 8:52:03136 days 1 hr ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.002918586376 35.736333739
0xea418d8dc38e9d954d378128f92bb922dd858ebcbc53da0ed0749a333a3213a6Withdraw355480112022-11-13 8:43:11136 days 1 hr ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.004403468805 37.605629614
0x0f0aaf77d06202ee5ca32a99d825a8026c9b12b514ae1974ddda500b08ae4a2fClaim355479742022-11-13 8:41:57136 days 1 hr ago0x9bdbdb4a8f7f816c87a67f5281484ed902c6b942 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003135577289 38.398898936
0xd460565491a2fedbbafdb0bcdd9caf0dcdb5a72755821b756238ca6993c349beClaim351105052022-11-02 13:40:32146 days 20 hrs ago0xe3994579395c144a3fcf07cd945c3e59c0cdcd21 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003311937893 40.552686337
0xd75568eb14340520c70c9cbedc0568c561498eb4023f7ce55e0ae2b53571cd1fClaim351103532022-11-02 13:35:20146 days 21 hrs ago0xe3994579395c144a3fcf07cd945c3e59c0cdcd21 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003378805838 41.37144409
0xa2f0cfcc8a208f1702ade4563faf821292831bd7fff75b7fd5387af56b8a3302Deposit349846262022-10-30 11:22:46149 days 23 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003367488629 30.108800018
0xd961f23bc5b4c597446db45fe848e007ec97ec7053a22d80f648080ce7ba4895Withdraw349809472022-10-30 9:13:56150 days 1 hr ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003224880001 30.000000014
0x5bc79ee6b61919075131c150457c1ff997501263dcf228a63cbc11008adb2f60Withdraw349808782022-10-30 9:11:34150 days 1 hr ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003226320003 30.000000028
0x02d21a7e620f71109eea6ba70198a30a215c398e44272edbf9d9c34eca496f4fWithdraw349807752022-10-30 9:08:00150 days 1 hr ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.002714040003 30.000000035
0x2ac131ba726f5b19f49fc8192811f462413a7aa9ed36fc777d38de7617190bd8Claim349804382022-10-30 8:56:26150 days 1 hr ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.002450100045 30.000000555
0x59c316c7e14cb57a6bae42d1cc7786abd99bd174d40df612d36a8c98a1fab5dbClaim349800612022-10-30 8:43:24150 days 1 hr ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.002450107911 30.000096866
0x5e23cfaab4ad67e761bc41acb7aee00dbfdec0e1152cd2ca2a8f66d06cfe693fDeposit349411642022-10-29 10:01:16151 days 36 mins ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.004006760922 35.847626619
0xc0402153834140ad7fbee13c36b0c58ce0dd6477e8558feb58226aad47604ad7Deposit349405112022-10-29 9:38:50151 days 59 mins ago0x2c640ac98e293daa246f98d2828e328a06fa6936 IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.003887468827 34.765416094
0x3c7af2c5505de0c2b9963a523ac29513770460022feee7c08a8018b551f3a01bClaim349369602022-10-29 7:36:42151 days 3 hrs ago0xaabe1c960da09ce6b13c9da8f69cf9dc486369cc IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.002569867307 32.583584476
0xb1a60ed52ac1389eec7d65f53d67aeec6966766a6ae7851d3e28082c7862dc65Withdraw348689012022-10-27 16:04:12152 days 18 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.011605311976 107.936309304
0xaafbec845902ad20500ad4a216d10821049fa86f6c0e9dfea300e2ac8593ef9cWithdraw348688212022-10-27 16:00:40152 days 18 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.009188122231 85.464544329
0x676d6d2a5249f82ae9606e0706c65f82fec9cbae89307b8a818ca19180cd8e57Withdraw348687782022-10-27 15:59:00152 days 18 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.001805058502 68.516170133
0x2c15cd9b2f92f1fc8886febc5aa3ea78f683032f5ebcdefe6f8485662df91f28Withdraw348687782022-10-27 15:59:00152 days 18 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.008106413533 75.402886611
0x2432af6647253970784f801be61dda79735001138ce23eeaa05e3038de6d056dWithdraw348686292022-10-27 15:53:54152 days 18 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.006393691531 59.478413439
0xaf22e29f917c0d6fd251ff54edeb36966ea5926923121f502c094ff2991660eaWithdraw348214392022-10-26 11:45:41153 days 22 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.015436791012 131.816707764
0xbc30d737cefe9248f925cb2d243a69a434eb5b1a5a60d28ece40ea5e8bf77351Withdraw348214222022-10-26 11:45:07153 days 22 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.011921042375 119.200887681
0xc41f2e3b7c141069340e4232a3a0ca1b6df1bdee36e4eab8622a1aefcefda7e4Withdraw348213772022-10-26 11:43:37153 days 22 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.010169310571 101.697173601
0xd8ef5a4561c4ee0c8653bc1b89b213ed8d323ccb36b35b5e1578c345faacea49Withdraw348213082022-10-26 11:41:11153 days 22 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.012977754116 110.807326818
0x115804f38409323a67bb357128b671954f27f4023b2b12db15677d41c258d3a3Withdraw348212832022-10-26 11:40:21153 days 22 hrs ago0x3eb0cc63e65163436b845e6c619e7873ac11e92c IN  0xb956b861bd97bf5195eb4aa09d5c5ead1b2e45140 MATIC0.014083142849 120.270059178
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EntropySponsorFarm

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 7 : EntropySponsorFarm.sol
// SPDX-License-Identifier: GPL 3.0
pragma solidity ^0.8.2;

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

contract EntropySponsorFarm is Ownable {
	using SafeMath for uint256;
	using SafeERC20 for IERC20;
	// Info of each user.
	struct UserInfo {
		uint256 amount; // How many sponsor tokens the user has provided.
		uint256 rewardDebt; // Reward debt. See explanation below.
		//
		// We do some fancy math here. Basically, any point in time, the amount of ENTROPYs
		// entitled to a user but is pending to be distributed is:
		//
		//   pending reward = (user.amount * pool.accEntropyPerShare) - user.rewardDebt
		//
		// Whenever a user deposits or withdraws sponsor tokens to a pool. Here's what happens:
		//   1. The pool's `accEntropyPerShare` (and `lastRewardBlock`) gets updated.
		//   2. User receives the pending reward sent to his/her address.
		//   3. User's `amount` gets updated.
		//   4. User's `rewardDebt` gets updated.
	}
	// Info of each pool.
	struct PoolInfo {
		uint256 allocPoint; // How many allocation points assigned to this pool. ENTROPYs to distribute per block.
		uint256 lastRewardBlock; // Last block number that ENTROPYs distribution occurs.
		uint256 accEntropyPerShare; // Accumulated ENTROPYs per share, times 1e12. See below.
	}
	// The ENTROPY TOKEN!
	IERC20 public immutable entropy;
	// ENTROPY tokens created per block.
	uint256 public entropyPerBlock;
	// Info of each pool.
	PoolInfo[] public poolInfo;
	// Info of sponsor token.
	IERC20[] public sponsorToken;
	// check if the sponsor token already been added or not
	mapping(address => bool) public isTokenAdded;
	// check the pool ID from a specific sponsor token
	mapping(address => uint256) public getPoolID;
	// Info of each user that stakes sponsor tokens.
	mapping(uint256 => mapping(address => UserInfo)) public userInfo;
	// Total allocation poitns. Must be the sum of all allocation points in all pools.
	uint256 public totalAllocPoint = 0;

	// user actions event
	event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
	event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
	event Claim(address indexed user, uint256 indexed pid, uint256 amount);
	event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount);
	// admin actions event
	event LogPoolAddition(uint256 indexed pid, uint256 allocPoint, IERC20 indexed sponsorToken, bool withUpdate);
	event LogSetPool(uint256 indexed pid, uint256 allocPoint, IERC20 indexed sponsorToken, bool withUpdate);
	event LogUpdatePool(uint256 indexed pid, uint256 lastRewardBlock, IERC20 indexed sponsorToken, uint256 accEntropyPerShare);

	modifier validatePoolByPid(uint256 _pid) {
		require(_pid < poolInfo.length, "SPFARM: Pool does not exist");
		_;
	}

	constructor(address _entropy, uint256 _entropyPerBlock) {
		entropy = IERC20(_entropy);
		entropyPerBlock = _entropyPerBlock;
	}

	function poolLength() external view returns (uint256) {
		return poolInfo.length;
	}

	// Add a new sponsor token to the pool. Can only be called by the owner.
	function add(
		uint256 _allocPoint,
		address _sponsorToken,
		bool _withUpdate
	) external onlyOwner {
		require(isTokenAdded[_sponsorToken] == false, "SPFARM: SPONSOR TOKEN ALREADY IN POOL");
		isTokenAdded[_sponsorToken] = true;
		if (_withUpdate) {
			massUpdatePools();
		}
		uint256 lastRewardBlock = block.number;
		totalAllocPoint = totalAllocPoint.add(_allocPoint);
		sponsorToken.push(IERC20(_sponsorToken));
		poolInfo.push(PoolInfo({ allocPoint: _allocPoint, lastRewardBlock: lastRewardBlock, accEntropyPerShare: 0 }));
		getPoolID[_sponsorToken] = poolInfo.length.sub(1);
		emit LogPoolAddition(poolInfo.length.sub(1), _allocPoint, IERC20(_sponsorToken), _withUpdate);
	}

	// Update the given pool's ENTROPY allocation point. Can only be called by the owner.
	function set(
		uint256 _pid,
		uint256 _allocPoint,
		bool _withUpdate
	) external onlyOwner validatePoolByPid(_pid) {
		if (_withUpdate) {
			massUpdatePools();
		}
		totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint);
		poolInfo[_pid].allocPoint = _allocPoint;
		emit LogSetPool(_pid, _allocPoint, sponsorToken[_pid], _withUpdate);
	}

	// View function to see pending ENTROPYs on frontend.
	function pendingEntropy(uint256 _pid, address _user) external view validatePoolByPid(_pid) returns (uint256) {
		PoolInfo memory pool = poolInfo[_pid];
		UserInfo storage user = userInfo[_pid][_user];
		uint256 accEntropyPerShare = pool.accEntropyPerShare;
		uint256 sponsorSupply = sponsorToken[_pid].balanceOf(address(this));
		if (block.number > pool.lastRewardBlock && sponsorSupply != 0) {
			uint256 blocks = block.number.sub(pool.lastRewardBlock);
			uint256 entropyReward = blocks.mul(entropyPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
			accEntropyPerShare = accEntropyPerShare.add(entropyReward.mul(1e12).div(sponsorSupply));
		}
		return user.amount.mul(accEntropyPerShare).div(1e12).sub(user.rewardDebt);
	}

	// Update reward vairables for all pools. Be careful of gas spending!
	function massUpdatePools() public {
		uint256 length = poolInfo.length;
		for (uint256 pid = 0; pid < length; ++pid) {
			updatePool(pid);
		}
	}

	// Update reward variables of the given pool to be up-to-date.
	function updatePool(uint256 _pid) public validatePoolByPid(_pid) {
		PoolInfo storage pool = poolInfo[_pid];
		if (block.number <= pool.lastRewardBlock) {
			return;
		}
		uint256 sponsorSupply = sponsorToken[_pid].balanceOf(address(this));
		if (sponsorSupply == 0) {
			pool.lastRewardBlock = block.number;
			return;
		}
		uint256 blocks = block.number.sub(pool.lastRewardBlock);
		uint256 entropyReward = blocks.mul(entropyPerBlock).mul(pool.allocPoint).div(totalAllocPoint);
		pool.accEntropyPerShare = pool.accEntropyPerShare.add(entropyReward.mul(1e12).div(sponsorSupply));
		pool.lastRewardBlock = block.number;
		emit LogUpdatePool(_pid, pool.lastRewardBlock, sponsorToken[_pid], pool.accEntropyPerShare);
	}

	// Deposit sponsor tokens to MasterChef for ENTROPY allocation.
	function deposit(uint256 _pid, uint256 _amount) external validatePoolByPid(_pid) {
		PoolInfo storage pool = poolInfo[_pid];
		UserInfo storage user = userInfo[_pid][msg.sender];
		updatePool(_pid);
		if (user.amount > 0) {
			uint256 pending = user.amount.mul(pool.accEntropyPerShare).div(1e12).sub(user.rewardDebt);
			safeEntropyTransfer(msg.sender, pending);
		}
		sponsorToken[_pid].safeTransferFrom(address(msg.sender), address(this), _amount);
		user.amount = user.amount.add(_amount);
		user.rewardDebt = user.amount.mul(pool.accEntropyPerShare).div(1e12);
		emit Deposit(msg.sender, _pid, _amount);
	}

	// Withdraw sponsor tokens from MasterChef.
	function withdraw(uint256 _pid, uint256 _amount) external validatePoolByPid(_pid) {
		PoolInfo storage pool = poolInfo[_pid];
		UserInfo storage user = userInfo[_pid][msg.sender];
		require(user.amount >= _amount, "SPFARM: INSUFFICIENT BALANCE");
		updatePool(_pid);

		uint256 pending = user.amount.mul(pool.accEntropyPerShare).div(1e12).sub(user.rewardDebt);
		safeEntropyTransfer(msg.sender, pending);
		emit Claim(msg.sender, _pid, pending);

		user.amount = user.amount.sub(_amount);
		user.rewardDebt = user.amount.mul(pool.accEntropyPerShare).div(1e12);
		sponsorToken[_pid].safeTransfer(address(msg.sender), _amount);
		emit Withdraw(msg.sender, _pid, _amount);
	}

	// Claim mint entropy tokens
	function claim(uint256 _pid) external validatePoolByPid(_pid) {
		PoolInfo storage pool = poolInfo[_pid];
		UserInfo storage user = userInfo[_pid][msg.sender];
		updatePool(_pid);
		uint256 accumulatedEntropy = user.amount.mul(pool.accEntropyPerShare).div(1e12);
		uint256 pending = accumulatedEntropy.sub(user.rewardDebt);
		user.rewardDebt = accumulatedEntropy;
		safeEntropyTransfer(msg.sender, pending);
		emit Claim(msg.sender, _pid, pending);
	}

	// Withdraw without caring about rewards. EMERGENCY ONLY.
	function emergencyWithdraw(uint256 _pid) external validatePoolByPid(_pid) {
		UserInfo storage user = userInfo[_pid][msg.sender];

		uint256 amount = user.amount;
		user.amount = 0;
		user.rewardDebt = 0;

		sponsorToken[_pid].safeTransfer(address(msg.sender), amount);
		emit EmergencyWithdraw(msg.sender, _pid, user.amount);
	}

	// Safe entropy transfer function, just in case if rounding error causes pool to not have enough ENTROPYs.
	function safeEntropyTransfer(address _to, uint256 _amount) private {
		uint256 entropyBal = entropy.balanceOf(address(this));
		if (_amount > entropyBal) {
			entropy.transfer(_to, entropyBal);
		} else {
			entropy.transfer(_to, _amount);
		}
	}

	// Rescue left over ERP token
	function rescue(uint256 amount_) external onlyOwner {
		IERC20(entropy).transfer(owner(), amount_);
	}
}

File 2 of 7 : 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 3 of 7 : 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'
        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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 7 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 7 : 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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 6 of 7 : 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;
        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");

        (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");

        (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");

        (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");

        (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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 7 of 7 : 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) {
        return msg.data;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_entropy","type":"address"},{"internalType":"uint256","name":"_entropyPerBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"sponsorToken","type":"address"},{"indexed":false,"internalType":"bool","name":"withUpdate","type":"bool"}],"name":"LogPoolAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"sponsorToken","type":"address"},{"indexed":false,"internalType":"bool","name":"withUpdate","type":"bool"}],"name":"LogSetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"sponsorToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"accEntropyPerShare","type":"uint256"}],"name":"LogUpdatePool","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":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"address","name":"_sponsorToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"entropy","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"entropyPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"getPoolID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isTokenAdded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingEntropy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accEntropyPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount_","type":"uint256"}],"name":"rescue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sponsorToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","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":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a0604052600060075534801561001557600080fd5b5060405162001af538038062001af5833981016040819052610036916100aa565b61003f3361005a565b60609190911b6001600160601b0319166080526001556100e4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100bd57600080fd5b82516001600160a01b03811681146100d457600080fd5b6020939093015192949293505050565b60805160601c6119d66200011f600039600081816101d501528181610ce7015281816111ee015281816112a0015261134901526119d66000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c806364482f79116100b85780638da5cb5b1161007c5780638da5cb5b1461029a57806393f1a40b146102ab578063a36532b2146102f2578063b6506a9714610325578063e2bbb15814610345578063f2fde38b1461035857600080fd5b806364482f79146102505780636ac053ad146102635780636c0106fa14610276578063715018a61461028957806384bfdcba1461029157600080fd5b8063441a3e701161010a578063441a3e70146101bd57806347ce07cc146101d057806351eb05a61461020f5780635312ea8e1461022257806362c9a43d14610235578063630b5ba11461024857600080fd5b8063081e3eda146101475780631526fe271461015e57806317caf6f11461018c5780631eaaa04514610195578063379607f5146101aa575b600080fd5b6002545b6040519081526020015b60405180910390f35b61017161016c366004611706565b61036b565b60408051938452602084019290925290820152606001610155565b61014b60075481565b6101a86101a3366004611764565b61039e565b005b6101a86101b8366004611706565b6105ec565b6101a86101cb3660046117a4565b6106ef565b6101f77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610155565b6101a861021d366004611706565b6108b9565b6101a8610230366004611706565b610aa1565b6101f7610243366004611706565b610b3f565b6101a8610b69565b6101a861025e3660046117c6565b610b90565b6101a8610271366004611706565b610cbb565b61014b610284366004611738565b610da6565b6101a8610f80565b61014b60015481565b6000546001600160a01b03166101f7565b6102dd6102b9366004611738565b60066020908152600092835260408084209091529082529020805460019091015482565b60408051928352602083019190915201610155565b6103156103003660046116ce565b60046020526000908152604090205460ff1681565b6040519015158152602001610155565b61014b6103333660046116ce565b60056020526000908152604090205481565b6101a86103533660046117a4565b610fb6565b6101a86103663660046116ce565b611104565b6002818154811061037b57600080fd5b600091825260209091206003909102018054600182015460029092015490925083565b6000546001600160a01b031633146103d15760405162461bcd60e51b81526004016103c890611843565b60405180910390fd5b6001600160a01b03821660009081526004602052604090205460ff16156104485760405162461bcd60e51b815260206004820152602560248201527f53504641524d3a2053504f4e534f5220544f4b454e20414c524541445920494e604482015264081413d3d360da1b60648201526084016103c8565b6001600160a01b0382166000908152600460205260409020805460ff19166001179055801561047957610479610b69565b6007544390610488908561119f565b60075560038054600180820183557fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b0319166001600160a01b038716179055604080516060810182528781526020810185815260009282018381526002805480870182559481905292517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9490960293840195909555517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf83015592517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0909101559054610581916111b2565b6001600160a01b0384166000818152600560205260409020919091556002546105ab9060016111b2565b6040805187815285151560208201527fad5b09333e221a3ab1ec48f5594f2ba9fd1c56d813d8928281574015e18c0a5b91015b60405180910390a350505050565b6002548190811061060f5760405162461bcd60e51b81526004016103c890611878565b6000600283815481106106245761062461197c565b60009182526020808320868452600682526040808520338652909252922060039091029091019150610655846108b9565b600061068164e8d4a5100061067b856002015485600001546111be90919063ffffffff16565b906111ca565b9050600061069c8360010154836111b290919063ffffffff16565b6001840183905590506106af33826111d6565b604051818152869033907f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf7906020015b60405180910390a3505050505050565b600254829081106107125760405162461bcd60e51b81526004016103c890611878565b6000600284815481106107275761072761197c565b6000918252602080832087845260068252604080852033865290925292208054600390920290920192508411156107a05760405162461bcd60e51b815260206004820152601c60248201527f53504641524d3a20494e53554646494349454e542042414c414e43450000000060448201526064016103c8565b6107a9856108b9565b60006107dd82600101546107d764e8d4a5100061067b876002015487600001546111be90919063ffffffff16565b906111b2565b90506107e933826111d6565b604051818152869033907f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf79060200160405180910390a3815461082c90866111b2565b80835560028401546108499164e8d4a510009161067b91906111be565b82600101819055506108853386600389815481106108695761086961197c565b6000918252602090912001546001600160a01b0316919061137d565b604051858152869033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020016106df565b600254819081106108dc5760405162461bcd60e51b81526004016103c890611878565b6000600283815481106108f1576108f161197c565b906000526020600020906003020190508060010154431161091157505050565b6000600384815481106109265761092661197c565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561097257600080fd5b505afa158015610986573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109aa919061171f565b9050806109bd5750436001909101555050565b60006109d68360010154436111b290919063ffffffff16565b90506000610a0360075461067b86600001546109fd600154876111be90919063ffffffff16565b906111be565b9050610a26610a1b8461067b8464e8d4a510006111be565b60028601549061119f565b60028501554360018501556003805487908110610a4557610a4561197c565b600091825260209182902001546001860154600287015460408051928352938201526001600160a01b039091169188917f6249d10e9027bf710bc27387709e839bc4166063108ed277ab28a32cec45031191016106df565b5050565b60025481908110610ac45760405162461bcd60e51b81526004016103c890611878565b600082815260066020908152604080832033808552925282208054838255600182019390935560038054919392610b099290918491889081106108695761086961197c565b8154604051908152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595906020016105de565b60038181548110610b4f57600080fd5b6000918252602090912001546001600160a01b0316905081565b60025460005b81811015610a9d57610b80816108b9565b610b898161194b565b9050610b6f565b6000546001600160a01b03163314610bba5760405162461bcd60e51b81526004016103c890611843565b60025483908110610bdd5760405162461bcd60e51b81526004016103c890611878565b8115610beb57610beb610b69565b610c2583610c1f60028781548110610c0557610c0561197c565b6000918252602090912060039091020154600754906111b2565b9061119f565b6007819055508260028581548110610c3f57610c3f61197c565b90600052602060002090600302016000018190555060038481548110610c6757610c6761197c565b6000918252602091829020015460408051868152851515938101939093526001600160a01b039091169186917f95895a6ab1df54420d241b55243258a33e61b2194db66c1179ec521aae8e186591016105de565b6000546001600160a01b03163314610ce55760405162461bcd60e51b81526004016103c890611843565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb610d266000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401602060405180830381600087803b158015610d6e57600080fd5b505af1158015610d82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9d91906116e9565b60025460009083908110610dcc5760405162461bcd60e51b81526004016103c890611878565b600060028581548110610de157610de161197c565b6000918252602080832060408051606081018252600394850290920180548352600181015483850152600201548282019081528a8652600684528186206001600160a01b038b168752909352842091518354919550919391929089908110610e4b57610e4b61197c565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a082319060240160206040518083038186803b158015610e9757600080fd5b505afa158015610eab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ecf919061171f565b9050836020015143118015610ee357508015155b15610f4c576000610f018560200151436111b290919063ffffffff16565b90506000610f2860075461067b88600001516109fd600154876111be90919063ffffffff16565b9050610f47610f408461067b8464e8d4a510006111be565b859061119f565b935050505b610f7483600101546107d764e8d4a5100061067b8688600001546111be90919063ffffffff16565b98975050505050505050565b6000546001600160a01b03163314610faa5760405162461bcd60e51b81526004016103c890611843565b610fb460006113e0565b565b60025482908110610fd95760405162461bcd60e51b81526004016103c890611878565b600060028481548110610fee57610fee61197c565b6000918252602080832087845260068252604080852033865290925292206003909102909101915061101f856108b9565b80541561106257600061105482600101546107d764e8d4a5100061067b876002015487600001546111be90919063ffffffff16565b905061106033826111d6565b505b6110983330866003898154811061107b5761107b61197c565b6000918252602090912001546001600160a01b0316929190611430565b80546110a4908561119f565b80825560028301546110c19164e8d4a510009161067b91906111be565b6001820155604051848152859033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a35050505050565b6000546001600160a01b0316331461112e5760405162461bcd60e51b81526004016103c890611843565b6001600160a01b0381166111935760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103c8565b61119c816113e0565b50565b60006111ab82846118af565b9392505050565b60006111ab8284611908565b60006111ab82846118e9565b60006111ab82846118c7565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561123857600080fd5b505afa15801561124c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611270919061171f565b9050808211156113235760405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044015b602060405180830381600087803b1580156112e557600080fd5b505af11580156112f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131d91906116e9565b50505050565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb906044016112cb565b505050565b6040516001600160a01b03831660248201526044810182905261137890849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611468565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261131d9085906323b872dd60e01b906084016113a9565b60006114bd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661153a9092919063ffffffff16565b80519091501561137857808060200190518101906114db91906116e9565b6113785760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103c8565b60606115498484600085611551565b949350505050565b6060824710156115b25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016103c8565b843b6116005760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c8565b600080866001600160a01b0316858760405161161c91906117f4565b60006040518083038185875af1925050503d8060008114611659576040519150601f19603f3d011682016040523d82523d6000602084013e61165e565b606091505b509150915061166e828286611679565b979650505050505050565b606083156116885750816111ab565b8251156116985782518084602001fd5b8160405162461bcd60e51b81526004016103c89190611810565b80356001600160a01b03811681146116c957600080fd5b919050565b6000602082840312156116e057600080fd5b6111ab826116b2565b6000602082840312156116fb57600080fd5b81516111ab81611992565b60006020828403121561171857600080fd5b5035919050565b60006020828403121561173157600080fd5b5051919050565b6000806040838503121561174b57600080fd5b8235915061175b602084016116b2565b90509250929050565b60008060006060848603121561177957600080fd5b83359250611789602085016116b2565b9150604084013561179981611992565b809150509250925092565b600080604083850312156117b757600080fd5b50508035926020909101359150565b6000806000606084860312156117db57600080fd5b8335925060208401359150604084013561179981611992565b6000825161180681846020870161191f565b9190910192915050565b602081526000825180602084015261182f81604085016020870161191f565b601f01601f19169190910160400192915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601b908201527f53504641524d3a20506f6f6c20646f6573206e6f742065786973740000000000604082015260600190565b600082198211156118c2576118c2611966565b500190565b6000826118e457634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561190357611903611966565b500290565b60008282101561191a5761191a611966565b500390565b60005b8381101561193a578181015183820152602001611922565b8381111561131d5750506000910152565b600060001982141561195f5761195f611966565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b801515811461119c57600080fdfea2646970667358221220159eadd7bbee4c5d4bdd400e8d3411d26002642f8b1c57a4c35ea5390e24695164736f6c6343000807003300000000000000000000000028acca4ed2f6186c3d93e20e29e6e6a9af65634100000000000000000000000000000000000000000000000002c68af0bb140000

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000028acca4ed2f6186c3d93e20e29e6e6a9af65634100000000000000000000000000000000000000000000000002c68af0bb140000

-----Decoded View---------------
Arg [0] : _entropy (address): 0x28acca4ed2f6186c3d93e20e29e6e6a9af656341
Arg [1] : _entropyPerBlock (uint256): 200000000000000000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000028acca4ed2f6186c3d93e20e29e6e6a9af656341
Arg [1] : 00000000000000000000000000000000000000000000000002c68af0bb140000


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.