Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 5 from a total of 5 transactions
Loading...
Loading
Contract Name:
BoundedTTLHook_1Week
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 0 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.0 <0.9.0; import {IHook} from "../../interfaces/IHook.sol"; import {Ownable} from "openzeppelin-contracts/contracts/access/Ownable.sol"; contract BoundedTTLHook_1Week is IHook, Ownable { mapping (address=>bool) whitelistedApps; function onPositionUse(bytes calldata _data) external { (address app, uint256 ttl) = abi.decode(_data, (address, uint256)); if (!whitelistedApps[app]) revert(); if (ttl > 7 days) revert(); } function onPositionUnUse(bytes calldata _data) external {} function updateWhitelistedAppsStatus(address app, bool status) external onlyOwner { whitelistedApps[app] = status; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; interface IHook { function onPositionUse(bytes calldata _data) external; function onPositionUnUse(bytes calldata _data) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts/contracts/", "@openzeppelin/=lib/openzeppelin-contracts/", "v3-core/=lib/v3-core/", "v3-periphery/=lib/v3-periphery/contracts/", "@uniswap/v3-core/=lib/v3-core/", "base64-sol/=lib/openzeppelin-contracts/contracts/utils/", "BokkyPooBahsDateTimeLibrary/=lib/BokkyPooBahsDateTimeLibrary/" ], "optimizer": { "enabled": true, "runs": 0 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "viaIR": false, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onPositionUnUse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onPositionUse","outputs":[],"stateMutability":"nonpayable","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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"app","type":"address"},{"internalType":"bool","name":"status","type":"bool"}],"name":"updateWhitelistedAppsStatus","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6103fc8061007e6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80633f9dd86814610067578063715018a61461007b5780637bd14bcd146100835780638da5cb5b146100965780638e007f70146100ba578063f2fde38b146100cd575b600080fd5b6100796100753660046102b2565b5050565b005b6100796100e0565b6100796100913660046102b2565b6100f4565b61009e610143565b6040516001600160a01b03909116815260200160405180910390f35b6100796100c8366004610338565b610152565b6100796100db366004610376565b610185565b6100e8610203565b6100f26000610262565b565b6000806101038385018561039a565b6001600160a01b038216600090815260016020526040902054919350915060ff1661012d57600080fd5b62093a8081111561013d57600080fd5b50505050565b6000546001600160a01b031690565b61015a610203565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b61018d610203565b6001600160a01b0381166101f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61020081610262565b50565b3361020c610143565b6001600160a01b0316146100f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080602083850312156102c557600080fd5b82356001600160401b03808211156102dc57600080fd5b818501915085601f8301126102f057600080fd5b8135818111156102ff57600080fd5b86602082850101111561031157600080fd5b60209290920196919550909350505050565b6001600160a01b038116811461020057600080fd5b6000806040838503121561034b57600080fd5b823561035681610323565b91506020830135801515811461036b57600080fd5b809150509250929050565b60006020828403121561038857600080fd5b813561039381610323565b9392505050565b600080604083850312156103ad57600080fd5b82356103b881610323565b94602093909301359350505056fea26469706673582212205c9cee063819b3915287e668594b253e0b4a70c7d1e610a6ddb499dc10df186064736f6c634300080f0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c80633f9dd86814610067578063715018a61461007b5780637bd14bcd146100835780638da5cb5b146100965780638e007f70146100ba578063f2fde38b146100cd575b600080fd5b6100796100753660046102b2565b5050565b005b6100796100e0565b6100796100913660046102b2565b6100f4565b61009e610143565b6040516001600160a01b03909116815260200160405180910390f35b6100796100c8366004610338565b610152565b6100796100db366004610376565b610185565b6100e8610203565b6100f26000610262565b565b6000806101038385018561039a565b6001600160a01b038216600090815260016020526040902054919350915060ff1661012d57600080fd5b62093a8081111561013d57600080fd5b50505050565b6000546001600160a01b031690565b61015a610203565b6001600160a01b03919091166000908152600160205260409020805460ff1916911515919091179055565b61018d610203565b6001600160a01b0381166101f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61020081610262565b50565b3361020c610143565b6001600160a01b0316146100f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016101ee565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080602083850312156102c557600080fd5b82356001600160401b03808211156102dc57600080fd5b818501915085601f8301126102f057600080fd5b8135818111156102ff57600080fd5b86602082850101111561031157600080fd5b60209290920196919550909350505050565b6001600160a01b038116811461020057600080fd5b6000806040838503121561034b57600080fd5b823561035681610323565b91506020830135801515811461036b57600080fd5b809150509250929050565b60006020828403121561038857600080fd5b813561039381610323565b9392505050565b600080604083850312156103ad57600080fd5b82356103b881610323565b94602093909301359350505056fea26469706673582212205c9cee063819b3915287e668594b253e0b4a70c7d1e610a6ddb499dc10df186064736f6c634300080f0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.