Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Set Price | 16418005 | 541 days ago | IN | 0 ETH | 0.00048191 | ||||
Set Price | 16139240 | 580 days ago | IN | 0 ETH | 0.00041482 | ||||
Set Price | 15913681 | 612 days ago | IN | 0 ETH | 0.00032324 | ||||
Set Price | 15030865 | 745 days ago | IN | 0 ETH | 0.00090882 | ||||
Set Price | 15009005 | 749 days ago | IN | 0 ETH | 0.00194557 | ||||
Set Price | 14893934 | 769 days ago | IN | 0 ETH | 0.00155071 | ||||
Set Price | 14887751 | 770 days ago | IN | 0 ETH | 0.00188005 | ||||
0x60806040 | 14558556 | 822 days ago | IN | Create: PriceStrategyExp | 0 ETH | 0.01346708 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
PriceStrategyExp
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "contracts/IPriceStrategy.sol"; contract PriceStrategyExp is IPriceStrategy, Ownable { uint256 private _step; uint256 private _initial; constructor() { setPrice(3e16, 2000); // 0.03eth, +0.03 every 2000 } function setPrice(uint256 initial, uint256 step) public override onlyOwner { require(step != 0, "step assert"); _initial = initial; _step = step; } function getPrice(uint256 num) external override view returns (uint256) { uint256 steps = num / _step; return _initial * (steps + 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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: Unlicense pragma solidity ^0.8.0; interface IPriceStrategy { function getPrice(uint256 num) external view returns (uint256); function setPrice(uint256 initial, uint256 step) external; }
// 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":"uint256","name":"num","type":"uint256"}],"name":"getPrice","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":"initial","type":"uint256"},{"internalType":"uint256","name":"step","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061001a33610032565b61002d666a94d74f4300006107d0610082565b610127565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000546001600160a01b031633146100e15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8061011c5760405162461bcd60e51b815260206004820152600b60248201526a1cdd195c08185cdcd95c9d60aa1b60448201526064016100d8565b600291909155600155565b6103d1806101366000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b14610066578063e757223014610086578063f2fde38b146100a7578063f7d97577146100ba575b600080fd5b6100646100cd565b005b6000546040516001600160a01b0390911681526020015b60405180910390f35b6100996100943660046102c0565b61010c565b60405190815260200161007d565b6100646100b5366004610299565b61013e565b6100646100c83660046102d8565b6101d9565b6000546001600160a01b031633146101005760405162461bcd60e51b81526004016100f7906102f9565b60405180910390fd5b61010a6000610249565b565b6000806001548361011d9190610346565b905061012a81600161032e565b6002546101379190610366565b9392505050565b6000546001600160a01b031633146101685760405162461bcd60e51b81526004016100f7906102f9565b6001600160a01b0381166101cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100f7565b6101d681610249565b50565b6000546001600160a01b031633146102035760405162461bcd60e51b81526004016100f7906102f9565b8061023e5760405162461bcd60e51b815260206004820152600b60248201526a1cdd195c08185cdcd95c9d60aa1b60448201526064016100f7565b600291909155600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156102aa578081fd5b81356001600160a01b0381168114610137578182fd5b6000602082840312156102d1578081fd5b5035919050565b600080604083850312156102ea578081fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561034157610341610385565b500190565b60008261036157634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561038057610380610385565b500290565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220e0435041f9ffc6f721c0cde2333c964556a433a0feef23871fb605423174b2ee64736f6c63430008040033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063715018a61461005c5780638da5cb5b14610066578063e757223014610086578063f2fde38b146100a7578063f7d97577146100ba575b600080fd5b6100646100cd565b005b6000546040516001600160a01b0390911681526020015b60405180910390f35b6100996100943660046102c0565b61010c565b60405190815260200161007d565b6100646100b5366004610299565b61013e565b6100646100c83660046102d8565b6101d9565b6000546001600160a01b031633146101005760405162461bcd60e51b81526004016100f7906102f9565b60405180910390fd5b61010a6000610249565b565b6000806001548361011d9190610346565b905061012a81600161032e565b6002546101379190610366565b9392505050565b6000546001600160a01b031633146101685760405162461bcd60e51b81526004016100f7906102f9565b6001600160a01b0381166101cd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016100f7565b6101d681610249565b50565b6000546001600160a01b031633146102035760405162461bcd60e51b81526004016100f7906102f9565b8061023e5760405162461bcd60e51b815260206004820152600b60248201526a1cdd195c08185cdcd95c9d60aa1b60448201526064016100f7565b600291909155600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156102aa578081fd5b81356001600160a01b0381168114610137578182fd5b6000602082840312156102d1578081fd5b5035919050565b600080604083850312156102ea578081fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561034157610341610385565b500190565b60008261036157634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561038057610380610385565b500290565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220e0435041f9ffc6f721c0cde2333c964556a433a0feef23871fb605423174b2ee64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.