More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 87 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stake Tokens | 8282118 | 30 days ago | IN | 0 APE | 0.00248855 | ||||
Unstake Tokens | 7524214 | 43 days ago | IN | 0 APE | 0.00188003 | ||||
Unstake Tokens | 7398560 | 46 days ago | IN | 0 APE | 0.00144562 | ||||
Stake Tokens | 6624926 | 64 days ago | IN | 0 APE | 0.0016195 | ||||
Unstake Tokens | 6152428 | 74 days ago | IN | 0 APE | 0.00156736 | ||||
Stake Tokens | 5963813 | 76 days ago | IN | 0 APE | 0.00205447 | ||||
Stake Tokens | 5631416 | 80 days ago | IN | 0 APE | 0.00205419 | ||||
Unstake Tokens | 5529704 | 81 days ago | IN | 0 APE | 0.00188034 | ||||
Unstake Tokens | 5418532 | 82 days ago | IN | 0 APE | 0.00188003 | ||||
Unstake Tokens | 5066077 | 85 days ago | IN | 0 APE | 0.00188003 | ||||
Unstake Tokens | 4986853 | 86 days ago | IN | 0 APE | 0.00188001 | ||||
Unstake Tokens | 4835512 | 87 days ago | IN | 0 APE | 0.00188003 | ||||
Unstake Tokens | 4702914 | 88 days ago | IN | 0 APE | 0.00188003 | ||||
Unstake Tokens | 4647278 | 89 days ago | IN | 0 APE | 0.0023147 | ||||
Unstake Tokens | 4621340 | 89 days ago | IN | 0 APE | 0.00188001 | ||||
Unstake Tokens | 4310612 | 93 days ago | IN | 0 APE | 0.00188031 | ||||
Stake Tokens | 4297019 | 93 days ago | IN | 0 APE | 0.00248888 | ||||
Stake Tokens | 4296959 | 93 days ago | IN | 0 APE | 0.0016195 | ||||
Unstake Tokens | 4200250 | 95 days ago | IN | 0 APE | 0.00188034 | ||||
Stake Tokens | 4181101 | 95 days ago | IN | 0 APE | 0.0016195 | ||||
Unstake Tokens | 4180929 | 95 days ago | IN | 0 APE | 0.00200205 | ||||
Stake Tokens | 4047991 | 97 days ago | IN | 0 APE | 0.00248888 | ||||
Stake Tokens | 4028752 | 97 days ago | IN | 0 APE | 0.00261088 | ||||
Stake Tokens | 4024914 | 97 days ago | IN | 0 APE | 0.00248888 | ||||
Stake Tokens | 4022942 | 97 days ago | IN | 0 APE | 0.00248888 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PizzaStake
Compiler Version
v0.8.26+commit.8a97fa7a
Contract Source Code (Solidity)
/** *Submitted for verification at apescan.io on 2024-10-31 */ // SPDX-License-Identifier: MIT // File: @openzeppelin/contracts/token/ERC20/IERC20.sol // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @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 Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } // File: @openzeppelin/contracts/interfaces/IERC20.sol // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; // File: @openzeppelin/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/interfaces/IERC165.sol // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; // File: @openzeppelin/contracts/interfaces/IERC1363.sol // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); } // File: @openzeppelin/contracts/utils/Errors.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); } // File: @openzeppelin/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert Errors.FailedCall(); } } /** * @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 or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {Errors.FailedCall} error. * * 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. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @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`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case * of an unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {Errors.FailedCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } } // File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; /** * @title SafeERC20 * @dev Wrappers around ERC-20 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 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } } // File: @openzeppelin/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol) 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 making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == _ENTERED; } } // File: @openzeppelin/contracts/utils/Context.sol // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // File: @openzeppelin/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; /** * @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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: @openzeppelin/contracts/utils/math/SafeMath.sol // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol) 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 generally not needed starting with Solidity 0.8, since 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 subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File: PizzaStake.sol pragma solidity 0.8.26; contract PizzaStake is ReentrancyGuard, Ownable { // Library usage using SafeERC20 for IERC20; using SafeMath for uint256; // Token amount variables mapping(address => uint256) public alreadyWithdrawn; mapping(address => uint256) public balances; mapping(address => uint256) public userLockPeriod; // User-specific lock period uint256 public contractBalance; uint256 public lockPeriod; // Lock period in seconds (default: 1 week) // ERC20 contract address IERC20 public erc20Contract; // Events event tokensStaked(address from, uint256 amount); event TokensUnstaked(address to, uint256 amount); event LockPeriodUpdated(uint256 newLockPeriod); /// @dev Deploys contract and links the ERC20 token which we are staking /// @param _erc20_contract_address The address of the ERC20 token. constructor(IERC20 _erc20_contract_address) Ownable(msg.sender) { require(address(_erc20_contract_address) != address(0), "_erc20_contract_address address can not be zero"); erc20Contract = _erc20_contract_address; lockPeriod = 604800 ; // Initialize with a default lock period of 1 Week } /// @dev Returns the time remaining until tokens can be unstaked for the caller. function timeUntilUnstakeAvailable() public view returns (uint256) { if (block.timestamp >= userLockPeriod[msg.sender]) { return 0; } else { return userLockPeriod[msg.sender].sub(block.timestamp); } } /// @dev Allows the owner to set the lock period for future stakes. /// @param _newLockPeriod Lock period in seconds. function setLockPeriod(uint256 _newLockPeriod) public onlyOwner { lockPeriod = _newLockPeriod; emit LockPeriodUpdated(_newLockPeriod); } /// @dev Allows the contract owner to allocate official ERC20 tokens to each future recipient (only one at a time). /// @param token The official ERC20 token which this contract exclusively accepts. /// @param amount The amount to allocate to recipient. function stakeTokens(IERC20 token, uint256 amount) public nonReentrant { require(token == erc20Contract, "You are only allowed to stake the official erc20 token address which was passed into this contract's constructor"); require(amount <= token.balanceOf(msg.sender), "Not enough STATE tokens in your wallet, please try lesser amount"); token.safeTransferFrom(msg.sender, address(this), amount); balances[msg.sender] = balances[msg.sender].add(amount); userLockPeriod[msg.sender] = block.timestamp.add(lockPeriod); // Use the set lock period emit tokensStaked(msg.sender, amount); } /// @dev Allows user to unstake tokens after their lock period has elapsed. /// @param token - Address of the official ERC20 token which is being unlocked here. /// @param amount - The amount to unlock (in wei). function unstakeTokens(IERC20 token, uint256 amount) public nonReentrant { require(balances[msg.sender] >= amount, "Insufficient token balance, try lesser amount"); require(token == erc20Contract, "Token parameter must be the same as the erc20 contract address which was passed into the constructor"); require(block.timestamp >= userLockPeriod[msg.sender], "Tokens are only available after the lock period has elapsed"); alreadyWithdrawn[msg.sender] = alreadyWithdrawn[msg.sender].add(amount); balances[msg.sender] = balances[msg.sender].sub(amount); token.safeTransfer(msg.sender, amount); emit TokensUnstaked(msg.sender, amount); } /// @dev Transfer accidentally locked ERC20 tokens. /// @param token - ERC20 token address. /// @param amount of ERC20 tokens to remove. function transferAccidentallyLockedTokens(IERC20 token, uint256 amount) public onlyOwner nonReentrant { require(address(token) != address(0), "Token address can not be zero"); // This function cannot access the official timelocked tokens; just other random ERC20 tokens that may have been accidently sent here require(token != erc20Contract, "Token address can not be ERC20 address which was passed into the constructor"); // Transfer the amount of the specified ERC20 tokens to the owner of this contract token.safeTransfer(owner(), amount); // Use owner() function from Ownable } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20","name":"_erc20_contract_address","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newLockPeriod","type":"uint256"}],"name":"LockPeriodUpdated","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":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokensStaked","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"alreadyWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balances","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"erc20Contract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLockPeriod","type":"uint256"}],"name":"setLockPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeUntilUnstakeAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferAccidentallyLockedTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstakeTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLockPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b50604051610d38380380610d3883398101604081905261002e9161014d565b60015f55338061005857604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b610061816100fc565b506001600160a01b0381166100d05760405162461bcd60e51b815260206004820152602f60248201527f5f65726332305f636f6e74726163745f6164647265737320616464726573732060448201526e63616e206e6f74206265207a65726f60881b606482015260840161004f565b600780546001600160a01b0319166001600160a01b039290921691909117905562093a8060065561017a565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6020828403121561015d575f80fd5b81516001600160a01b0381168114610173575f80fd5b9392505050565b610bb1806101875f395ff3fe608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638b7afe2e11610088578063a8f6c91311610063578063a8f6c913146101d3578063c40e55af146101e6578063e89a173e146101ee578063f2fde38b14610201575f80fd5b80638b7afe2e146101865780638da5cb5b1461018f5780639aa2e39e146101b4575f80fd5b80633fd8b02f116100c35780633fd8b02f1461014f578063715018a614610158578063779972da1461016057806379a83f5a14610173575f80fd5b80630c8e32d2146100e957806327e235e31461011b5780633e9949421461013a575b5f80fd5b6101086100f7366004610ac7565b60046020525f908152604090205481565b6040519081526020015b60405180910390f35b610108610129366004610ac7565b60036020525f908152604090205481565b61014d610148366004610ae9565b610214565b005b61010860065481565b61014d61034b565b61014d61016e366004610b13565b61035e565b61014d610181366004610ae9565b6103a1565b61010860055481565b6001546001600160a01b03165b6040516001600160a01b039091168152602001610112565b6101086101c2366004610ac7565b60026020525f908152604090205481565b60075461019c906001600160a01b031681565b6101086105e9565b61014d6101fc366004610ae9565b610621565b61014d61020f366004610ac7565b610873565b61021c6108b0565b6102246108dd565b6001600160a01b03821661027f5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e20616464726573732063616e206e6f74206265207a65726f00000060448201526064015b60405180910390fd5b6007546001600160a01b03908116908316036103185760405162461bcd60e51b815260206004820152604c60248201527f546f6b656e20616464726573732063616e206e6f74206265204552433230206160448201527f646472657373207768696368207761732070617373656420696e746f2074686560648201526b1031b7b739ba393ab1ba37b960a11b608482015260a401610276565b61033e61032d6001546001600160a01b031690565b6001600160a01b0384169083610934565b61034760015f55565b5050565b6103536108b0565b61035c5f610998565b565b6103666108b0565b60068190556040518181527f8249ec545e68f6f1e1230133ca48c704d831a7f8e635ded80f3dd9e99b09bb2f9060200160405180910390a150565b6103a96108dd565b6007546001600160a01b0383811691161461046b5760405162461bcd60e51b815260206004820152607060248201527f596f7520617265206f6e6c7920616c6c6f77656420746f207374616b6520746860448201527f65206f6666696369616c20657263323020746f6b656e2061646472657373207760648201527f68696368207761732070617373656420696e746f207468697320636f6e74726160848201526f31ba13b99031b7b739ba393ab1ba37b960811b60a482015260c401610276565b6040516370a0823160e01b81523360048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d19190610b2a565b811115610548576040805162461bcd60e51b81526020600482015260248101919091527f4e6f7420656e6f75676820535441544520746f6b656e7320696e20796f75722060448201527f77616c6c65742c20706c6561736520747279206c657373657220616d6f756e746064820152608401610276565b61055d6001600160a01b0383163330846109e9565b335f908152600360205260409020546105769082610a28565b335f90815260036020526040902055600654610593904290610a28565b335f818152600460209081526040918290209390935580519182529181018390527fe5cfeeb5fcb96c1c52a55137c15e7f46d34d100d256c5396efc087c43d2fde4b91015b60405180910390a161034760015f55565b335f90815260046020526040812054421061060357505f90565b335f9081526004602052604090205461061c9042610a3c565b905090565b6106296108dd565b335f9081526003602052604090205481111561069d5760405162461bcd60e51b815260206004820152602d60248201527f496e73756666696369656e7420746f6b656e2062616c616e63652c207472792060448201526c1b195cdcd95c88185b5bdd5b9d609a1b6064820152608401610276565b6007546001600160a01b038381169116146107545760405162461bcd60e51b8152602060048201526064602482018190527f546f6b656e20706172616d65746572206d757374206265207468652073616d6560448301527f2061732074686520657263323020636f6e747261637420616464726573732077908201527f68696368207761732070617373656420696e746f2074686520636f6e7374727560848201526331ba37b960e11b60a482015260c401610276565b335f908152600460205260409020544210156107d85760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e7320617265206f6e6c7920617661696c61626c652061667465722060448201527f746865206c6f636b20706572696f642068617320656c617073656400000000006064820152608401610276565b335f908152600260205260409020546107f19082610a28565b335f908152600260209081526040808320939093556003905220546108169082610a3c565b335f8181526003602052604090209190915561083d906001600160a01b0384169083610934565b60408051338152602081018390527f9845e367b683334e5c0b12d7b81721ac518e649376fa65e3d68324e8f34f267991016105d8565b61087b6108b0565b6001600160a01b0381166108a457604051631e4fbdf760e01b81525f6004820152602401610276565b6108ad81610998565b50565b6001546001600160a01b0316331461035c5760405163118cdaa760e01b8152336004820152602401610276565b60025f540361092e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610276565b60025f55565b6040516001600160a01b0383811660248301526044820183905261099391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610a47565b505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a229186918216906323b872dd90608401610961565b50505050565b5f610a338284610b55565b90505b92915050565b5f610a338284610b68565b5f8060205f8451602086015f885af180610a66576040513d5f823e3d81fd5b50505f513d91508115610a7d578060011415610a8a565b6001600160a01b0384163b155b15610a2257604051635274afe760e01b81526001600160a01b0385166004820152602401610276565b6001600160a01b03811681146108ad575f80fd5b5f60208284031215610ad7575f80fd5b8135610ae281610ab3565b9392505050565b5f8060408385031215610afa575f80fd5b8235610b0581610ab3565b946020939093013593505050565b5f60208284031215610b23575f80fd5b5035919050565b5f60208284031215610b3a575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610a3657610a36610b41565b81810381811115610a3657610a36610b4156fea2646970667358221220905b41e5a364e281e04a72e21fe415d632d3d25743abb485fc54aceab4a67ce464736f6c634300081a0033000000000000000000000000e056496b48db4aca613ee64c4dc6dc272356403c
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100e5575f3560e01c80638b7afe2e11610088578063a8f6c91311610063578063a8f6c913146101d3578063c40e55af146101e6578063e89a173e146101ee578063f2fde38b14610201575f80fd5b80638b7afe2e146101865780638da5cb5b1461018f5780639aa2e39e146101b4575f80fd5b80633fd8b02f116100c35780633fd8b02f1461014f578063715018a614610158578063779972da1461016057806379a83f5a14610173575f80fd5b80630c8e32d2146100e957806327e235e31461011b5780633e9949421461013a575b5f80fd5b6101086100f7366004610ac7565b60046020525f908152604090205481565b6040519081526020015b60405180910390f35b610108610129366004610ac7565b60036020525f908152604090205481565b61014d610148366004610ae9565b610214565b005b61010860065481565b61014d61034b565b61014d61016e366004610b13565b61035e565b61014d610181366004610ae9565b6103a1565b61010860055481565b6001546001600160a01b03165b6040516001600160a01b039091168152602001610112565b6101086101c2366004610ac7565b60026020525f908152604090205481565b60075461019c906001600160a01b031681565b6101086105e9565b61014d6101fc366004610ae9565b610621565b61014d61020f366004610ac7565b610873565b61021c6108b0565b6102246108dd565b6001600160a01b03821661027f5760405162461bcd60e51b815260206004820152601d60248201527f546f6b656e20616464726573732063616e206e6f74206265207a65726f00000060448201526064015b60405180910390fd5b6007546001600160a01b03908116908316036103185760405162461bcd60e51b815260206004820152604c60248201527f546f6b656e20616464726573732063616e206e6f74206265204552433230206160448201527f646472657373207768696368207761732070617373656420696e746f2074686560648201526b1031b7b739ba393ab1ba37b960a11b608482015260a401610276565b61033e61032d6001546001600160a01b031690565b6001600160a01b0384169083610934565b61034760015f55565b5050565b6103536108b0565b61035c5f610998565b565b6103666108b0565b60068190556040518181527f8249ec545e68f6f1e1230133ca48c704d831a7f8e635ded80f3dd9e99b09bb2f9060200160405180910390a150565b6103a96108dd565b6007546001600160a01b0383811691161461046b5760405162461bcd60e51b815260206004820152607060248201527f596f7520617265206f6e6c7920616c6c6f77656420746f207374616b6520746860448201527f65206f6666696369616c20657263323020746f6b656e2061646472657373207760648201527f68696368207761732070617373656420696e746f207468697320636f6e74726160848201526f31ba13b99031b7b739ba393ab1ba37b960811b60a482015260c401610276565b6040516370a0823160e01b81523360048201526001600160a01b038316906370a0823190602401602060405180830381865afa1580156104ad573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104d19190610b2a565b811115610548576040805162461bcd60e51b81526020600482015260248101919091527f4e6f7420656e6f75676820535441544520746f6b656e7320696e20796f75722060448201527f77616c6c65742c20706c6561736520747279206c657373657220616d6f756e746064820152608401610276565b61055d6001600160a01b0383163330846109e9565b335f908152600360205260409020546105769082610a28565b335f90815260036020526040902055600654610593904290610a28565b335f818152600460209081526040918290209390935580519182529181018390527fe5cfeeb5fcb96c1c52a55137c15e7f46d34d100d256c5396efc087c43d2fde4b91015b60405180910390a161034760015f55565b335f90815260046020526040812054421061060357505f90565b335f9081526004602052604090205461061c9042610a3c565b905090565b6106296108dd565b335f9081526003602052604090205481111561069d5760405162461bcd60e51b815260206004820152602d60248201527f496e73756666696369656e7420746f6b656e2062616c616e63652c207472792060448201526c1b195cdcd95c88185b5bdd5b9d609a1b6064820152608401610276565b6007546001600160a01b038381169116146107545760405162461bcd60e51b8152602060048201526064602482018190527f546f6b656e20706172616d65746572206d757374206265207468652073616d6560448301527f2061732074686520657263323020636f6e747261637420616464726573732077908201527f68696368207761732070617373656420696e746f2074686520636f6e7374727560848201526331ba37b960e11b60a482015260c401610276565b335f908152600460205260409020544210156107d85760405162461bcd60e51b815260206004820152603b60248201527f546f6b656e7320617265206f6e6c7920617661696c61626c652061667465722060448201527f746865206c6f636b20706572696f642068617320656c617073656400000000006064820152608401610276565b335f908152600260205260409020546107f19082610a28565b335f908152600260209081526040808320939093556003905220546108169082610a3c565b335f8181526003602052604090209190915561083d906001600160a01b0384169083610934565b60408051338152602081018390527f9845e367b683334e5c0b12d7b81721ac518e649376fa65e3d68324e8f34f267991016105d8565b61087b6108b0565b6001600160a01b0381166108a457604051631e4fbdf760e01b81525f6004820152602401610276565b6108ad81610998565b50565b6001546001600160a01b0316331461035c5760405163118cdaa760e01b8152336004820152602401610276565b60025f540361092e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610276565b60025f55565b6040516001600160a01b0383811660248301526044820183905261099391859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610a47565b505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6040516001600160a01b038481166024830152838116604483015260648201839052610a229186918216906323b872dd90608401610961565b50505050565b5f610a338284610b55565b90505b92915050565b5f610a338284610b68565b5f8060205f8451602086015f885af180610a66576040513d5f823e3d81fd5b50505f513d91508115610a7d578060011415610a8a565b6001600160a01b0384163b155b15610a2257604051635274afe760e01b81526001600160a01b0385166004820152602401610276565b6001600160a01b03811681146108ad575f80fd5b5f60208284031215610ad7575f80fd5b8135610ae281610ab3565b9392505050565b5f8060408385031215610afa575f80fd5b8235610b0581610ab3565b946020939093013593505050565b5f60208284031215610b23575f80fd5b5035919050565b5f60208284031215610b3a575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610a3657610a36610b41565b81810381811115610a3657610a36610b4156fea2646970667358221220905b41e5a364e281e04a72e21fe415d632d3d25743abb485fc54aceab4a67ce464736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e056496b48db4aca613ee64c4dc6dc272356403c
-----Decoded View---------------
Arg [0] : _erc20_contract_address (address): 0xE056496B48dB4aca613Ee64c4dc6dC272356403c
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e056496b48db4aca613ee64c4dc6dc272356403c
Deployed Bytecode Sourcemap
39782:4532:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;40066:49;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;548:25:1;;;536:2;521:18;40066:49:0;;;;;;;;40016:43;;;;;;:::i;:::-;;;;;;;;;;;;;;43680:631;;;;;;:::i;:::-;;:::i;:::-;;40191:25;;;;;;31941:103;;;:::i;41486:159::-;;;;;;:::i;:::-;;:::i;41922:652::-;;;;;;:::i;:::-;;:::i;40154:30::-;;;;;;31266:87;31339:6;;-1:-1:-1;;;;;31339:6:0;31266:87;;;-1:-1:-1;;;;;1364:32:1;;;1346:51;;1334:2;1319:18;31266:87:0;1200:203:1;39958:51:0;;;;;;:::i;:::-;;;;;;;;;;;;;;40300:27;;;;;-1:-1:-1;;;;;40300:27:0;;;41092:258;;;:::i;42809:711::-;;;;;;:::i;:::-;;:::i;32199:220::-;;;;;;:::i;:::-;;:::i;43680:631::-;31152:13;:11;:13::i;:::-;27685:21:::1;:19;:21::i;:::-;-1:-1:-1::0;;;;;43801:28:0;::::2;43793:70;;;::::0;-1:-1:-1;;;43793:70:0;;1831:2:1;43793:70:0::2;::::0;::::2;1813:21:1::0;1870:2;1850:18;;;1843:30;1909:31;1889:18;;;1882:59;1958:18;;43793:70:0::2;;;;;;;;;44034:13;::::0;-1:-1:-1;;;;;44034:13:0;;::::2;44025:22:::0;;::::2;::::0;44017:111:::2;;;::::0;-1:-1:-1;;;44017:111:0;;2189:2:1;44017:111:0::2;::::0;::::2;2171:21:1::0;2228:2;2208:18;;;2201:30;2267:34;2247:18;;;2240:62;2338:34;2318:18;;;2311:62;-1:-1:-1;;;2389:19:1;;;2382:43;2442:19;;44017:111:0::2;1987:480:1::0;44017:111:0::2;44231:35;44250:7;31339:6:::0;;-1:-1:-1;;;;;31339:6:0;;31266:87;44250:7:::2;-1:-1:-1::0;;;;;44231:18:0;::::2;::::0;44259:6;44231:18:::2;:35::i;:::-;27729:20:::1;27123:1:::0;28249:7;:22;28066:213;27729:20:::1;43680:631:::0;;:::o;31941:103::-;31152:13;:11;:13::i;:::-;32006:30:::1;32033:1;32006:18;:30::i;:::-;31941:103::o:0;41486:159::-;31152:13;:11;:13::i;:::-;41561:10:::1;:27:::0;;;41604:33:::1;::::0;548:25:1;;;41604:33:0::1;::::0;536:2:1;521:18;41604:33:0::1;;;;;;;41486:159:::0;:::o;41922:652::-;27685:21;:19;:21::i;:::-;42021:13:::1;::::0;-1:-1:-1;;;;;42012:22:0;;::::1;42021:13:::0;::::1;42012:22;42004:147;;;::::0;-1:-1:-1;;;42004:147:0;;2674:2:1;42004:147:0::1;::::0;::::1;2656:21:1::0;2713:3;2693:18;;;2686:31;2753:34;2733:18;;;2726:62;2824:34;2804:18;;;2797:62;2896:34;2875:19;;;2868:63;-1:-1:-1;;;2947:19:1;;;2940:47;3004:19;;42004:147:0::1;2472:557:1::0;42004:147:0::1;42180:27;::::0;-1:-1:-1;;;42180:27:0;;42196:10:::1;42180:27;::::0;::::1;1346:51:1::0;-1:-1:-1;;;;;42180:15:0;::::1;::::0;::::1;::::0;1319:18:1;;42180:27:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;42170:6;:37;;42162:114;;;::::0;;-1:-1:-1;;;42162:114:0;;3425:2:1;42162:114:0::1;::::0;::::1;3407:21:1::0;3444:18;;;3437:30;;;;3503:34;3483:18;;;3476:62;3574:34;3554:18;;;3547:62;3626:19;;42162:114:0::1;3223:428:1::0;42162:114:0::1;42297:57;-1:-1:-1::0;;;;;42297:22:0;::::1;42320:10;42340:4;42347:6:::0;42297:22:::1;:57::i;:::-;42397:10;42388:20;::::0;;;:8:::1;:20;::::0;;;;;:32:::1;::::0;42413:6;42388:24:::1;:32::i;:::-;42374:10;42365:20;::::0;;;:8:::1;:20;::::0;;;;:55;42480:10:::1;::::0;42460:31:::1;::::0;:15:::1;::::0;:19:::1;:31::i;:::-;42446:10;42431:26;::::0;;;:14:::1;:26;::::0;;;;;;;;:60;;;;42534:32;;3830:51:1;;;3897:18;;;3890:34;;;42534:32:0::1;::::0;3803:18:1;42534:32:0::1;;;;;;;;27729:20:::0;27123:1;28249:7;:22;28066:213;41092:258;41208:10;41150:7;41193:26;;;:14;:26;;;;;;41174:15;:45;41170:173;;-1:-1:-1;41243:1:0;;41092:258::o;41170:173::-;41299:10;41284:26;;;;:14;:26;;;;;;:47;;41315:15;41284:30;:47::i;:::-;41277:54;;41092:258;:::o;42809:711::-;27685:21;:19;:21::i;:::-;42910:10:::1;42901:20;::::0;;;:8:::1;:20;::::0;;;;;:30;-1:-1:-1;42901:30:0::1;42893:88;;;::::0;-1:-1:-1;;;42893:88:0;;4137:2:1;42893:88:0::1;::::0;::::1;4119:21:1::0;4176:2;4156:18;;;4149:30;4215:34;4195:18;;;4188:62;-1:-1:-1;;;4266:18:1;;;4259:43;4319:19;;42893:88:0::1;3935:409:1::0;42893:88:0::1;43009:13;::::0;-1:-1:-1;;;;;43000:22:0;;::::1;43009:13:::0;::::1;43000:22;42992:135;;;::::0;-1:-1:-1;;;42992:135:0;;4551:2:1;42992:135:0::1;::::0;::::1;4533:21:1::0;4590:3;4570:18;;;4563:31;;;4630:34;4610:18;;;4603:62;4701:34;4681:18;;;4674:62;4773:34;4752:19;;;4745:63;-1:-1:-1;;;4824:19:1;;;4817:35;4869:19;;42992:135:0::1;4349:545:1::0;42992:135:0::1;43180:10;43165:26;::::0;;;:14:::1;:26;::::0;;;;;43146:15:::1;:45;;43138:117;;;::::0;-1:-1:-1;;;43138:117:0;;5101:2:1;43138:117:0::1;::::0;::::1;5083:21:1::0;5140:2;5120:18;;;5113:30;5179:34;5159:18;;;5152:62;5250:29;5230:18;;;5223:57;5297:19;;43138:117:0::1;4899:423:1::0;43138:117:0::1;43324:10;43307:28;::::0;;;:16:::1;:28;::::0;;;;;:40:::1;::::0;43340:6;43307:32:::1;:40::i;:::-;43293:10;43276:28;::::0;;;:16:::1;:28;::::0;;;;;;;:71;;;;43381:8:::1;:20:::0;;;;:32:::1;::::0;43406:6;43381:24:::1;:32::i;:::-;43367:10;43358:20;::::0;;;:8:::1;:20;::::0;;;;:55;;;;43424:38:::1;::::0;-1:-1:-1;;;;;43424:18:0;::::1;::::0;43455:6;43424:18:::1;:38::i;:::-;43478:34;::::0;;43493:10:::1;3830:51:1::0;;3912:2;3897:18;;3890:34;;;43478::0::1;::::0;3803:18:1;43478:34:0::1;3656:274:1::0;32199:220:0;31152:13;:11;:13::i;:::-;-1:-1:-1;;;;;32284:22:0;::::1;32280:93;;32330:31;::::0;-1:-1:-1;;;32330:31:0;;32358:1:::1;32330:31;::::0;::::1;1346:51:1::0;1319:18;;32330:31:0::1;1200:203:1::0;32280:93:0::1;32383:28;32402:8;32383:18;:28::i;:::-;32199:220:::0;:::o;31431:166::-;31339:6;;-1:-1:-1;;;;;31339:6:0;29355:10;31491:23;31487:103;;31538:40;;-1:-1:-1;;;31538:40:0;;29355:10;31538:40;;;1346:51:1;1319:18;;31538:40:0;1200:203:1;27765:293:0;27167:1;27899:7;;:19;27891:63;;;;-1:-1:-1;;;27891:63:0;;5529:2:1;27891:63:0;;;5511:21:1;5568:2;5548:18;;;5541:30;5607:33;5587:18;;;5580:61;5658:18;;27891:63:0;5327:355:1;27891:63:0;27167:1;28032:7;:18;27765:293::o;17000:162::-;17110:43;;-1:-1:-1;;;;;3848:32:1;;;17110:43:0;;;3830:51:1;3897:18;;;3890:34;;;17083:71:0;;17103:5;;17125:14;;;;;3803:18:1;;17110:43:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;17110:43:0;;;;;;;;;;;17083:19;:71::i;:::-;17000:162;;;:::o;32579:191::-;32672:6;;;-1:-1:-1;;;;;32689:17:0;;;-1:-1:-1;;;;;;32689:17:0;;;;;;;32722:40;;32672:6;;;32689:17;32672:6;;32722:40;;32653:16;;32722:40;32642:128;32579:191;:::o;17407:190::-;17535:53;;-1:-1:-1;;;;;5907:32:1;;;17535:53:0;;;5889:51:1;5976:32;;;5956:18;;;5949:60;6025:18;;;6018:34;;;17508:81:0;;17528:5;;17550:18;;;;;5862::1;;17535:53:0;5687:371:1;17508:81:0;17407:190;;;;:::o;35653:98::-;35711:7;35738:5;35742:1;35738;:5;:::i;:::-;35731:12;;35653:98;;;;;:::o;36034:::-;36092:7;36119:5;36123:1;36119;:5;:::i;23593:738::-;23674:18;23703:19;23843:4;23840:1;23833:4;23827:11;23820:4;23814;23810:15;23807:1;23800:5;23793;23788:60;23902:7;23892:180;;23947:4;23941:11;23993:16;23990:1;23985:3;23970:40;24040:16;24035:3;24028:29;23892:180;-1:-1:-1;;24151:1:0;24145:8;24100:16;;-1:-1:-1;24180:15:0;;:68;;24232:11;24247:1;24232:16;;24180:68;;;-1:-1:-1;;;;;24198:26:0;;;:31;24180:68;24176:148;;;24272:40;;-1:-1:-1;;;24272:40:0;;-1:-1:-1;;;;;1364:32:1;;24272:40:0;;;1346:51:1;1319:18;;24272:40:0;1200:203:1;14:131;-1:-1:-1;;;;;89:31:1;;79:42;;69:70;;135:1;132;125:12;150:247;209:6;262:2;250:9;241:7;237:23;233:32;230:52;;;278:1;275;268:12;230:52;317:9;304:23;336:31;361:5;336:31;:::i;:::-;386:5;150:247;-1:-1:-1;;;150:247:1:o;584:380::-;665:6;673;726:2;714:9;705:7;701:23;697:32;694:52;;;742:1;739;732:12;694:52;781:9;768:23;800:31;825:5;800:31;:::i;:::-;850:5;928:2;913:18;;;;900:32;;-1:-1:-1;;;584:380:1:o;969:226::-;1028:6;1081:2;1069:9;1060:7;1056:23;1052:32;1049:52;;;1097:1;1094;1087:12;1049:52;-1:-1:-1;1142:23:1;;969:226;-1:-1:-1;969:226:1:o;3034:184::-;3104:6;3157:2;3145:9;3136:7;3132:23;3128:32;3125:52;;;3173:1;3170;3163:12;3125:52;-1:-1:-1;3196:16:1;;3034:184;-1:-1:-1;3034:184:1:o;6063:127::-;6124:10;6119:3;6115:20;6112:1;6105:31;6155:4;6152:1;6145:15;6179:4;6176:1;6169:15;6195:125;6260:9;;;6281:10;;;6278:36;;;6294:18;;:::i;6325:128::-;6392:9;;;6413:11;;;6410:37;;;6427:18;;:::i
Swarm Source
ipfs://905b41e5a364e281e04a72e21fe415d632d3d25743abb485fc54aceab4a67ce4
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.