Feature Tip: Add private address tag to any address under My Name Tag !
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,175 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 18687877 | 401 days ago | IN | 0 ETH | 0.01726113 | ||||
Withdraw | 17263640 | 601 days ago | IN | 0 ETH | 0.01134863 | ||||
Withdraw | 17050210 | 631 days ago | IN | 0 ETH | 0.00723916 | ||||
Withdraw | 16482509 | 711 days ago | IN | 0 ETH | 0.00427677 | ||||
Withdraw | 16464897 | 713 days ago | IN | 0 ETH | 0.00637789 | ||||
Withdraw | 16460219 | 714 days ago | IN | 0 ETH | 0.00500519 | ||||
Deposit | 16460209 | 714 days ago | IN | 0 ETH | 0.00416051 | ||||
Withdraw | 16039024 | 773 days ago | IN | 0 ETH | 0.00113831 | ||||
Deposit | 16039024 | 773 days ago | IN | 0 ETH | 0.00384163 | ||||
Deposit | 16021012 | 775 days ago | IN | 0 ETH | 0.00337117 | ||||
Withdraw | 15980885 | 781 days ago | IN | 0 ETH | 0.00411989 | ||||
Deposit | 15980871 | 781 days ago | IN | 0 ETH | 0.00412487 | ||||
Deposit | 15848295 | 800 days ago | IN | 0 ETH | 0.00563273 | ||||
Withdraw | 15645447 | 828 days ago | IN | 0 ETH | 0.00309506 | ||||
Deposit | 15420260 | 862 days ago | IN | 0 ETH | 0.00188441 | ||||
Withdraw | 15302116 | 881 days ago | IN | 0 ETH | 0.00634668 | ||||
Deposit | 15298536 | 881 days ago | IN | 0 ETH | 0.00270249 | ||||
Deposit | 15250614 | 889 days ago | IN | 0 ETH | 0.00161528 | ||||
Withdraw | 15236878 | 891 days ago | IN | 0 ETH | 0.00271159 | ||||
Withdraw | 15225669 | 893 days ago | IN | 0 ETH | 0.01163298 | ||||
Withdraw | 15223570 | 893 days ago | IN | 0 ETH | 0.00246882 | ||||
Deposit | 15217111 | 894 days ago | IN | 0 ETH | 0.00346399 | ||||
Withdraw | 15207560 | 895 days ago | IN | 0 ETH | 0.00429565 | ||||
Withdraw | 15201866 | 896 days ago | IN | 0 ETH | 0.00363634 | ||||
Deposit | 15167238 | 902 days ago | IN | 0 ETH | 0.01577381 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
WorldFarm
Compiler Version
v0.7.4+commit.3f05b770
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.7.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./WorldToken.sol"; contract WorldFarm is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP 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 WORLD tokens // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accWorldPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accWorldPerShare` (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 { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. WORLD tokens to distribute per block. uint256 lastRewardBlock; // Last block number that WORLD tokens distribution occurs. uint256 accWorldPerShare; // Accumulated WORLD tokens per share, times 1e12. See below. } WorldToken public immutable world; // The WORLD ERC-20 Token. uint256 private worldPerBlock; // WORLD tokens distributed per block. Use getWorldPerBlock() to get the updated reward. PoolInfo[] public poolInfo; // Info of each pool. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Info of each user that stakes LP tokens. uint256 public totalAllocPoint; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public startBlock; // The block number when WORLD token mining starts. uint256 public blockRewardUpdateCycle = 1 days; // The cycle in which the worldPerBlock gets updated. uint256 public blockRewardLastUpdateTime = block.timestamp; // The timestamp when the block worldPerBlock was last updated. uint256 public blocksPerDay = 6525; // The estimated number of mined blocks per day. uint256 public blockRewardPercentage = 1; // The percentage used for worldPerBlock calculation. mapping(address => bool) public addedLpTokens; // Used for preventing LP tokens from being added twice in add(). event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); constructor( WorldToken _world, uint256 _startBlock ) { require(address(_world) != address(0), "WORLD address is invalid"); require(_startBlock >= block.number, "startBlock is before current block"); world = _world; startBlock = _startBlock; } modifier updateWorldPerBlock() { (uint256 blockReward, bool update) = getWorldPerBlock(); if (update) { worldPerBlock = blockReward; blockRewardLastUpdateTime = block.timestamp; } _; } function getWorldPerBlock() public view returns (uint256, bool) { if (block.number < startBlock) { return (0, false); } uint256 poolReward = world.balanceOf(address(this)); if (poolReward == 0) { return (0, worldPerBlock != 0); } if (block.timestamp >= getWorldPerBlockUpdateTime() || worldPerBlock == 0) { return (poolReward.mul(blockRewardPercentage).div(100).div(blocksPerDay), true); } return (worldPerBlock, false); } function getWorldPerBlockUpdateTime() public view returns (uint256) { // if blockRewardUpdateCycle = 1 day then roundedUpdateTime = today's UTC midnight uint256 roundedUpdateTime = blockRewardLastUpdateTime - (blockRewardLastUpdateTime % blockRewardUpdateCycle); // if blockRewardUpdateCycle = 1 day then calculateRewardTime = tomorrow's UTC midnight uint256 calculateRewardTime = roundedUpdateTime + blockRewardUpdateCycle; return calculateRewardTime; } function poolLength() external view returns (uint256) { return poolInfo.length; } // Add a new lp to the pool. Can only be called by the owner. function add( uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate ) public onlyOwner { require(address(_lpToken) != address(0), "LP token is invalid"); require(!addedLpTokens[address(_lpToken)], "LP token is already added"); require(_allocPoint >= 5 && _allocPoint <= 10, "_allocPoint is outside of range 5-10"); if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo.push(PoolInfo({ lpToken : _lpToken, allocPoint : _allocPoint, lastRewardBlock : lastRewardBlock, accWorldPerShare : 0 })); addedLpTokens[address(_lpToken)] = true; } // Update the given pool's WORLD token allocation point. Can only be called by the owner. function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public onlyOwner { require(_allocPoint >= 5 && _allocPoint <= 10, "_allocPoint is outside of range 5-10"); if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); poolInfo[_pid].allocPoint = _allocPoint; } // View function to see pending WORLD tokens on frontend. function pendingRewards(uint256 _pid, address _user) external view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accWorldPerShare = pool.accWorldPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 multiplier = block.number.sub(pool.lastRewardBlock); (uint256 blockReward, ) = getWorldPerBlock(); uint256 worldReward = multiplier.mul(blockReward).mul(pool.allocPoint).div(totalAllocPoint); accWorldPerShare = accWorldPerShare.add(worldReward.mul(1e12).div(lpSupply)); } return user.amount.mul(accWorldPerShare).div(1e12).sub(user.rewardDebt); } // Update reward variables 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 when lpSupply changes // For every deposit/withdraw pool recalculates accumulated token value function updatePool(uint256 _pid) public updateWorldPerBlock { PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0) { pool.lastRewardBlock = block.number; return; } uint256 multiplier = block.number.sub(pool.lastRewardBlock); uint256 worldReward = multiplier.mul(worldPerBlock).mul(pool.allocPoint).div(totalAllocPoint); // no minting is required, the contract should have WORLD token balance pre-allocated // accumulated WORLD per share is stored multiplied by 10^12 to allow small 'fractional' values pool.accWorldPerShare = pool.accWorldPerShare.add(worldReward.mul(1e12).div(lpSupply)); pool.lastRewardBlock = block.number; } // Deposit LP tokens to WorldFarming for WORLD token allocation. function deposit(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; updatePool(_pid); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accWorldPerShare).div(1e12).sub(user.rewardDebt); if (pending > 0) { safeTokenTransfer(msg.sender, pending); } } if (_amount > 0) { pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount); user.amount = user.amount.add(_amount); } user.rewardDebt = user.amount.mul(pool.accWorldPerShare).div(1e12); emit Deposit(msg.sender, _pid, _amount); } // Withdraw LP tokens from WorldFarming function withdraw(uint256 _pid, uint256 _amount) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "Withdraw amount is greater than user amount"); updatePool(_pid); uint256 pending = user.amount.mul(pool.accWorldPerShare).div(1e12).sub(user.rewardDebt); if (pending > 0) { safeTokenTransfer(msg.sender, pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); pool.lpToken.safeTransfer(address(msg.sender), _amount); } user.rewardDebt = user.amount.mul(pool.accWorldPerShare).div(1e12); emit Withdraw(msg.sender, _pid, _amount); } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; user.amount = 0; user.rewardDebt = 0; pool.lpToken.safeTransfer(address(msg.sender), user.amount); emit EmergencyWithdraw(msg.sender, _pid, user.amount); } // Safe WORLD token transfer function, just in case if // rounding error causes pool to not have enough WORLD tokens function safeTokenTransfer(address _to, uint256 _amount) internal { uint256 balance = world.balanceOf(address(this)); uint256 amount = _amount > balance ? balance : _amount; world.transfer(_to, amount); } function setBlockRewardUpdateCycle(uint256 _blockRewardUpdateCycle) external onlyOwner { require(_blockRewardUpdateCycle > 0, "Value is zero"); blockRewardUpdateCycle = _blockRewardUpdateCycle; } // Just in case an adjustment is needed since mined blocks per day // changes constantly depending on the network function setBlocksPerDay(uint256 _blocksPerDay) external onlyOwner { require(_blocksPerDay >= 6200 && _blocksPerDay <= 7000, "Value is outside of range 6200-7000"); blocksPerDay = _blocksPerDay; } function setBlockRewardPercentage(uint256 _blockRewardPercentage) external onlyOwner { require(_blockRewardPercentage >= 1 && _blockRewardPercentage <= 5, "Value is outside of range 1-5"); blockRewardPercentage = _blockRewardPercentage; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.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 SafeMath for uint256; 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).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _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"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @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) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @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 sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @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) { // 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 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts 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 mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../GSN/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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view 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; } }
/* ░░░░░░░░░░ ░░░░░░████░░░░░░░░░░░░ ░░░░░░░░██████░░░░░░░░░░░░░░░░ ████░░░░░░░░████░░░░░░░░░░░░░░░░██ ████████░░░░██░░██░░░░░░░░░░░░░░██████ ██████████░░░░░░░░░░░░░░░░░░██████████ ████████████████████░░░░░░░░██████████████ ████████████░░██████░░░░░░░░██████████████ ██████████░░████████░░░░░░██████████░░░░██ ████████████████████░░░░░░░░████████░░░░░░░░██ ████████████████████░░░░░░░░░░████░░░░████████ ██████████████████░░░░░░░░░░░░░░░░████████████ ██████████████████░░░░░░░░░░░░░░██████████████ ░░░░░░░░░░██████░░░░░░░░░░░░░░░░██████████████ ░░░░░░░░░░░░██░░░░░░░░░░░░░░██████████████ ░░░░░░██░░░░██░░░░░░░░░░░░░░██████████████ ░░░░██░░░░░░░░░░░░░░░░░░░░░░██████████████ ░░░░░░░░░░░░░░░░░░░░░░░░░░████████████ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████ ░░░░██░░░░░░░░░░░░░░░░░░░░████████ ████░░░░░░░░░░░░░░░░░░░░██████ ░░████░░░░░░░░░░░░░░░░ ░░░░░░░░░░ ██╗ ██╗ ██████╗ ██████╗ ██╗ ██████╗ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗ ██║ ██║██╔═══██╗██╔══██╗██║ ██╔══██╗ ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║ ██║ █╗ ██║██║ ██║██████╔╝██║ ██║ ██║ ██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║ ██║███╗██║██║ ██║██╔══██╗██║ ██║ ██║ ██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║ ╚███╔███╔╝╚██████╔╝██║ ██║███████╗██████╔╝ ██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║ ╚══╝╚══╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ */ // SPDX-License-Identifier: MIT pragma solidity 0.7.4; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract WorldToken is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; string private constant NAME = "World Token"; string private constant SYMBOL = "WORLD"; uint8 private constant DECIMALS = 18; mapping(address => uint256) private rewards; mapping(address => uint256) private actual; mapping(address => mapping(address => uint256)) private allowances; mapping(address => bool) private excludedFromFees; mapping(address => bool) private excludedFromRewards; address[] private rewardExcluded; uint256 private constant MAX = ~uint256(0); uint256 private constant ACTUAL_TOTAL = 100_000_000 * 1e18; uint256 private rewardsTotal = (MAX - (MAX % ACTUAL_TOTAL)); uint256 private holderFeeTotal; uint256 private marketingFeeTotal; uint256 private lpFeeTotal; uint256 private merchantFeeTotal; uint256 public taxPercentage = 3; uint256 public holderTaxAlloc = 10; uint256 public marketingTaxAlloc = 10; uint256 public lpTaxAlloc = 10; uint256 public merchantTaxAlloc; uint256 public totalTaxAlloc = marketingTaxAlloc.add(holderTaxAlloc).add(lpTaxAlloc).add(merchantTaxAlloc); address public marketingAddress; address public lpStakingAddress; address public merchantStakingAddress; constructor(address _marketingAddress) { rewards[_marketingAddress] = rewardsTotal; emit Transfer(address(0), _marketingAddress, ACTUAL_TOTAL); marketingAddress = _marketingAddress; excludeFromRewards(_msgSender()); excludeFromFees(_marketingAddress); if (_marketingAddress != _msgSender()) { excludeFromRewards(_marketingAddress); excludeFromFees(_msgSender()); } excludeFromFees(address(0x000000000000000000000000000000000000dEaD)); } function name() external pure returns (string memory) { return NAME; } function symbol() external pure returns (string memory) { return SYMBOL; } function decimals() external pure returns (uint8) { return DECIMALS; } function totalSupply() external pure override returns (uint256) { return ACTUAL_TOTAL; } function balanceOf(address _account) public view override returns (uint256) { if (excludedFromRewards[_account]) { return actual[_account]; } return tokenWithRewards(rewards[_account]); } function transfer(address _recipient, uint256 _amount) public override returns (bool) { _transfer(_msgSender(), _recipient, _amount); return true; } function allowance(address _owner, address _spender) public view override returns (uint256) { return allowances[_owner][_spender]; } function approve(address _spender, uint256 _amount) public override returns (bool) { _approve(_msgSender(), _spender, _amount); return true; } function transferFrom( address _sender, address _recipient, uint256 _amount ) public override returns (bool) { _transfer(_sender, _recipient, _amount); _approve( _sender, _msgSender(), allowances[_sender][_msgSender()].sub(_amount, "ERC20: transfer amount exceeds allowance") ); return true; } function increaseAllowance(address _spender, uint256 _addedValue) public virtual returns (bool) { _approve(_msgSender(), _spender, allowances[_msgSender()][_spender].add(_addedValue)); return true; } function decreaseAllowance(address _spender, uint256 _subtractedValue) public virtual returns (bool) { _approve( _msgSender(), _spender, allowances[_msgSender()][_spender].sub(_subtractedValue, "ERC20: decreased allowance below zero") ); return true; } function isExcludedFromRewards(address _account) external view returns (bool) { return excludedFromRewards[_account]; } function isExcludedFromFees(address _account) external view returns (bool) { return excludedFromFees[_account]; } function totalFees() external view returns (uint256) { return holderFeeTotal.add(marketingFeeTotal).add(lpFeeTotal).add(merchantFeeTotal); } function totalHolderFees() external view returns (uint256) { return holderFeeTotal; } function totalMarketingFees() external view returns (uint256) { return marketingFeeTotal; } function totalLpFees() external view returns (uint256) { return lpFeeTotal; } function totalMerchantFees() external view returns (uint256) { return merchantFeeTotal; } function distribute(uint256 _actualAmount) public { address sender = _msgSender(); require(!excludedFromRewards[sender], "Excluded addresses cannot call this function"); (uint256 rewardAmount, , , , ) = _getValues(_actualAmount); rewards[sender] = rewards[sender].sub(rewardAmount); rewardsTotal = rewardsTotal.sub(rewardAmount); holderFeeTotal = holderFeeTotal.add(_actualAmount); } function excludeFromFees(address _account) public onlyOwner() { require(!excludedFromFees[_account], "Account is already excluded from fee"); excludedFromFees[_account] = true; } function includeInFees(address _account) public onlyOwner() { require(excludedFromFees[_account], "Account is already included in fee"); excludedFromFees[_account] = false; } function excludeFromRewards(address _account) public onlyOwner() { require(!excludedFromRewards[_account], "Account is already excluded from reward"); if (rewards[_account] > 0) { actual[_account] = tokenWithRewards(rewards[_account]); } excludedFromRewards[_account] = true; rewardExcluded.push(_account); } function includeInRewards(address _account) public onlyOwner() { require(excludedFromRewards[_account], "Account is already included in rewards"); for (uint256 i = 0; i < rewardExcluded.length; i++) { if (rewardExcluded[i] == _account) { rewardExcluded[i] = rewardExcluded[rewardExcluded.length - 1]; actual[_account] = 0; excludedFromRewards[_account] = false; rewardExcluded.pop(); break; } } } function _approve( address _owner, address _spender, uint256 _amount ) private { require(_owner != address(0), "ERC20: approve from the zero address"); require(_spender != address(0), "ERC20: approve to the zero address"); allowances[_owner][_spender] = _amount; emit Approval(_owner, _spender, _amount); } function _transfer( address _sender, address _recipient, uint256 _amount ) private { require(_sender != address(0), "ERC20: transfer from the zero address"); require(_recipient != address(0), "ERC20: transfer to the zero address"); require(_amount > 0, "Transfer amount must be greater than zero"); uint256 currentTaxPercentage = taxPercentage; if (excludedFromFees[_sender] || excludedFromFees[_recipient]) { taxPercentage = 0; } else { uint256 fee = _getFee(_amount); uint256 marketingFee = _getMarketingFee(fee); uint256 lpFee = _getLpFee(fee); uint256 merchantFee = _getMerchantFee(fee); _updateMarketingFee(marketingFee); _updateLpFee(lpFee); _updateMerchantFee(merchantFee); } if (excludedFromRewards[_sender] && !excludedFromRewards[_recipient]) { _transferWithoutSenderRewards(_sender, _recipient, _amount); } else if (!excludedFromRewards[_sender] && excludedFromRewards[_recipient]) { _transferWithRecipientRewards(_sender, _recipient, _amount); } else if (!excludedFromRewards[_sender] && !excludedFromRewards[_recipient]) { _transferWithRewards(_sender, _recipient, _amount); } else if (excludedFromRewards[_sender] && excludedFromRewards[_recipient]) { _transferWithoutRewards(_sender, _recipient, _amount); } else { _transferWithRewards(_sender, _recipient, _amount); } if (currentTaxPercentage != taxPercentage) { taxPercentage = currentTaxPercentage; } } function _transferWithRewards( address _sender, address _recipient, uint256 _actualAmount ) private { ( uint256 rewardAmount, uint256 rewardTransferAmount, uint256 rewardFee, uint256 actualTransferAmount, uint256 actualFee ) = _getValues(_actualAmount); rewards[_sender] = rewards[_sender].sub(rewardAmount); rewards[_recipient] = rewards[_recipient].add(rewardTransferAmount); _updateHolderFee(rewardFee, actualFee); emit Transfer(_sender, _recipient, actualTransferAmount); } function _transferWithRecipientRewards( address _sender, address _recipient, uint256 _actualAmount ) private { ( uint256 rewardAmount, uint256 rewardTransferAmount, uint256 rewardFee, uint256 actualTransferAmount, uint256 actualFee ) = _getValues(_actualAmount); rewards[_sender] = rewards[_sender].sub(rewardAmount); actual[_recipient] = actual[_recipient].add(actualTransferAmount); rewards[_recipient] = rewards[_recipient].add(rewardTransferAmount); _updateHolderFee(rewardFee, actualFee); emit Transfer(_sender, _recipient, actualTransferAmount); } function _transferWithoutSenderRewards( address _sender, address _recipient, uint256 _actualAmount ) private { ( uint256 rewardAmount, uint256 rewardTransferAmount, uint256 rewardFee, uint256 actualTransferAmount, uint256 actualFee ) = _getValues(_actualAmount); actual[_sender] = actual[_sender].sub(_actualAmount); rewards[_sender] = rewards[_sender].sub(rewardAmount); rewards[_recipient] = rewards[_recipient].add(rewardTransferAmount); _updateHolderFee(rewardFee, actualFee); emit Transfer(_sender, _recipient, actualTransferAmount); } function _transferWithoutRewards( address _sender, address _recipient, uint256 _actualAmount ) private { ( uint256 rewardAmount, uint256 rewardTransferAmount, uint256 rewardFee, uint256 actualTransferAmount, uint256 actualFee ) = _getValues(_actualAmount); actual[_sender] = actual[_sender].sub(_actualAmount); rewards[_sender] = rewards[_sender].sub(rewardAmount); actual[_recipient] = actual[_recipient].add(actualTransferAmount); rewards[_recipient] = rewards[_recipient].add(rewardTransferAmount); _updateHolderFee(rewardFee, actualFee); emit Transfer(_sender, _recipient, actualTransferAmount); } function _updateHolderFee(uint256 _rewardFee, uint256 _actualFee) private { rewardsTotal = rewardsTotal.sub(_rewardFee); holderFeeTotal = holderFeeTotal.add(_actualFee); } function _updateMarketingFee(uint256 _marketingFee) private { if (marketingAddress == address(0)) { return; } uint256 rewardsRate = _getRewardsRate(); uint256 rewardMarketingFee = _marketingFee.mul(rewardsRate); marketingFeeTotal = marketingFeeTotal.add(_marketingFee); rewards[marketingAddress] = rewards[marketingAddress].add(rewardMarketingFee); if (excludedFromRewards[marketingAddress]) { actual[marketingAddress] = actual[marketingAddress].add(_marketingFee); } } function _updateLpFee(uint256 _lpFee) private { if (lpStakingAddress == address(0)) { return; } uint256 rewardsRate = _getRewardsRate(); uint256 rewardLpFee = _lpFee.mul(rewardsRate); lpFeeTotal = lpFeeTotal.add(_lpFee); rewards[lpStakingAddress] = rewards[lpStakingAddress].add(rewardLpFee); if (excludedFromRewards[lpStakingAddress]) { actual[lpStakingAddress] = actual[lpStakingAddress].add(_lpFee); } } function _updateMerchantFee(uint256 _merchantFee) private { if (merchantStakingAddress == address(0)) { return; } uint256 rewardsRate = _getRewardsRate(); uint256 rewardMerchantFee = _merchantFee.mul(rewardsRate); merchantFeeTotal = merchantFeeTotal.add(_merchantFee); rewards[merchantStakingAddress] = rewards[merchantStakingAddress].add(rewardMerchantFee); if (excludedFromRewards[merchantStakingAddress]) { actual[merchantStakingAddress] = actual[merchantStakingAddress].add(_merchantFee); } } function rewardsFromToken(uint256 _actualAmount, bool _deductTransferFee) public view returns (uint256) { require(_actualAmount <= ACTUAL_TOTAL, "Amount must be less than supply"); if (!_deductTransferFee) { (uint256 rewardAmount, , , , ) = _getValues(_actualAmount); return rewardAmount; } else { (, uint256 rewardTransferAmount, , , ) = _getValues(_actualAmount); return rewardTransferAmount; } } function tokenWithRewards(uint256 _rewardAmount) public view returns (uint256) { require(_rewardAmount <= rewardsTotal, "Amount must be less than total rewards"); uint256 rewardsRate = _getRewardsRate(); return _rewardAmount.div(rewardsRate); } function _getValues(uint256 _actualAmount) private view returns ( uint256, uint256, uint256, uint256, uint256 ) { (uint256 actualTransferAmount, uint256 actualFee) = _getActualValues(_actualAmount); uint256 rewardsRate = _getRewardsRate(); ( uint256 rewardAmount, uint256 rewardTransferAmount, uint256 rewardFee ) = _getRewardValues(_actualAmount, actualFee, rewardsRate); return (rewardAmount, rewardTransferAmount, rewardFee, actualTransferAmount, actualFee); } function _getActualValues(uint256 _actualAmount) private view returns (uint256, uint256) { uint256 actualFee = _getFee(_actualAmount); uint256 actualHolderFee = _getHolderFee(actualFee); uint256 actualTransferAmount = _actualAmount.sub(actualFee); return (actualTransferAmount, actualHolderFee); } function _getRewardValues( uint256 _actualAmount, uint256 _actualHolderFee, uint256 _rewardsRate ) private view returns ( uint256, uint256, uint256 ) { uint256 actualFee = _getFee(_actualAmount).mul(_rewardsRate); uint256 rewardAmount = _actualAmount.mul(_rewardsRate); uint256 rewardTransferAmount = rewardAmount.sub(actualFee); uint256 rewardFee = _actualHolderFee.mul(_rewardsRate); return (rewardAmount, rewardTransferAmount, rewardFee); } function _getRewardsRate() private view returns (uint256) { (uint256 rewardsSupply, uint256 actualSupply) = _getCurrentSupply(); return rewardsSupply.div(actualSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rewardsSupply = rewardsTotal; uint256 actualSupply = ACTUAL_TOTAL; for (uint256 i = 0; i < rewardExcluded.length; i++) { if (rewards[rewardExcluded[i]] > rewardsSupply || actual[rewardExcluded[i]] > actualSupply) { return (rewardsTotal, ACTUAL_TOTAL); } rewardsSupply = rewardsSupply.sub(rewards[rewardExcluded[i]]); actualSupply = actualSupply.sub(actual[rewardExcluded[i]]); } if (rewardsSupply < rewardsTotal.div(ACTUAL_TOTAL)) { return (rewardsTotal, ACTUAL_TOTAL); } return (rewardsSupply, actualSupply); } function _getFee(uint256 _amount) private view returns (uint256) { return _amount.mul(taxPercentage).div(100); } function _getHolderFee(uint256 _tax) private view returns (uint256) { return _tax.mul(holderTaxAlloc).div(totalTaxAlloc); } function _getMarketingFee(uint256 _tax) private view returns (uint256) { return _tax.mul(marketingTaxAlloc).div(totalTaxAlloc); } function _getLpFee(uint256 _tax) private view returns (uint256) { return _tax.mul(lpTaxAlloc).div(totalTaxAlloc); } function _getMerchantFee(uint256 _tax) private view returns (uint256) { return _tax.mul(merchantTaxAlloc).div(totalTaxAlloc); } function setTaxPercentage(uint256 _taxPercentage) external onlyOwner { require(_taxPercentage >= 1 && _taxPercentage <= 10, "Value is outside of range 1-10"); taxPercentage = _taxPercentage; } function setTaxAllocations( uint256 _holderTaxAlloc, uint256 _marketingTaxAlloc, uint256 _lpTaxAlloc, uint256 _merchantTaxAlloc ) external onlyOwner { totalTaxAlloc = _holderTaxAlloc.add(_marketingTaxAlloc).add(_lpTaxAlloc).add(_merchantTaxAlloc); require(_holderTaxAlloc >= 5 && _holderTaxAlloc <= 10, "_holderTaxAlloc is outside of range 5-10"); require(_lpTaxAlloc >= 5 && _lpTaxAlloc <= 10, "_lpTaxAlloc is outside of range 5-10"); require(_marketingTaxAlloc <= 10, "_marketingTaxAlloc is greater than 10"); require(_merchantTaxAlloc <= 10, "_merchantTaxAlloc is greater than 10"); holderTaxAlloc = _holderTaxAlloc; marketingTaxAlloc = _marketingTaxAlloc; lpTaxAlloc = _lpTaxAlloc; merchantTaxAlloc = _merchantTaxAlloc; } function setMarketingAddress(address _marketingAddress) external onlyOwner { marketingAddress = _marketingAddress; } function setLpStakingAddress(address _lpStakingAddress) external onlyOwner { lpStakingAddress = _lpStakingAddress; } function setMerchantStakingAddress(address _merchantStakingAddress) external onlyOwner { merchantStakingAddress = _merchantStakingAddress; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <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); } 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); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract WorldToken","name":"_world","type":"address"},{"internalType":"uint256","name":"_startBlock","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":"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":"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":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addedLpTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockRewardLastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockRewardPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blockRewardUpdateCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blocksPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"getWorldPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWorldPerBlockUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accWorldPerShare","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":"_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":"_blockRewardPercentage","type":"uint256"}],"name":"setBlockRewardPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blockRewardUpdateCycle","type":"uint256"}],"name":"setBlockRewardUpdateCycle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blocksPerDay","type":"uint256"}],"name":"setBlocksPerDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"inputs":[],"name":"world","outputs":[{"internalType":"contract WorldToken","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a0604052620151806006554260075561197d600855600160095534801561002657600080fd5b5060405162001e1338038062001e138339818101604052604081101561004b57600080fd5b508051602090910151600061005e61015e565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038216610103576040805162461bcd60e51b815260206004820152601860248201527f574f524c44206164647265737320697320696e76616c69640000000000000000604482015290519081900360640190fd5b438110156101435760405162461bcd60e51b815260040180806020018281038252602281526020018062001df16022913960400191505060405180910390fd5b60609190911b6001600160601b031916608052600555610162565b3390565b60805160601c611c626200018f6000398061052b52806108f25280611570528061161e5250611c626000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c806348cd4cb1116100f9578063715018a611610097578063d18df53c11610071578063d18df53c14610436578063d38028a714610462578063e2bbb1581461046a578063f2fde38b1461048d576101a9565b8063715018a6146103e15780638da5cb5b146103e957806393f1a40b146103f1576101a9565b806351eb05a6116100d357806351eb05a6146103745780635312ea8e14610391578063630b5ba1146103ae57806364482f79146103b6576101a9565b806348cd4cb11461035c5780634cfea68a1461036457806351b117551461036c576101a9565b80631eaaa04511610166578063353b6c2c11610140578063353b6c2c146102e2578063435056fe146102ff578063441a3e701461031c57806348a226231461033f576101a9565b80631eaaa0451461024e57806322a0e5d81461028457806330b67baa146102be576101a9565b8063081e3eda146101ae5780631294b8f2146101c85780631526fe27146101d057806317caf6f11461021d57806317e31fb21461022557806318ae98d91461022d575b600080fd5b6101b66104b3565b60408051918252519081900360200190f35b6101b66104b9565b6101ed600480360360208110156101e657600080fd5b50356104bf565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6101b6610503565b6101b6610509565b61023561050f565b6040805192835290151560208301528051918290030190f35b6102826004803603606081101561026457600080fd5b508035906001600160a01b0360208201351690604001351515610634565b005b6102aa6004803603602081101561029a57600080fd5b50356001600160a01b03166108db565b604080519115158252519081900360200190f35b6102c66108f0565b604080516001600160a01b039092168252519081900360200190f35b610282600480360360208110156102f857600080fd5b5035610914565b6102826004803603602081101561031557600080fd5b50356109c0565b6102826004803603604081101561033257600080fd5b5080359060200135610a80565b6102826004803603602081101561035557600080fd5b5035610bce565b6101b6610c70565b6101b6610c76565b6101b6610c7c565b6102826004803603602081101561038a57600080fd5b5035610c82565b610282600480360360208110156103a757600080fd5b5035610ddc565b610282610e71565b610282600480360360608110156103cc57600080fd5b50803590602081013590604001351515610e94565b610282610fb2565b6102c6611054565b61041d6004803603604081101561040757600080fd5b50803590602001356001600160a01b0316611063565b6040805192835260208301919091528051918290030190f35b6101b66004803603604081101561044c57600080fd5b50803590602001356001600160a01b0316611087565b6101b66111fd565b6102826004803603604081101561048057600080fd5b5080359060200135611220565b610282600480360360208110156104a357600080fd5b50356001600160a01b0316611332565b60025490565b60095481565b600281815481106104cf57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60045481565b60075481565b60008060055443101561052757506000905080610630565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561059657600080fd5b505afa1580156105aa573d6000803e3d6000fd5b505050506040513d60208110156105c057600080fd5b50519050806105d9575050600154600091501515610630565b6105e16111fd565b421015806105ef5750600154155b156106265761061a60085461061460646106146009548661142a90919063ffffffff16565b9061148a565b60019250925050610630565b5050600154905060005b9091565b61063c6114cc565b6000546001600160a01b0390811691161461068c576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b6001600160a01b0382166106dd576040805162461bcd60e51b81526020600482015260136024820152721314081d1bdad95b881a5cc81a5b9d985b1a59606a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600a602052604090205460ff161561074b576040805162461bcd60e51b815260206004820152601960248201527f4c5020746f6b656e20697320616c726561647920616464656400000000000000604482015290519081900360640190fd5b6005831015801561075d5750600a8311155b6107985760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b80156107a6576107a6610e71565b600060055443116107b9576005546107bb565b435b6004549091506107cb90856114d0565b6004908155604080516080810182526001600160a01b039586168082526020808301988952828401958652600060608401818152600280546001808201835591845295517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9690980295860180546001600160a01b03191698909b169790971790995598517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf84015594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad083015595517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad190910155938552600a90915291909220805460ff1916909117905550565b600a6020526000908152604090205460ff1681565b7f000000000000000000000000000000000000000000000000000000000000000081565b61091c6114cc565b6000546001600160a01b0390811691161461096c576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b61183881101580156109805750611b588111155b6109bb5760405162461bcd60e51b8152600401808060200182810382526023815260200180611b046023913960400191505060405180910390fd5b600855565b6109c86114cc565b6000546001600160a01b03908116911614610a18576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b60018110158015610a2a575060058111155b610a7b576040805162461bcd60e51b815260206004820152601d60248201527f56616c7565206973206f757473696465206f662072616e676520312d35000000604482015290519081900360640190fd5b600955565b600060028381548110610a8f57fe5b600091825260208083208684526003825260408085203386529092529220805460049092029092019250831115610af75760405162461bcd60e51b815260040180806020018281038252602b815260200180611b4d602b913960400191505060405180910390fd5b610b0084610c82565b6000610b348260010154610b2e64e8d4a510006106148760030154876000015461142a90919063ffffffff16565b9061152a565b90508015610b4657610b46338261156c565b8315610b70578154610b58908561152a565b82558254610b70906001600160a01b031633866116c5565b60038301548254610b8b9164e8d4a51000916106149161142a565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b610bd66114cc565b6000546001600160a01b03908116911614610c26576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b60008111610c6b576040805162461bcd60e51b815260206004820152600d60248201526c56616c7565206973207a65726f60981b604482015290519081900360640190fd5b600655565b60055481565b60085481565b60065481565b600080610c8d61050f565b915091508015610ca1576001829055426007555b600060028481548110610cb057fe5b9060005260206000209060040201905080600201544311610cd15750610dd7565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d1b57600080fd5b505afa158015610d2f573d6000803e3d6000fd5b505050506040513d6020811015610d4557600080fd5b5051905080610d5b575043600290910155610dd7565b6000610d7483600201544361152a90919063ffffffff16565b90506000610da16004546106148660010154610d9b6001548761142a90919063ffffffff16565b9061142a565b9050610dc4610db9846106148464e8d4a5100061142a565b6003860154906114d0565b6003850155505043600290920191909155505b505050565b600060028281548110610deb57fe5b6000918252602080832085845260038252604080852033808752935284208481556001810185905560049093020180549094509192610e34926001600160a01b031691906116c5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a3505050565b60025460005b81811015610e9057610e8881610c82565b600101610e77565b5050565b610e9c6114cc565b6000546001600160a01b03908116911614610eec576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b60058210158015610efe5750600a8211155b610f395760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b8015610f4757610f47610e71565b610f8482610f7e60028681548110610f5b57fe5b90600052602060002090600402016001015460045461152a90919063ffffffff16565b906114d0565b6004819055508160028481548110610f9857fe5b906000526020600020906004020160010181905550505050565b610fba6114cc565b6000546001600160a01b0390811691161461100a576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60036020908152600092835260408084209091529082529020805460019091015482565b6000806002848154811061109757fe5b60009182526020808320878452600380835260408086206001600160a01b03808b168852908552818720600496870290940192830154835483516370a0823160e01b8152309881019890985292519398509396939593949116926370a082319260248083019392829003018186803b15801561111257600080fd5b505afa158015611126573d6000803e3d6000fd5b505050506040513d602081101561113c57600080fd5b505160028501549091504311801561115357508015155b156111c857600061117185600201544361152a90919063ffffffff16565b9050600061117d61050f565b50905060006111a36004546106148960010154610d9b868861142a90919063ffffffff16565b90506111c26111bb856106148464e8d4a5100061142a565b86906114d0565b94505050505b6111f08360010154610b2e64e8d4a5100061061486886000015461142a90919063ffffffff16565b9450505050505b92915050565b6000806006546007548161120d57fe5b6007546006549290910690030191505090565b60006002838154811061122f57fe5b6000918252602080832086845260038252604080852033865290925292206004909102909101915061126084610c82565b8054156112a95760006112958260010154610b2e64e8d4a510006106148760030154876000015461142a90919063ffffffff16565b905080156112a7576112a7338261156c565b505b82156112d55781546112c6906001600160a01b0316333086611717565b80546112d290846114d0565b81555b600382015481546112f09164e8d4a51000916106149161142a565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b61133a6114cc565b6000546001600160a01b0390811691161461138a576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b6001600160a01b0381166113cf5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b276026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082611439575060006111f7565b8282028284828161144657fe5b04146114835760405162461bcd60e51b8152600401808060200182810382526021815260200180611bc26021913960400191505060405180910390fd5b9392505050565b600061148383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611777565b3390565b600082820183811015611483576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061148383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611819565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115db57600080fd5b505afa1580156115ef573d6000803e3d6000fd5b505050506040513d602081101561160557600080fd5b505190506000818311611618578261161a565b815b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb85836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561169357600080fd5b505af11580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610dd7908490611873565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611771908590611873565b50505050565b600081836118035760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117c85781810151838201526020016117b0565b50505050905090810190601f1680156117f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161180f57fe5b0495945050505050565b6000818484111561186b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156117c85781810151838201526020016117b0565b505050900390565b60606118c8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119249092919063ffffffff16565b805190915015610dd7578080602001905160208110156118e757600080fd5b5051610dd75760405162461bcd60e51b815260040180806020018281038252602a815260200180611c03602a913960400191505060405180910390fd5b6060611933848460008561193b565b949350505050565b60608247101561197c5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b9c6026913960400191505060405180910390fd5b61198585611a97565b6119d6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611a155780518252601f1990920191602091820191016119f6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a77576040519150601f19603f3d011682016040523d82523d6000602084013e611a7c565b606091505b5091509150611a8c828286611a9d565b979650505050505050565b3b151590565b60608315611aac575081611483565b825115611abc5782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156117c85781810151838201526020016117b056fe56616c7565206973206f757473696465206f662072616e676520363230302d373030304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373576974686472617720616d6f756e742069732067726561746572207468616e207573657220616d6f756e745f616c6c6f63506f696e74206973206f757473696465206f662072616e676520352d3130416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ef47e107767ac1df7751470c261e54ded01160106999f565381effc347c8702864736f6c634300070400337374617274426c6f636b206973206265666f72652063757272656e7420626c6f636b000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e470000000000000000000000000000000000000000000000000000000000b35390
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c806348cd4cb1116100f9578063715018a611610097578063d18df53c11610071578063d18df53c14610436578063d38028a714610462578063e2bbb1581461046a578063f2fde38b1461048d576101a9565b8063715018a6146103e15780638da5cb5b146103e957806393f1a40b146103f1576101a9565b806351eb05a6116100d357806351eb05a6146103745780635312ea8e14610391578063630b5ba1146103ae57806364482f79146103b6576101a9565b806348cd4cb11461035c5780634cfea68a1461036457806351b117551461036c576101a9565b80631eaaa04511610166578063353b6c2c11610140578063353b6c2c146102e2578063435056fe146102ff578063441a3e701461031c57806348a226231461033f576101a9565b80631eaaa0451461024e57806322a0e5d81461028457806330b67baa146102be576101a9565b8063081e3eda146101ae5780631294b8f2146101c85780631526fe27146101d057806317caf6f11461021d57806317e31fb21461022557806318ae98d91461022d575b600080fd5b6101b66104b3565b60408051918252519081900360200190f35b6101b66104b9565b6101ed600480360360208110156101e657600080fd5b50356104bf565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6101b6610503565b6101b6610509565b61023561050f565b6040805192835290151560208301528051918290030190f35b6102826004803603606081101561026457600080fd5b508035906001600160a01b0360208201351690604001351515610634565b005b6102aa6004803603602081101561029a57600080fd5b50356001600160a01b03166108db565b604080519115158252519081900360200190f35b6102c66108f0565b604080516001600160a01b039092168252519081900360200190f35b610282600480360360208110156102f857600080fd5b5035610914565b6102826004803603602081101561031557600080fd5b50356109c0565b6102826004803603604081101561033257600080fd5b5080359060200135610a80565b6102826004803603602081101561035557600080fd5b5035610bce565b6101b6610c70565b6101b6610c76565b6101b6610c7c565b6102826004803603602081101561038a57600080fd5b5035610c82565b610282600480360360208110156103a757600080fd5b5035610ddc565b610282610e71565b610282600480360360608110156103cc57600080fd5b50803590602081013590604001351515610e94565b610282610fb2565b6102c6611054565b61041d6004803603604081101561040757600080fd5b50803590602001356001600160a01b0316611063565b6040805192835260208301919091528051918290030190f35b6101b66004803603604081101561044c57600080fd5b50803590602001356001600160a01b0316611087565b6101b66111fd565b6102826004803603604081101561048057600080fd5b5080359060200135611220565b610282600480360360208110156104a357600080fd5b50356001600160a01b0316611332565b60025490565b60095481565b600281815481106104cf57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b60045481565b60075481565b60008060055443101561052757506000905080610630565b60007f000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e476001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561059657600080fd5b505afa1580156105aa573d6000803e3d6000fd5b505050506040513d60208110156105c057600080fd5b50519050806105d9575050600154600091501515610630565b6105e16111fd565b421015806105ef5750600154155b156106265761061a60085461061460646106146009548661142a90919063ffffffff16565b9061148a565b60019250925050610630565b5050600154905060005b9091565b61063c6114cc565b6000546001600160a01b0390811691161461068c576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b6001600160a01b0382166106dd576040805162461bcd60e51b81526020600482015260136024820152721314081d1bdad95b881a5cc81a5b9d985b1a59606a1b604482015290519081900360640190fd5b6001600160a01b0382166000908152600a602052604090205460ff161561074b576040805162461bcd60e51b815260206004820152601960248201527f4c5020746f6b656e20697320616c726561647920616464656400000000000000604482015290519081900360640190fd5b6005831015801561075d5750600a8311155b6107985760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b80156107a6576107a6610e71565b600060055443116107b9576005546107bb565b435b6004549091506107cb90856114d0565b6004908155604080516080810182526001600160a01b039586168082526020808301988952828401958652600060608401818152600280546001808201835591845295517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace9690980295860180546001600160a01b03191698909b169790971790995598517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5acf84015594517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad083015595517f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad190910155938552600a90915291909220805460ff1916909117905550565b600a6020526000908152604090205460ff1681565b7f000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e4781565b61091c6114cc565b6000546001600160a01b0390811691161461096c576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b61183881101580156109805750611b588111155b6109bb5760405162461bcd60e51b8152600401808060200182810382526023815260200180611b046023913960400191505060405180910390fd5b600855565b6109c86114cc565b6000546001600160a01b03908116911614610a18576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b60018110158015610a2a575060058111155b610a7b576040805162461bcd60e51b815260206004820152601d60248201527f56616c7565206973206f757473696465206f662072616e676520312d35000000604482015290519081900360640190fd5b600955565b600060028381548110610a8f57fe5b600091825260208083208684526003825260408085203386529092529220805460049092029092019250831115610af75760405162461bcd60e51b815260040180806020018281038252602b815260200180611b4d602b913960400191505060405180910390fd5b610b0084610c82565b6000610b348260010154610b2e64e8d4a510006106148760030154876000015461142a90919063ffffffff16565b9061152a565b90508015610b4657610b46338261156c565b8315610b70578154610b58908561152a565b82558254610b70906001600160a01b031633866116c5565b60038301548254610b8b9164e8d4a51000916106149161142a565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b610bd66114cc565b6000546001600160a01b03908116911614610c26576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b60008111610c6b576040805162461bcd60e51b815260206004820152600d60248201526c56616c7565206973207a65726f60981b604482015290519081900360640190fd5b600655565b60055481565b60085481565b60065481565b600080610c8d61050f565b915091508015610ca1576001829055426007555b600060028481548110610cb057fe5b9060005260206000209060040201905080600201544311610cd15750610dd7565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b158015610d1b57600080fd5b505afa158015610d2f573d6000803e3d6000fd5b505050506040513d6020811015610d4557600080fd5b5051905080610d5b575043600290910155610dd7565b6000610d7483600201544361152a90919063ffffffff16565b90506000610da16004546106148660010154610d9b6001548761142a90919063ffffffff16565b9061142a565b9050610dc4610db9846106148464e8d4a5100061142a565b6003860154906114d0565b6003850155505043600290920191909155505b505050565b600060028281548110610deb57fe5b6000918252602080832085845260038252604080852033808752935284208481556001810185905560049093020180549094509192610e34926001600160a01b031691906116c5565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a3505050565b60025460005b81811015610e9057610e8881610c82565b600101610e77565b5050565b610e9c6114cc565b6000546001600160a01b03908116911614610eec576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b60058210158015610efe5750600a8211155b610f395760405162461bcd60e51b8152600401808060200182810382526024815260200180611b786024913960400191505060405180910390fd5b8015610f4757610f47610e71565b610f8482610f7e60028681548110610f5b57fe5b90600052602060002090600402016001015460045461152a90919063ffffffff16565b906114d0565b6004819055508160028481548110610f9857fe5b906000526020600020906004020160010181905550505050565b610fba6114cc565b6000546001600160a01b0390811691161461100a576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60036020908152600092835260408084209091529082529020805460019091015482565b6000806002848154811061109757fe5b60009182526020808320878452600380835260408086206001600160a01b03808b168852908552818720600496870290940192830154835483516370a0823160e01b8152309881019890985292519398509396939593949116926370a082319260248083019392829003018186803b15801561111257600080fd5b505afa158015611126573d6000803e3d6000fd5b505050506040513d602081101561113c57600080fd5b505160028501549091504311801561115357508015155b156111c857600061117185600201544361152a90919063ffffffff16565b9050600061117d61050f565b50905060006111a36004546106148960010154610d9b868861142a90919063ffffffff16565b90506111c26111bb856106148464e8d4a5100061142a565b86906114d0565b94505050505b6111f08360010154610b2e64e8d4a5100061061486886000015461142a90919063ffffffff16565b9450505050505b92915050565b6000806006546007548161120d57fe5b6007546006549290910690030191505090565b60006002838154811061122f57fe5b6000918252602080832086845260038252604080852033865290925292206004909102909101915061126084610c82565b8054156112a95760006112958260010154610b2e64e8d4a510006106148760030154876000015461142a90919063ffffffff16565b905080156112a7576112a7338261156c565b505b82156112d55781546112c6906001600160a01b0316333086611717565b80546112d290846114d0565b81555b600382015481546112f09164e8d4a51000916106149161142a565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b61133a6114cc565b6000546001600160a01b0390811691161461138a576040805162461bcd60e51b81526020600482018190526024820152600080516020611be3833981519152604482015290519081900360640190fd5b6001600160a01b0381166113cf5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b276026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082611439575060006111f7565b8282028284828161144657fe5b04146114835760405162461bcd60e51b8152600401808060200182810382526021815260200180611bc26021913960400191505060405180910390fd5b9392505050565b600061148383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611777565b3390565b600082820183811015611483576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600061148383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611819565b60007f000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e476001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115db57600080fd5b505afa1580156115ef573d6000803e3d6000fd5b505050506040513d602081101561160557600080fd5b505190506000818311611618578261161a565b815b90507f000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e476001600160a01b031663a9059cbb85836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561169357600080fd5b505af11580156116a7573d6000803e3d6000fd5b505050506040513d60208110156116bd57600080fd5b505050505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610dd7908490611873565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611771908590611873565b50505050565b600081836118035760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117c85781810151838201526020016117b0565b50505050905090810190601f1680156117f55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161180f57fe5b0495945050505050565b6000818484111561186b5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156117c85781810151838201526020016117b0565b505050900390565b60606118c8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119249092919063ffffffff16565b805190915015610dd7578080602001905160208110156118e757600080fd5b5051610dd75760405162461bcd60e51b815260040180806020018281038252602a815260200180611c03602a913960400191505060405180910390fd5b6060611933848460008561193b565b949350505050565b60608247101561197c5760405162461bcd60e51b8152600401808060200182810382526026815260200180611b9c6026913960400191505060405180910390fd5b61198585611a97565b6119d6576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611a155780518252601f1990920191602091820191016119f6565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611a77576040519150601f19603f3d011682016040523d82523d6000602084013e611a7c565b606091505b5091509150611a8c828286611a9d565b979650505050505050565b3b151590565b60608315611aac575081611483565b825115611abc5782518084602001fd5b60405162461bcd60e51b81526020600482018181528451602484015284518593919283926044019190850190808383600083156117c85781810151838201526020016117b056fe56616c7565206973206f757473696465206f662072616e676520363230302d373030304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373576974686472617720616d6f756e742069732067726561746572207468616e207573657220616d6f756e745f616c6c6f63506f696e74206973206f757473696465206f662072616e676520352d3130416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220ef47e107767ac1df7751470c261e54ded01160106999f565381effc347c8702864736f6c63430007040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e470000000000000000000000000000000000000000000000000000000000b35390
-----Decoded View---------------
Arg [0] : _world (address): 0xBF494F02EE3FdE1F20BEE6242bCe2d1ED0c15e47
Arg [1] : _startBlock (uint256): 11752336
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000bf494f02ee3fde1f20bee6242bce2d1ed0c15e47
Arg [1] : 0000000000000000000000000000000000000000000000000000000000b35390
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.002112 | 599,646.0289 | $1,266.61 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.