Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
PolygonLandWeightedSANDRewardPool
Compiler Version
v0.8.2+commit.661d1103
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-0.8/utils/math/SafeMath.sol"; /** * @title SafeMath * @dev Math operations with safety checks that revert */ library SafeMathWithRequire { using SafeMath for uint256; uint256 private constant DECIMALS_18 = 1000000000000000000; uint256 private constant DECIMALS_12 = 1000000000000; uint256 private constant DECIMALS_9 = 1000000000; uint256 private constant DECIMALS_6 = 1000000; function sqrt6(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_12); uint256 tmp = a.add(1) / 2; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; tmp = ((a / tmp) + tmp) / 2; } } function sqrt3(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_6); uint256 tmp = a.add(1) / 2; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; tmp = ((a / tmp) + tmp) / 2; } } function cbrt6(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_18); uint256 tmp = a.add(2) / 3; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; uint256 tmpSquare = tmp**2; require(tmpSquare > tmp, "overflow"); tmp = ((a / tmpSquare) + (tmp * 2)) / 3; } return c; } function cbrt3(uint256 a) internal pure returns (uint256 c) { a = a.mul(DECIMALS_9); uint256 tmp = a.add(2) / 3; c = a; // tmp cannot be zero unless a = 0 which skip the loop while (tmp < c) { c = tmp; uint256 tmpSquare = tmp**2; require(tmpSquare > tmp, "overflow"); tmp = ((a / tmpSquare) + (tmp * 2)) / 3; } return c; } }
//SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity 0.8.2; /** * @title ERC165 * @dev https://eips.ethereum.org/EIPS/eip-165 */ interface IERC165 { /** * @notice Query if a contract implements interface `interfaceId` * @param interfaceId The interface identifier, as specified in ERC-165 * @dev Interface identification is specified in ERC-165. This function * uses less than 30,000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
//SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity 0.8.2; import "./IERC165.sol"; import "./IERC721Events.sol"; /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://eips.ethereum.org/EIPS/eip-721 */ /*interface*/ interface IERC721 is IERC165, IERC721Events { function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); // function exists(uint256 tokenId) external view returns (bool exists); function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function transferFrom( address from, address to, uint256 tokenId ) external; function safeTransferFrom( address from, address to, uint256 tokenId ) external; function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
//SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity 0.8.2; /** * @title ERC721 Non-Fungible Token Standard basic interface * @dev see https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Events { event Transfer(address indexed _from, address indexed _to, uint256 indexed _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 indexed _tokenId); // Duplicate event, ERC1155 ApprovalForAll // event ApprovalForAll(address indexed _owner, address indexed _operator, bool _approved); }
//SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-0.8/access/Ownable.sol"; abstract contract IRewardDistributionRecipient is Ownable { address public rewardDistribution; function notifyRewardAmount(uint256 reward) external virtual; modifier onlyRewardDistribution() { require(_msgSender() == rewardDistribution, "Caller is not reward distribution"); _; } modifier onlyRewardDistributionOrAccount(address account) { require( _msgSender() == rewardDistribution || _msgSender() == account, "Caller is not reward distribution or account" ); _; } function setRewardDistribution(address _rewardDistribution) external onlyOwner { rewardDistribution = _rewardDistribution; } }
//SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-0.8/utils/math/SafeMath.sol"; import "@openzeppelin/contracts-0.8/utils/math/Math.sol"; import "@openzeppelin/contracts-0.8/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts-0.8/token/ERC20/utils/SafeERC20.sol"; import "../../common/Libraries/SafeMathWithRequire.sol"; import "./IRewardDistributionRecipient.sol"; import "../../common/interfaces/IERC721.sol"; contract PolygonLPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; uint256 internal constant DECIMALS_18 = 1000000000000000000; IERC20 internal _stakeToken; uint256 private _totalSupply; mapping(address => uint256) private _balances; constructor(IERC20 stakeToken) { _stakeToken = stakeToken; } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function stake(uint256 amount) public virtual { _totalSupply = _totalSupply.add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); _stakeToken.safeTransferFrom(msg.sender, address(this), amount); } function withdraw(uint256 amount) public virtual { _totalSupply = _totalSupply.sub(amount); _balances[msg.sender] = _balances[msg.sender].sub(amount); _stakeToken.safeTransfer(msg.sender, amount); } } ///@notice Reward Pool based on unipool contract : https://github.com/Synthetixio/Unipool/blob/master/contracts/Unipool.sol //with the addition of NFT multiplier reward contract PolygonLandWeightedSANDRewardPool is PolygonLPTokenWrapper, IRewardDistributionRecipient, ReentrancyGuard { using SafeMath for uint256; using SafeMathWithRequire for uint256; using SafeERC20 for IERC20; using Address for address; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event MultiplierComputed(address indexed user, uint256 multiplier, uint256 contribution); uint256 public immutable duration; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; uint256 internal constant DECIMALS_9 = 1000000000; uint256 internal constant MIDPOINT_9 = 500000000; uint256 internal constant NFT_FACTOR_6 = 10000; uint256 internal constant NFT_CONSTANT_3 = 9000; uint256 internal constant ROOT3_FACTOR = 697; IERC20 internal _rewardToken; IERC721 internal _multiplierNFToken; uint256 internal _totalContributions; mapping(address => uint256) internal _multipliers; mapping(address => uint256) internal _contributions; constructor( IERC20 stakeToken, IERC20 rewardToken, IERC721 multiplierNFToken, uint256 rewardDuration ) PolygonLPTokenWrapper(stakeToken) { _rewardToken = rewardToken; _multiplierNFToken = multiplierNFToken; duration = rewardDuration; } function totalContributions() public view returns (uint256) { return _totalContributions; } function contributionOf(address account) public view returns (uint256) { return _contributions[account]; } function multiplierOf(address account) public view returns (uint256) { return _multipliers[account]; } modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); if (block.timestamp >= periodFinish || _totalContributions != 0) { // ensure reward past the first staker do not get lost lastUpdateTime = lastTimeRewardApplicable(); } if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public view returns (uint256) { if (totalContributions() == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add( lastTimeRewardApplicable().sub(lastUpdateTime).mul(rewardRate).mul(1e24).div(totalContributions()) ); } function earned(address account) public view returns (uint256) { return contributionOf(account).mul(rewardPerToken().sub(userRewardPerTokenPaid[account])).div(1e24).add( rewards[account] ); } function computeContribution(uint256 amountStaked, uint256 numLands) public pure returns (uint256) { if (numLands == 0) { return amountStaked; } uint256 nftContrib = NFT_FACTOR_6.mul(NFT_CONSTANT_3.add(numLands.sub(1).mul(ROOT3_FACTOR).add(1).cbrt3())); if (nftContrib > MIDPOINT_9) { nftContrib = MIDPOINT_9.add(nftContrib.sub(MIDPOINT_9).div(10)); } return amountStaked.add(amountStaked.mul(nftContrib).div(DECIMALS_9)); } function updateContribution(address account) internal { _totalContributions = _totalContributions.sub(contributionOf(account)); _multipliers[account] = _multiplierNFToken.balanceOf(account); uint256 contribution = computeContribution(balanceOf(account), multiplierOf(account)); _totalContributions = _totalContributions.add(contribution); _contributions[account] = contribution; } function computeMultiplier(address account) public onlyRewardDistributionOrAccount(account) updateReward(account) { updateContribution(account); emit MultiplierComputed(account, multiplierOf(account), contributionOf(account)); } function stake(uint256 amount) public override nonReentrant updateReward(msg.sender) { require(amount > 0, "Cannot stake 0"); super.stake(amount); updateContribution(msg.sender); emit Staked(msg.sender, amount); } function withdraw(uint256 amount) public override nonReentrant updateReward(msg.sender) { require(amount > 0, "Cannot withdraw 0"); super.withdraw(amount); updateContribution(msg.sender); emit Withdrawn(msg.sender, amount); } function exit() external { withdraw(balanceOf(msg.sender)); getReward(); } function getReward() public nonReentrant updateReward(msg.sender) { uint256 reward = rewards[msg.sender]; if (reward > 0) { rewards[msg.sender] = 0; _rewardToken.safeTransfer(msg.sender, reward); emit RewardPaid(msg.sender, reward); } } ///@notice to be called after the amount of reward tokens (specified by the reward parameter) has been sent to the contract // Note that the reward should be divisible by the duration to avoid reward token lost ///@param reward number of token to be distributed over the duration function notifyRewardAmount(uint256 reward) external override onlyRewardDistribution updateReward(address(0)) { if (block.timestamp >= periodFinish) { rewardRate = reward.div(duration); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardRate = reward.add(leftover).div(duration); } lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(duration); emit RewardAdded(reward); } // Add Setter functions for every external contract function SetRewardToken(address newRewardToken) external onlyOwner { require(newRewardToken.isContract(), "Bad RewardToken address"); _rewardToken = IERC20(newRewardToken); } function SetStakeLPToken(address newStakeLPToken) external onlyOwner { require(newStakeLPToken.isContract(), "Bad StakeToken address"); _stakeToken = IERC20(newStakeLPToken); } function SetNFTMultiplierToken(address newNFTMultiplierToken) external onlyOwner { require(newNFTMultiplierToken.isContract(), "Bad NFTMultiplierToken address"); _multiplierNFToken = IERC721(newNFTMultiplierToken); } }
{ "evmVersion": "istanbul", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 2000 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"stakeToken","type":"address"},{"internalType":"contract IERC20","name":"rewardToken","type":"address"},{"internalType":"contract IERC721","name":"multiplierNFToken","type":"address"},{"internalType":"uint256","name":"rewardDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"multiplier","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"contribution","type":"uint256"}],"name":"MultiplierComputed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reward","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[{"internalType":"address","name":"newNFTMultiplierToken","type":"address"}],"name":"SetNFTMultiplierToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRewardToken","type":"address"}],"name":"SetRewardToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newStakeLPToken","type":"address"}],"name":"SetStakeLPToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountStaked","type":"uint256"},{"internalType":"uint256","name":"numLands","type":"uint256"}],"name":"computeContribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"computeMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"contributionOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTimeRewardApplicable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"multiplierOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"reward","type":"uint256"}],"name":"notifyRewardAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periodFinish","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardDistribution","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardPerTokenStored","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardDistribution","type":"address"}],"name":"setRewardDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalContributions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","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":"address","name":"","type":"address"}],"name":"userRewardPerTokenPaid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a0604052600060065560006007553480156200001b57600080fd5b5060405162001d2538038062001d258339810160408190526200003e91620000ee565b600080546001600160a01b0319166001600160a01b038616178155620000613390565b600380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600555600c80546001600160a01b039485166001600160a01b031991821617909155600d8054939094169216919091179091556080525062000160565b6000806000806080858703121562000104578384fd5b8451620001118162000147565b6020860151909450620001248162000147565b6040860151909350620001378162000147565b6060959095015193969295505050565b6001600160a01b03811681146200015d57600080fd5b50565b608051611b94620001916000396000818161025101528181610947015281816109a301526109de0152611b946000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c8063715018a611610104578063c8f33c91116100a2578063df136d6511610071578063df136d6514610411578063e9fad8ee1461041a578063ebe2b12b14610422578063f2fde38b1461042b576101d9565b8063c8f33c91146103c4578063cd3daf9d146103cd578063d7805ece146103d5578063de4ef212146103fe576101d9565b80638b876347116100de5780638b876347146103575780638da5cb5b146103775780638e4a524814610388578063a694fc3a146103b1576101d9565b8063715018a61461033e5780637b0a47ee1461034657806380faa57d1461034f576101d9565b80631b510c141161017c5780633d18b9121161014b5780633d18b912146102e757806362dfa108146102ef5780636f8c206c1461030257806370a0823114610315576101d9565b80631b510c14146102a65780632e1a7d4d146102b957806337c08923146102cc5780633c6b16ab146102d4576101d9565b80630d68b761116101b85780630d68b761146102395780630fb5a6b41461024c578063101114cf1461027357806318160ddd1461029e576101d9565b80628cc262146101de5780630700037d146102045780630756844114610224575b600080fd5b6101f16101ec36600461187e565b61043e565b6040519081526020015b60405180910390f35b6101f161021236600461187e565b600b6020526000908152604090205481565b61023761023236600461187e565b6104bf565b005b61023761024736600461187e565b6105a4565b6101f17f000000000000000000000000000000000000000000000000000000000000000081565b600454610286906001600160a01b031681565b6040516001600160a01b0390911681526020016101fb565b6101f161062d565b6101f16102b43660046118f5565b610634565b6102376102c73660046118c5565b6106cf565b600e546101f1565b6102376102e23660046118c5565b61083b565b610237610a3c565b6102376102fd36600461187e565b610b81565b61023761031036600461187e565b610cfd565b6101f161032336600461187e565b6001600160a01b031660009081526002602052604090205490565b610237610ddd565b6101f160075481565b6101f1610e8e565b6101f161036536600461187e565b600a6020526000908152604090205481565b6003546001600160a01b0316610286565b6101f161039636600461187e565b6001600160a01b03166000908152600f602052604090205490565b6102376103bf3660046118c5565b610ea1565b6101f160085481565b6101f1611000565b6101f16103e336600461187e565b6001600160a01b031660009081526010602052604090205490565b61023761040c36600461187e565b611052565b6101f160095481565b610237611132565b6101f160065481565b61023761043936600461187e565b611155565b6001600160a01b0381166000908152600b6020908152604080832054600a9092528220546104b991906104b39069d3c21bcecceda1000000906104ad9061048d90610487611000565b90611294565b6001600160a01b0388166000908152601060205260409020545b906112a7565b906112b3565b906112bf565b92915050565b6003546001600160a01b0316331461051e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b0381163b6105755760405162461bcd60e51b815260206004820152601660248201527f426164205374616b65546f6b656e2061646472657373000000000000000000006044820152606401610515565b6000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6003546001600160a01b031633146105fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6001545b90565b6000816106425750816104b9565b600061067961067061066761066260016104b36102b96104a78a84611294565b6112cb565b612328906112bf565b612710906112a7565b9050631dcd65008111156106ab576106a861069d600a6104ad84631dcd6500611294565b631dcd6500906112bf565b90505b6106c76106c0633b9aca006104ad87856112a7565b85906112bf565b949350505050565b600260055414156107225760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610515565b600260055533610730611000565b600955600654421015806107455750600e5415155b1561075657610752610e8e565b6008555b6001600160a01b0381161561079a5761076e8161043e565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b600082116107ea5760405162461bcd60e51b815260206004820152601160248201527f43616e6e6f7420776974686472617720300000000000000000000000000000006044820152606401610515565b6107f38261139e565b6107fc336113f6565b60405182815233907f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5906020015b60405180910390a250506001600555565b6004546001600160a01b0316336001600160a01b0316146108c45760405162461bcd60e51b815260206004820152602160248201527f43616c6c6572206973206e6f742072657761726420646973747269627574696f60448201527f6e000000000000000000000000000000000000000000000000000000000000006064820152608401610515565b60006108ce611000565b600955600654421015806108e35750600e5415155b156108f4576108f0610e8e565b6008555b6001600160a01b038116156109385761090c8161043e565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60065442106109735761096b827f00000000000000000000000000000000000000000000000000000000000000006112b3565b6007556109d2565b6006546000906109839042611294565b9050600061099c600754836112a790919063ffffffff16565b90506109cc7f00000000000000000000000000000000000000000000000000000000000000006104ad86846112bf565b60075550505b426008819055610a02907f00000000000000000000000000000000000000000000000000000000000000006112bf565b6006556040518281527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a15050565b60026005541415610a8f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610515565b600260055533610a9d611000565b60095560065442101580610ab25750600e5415155b15610ac357610abf610e8e565b6008555b6001600160a01b03811615610b0757610adb8161043e565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b336000908152600b60205260409020548015610b7857336000818152600b6020526040812055600c54610b46916001600160a01b03909116908361151d565b60405181815233907fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e04869060200161082a565b50506001600555565b60045481906001600160a01b0316336001600160a01b03161480610bad5750336001600160a01b038216145b610c1f5760405162461bcd60e51b815260206004820152602c60248201527f43616c6c6572206973206e6f742072657761726420646973747269627574696f60448201527f6e206f72206163636f756e7400000000000000000000000000000000000000006064820152608401610515565b81610c28611000565b60095560065442101580610c3d5750600e5415155b15610c4e57610c4a610e8e565b6008555b6001600160a01b03811615610c9257610c668161043e565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b610c9b836113f6565b6001600160a01b0383166000818152600f602090815260408083205460108352928190205481519384529183019190915280517fe483f88a85578f0fc325c6aabb8f618d2d0f712d8e98493e8cc1fba91d61b7789281900390910190a2505050565b6003546001600160a01b03163314610d575760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b6001600160a01b0381163b610dae5760405162461bcd60e51b815260206004820152601760248201527f42616420526577617264546f6b656e20616464726573730000000000000000006044820152606401610515565b600c805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6003546001600160a01b03163314610e375760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36003805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000610e9c426006546115cb565b905090565b60026005541415610ef45760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610515565b600260055533610f02611000565b60095560065442101580610f175750600e5415155b15610f2857610f24610e8e565b6008555b6001600160a01b03811615610f6c57610f408161043e565b6001600160a01b0382166000908152600b6020908152604080832093909355600954600a909152919020555b60008211610fbc5760405162461bcd60e51b815260206004820152600e60248201527f43616e6e6f74207374616b6520300000000000000000000000000000000000006044820152606401610515565b610fc5826115e1565b610fce336113f6565b60405182815233907f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d9060200161082a565b600061100b600e5490565b6110185750600954610631565b610e9c611049611027600e5490565b6104ad69d3c21bcecceda10000006104a76007546104a7600854610487610e8e565b600954906112bf565b6003546001600160a01b031633146110ac5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b6001600160a01b0381163b6111035760405162461bcd60e51b815260206004820152601e60248201527f426164204e46544d756c7469706c696572546f6b656e206164647265737300006044820152606401610515565b600d805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3360009081526002602052604090205461114b906102c7565b611153610a3c565b565b6003546001600160a01b031633146111af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610515565b6001600160a01b03811661122b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610515565b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b60006112a08284611aec565b9392505050565b60006112a08284611acd565b60006112a0828461197d565b60006112a08284611965565b60006112db82633b9aca006112a7565b9150600060036112ec8460026112bf565b6112f6919061197d565b90508291505b818110156113985790508060006113146002836119fc565b90508181116113655760405162461bcd60e51b815260206004820152600860248201527f6f766572666c6f770000000000000000000000000000000000000000000000006044820152606401610515565b6003611372836002611acd565b61137c838761197d565b6113869190611965565b611390919061197d565b9150506112fc565b50919050565b6001546113ab9082611294565b600155336000908152600260205260409020546113c89082611294565b3360008181526002602052604081209290925590546113f3916001600160a01b03909116908361151d565b50565b611421611418826001600160a01b031660009081526010602052604090205490565b600e5490611294565b600e55600d546040517f70a082310000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152909116906370a082319060240160206040518083038186803b15801561148257600080fd5b505afa158015611496573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ba91906118dd565b6001600160a01b0382166000908152600f602081815260408084208590556002825283205491905290916114ee91906102b4565b600e549091506114fe90826112bf565b600e556001600160a01b03909116600090815260106020526040902055565b6040516001600160a01b0383166024820152604481018290526115c69084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611637565b505050565b60008183106115da57816112a0565b5090919050565b6001546115ee90826112bf565b6001553360009081526002602052604090205461160b90826112bf565b3360008181526002602052604081209290925590546113f3916001600160a01b0390911690308461171c565b600061168c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166117739092919063ffffffff16565b8051909150156115c657808060200190518101906116aa91906118a5565b6115c65760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610515565b6040516001600160a01b038085166024830152831660448201526064810182905261176d9085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611562565b50505050565b60606106c7848460008585843b6117cc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610515565b600080866001600160a01b031685876040516117e89190611916565b60006040518083038185875af1925050503d8060008114611825576040519150601f19603f3d011682016040523d82523d6000602084013e61182a565b606091505b509150915061183a828286611845565b979650505050505050565b606083156118545750816112a0565b8251156118645782518084602001fd5b8160405162461bcd60e51b81526004016105159190611932565b60006020828403121561188f578081fd5b81356001600160a01b03811681146112a0578182fd5b6000602082840312156118b6578081fd5b815180151581146112a0578182fd5b6000602082840312156118d6578081fd5b5035919050565b6000602082840312156118ee578081fd5b5051919050565b60008060408385031215611907578081fd5b50508035926020909101359150565b60008251611928818460208701611b03565b9190910192915050565b6000602082528251806020840152611951816040850160208701611b03565b601f01601f19169190910160400192915050565b6000821982111561197857611978611b2f565b500190565b6000826119b1577f4e487b710000000000000000000000000000000000000000000000000000000081526012600452602481fd5b500490565b80825b60018086116119c857506119f3565b8187048211156119da576119da611b2f565b808616156119e757918102915b9490941c9380026119b9565b94509492505050565b60006112a060001960ff851684600082611a18575060016112a0565b81611a25575060006112a0565b8160018114611a3b5760028114611a4557611a72565b60019150506112a0565b60ff841115611a5657611a56611b2f565b6001841b915084821115611a6c57611a6c611b2f565b506112a0565b5060208310610133831016604e8410600b8410161715611aa5575081810a83811115611aa057611aa0611b2f565b6112a0565b611ab284848460016119b6565b808604821115611ac457611ac4611b2f565b02949350505050565b6000816000190483118215151615611ae757611ae7611b2f565b500290565b600082821015611afe57611afe611b2f565b500390565b60005b83811015611b1e578181015183820152602001611b06565b8381111561176d5750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fdfea26469706673582212206c97a442352b91fe8cff8034d6847e2c71391cbd1bed18374c5c0c19ee2f2e3164736f6c63430008020033000000000000000000000000369582d2010b6ed950b571f4101e3bb9b554876f000000000000000000000000bbba073c31bf03b8acf7c28ef0738decf36956830000000000000000000000004ebcfb9f8b4df38ce149c655541d591afb6a03bd000000000000000000000000000000000000000000000000000000000024ea00
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000369582d2010b6ed950b571f4101e3bb9b554876f000000000000000000000000bbba073c31bf03b8acf7c28ef0738decf36956830000000000000000000000004ebcfb9f8b4df38ce149c655541d591afb6a03bd000000000000000000000000000000000000000000000000000000000024ea00
-----Decoded View---------------
Arg [0] : stakeToken (address): 0x369582d2010b6ed950b571f4101e3bb9b554876f
Arg [1] : rewardToken (address): 0xbbba073c31bf03b8acf7c28ef0738decf3695683
Arg [2] : multiplierNFToken (address): 0x4ebcfb9f8b4df38ce149c655541d591afb6a03bd
Arg [3] : rewardDuration (uint256): 2419200
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000369582d2010b6ed950b571f4101e3bb9b554876f
Arg [1] : 000000000000000000000000bbba073c31bf03b8acf7c28ef0738decf3695683
Arg [2] : 0000000000000000000000004ebcfb9f8b4df38ce149c655541d591afb6a03bd
Arg [3] : 000000000000000000000000000000000000000000000000000000000024ea00
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.