More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 45 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 13223002 | 1223 days ago | IN | 0 ETH | 0.00443114 | ||||
Withdraw | 12591177 | 1321 days ago | IN | 0 ETH | 0.00152484 | ||||
Withdraw | 12547865 | 1328 days ago | IN | 0 ETH | 0.00223669 | ||||
Withdraw | 12531113 | 1331 days ago | IN | 0 ETH | 0.00380019 | ||||
Withdraw | 12503678 | 1335 days ago | IN | 0 ETH | 0.00245733 | ||||
Withdraw | 12503653 | 1335 days ago | IN | 0 ETH | 0.00299675 | ||||
Withdraw | 12502141 | 1335 days ago | IN | 0 ETH | 0.00179769 | ||||
Withdraw | 12484473 | 1338 days ago | IN | 0 ETH | 0.00221715 | ||||
Withdraw | 12476468 | 1339 days ago | IN | 0 ETH | 0.00263661 | ||||
Withdraw | 12475395 | 1339 days ago | IN | 0 ETH | 0.00317655 | ||||
Withdraw | 12474341 | 1339 days ago | IN | 0 ETH | 0.00317655 | ||||
Withdraw | 12473587 | 1339 days ago | IN | 0 ETH | 0.00395491 | ||||
Withdraw | 12472814 | 1340 days ago | IN | 0 ETH | 0.00449422 | ||||
Withdraw | 12472536 | 1340 days ago | IN | 0 ETH | 0.00545408 | ||||
Withdraw | 12472458 | 1340 days ago | IN | 0 ETH | 0.00910829 | ||||
Deposit | 12472152 | 1340 days ago | IN | 0 ETH | 0.00654185 | ||||
Withdraw | 12472145 | 1340 days ago | IN | 0 ETH | 0.0059935 | ||||
Deposit | 12471512 | 1340 days ago | IN | 0 ETH | 0.00845777 | ||||
Withdraw | 12471241 | 1340 days ago | IN | 0 ETH | 0.00299615 | ||||
Withdraw | 12471205 | 1340 days ago | IN | 0 ETH | 0.00365603 | ||||
Withdraw | 12471185 | 1340 days ago | IN | 0 ETH | 0.00311599 | ||||
Withdraw | 12471079 | 1340 days ago | IN | 0 ETH | 0.00345405 | ||||
Withdraw | 12470857 | 1340 days ago | IN | 0 ETH | 0.00323584 | ||||
Deposit | 12470307 | 1340 days ago | IN | 0 ETH | 0.00485198 | ||||
Deposit | 12470289 | 1340 days ago | IN | 0 ETH | 0.00471335 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
12459080 | 1342 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
LaunchPoolStakingWithGuild
Compiler Version
v0.6.12+commit.27d51765
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.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import { Guild } from "./Guild.sol"; /// @title Staking contract for farming generic rewards in return for staking a whitelisted token(s) /// @author BlockRocket.tech /// @notice Fork of MasterChef.sol from SushiSwap /// @dev Only the owner can add new pools contract LaunchPoolStakingWithGuild is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; /// @dev Details about each user in a pool struct UserInfo { uint256 amount; // How many tokens the user has provided to a pool uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of reward tokens // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws ERC20 tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (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. } /// @dev Info of each pool. struct PoolInfo { IERC20 erc20Token; // Address of token contract. uint256 allocPoint; // How many allocation points assigned to this pool; this is a weighting for rewards. uint256 lastRewardBlock; // Last block number that reward token distribution has occurred up to endBlock. uint256 accRewardPerShare; // Per LP token staked, how much reward token earned in pool that users will get uint256 maxStakingAmountPerUser; // Max. amount of tokens that can be staked per account/user } /// @notice Container for holding all rewards Guild public rewardGuildBank; /// @notice Number of reward tokens distributed per block, across all pools. uint256 public rewardPerBlock; /// @notice The total amount of reward token available for farming across all pools between start and end block. uint256 public maxRewardTokenAvailableForFarming; /// @notice List of pools that users can stake into PoolInfo[] public poolInfo; /// @notice Per pool, info of each user that stakes ERC20 tokens. /// @notice Pool ID => User Address => User Info mapping(uint256 => mapping(address => UserInfo)) public userInfo; /// @notice Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint; /// @notice The block number when rewards starts across all pools. uint256 public startBlock; /// @notice The block number when rewards ends. uint256 public endBlock; /// @notice Tracks ERC20 tokens added by owner mapping(address => bool) isErc20TokenWhitelisted; 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); /// @param _rewardToken Address of the reward token /// @param _maxRewardTokenAvailableForFarming Maximum number of reward token that will be distributed between the start and end of farming /// @param _startBlock Block number when farming will begin for all pools /// @param _endBlock Block number when farming will end for all pools constructor( IERC20 _rewardToken, uint256 _maxRewardTokenAvailableForFarming, uint256 _startBlock, uint256 _endBlock ) public { require(address(_rewardToken) != address(0), "constructor: _rewardToken must not be zero address"); require(_maxRewardTokenAvailableForFarming > 0, "constructor: _maxRewardTokenAvailableForFarming must be greater than zero"); maxRewardTokenAvailableForFarming = _maxRewardTokenAvailableForFarming; startBlock = _startBlock; endBlock = _endBlock; uint256 numberOfBlocksForFarming = endBlock.sub(startBlock); rewardPerBlock = maxRewardTokenAvailableForFarming.div(numberOfBlocksForFarming); rewardGuildBank = new Guild(IERC20(address(_rewardToken)), address(this)); } /// @notice Returns the number of pools that have been added by the owner /// @return Number of pools function numberOfPools() external view returns (uint256) { return poolInfo.length; } /// @notice Create a new reward pool by whitelisting a new ERC20 token. /// @dev Can only be called by the contract owner /// @param _allocPoint Governs what percentage of the total rewards this pool and other pools will get /// @param _erc20Token Address of the staking token being whitelisted /// @param _maxStakingAmountPerUser For this pool, maximum amount per user that can be staked /// @param _withUpdate Set to true for updating all pools before adding this one function add(uint256 _allocPoint, IERC20 _erc20Token, uint256 _maxStakingAmountPerUser, bool _withUpdate) public onlyOwner { require(block.number < endBlock, "add: must be before end"); address erc20TokenAddress = address(_erc20Token); require(erc20TokenAddress != address(0), "add: _erc20Token must not be zero address"); require(isErc20TokenWhitelisted[erc20TokenAddress] == false, "add: already whitelisted"); require(_maxStakingAmountPerUser > 0, "add: _maxStakingAmountPerUser must be greater than zero"); if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo.push(PoolInfo({ erc20Token : _erc20Token, allocPoint : _allocPoint, lastRewardBlock : lastRewardBlock, accRewardPerShare : 0, maxStakingAmountPerUser: _maxStakingAmountPerUser })); isErc20TokenWhitelisted[erc20TokenAddress] = true; } /// @notice Update a pool's allocation point to increase or decrease its share of contract-level rewards /// @notice Can also update the max amount that can be staked per user /// @dev Can only be called by the owner /// @param _pid ID of the pool being updated /// @param _allocPoint New allocation point /// @param _maxStakingAmountPerUser Maximum amount that a user can deposit into the far /// @param _withUpdate Set to true if you want to update all pools before making this change - it will checkpoint those rewards function set(uint256 _pid, uint256 _allocPoint, uint256 _maxStakingAmountPerUser, bool _withUpdate) public onlyOwner { require(block.number < endBlock, "set: must be before end"); require(_pid < poolInfo.length, "set: invalid _pid"); require(_maxStakingAmountPerUser > 0, "set: _maxStakingAmountPerUser must be greater than zero"); if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(_allocPoint); poolInfo[_pid].allocPoint = _allocPoint; poolInfo[_pid].maxStakingAmountPerUser = _maxStakingAmountPerUser; } /// @notice View function to see pending and unclaimed reward tokens for a given user /// @param _pid ID of the pool where a user has a stake /// @param _user Account being queried /// @return Amount of reward tokens due to a user function pendingRewards(uint256 _pid, address _user) external view returns (uint256) { require(_pid < poolInfo.length, "pendingRewards: invalid _pid"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accRewardPerShare = pool.accRewardPerShare; uint256 lpSupply = pool.erc20Token.balanceOf(address(this)); if (block.number > pool.lastRewardBlock && lpSupply != 0) { uint256 maxEndBlock = block.number <= endBlock ? block.number : endBlock; uint256 multiplier = getMultiplier(pool.lastRewardBlock, maxEndBlock); uint256 reward = multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(totalAllocPoint); accRewardPerShare = accRewardPerShare.add(reward.mul(1e18).div(lpSupply)); } return user.amount.mul(accRewardPerShare).div(1e18).sub(user.rewardDebt); } /// @notice Cycles through the pools to update all of the rewards accrued function massUpdatePools() public { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } /// @notice Updates a specific pool to track all of the rewards accrued up to the TX block /// @param _pid ID of the pool function updatePool(uint256 _pid) public { require(_pid < poolInfo.length, "updatePool: invalid _pid"); PoolInfo storage pool = poolInfo[_pid]; if (block.number <= pool.lastRewardBlock) { return; } uint256 erc20Supply = pool.erc20Token.balanceOf(address(this)); if (erc20Supply == 0) { pool.lastRewardBlock = block.number; return; } uint256 maxEndBlock = block.number <= endBlock ? block.number : endBlock; uint256 multiplier = getMultiplier(pool.lastRewardBlock, maxEndBlock); // No point in doing any more logic as the rewards have ended if (multiplier == 0) { return; } uint256 reward = multiplier.mul(rewardPerBlock).mul(pool.allocPoint).div(totalAllocPoint); pool.accRewardPerShare = pool.accRewardPerShare.add(reward.mul(1e18).div(erc20Supply)); pool.lastRewardBlock = maxEndBlock; } /// @notice Where any user can stake their ERC20 tokens into a pool in order to farm rewards /// @param _pid ID of the pool /// @param _amount Amount of ERC20 being staked function deposit(uint256 _pid, uint256 _amount) external { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount.add(_amount) <= pool.maxStakingAmountPerUser, "deposit: can not exceed max staking amount per user"); updatePool(_pid); if (user.amount > 0) { uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e18).sub(user.rewardDebt); if (pending > 0) { safeRewardTransfer(msg.sender, pending); } } if (_amount > 0) { pool.erc20Token.safeTransferFrom(address(msg.sender), address(this), _amount); user.amount = user.amount.add(_amount); } user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e18); emit Deposit(msg.sender, _pid, _amount); } /// @notice Allows a user to withdraw any ERC20 tokens staked in a pool /// @dev Partial withdrawals permitted /// @param _pid Pool ID /// @param _amount Being withdrawn function withdraw(uint256 _pid, uint256 _amount) external { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.amount >= _amount, "withdraw: _amount not good"); updatePool(_pid); uint256 pending = user.amount.mul(pool.accRewardPerShare).div(1e18).sub(user.rewardDebt); if (pending > 0) { safeRewardTransfer(msg.sender, pending); } if (_amount > 0) { user.amount = user.amount.sub(_amount); pool.erc20Token.safeTransfer(address(msg.sender), _amount); } user.rewardDebt = user.amount.mul(pool.accRewardPerShare).div(1e18); emit Withdraw(msg.sender, _pid, _amount); } /// @notice Emergency only. Should the rewards issuance mechanism fail, people can still withdraw their stake /// @param _pid Pool ID function emergencyWithdraw(uint256 _pid) external { require(_pid < poolInfo.length, "updatePool: invalid _pid"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; uint256 amount = user.amount; user.amount = 0; user.rewardDebt = 0; pool.erc20Token.safeTransfer(address(msg.sender), amount); emit EmergencyWithdraw(msg.sender, _pid, amount); } //////////// // Private / //////////// /// @dev Safe reward transfer function, just in case if rounding error causes pool to not have enough rewards. /// @param _to Whom to send reward into /// @param _amount of reward to send function safeRewardTransfer(address _to, uint256 _amount) private { uint256 bal = rewardGuildBank.tokenBalance(); if (_amount > bal) { rewardGuildBank.withdrawTo(_to, bal); } else { rewardGuildBank.withdrawTo(_to, _amount); } } /// @notice Return reward multiplier over the given _from to _to block. /// @param _from Block number /// @param _to Block number /// @return Number of blocks that have passed function getMultiplier(uint256 _from, uint256 _to) private view returns (uint256) { return _to.sub(_from); } }
// 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 Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// 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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { 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) { 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) { // 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) { 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) { 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) { 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) { require(b <= a, "SafeMath: subtraction overflow"); 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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); 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) { require(b > 0, "SafeMath: modulo by zero"); 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) { 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. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); 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) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; contract Guild { using SafeERC20 for IERC20; IERC20 public token; address public stakingContract; constructor(IERC20 _token, address _stakingContract) public { token = _token; stakingContract = _stakingContract; } function withdrawTo(address _recipient, uint256 _amount) external { require(msg.sender == stakingContract, "Guild.withdrawTo: Only staking contract"); token.safeTransfer(_recipient, _amount); } function tokenBalance() external returns (uint256) { return token.balanceOf(address(this)); } }
// 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); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// 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 IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_maxRewardTokenAvailableForFarming","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_endBlock","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":"_erc20Token","type":"address"},{"internalType":"uint256","name":"_maxStakingAmountPerUser","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","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":"endBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxRewardTokenAvailableForFarming","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numberOfPools","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"erc20Token","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"},{"internalType":"uint256","name":"maxStakingAmountPerUser","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardGuildBank","outputs":[{"internalType":"contract Guild","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"uint256","name":"_maxStakingAmountPerUser","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","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"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620023c2380380620023c2833981810160405260808110156200003757600080fd5b508051602082015160408301516060909301519192909160006200005a620001e9565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b038416620000eb5760405162461bcd60e51b8152600401808060200182810382526032815260200180620023906032913960400191505060405180910390fd5b600083116200012c5760405162461bcd60e51b8152600401808060200182810382526049815260200180620023476049913960600191505060405180910390fd5b6003839055600782905560088190556000620001558284620001ed602090811b6200123d17901c565b905062000173816003546200024b60201b6200129a1790919060201c565b600255604051859030906200018890620002b4565b6001600160a01b03928316815291166020820152604080519182900301906000f080158015620001bc573d6000803e3d6000fd5b50600180546001600160a01b0319166001600160a01b039290921691909117905550620002c29350505050565b3390565b60008282111562000245576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000808211620002a2576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381620002ac57fe5b049392505050565b6106128062001d3583390190565b611a6380620002d26000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80637c57c31e116100ad578063988d7a6011610071578063988d7a60146102ce578063ce99ad4214610308578063d18df53c14610310578063e2bbb1581461033c578063f2fde38b1461035f5761012c565b80637c57c31e146102245780638862445a1461022c5780638ae39cac1461025d5780638da5cb5b1461026557806393f1a40b146102895761012c565b806351eb05a6116100f457806351eb05a6146101d25780635312ea8e146101ef578063630b5ba11461020c5780636f682a5314610214578063715018a61461021c5761012c565b8063083c6323146101315780631526fe271461014b57806317caf6f11461019d578063441a3e70146101a557806348cd4cb1146101ca575b600080fd5b610139610385565b60408051918252519081900360200190f35b6101686004803603602081101561016157600080fd5b503561038b565b604080516001600160a01b03909616865260208601949094528484019290925260608401526080830152519081900360a00190f35b6101396103d3565b6101c8600480360360408110156101bb57600080fd5b50803590602001356103d9565b005b61013961054b565b6101c8600480360360208110156101e857600080fd5b5035610551565b6101c86004803603602081101561020557600080fd5b50356106fa565b6101c86107e4565b610139610807565b6101c861080d565b6101396108b9565b6101c86004803603608081101561024257600080fd5b508035906020810135906040810135906060013515156108bf565b610139610a9d565b61026d610aa3565b604080516001600160a01b039092168252519081900360200190f35b6102b56004803603604081101561029f57600080fd5b50803590602001356001600160a01b0316610ab2565b6040805192835260208301919091528051918290030190f35b6101c8600480360360808110156102e457600080fd5b508035906001600160a01b0360208201351690604081013590606001351515610ad6565b61026d610dee565b6101396004803603604081101561032657600080fd5b50803590602001356001600160a01b0316610dfd565b6101c86004803603604081101561035257600080fd5b5080359060200135610fd3565b6101c86004803603602081101561037557600080fd5b50356001600160a01b031661113b565b60085481565b6004818154811061039857fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b60065481565b6000600483815481106103e857fe5b6000918252602080832086845260058083526040808620338752909352919093208054929091029092019250831115610468576040805162461bcd60e51b815260206004820152601a60248201527f77697468647261773a205f616d6f756e74206e6f7420676f6f64000000000000604482015290519081900360640190fd5b61047184610551565b60006104ae82600101546104a8670de0b6b3a76400006104a28760030154876000015461130190919063ffffffff16565b9061129a565b9061123d565b905080156104c0576104c03382611361565b83156104ea5781546104d2908561123d565b825582546104ea906001600160a01b031633866114c2565b6003830154825461050891670de0b6b3a7640000916104a291611301565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60075481565b60045481106105a2576040805162461bcd60e51b81526020600482015260186024820152771d5c19185d19541bdbdb0e881a5b9d985b1a590817dc1a5960421b604482015290519081900360640190fd5b6000600482815481106105b157fe5b90600052602060002090600502019050806002015443116105d257506106f7565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561061c57600080fd5b505afa158015610630573d6000803e3d6000fd5b505050506040513d602081101561064657600080fd5b505190508061065c5750436002909101556106f7565b600060085443111561067057600854610672565b435b90506000610684846002015483611514565b90508061069457505050506106f7565b60006106bf6006546104a287600101546106b96002548761130190919063ffffffff16565b90611301565b90506106e56106da856104a284670de0b6b3a7640000611301565b600387015490611520565b60038601555050600290920191909155505b50565b600454811061074b576040805162461bcd60e51b81526020600482015260186024820152771d5c19185d19541bdbdb0e881a5b9d985b1a590817dc1a5960421b604482015290519081900360640190fd5b60006004828154811061075a57fe5b600091825260208083208584526005808352604080862033808852945285208054868255600182019690965593020180549094509192916107a7916001600160a01b0390911690836114c2565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b60045460005b81811015610803576107fb81610551565b6001016107ea565b5050565b60045490565b61081561157a565b6001600160a01b0316610826610aa3565b6001600160a01b03161461086f576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035481565b6108c761157a565b6001600160a01b03166108d8610aa3565b6001600160a01b031614610921576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b6008544310610977576040805162461bcd60e51b815260206004820152601760248201527f7365743a206d757374206265206265666f726520656e64000000000000000000604482015290519081900360640190fd5b60045484106109c1576040805162461bcd60e51b81526020600482015260116024820152701cd95d0e881a5b9d985b1a590817dc1a59607a1b604482015290519081900360640190fd5b60008211610a005760405162461bcd60e51b81526004018080602001828103825260378152602001806118f96037913960400191505060405180910390fd5b8015610a0e57610a0e6107e4565b610a4b83610a4560048781548110610a2257fe5b90600052602060002090600502016001015460065461123d90919063ffffffff16565b90611520565b6006819055508260048581548110610a5f57fe5b9060005260206000209060050201600101819055508160048581548110610a8257fe5b90600052602060002090600502016004018190555050505050565b60025481565b6000546001600160a01b031690565b60056020908152600092835260408084209091529082529020805460019091015482565b610ade61157a565b6001600160a01b0316610aef610aa3565b6001600160a01b031614610b38576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b6008544310610b8e576040805162461bcd60e51b815260206004820152601760248201527f6164643a206d757374206265206265666f726520656e64000000000000000000604482015290519081900360640190fd5b826001600160a01b038116610bd45760405162461bcd60e51b8152600401808060200182810382526029815260200180611a056029913960400191505060405180910390fd5b6001600160a01b03811660009081526009602052604090205460ff1615610c42576040805162461bcd60e51b815260206004820152601860248201527f6164643a20616c72656164792077686974656c69737465640000000000000000604482015290519081900360640190fd5b60008311610c815760405162461bcd60e51b81526004018080602001828103825260378152602001806119a46037913960400191505060405180910390fd5b8115610c8f57610c8f6107e4565b60006007544311610ca257600754610ca4565b435b600654909150610cb49087611520565b6006556040805160a0810182526001600160a01b039687168152602080820198895281830193845260006060830181815260808401988952600480546001808201835591845294517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600590960295860180546001600160a01b031916918d169190911790559a517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c85015594517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d84015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e83015595517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f909101559190941684526009909252509020805460ff19169091179055565b6001546001600160a01b031681565b6004546000908310610e56576040805162461bcd60e51b815260206004820152601c60248201527f70656e64696e67526577617264733a20696e76616c6964205f70696400000000604482015290519081900360640190fd5b600060048481548110610e6557fe5b60009182526020808320878452600580835260408086206001600160a01b03808b16885290855281872060039390960290930191820154825482516370a0823160e01b815230600482015292519398509596909590949316926370a0823192602480840193829003018186803b158015610ede57600080fd5b505afa158015610ef2573d6000803e3d6000fd5b505050506040513d6020811015610f0857600080fd5b5051600285015490915043118015610f1f57508015155b15610f9b576000600854431115610f3857600854610f3a565b435b90506000610f4c866002015483611514565b90506000610f736006546104a289600101546106b96002548761130190919063ffffffff16565b9050610f95610f8e856104a284670de0b6b3a7640000611301565b8690611520565b94505050505b610fc683600101546104a8670de0b6b3a76400006104a286886000015461130190919063ffffffff16565b9450505050505b92915050565b600060048381548110610fe257fe5b6000918252602080832086845260058083526040808620338752909352919093209102909101600481015482549193509061101d9085611520565b111561105a5760405162461bcd60e51b81526004018080602001828103825260338152602001806119516033913960400191505060405180910390fd5b61106384610551565b8054156110af57600061109b82600101546104a8670de0b6b3a76400006104a28760030154876000015461130190919063ffffffff16565b905080156110ad576110ad3382611361565b505b82156110db5781546110cc906001600160a01b031633308661157e565b80546110d89084611520565b81555b600382015481546110f991670de0b6b3a7640000916104a291611301565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b61114361157a565b6001600160a01b0316611154610aa3565b6001600160a01b03161461119d576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b6001600160a01b0381166111e25760405162461bcd60e51b81526004018080602001828103825260268152602001806118ad6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082821115611294576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008082116112f0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816112f957fe5b049392505050565b60008261131057506000610fcd565b8282028284828161131d57fe5b041461135a5760405162461bcd60e51b81526004018080602001828103825260218152602001806119306021913960400191505060405180910390fd5b9392505050565b60015460408051639e1a4d1960e01b815290516000926001600160a01b031691639e1a4d1991600480830192602092919082900301818787803b1580156113a757600080fd5b505af11580156113bb573d6000803e3d6000fd5b505050506040513d60208110156113d157600080fd5b505190508082111561144f576001546040805163040b850f60e31b81526001600160a01b038681166004830152602482018590529151919092169163205c287891604480830192600092919082900301818387803b15801561143257600080fd5b505af1158015611446573d6000803e3d6000fd5b505050506114bd565b6001546040805163040b850f60e31b81526001600160a01b038681166004830152602482018690529151919092169163205c287891604480830192600092919082900301818387803b1580156114a457600080fd5b505af11580156114b8573d6000803e3d6000fd5b505050505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526114bd9084906115de565b600061135a828461123d565b60008282018381101561135a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526115d89085906115de565b50505050565b6060611633826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661168f9092919063ffffffff16565b8051909150156114bd5780806020019051602081101561165257600080fd5b50516114bd5760405162461bcd60e51b815260040180806020018281038252602a8152602001806119db602a913960400191505060405180910390fd5b606061169e84846000856116a6565b949350505050565b6060824710156116e75760405162461bcd60e51b81526004018080602001828103825260268152602001806118d36026913960400191505060405180910390fd5b6116f085611802565b611741576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106117805780518252601f199092019160209182019101611761565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146117e2576040519150601f19603f3d011682016040523d82523d6000602084013e6117e7565b606091505b50915091506117f7828286611808565b979650505050505050565b3b151590565b6060831561181757508161135a565b8251156118275782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611871578181015183820152602001611859565b50505050905090810190601f16801561189e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c7365743a205f6d61785374616b696e67416d6f756e7450657255736572206d7573742062652067726561746572207468616e207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776465706f7369743a2063616e206e6f7420657863656564206d6178207374616b696e6720616d6f756e742070657220757365724f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726164643a205f6d61785374616b696e67416d6f756e7450657255736572206d7573742062652067726561746572207468616e207a65726f5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565646164643a205f6572633230546f6b656e206d757374206e6f74206265207a65726f2061646472657373a26469706673582212203262c8ff91185842f06c8357bfd40261b6b4acd1ff8e169266b5e36f91cfdb3964736f6c634300060c0033608060405234801561001057600080fd5b506040516106123803806106128339818101604052604081101561003357600080fd5b508051602090910151600080546001600160a01b039384166001600160a01b031991821617909155600180549390921692169190911790556105988061007a6000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c8063205c2878146100515780639e1a4d191461007f578063ee99205c14610099578063fc0c546a146100bd575b600080fd5b61007d6004803603604081101561006757600080fd5b506001600160a01b0381351690602001356100c5565b005b610087610129565b60408051918252519081900360200190f35b6100a16101a6565b604080516001600160a01b039092168252519081900360200190f35b6100a16101b5565b6001546001600160a01b0316331461010e5760405162461bcd60e51b81526004018080602001828103825260278152602001806104ec6027913960400191505060405180910390fd5b600054610125906001600160a01b031683836101c4565b5050565b60008054604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561017557600080fd5b505afa158015610189573d6000803e3d6000fd5b505050506040513d602081101561019f57600080fd5b5051905090565b6001546001600160a01b031681565b6000546001600160a01b031681565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261021690849061021b565b505050565b6060610270826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166102cc9092919063ffffffff16565b8051909150156102165780806020019051602081101561028f57600080fd5b50516102165760405162461bcd60e51b815260040180806020018281038252602a815260200180610539602a913960400191505060405180910390fd5b60606102db84846000856102e5565b90505b9392505050565b6060824710156103265760405162461bcd60e51b81526004018080602001828103825260268152602001806105136026913960400191505060405180910390fd5b61032f85610441565b610380576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106103bf5780518252601f1990920191602091820191016103a0565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610421576040519150601f19603f3d011682016040523d82523d6000602084013e610426565b606091505b5091509150610436828286610447565b979650505050505050565b3b151590565b606083156104565750816102de565b8251156104665782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156104b0578181015183820152602001610498565b50505050905090810190601f1680156104dd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4775696c642e7769746864726177546f3a204f6e6c79207374616b696e6720636f6e7472616374416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212201ad60141a3ebbb8c2baec846a82de05ff1246ddeefbcd4aa01ab4af5e03965e964736f6c634300060c0033636f6e7374727563746f723a205f6d6178526577617264546f6b656e417661696c61626c65466f724661726d696e67206d7573742062652067726561746572207468616e207a65726f636f6e7374727563746f723a205f726577617264546f6b656e206d757374206e6f74206265207a65726f206164647265737300000000000000000000000007ca256267128fbe1a79b74fc7b0e6ed3359ad08000000000000000000000000000000000000000000000000000009d521d08e000000000000000000000000000000000000000000000000000000000000bee3300000000000000000000000000000000000000000000000000000000000ce196b
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80637c57c31e116100ad578063988d7a6011610071578063988d7a60146102ce578063ce99ad4214610308578063d18df53c14610310578063e2bbb1581461033c578063f2fde38b1461035f5761012c565b80637c57c31e146102245780638862445a1461022c5780638ae39cac1461025d5780638da5cb5b1461026557806393f1a40b146102895761012c565b806351eb05a6116100f457806351eb05a6146101d25780635312ea8e146101ef578063630b5ba11461020c5780636f682a5314610214578063715018a61461021c5761012c565b8063083c6323146101315780631526fe271461014b57806317caf6f11461019d578063441a3e70146101a557806348cd4cb1146101ca575b600080fd5b610139610385565b60408051918252519081900360200190f35b6101686004803603602081101561016157600080fd5b503561038b565b604080516001600160a01b03909616865260208601949094528484019290925260608401526080830152519081900360a00190f35b6101396103d3565b6101c8600480360360408110156101bb57600080fd5b50803590602001356103d9565b005b61013961054b565b6101c8600480360360208110156101e857600080fd5b5035610551565b6101c86004803603602081101561020557600080fd5b50356106fa565b6101c86107e4565b610139610807565b6101c861080d565b6101396108b9565b6101c86004803603608081101561024257600080fd5b508035906020810135906040810135906060013515156108bf565b610139610a9d565b61026d610aa3565b604080516001600160a01b039092168252519081900360200190f35b6102b56004803603604081101561029f57600080fd5b50803590602001356001600160a01b0316610ab2565b6040805192835260208301919091528051918290030190f35b6101c8600480360360808110156102e457600080fd5b508035906001600160a01b0360208201351690604081013590606001351515610ad6565b61026d610dee565b6101396004803603604081101561032657600080fd5b50803590602001356001600160a01b0316610dfd565b6101c86004803603604081101561035257600080fd5b5080359060200135610fd3565b6101c86004803603602081101561037557600080fd5b50356001600160a01b031661113b565b60085481565b6004818154811061039857fe5b6000918252602090912060059091020180546001820154600283015460038401546004909401546001600160a01b0390931694509092909185565b60065481565b6000600483815481106103e857fe5b6000918252602080832086845260058083526040808620338752909352919093208054929091029092019250831115610468576040805162461bcd60e51b815260206004820152601a60248201527f77697468647261773a205f616d6f756e74206e6f7420676f6f64000000000000604482015290519081900360640190fd5b61047184610551565b60006104ae82600101546104a8670de0b6b3a76400006104a28760030154876000015461130190919063ffffffff16565b9061129a565b9061123d565b905080156104c0576104c03382611361565b83156104ea5781546104d2908561123d565b825582546104ea906001600160a01b031633866114c2565b6003830154825461050891670de0b6b3a7640000916104a291611301565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b60075481565b60045481106105a2576040805162461bcd60e51b81526020600482015260186024820152771d5c19185d19541bdbdb0e881a5b9d985b1a590817dc1a5960421b604482015290519081900360640190fd5b6000600482815481106105b157fe5b90600052602060002090600502019050806002015443116105d257506106f7565b8054604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561061c57600080fd5b505afa158015610630573d6000803e3d6000fd5b505050506040513d602081101561064657600080fd5b505190508061065c5750436002909101556106f7565b600060085443111561067057600854610672565b435b90506000610684846002015483611514565b90508061069457505050506106f7565b60006106bf6006546104a287600101546106b96002548761130190919063ffffffff16565b90611301565b90506106e56106da856104a284670de0b6b3a7640000611301565b600387015490611520565b60038601555050600290920191909155505b50565b600454811061074b576040805162461bcd60e51b81526020600482015260186024820152771d5c19185d19541bdbdb0e881a5b9d985b1a590817dc1a5960421b604482015290519081900360640190fd5b60006004828154811061075a57fe5b600091825260208083208584526005808352604080862033808852945285208054868255600182019690965593020180549094509192916107a7916001600160a01b0390911690836114c2565b604080518281529051859133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a350505050565b60045460005b81811015610803576107fb81610551565b6001016107ea565b5050565b60045490565b61081561157a565b6001600160a01b0316610826610aa3565b6001600160a01b03161461086f576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60035481565b6108c761157a565b6001600160a01b03166108d8610aa3565b6001600160a01b031614610921576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b6008544310610977576040805162461bcd60e51b815260206004820152601760248201527f7365743a206d757374206265206265666f726520656e64000000000000000000604482015290519081900360640190fd5b60045484106109c1576040805162461bcd60e51b81526020600482015260116024820152701cd95d0e881a5b9d985b1a590817dc1a59607a1b604482015290519081900360640190fd5b60008211610a005760405162461bcd60e51b81526004018080602001828103825260378152602001806118f96037913960400191505060405180910390fd5b8015610a0e57610a0e6107e4565b610a4b83610a4560048781548110610a2257fe5b90600052602060002090600502016001015460065461123d90919063ffffffff16565b90611520565b6006819055508260048581548110610a5f57fe5b9060005260206000209060050201600101819055508160048581548110610a8257fe5b90600052602060002090600502016004018190555050505050565b60025481565b6000546001600160a01b031690565b60056020908152600092835260408084209091529082529020805460019091015482565b610ade61157a565b6001600160a01b0316610aef610aa3565b6001600160a01b031614610b38576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b6008544310610b8e576040805162461bcd60e51b815260206004820152601760248201527f6164643a206d757374206265206265666f726520656e64000000000000000000604482015290519081900360640190fd5b826001600160a01b038116610bd45760405162461bcd60e51b8152600401808060200182810382526029815260200180611a056029913960400191505060405180910390fd5b6001600160a01b03811660009081526009602052604090205460ff1615610c42576040805162461bcd60e51b815260206004820152601860248201527f6164643a20616c72656164792077686974656c69737465640000000000000000604482015290519081900360640190fd5b60008311610c815760405162461bcd60e51b81526004018080602001828103825260378152602001806119a46037913960400191505060405180910390fd5b8115610c8f57610c8f6107e4565b60006007544311610ca257600754610ca4565b435b600654909150610cb49087611520565b6006556040805160a0810182526001600160a01b039687168152602080820198895281830193845260006060830181815260808401988952600480546001808201835591845294517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600590960295860180546001600160a01b031916918d169190911790559a517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c85015594517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d84015593517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19e83015595517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19f909101559190941684526009909252509020805460ff19169091179055565b6001546001600160a01b031681565b6004546000908310610e56576040805162461bcd60e51b815260206004820152601c60248201527f70656e64696e67526577617264733a20696e76616c6964205f70696400000000604482015290519081900360640190fd5b600060048481548110610e6557fe5b60009182526020808320878452600580835260408086206001600160a01b03808b16885290855281872060039390960290930191820154825482516370a0823160e01b815230600482015292519398509596909590949316926370a0823192602480840193829003018186803b158015610ede57600080fd5b505afa158015610ef2573d6000803e3d6000fd5b505050506040513d6020811015610f0857600080fd5b5051600285015490915043118015610f1f57508015155b15610f9b576000600854431115610f3857600854610f3a565b435b90506000610f4c866002015483611514565b90506000610f736006546104a289600101546106b96002548761130190919063ffffffff16565b9050610f95610f8e856104a284670de0b6b3a7640000611301565b8690611520565b94505050505b610fc683600101546104a8670de0b6b3a76400006104a286886000015461130190919063ffffffff16565b9450505050505b92915050565b600060048381548110610fe257fe5b6000918252602080832086845260058083526040808620338752909352919093209102909101600481015482549193509061101d9085611520565b111561105a5760405162461bcd60e51b81526004018080602001828103825260338152602001806119516033913960400191505060405180910390fd5b61106384610551565b8054156110af57600061109b82600101546104a8670de0b6b3a76400006104a28760030154876000015461130190919063ffffffff16565b905080156110ad576110ad3382611361565b505b82156110db5781546110cc906001600160a01b031633308661157e565b80546110d89084611520565b81555b600382015481546110f991670de0b6b3a7640000916104a291611301565b6001820155604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b61114361157a565b6001600160a01b0316611154610aa3565b6001600160a01b03161461119d576040805162461bcd60e51b81526020600482018190526024820152600080516020611984833981519152604482015290519081900360640190fd5b6001600160a01b0381166111e25760405162461bcd60e51b81526004018080602001828103825260268152602001806118ad6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600082821115611294576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008082116112f0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816112f957fe5b049392505050565b60008261131057506000610fcd565b8282028284828161131d57fe5b041461135a5760405162461bcd60e51b81526004018080602001828103825260218152602001806119306021913960400191505060405180910390fd5b9392505050565b60015460408051639e1a4d1960e01b815290516000926001600160a01b031691639e1a4d1991600480830192602092919082900301818787803b1580156113a757600080fd5b505af11580156113bb573d6000803e3d6000fd5b505050506040513d60208110156113d157600080fd5b505190508082111561144f576001546040805163040b850f60e31b81526001600160a01b038681166004830152602482018590529151919092169163205c287891604480830192600092919082900301818387803b15801561143257600080fd5b505af1158015611446573d6000803e3d6000fd5b505050506114bd565b6001546040805163040b850f60e31b81526001600160a01b038681166004830152602482018690529151919092169163205c287891604480830192600092919082900301818387803b1580156114a457600080fd5b505af11580156114b8573d6000803e3d6000fd5b505050505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526114bd9084906115de565b600061135a828461123d565b60008282018381101561135a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b3390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526115d89085906115de565b50505050565b6060611633826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661168f9092919063ffffffff16565b8051909150156114bd5780806020019051602081101561165257600080fd5b50516114bd5760405162461bcd60e51b815260040180806020018281038252602a8152602001806119db602a913960400191505060405180910390fd5b606061169e84846000856116a6565b949350505050565b6060824710156116e75760405162461bcd60e51b81526004018080602001828103825260268152602001806118d36026913960400191505060405180910390fd5b6116f085611802565b611741576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106117805780518252601f199092019160209182019101611761565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146117e2576040519150601f19603f3d011682016040523d82523d6000602084013e6117e7565b606091505b50915091506117f7828286611808565b979650505050505050565b3b151590565b6060831561181757508161135a565b8251156118275782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611871578181015183820152602001611859565b50505050905090810190601f16801561189e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c7365743a205f6d61785374616b696e67416d6f756e7450657255736572206d7573742062652067726561746572207468616e207a65726f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776465706f7369743a2063616e206e6f7420657863656564206d6178207374616b696e6720616d6f756e742070657220757365724f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726164643a205f6d61785374616b696e67416d6f756e7450657255736572206d7573742062652067726561746572207468616e207a65726f5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565646164643a205f6572633230546f6b656e206d757374206e6f74206265207a65726f2061646472657373a26469706673582212203262c8ff91185842f06c8357bfd40261b6b4acd1ff8e169266b5e36f91cfdb3964736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000007ca256267128fbe1a79b74fc7b0e6ed3359ad08000000000000000000000000000000000000000000000000000009d521d08e000000000000000000000000000000000000000000000000000000000000bee3300000000000000000000000000000000000000000000000000000000000ce196b
-----Decoded View---------------
Arg [0] : _rewardToken (address): 0x07cA256267128FBE1A79B74Fc7b0e6ed3359ad08
Arg [1] : _maxRewardTokenAvailableForFarming (uint256): 10811000000000
Arg [2] : _startBlock (uint256): 12510000
Arg [3] : _endBlock (uint256): 13506923
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 00000000000000000000000007ca256267128fbe1a79b74fc7b0e6ed3359ad08
Arg [1] : 000000000000000000000000000000000000000000000000000009d521d08e00
Arg [2] : 0000000000000000000000000000000000000000000000000000000000bee330
Arg [3] : 0000000000000000000000000000000000000000000000000000000000ce196b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.