Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00Multichain Info
N/A
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
LinearDiscountModel
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
No with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.22; import "openzeppelin-contracts-upgradeable/access/OwnableUpgradeable.sol"; import {IDiscountModel} from "../interfaces/IDiscountModel.sol"; /** * @title LinearDiscountModel * @notice This model calculates the price of a linear discount bond using the linear discount formula. */ contract LinearDiscountModel is IDiscountModel, OwnableUpgradeable { uint256 private constant SECONDS_PER_YEAR = 365 days; uint256 private constant UNIT = 1e18; constructor() { _disableInitializers(); } function initialize() external initializer {} /// @dev See IDiscountModel.description function description() external pure override returns (string memory) { return "Linear discount model: Discount decreases linearly over time."; } /// @dev See IDiscountModel.getPrice. function getPrice( uint256 initialImpliedAPY, uint256 futurePTValue, IDiscountModel.Term memory term ) external pure override returns (uint256) { uint256 timeLeft = term.expiryTimestamp - term.currentTimestamp; if (timeLeft == 0) { return futurePTValue; } uint256 duration = term.expiryTimestamp - term.startTimestamp; uint256 termAdjustedInitialImpliedAPY = (initialImpliedAPY * duration) / SECONDS_PER_YEAR; uint256 anchor = (futurePTValue * UNIT) / (UNIT + termAdjustedInitialImpliedAPY); uint256 drift = ((futurePTValue - anchor) * (term.currentTimestamp - term.startTimestamp)) / duration; uint256 price = anchor + drift; return price; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {ContextUpgradeable} from "../utils/ContextUpgradeable.sol"; import {Initializable} from "../proxy/utils/Initializable.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. * * 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 OwnableUpgradeable is Initializable, ContextUpgradeable { /// @custom:storage-location erc7201:openzeppelin.storage.Ownable struct OwnableStorage { address _owner; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Ownable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant OwnableStorageLocation = 0x9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300; function _getOwnableStorage() private pure returns (OwnableStorage storage $) { assembly { $.slot := OwnableStorageLocation } } /** * @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. */ function __Ownable_init(address initialOwner) internal onlyInitializing { __Ownable_init_unchained(initialOwner); } function __Ownable_init_unchained(address initialOwner) internal onlyInitializing { 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) { OwnableStorage storage $ = _getOwnableStorage(); 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 { OwnableStorage storage $ = _getOwnableStorage(); address oldOwner = $._owner; $._owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; import {Initializable} from "../proxy/utils/Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.22; interface IDiscountModel { struct Term { uint256 startTimestamp; uint256 currentTimestamp; uint256 expiryTimestamp; } /** * @notice Computes the price for a given principal token. * @dev This function can be implemented customly, so not all argumnets need to be used * * @param initialImpliedAPY The initial implied APY of the principal token (in 18 decimals). * @param futurePTValue The future value of the principal token at maturity. * @param term Time data for the term of the principal token. * @return price The computed price, expressed with futurePTValue's decimals precision. */ function getPrice( uint256 initialImpliedAPY, uint256 futurePTValue, Term memory term ) external pure returns (uint256 price); /** * @notice Returns a human-readable description of the discount model. * @return A string describing the discount model. */ function description() external pure returns (string memory); }
{ "evmVersion": "shanghai", "libraries": {}, "metadata": { "appendCBOR": true, "bytecodeHash": "ipfs", "useLiteralContent": false }, "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "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-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "openzeppelin-erc20-basic/=lib/openzeppelin-contracts/contracts/token/ERC20/", "openzeppelin-erc20-extensions/=lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/", "openzeppelin-erc20/=lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/", "openzeppelin-math/=lib/openzeppelin-contracts/contracts/utils/math/", "openzeppelin-proxy/=lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/", "openzeppelin-utils/=lib/openzeppelin-contracts/contracts/utils/", "config/=lib/spectra-contracts-configs/script/", "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/", "spectra-contracts-configs/=lib/spectra-contracts-configs/" ], "viaIR": false }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","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"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"initialImpliedAPY","type":"uint256"},{"internalType":"uint256","name":"futurePTValue","type":"uint256"},{"components":[{"internalType":"uint256","name":"startTimestamp","type":"uint256"},{"internalType":"uint256","name":"currentTimestamp","type":"uint256"},{"internalType":"uint256","name":"expiryTimestamp","type":"uint256"}],"internalType":"struct IDiscountModel.Term","name":"term","type":"tuple"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"initialize","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"}]
Contract Creation Code
608060405234801561000f575f80fd5b5061001e61002360201b60201c565b610183565b5f61003261012160201b60201c565b9050805f0160089054906101000a900460ff161561007c576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff8016815f015f9054906101000a900467ffffffffffffffff1667ffffffffffffffff161461011e5767ffffffffffffffff815f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d267ffffffffffffffff604051610115919061016a565b60405180910390a15b50565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b5f67ffffffffffffffff82169050919050565b61016481610148565b82525050565b5f60208201905061017d5f83018461015b565b92915050565b610af6806101905f395ff3fe608060405234801561000f575f80fd5b5060043610610060575f3560e01c8063715018a6146100645780637284e4161461006e5780638129fc1c1461008c5780638da5cb5b14610096578063f2fde38b146100b4578063f87eba5d146100d0575b5f80fd5b61006c610100565b005b610076610113565b6040516100839190610682565b60405180910390f35b610094610133565b005b61009e6102aa565b6040516100ab91906106e1565b60405180910390f35b6100ce60048036038101906100c99190610731565b6102df565b005b6100ea60048036038101906100e5919061086c565b610363565b6040516100f791906108cb565b60405180910390f35b61010861044b565b6101115f6104d2565b565b60606040518060600160405280603d8152602001610a84603d9139905090565b5f61013c6105a3565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f808267ffffffffffffffff161480156101845750825b90505f60018367ffffffffffffffff161480156101b757505f3073ffffffffffffffffffffffffffffffffffffffff163b145b9050811580156101c5575080155b156101fc576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610249576001855f0160086101000a81548160ff0219169083151502179055505b83156102a3575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2600160405161029a9190610939565b60405180910390a15b5050505050565b5f806102b46105ca565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b6102e761044b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610357575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161034e91906106e1565b60405180910390fd5b610360816104d2565b50565b5f8082602001518360400151610379919061097f565b90505f810361038b5783915050610444565b5f835f0151846040015161039f919061097f565b90505f6301e1338082886103b391906109b2565b6103bd9190610a20565b90505f81670de0b6b3a76400006103d49190610a50565b670de0b6b3a7640000886103e891906109b2565b6103f29190610a20565b90505f83875f01518860200151610409919061097f565b838a610415919061097f565b61041f91906109b2565b6104299190610a20565b90505f81836104389190610a50565b90508096505050505050505b9392505050565b6104536105f1565b73ffffffffffffffffffffffffffffffffffffffff166104716102aa565b73ffffffffffffffffffffffffffffffffffffffff16146104d0576104946105f1565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016104c791906106e1565b60405180910390fd5b565b5f6104db6105ca565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f33905090565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561062f578082015181840152602081019050610614565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610654826105f8565b61065e8185610602565b935061066e818560208601610612565b6106778161063a565b840191505092915050565b5f6020820190508181035f83015261069a818461064a565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6106cb826106a2565b9050919050565b6106db816106c1565b82525050565b5f6020820190506106f45f8301846106d2565b92915050565b5f604051905090565b5f80fd5b610710816106c1565b811461071a575f80fd5b50565b5f8135905061072b81610707565b92915050565b5f6020828403121561074657610745610703565b5b5f6107538482850161071d565b91505092915050565b5f819050919050565b61076e8161075c565b8114610778575f80fd5b50565b5f8135905061078981610765565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6107c98261063a565b810181811067ffffffffffffffff821117156107e8576107e7610793565b5b80604052505050565b5f6107fa6106fa565b905061080682826107c0565b919050565b5f606082840312156108205761081f61078f565b5b61082a60606107f1565b90505f6108398482850161077b565b5f83015250602061084c8482850161077b565b60208301525060406108608482850161077b565b60408301525092915050565b5f805f60a0848603121561088357610882610703565b5b5f6108908682870161077b565b93505060206108a18682870161077b565b92505060406108b28682870161080b565b9150509250925092565b6108c58161075c565b82525050565b5f6020820190506108de5f8301846108bc565b92915050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f61092361091e610919846108e4565b610900565b6108ed565b9050919050565b61093381610909565b82525050565b5f60208201905061094c5f83018461092a565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6109898261075c565b91506109948361075c565b92508282039050818111156109ac576109ab610952565b5b92915050565b5f6109bc8261075c565b91506109c78361075c565b92508282026109d58161075c565b915082820484148315176109ec576109eb610952565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f610a2a8261075c565b9150610a358361075c565b925082610a4557610a446109f3565b5b828204905092915050565b5f610a5a8261075c565b9150610a658361075c565b9250828201905080821115610a7d57610a7c610952565b5b9291505056fe4c696e65617220646973636f756e74206d6f64656c3a20446973636f756e7420646563726561736573206c696e6561726c79206f7665722074696d652ea26469706673582212203c15b35a5fe2855722fe7006d6e14924098ce21e15c8bcf636927f02804875d364736f6c63430008160033
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610060575f3560e01c8063715018a6146100645780637284e4161461006e5780638129fc1c1461008c5780638da5cb5b14610096578063f2fde38b146100b4578063f87eba5d146100d0575b5f80fd5b61006c610100565b005b610076610113565b6040516100839190610682565b60405180910390f35b610094610133565b005b61009e6102aa565b6040516100ab91906106e1565b60405180910390f35b6100ce60048036038101906100c99190610731565b6102df565b005b6100ea60048036038101906100e5919061086c565b610363565b6040516100f791906108cb565b60405180910390f35b61010861044b565b6101115f6104d2565b565b60606040518060600160405280603d8152602001610a84603d9139905090565b5f61013c6105a3565b90505f815f0160089054906101000a900460ff161590505f825f015f9054906101000a900467ffffffffffffffff1690505f808267ffffffffffffffff161480156101845750825b90505f60018367ffffffffffffffff161480156101b757505f3073ffffffffffffffffffffffffffffffffffffffff163b145b9050811580156101c5575080155b156101fc576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001855f015f6101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055508315610249576001855f0160086101000a81548160ff0219169083151502179055505b83156102a3575f855f0160086101000a81548160ff0219169083151502179055507fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2600160405161029a9190610939565b60405180910390a15b5050505050565b5f806102b46105ca565b9050805f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1691505090565b6102e761044b565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610357575f6040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260040161034e91906106e1565b60405180910390fd5b610360816104d2565b50565b5f8082602001518360400151610379919061097f565b90505f810361038b5783915050610444565b5f835f0151846040015161039f919061097f565b90505f6301e1338082886103b391906109b2565b6103bd9190610a20565b90505f81670de0b6b3a76400006103d49190610a50565b670de0b6b3a7640000886103e891906109b2565b6103f29190610a20565b90505f83875f01518860200151610409919061097f565b838a610415919061097f565b61041f91906109b2565b6104299190610a20565b90505f81836104389190610a50565b90508096505050505050505b9392505050565b6104536105f1565b73ffffffffffffffffffffffffffffffffffffffff166104716102aa565b73ffffffffffffffffffffffffffffffffffffffff16146104d0576104946105f1565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016104c791906106e1565b60405180910390fd5b565b5f6104db6105ca565b90505f815f015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082825f015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b5f7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00905090565b5f7f9016d09d72d40fdae2fd8ceac6b6234c7706214fd39c1cd1e609a0528c199300905090565b5f33905090565b5f81519050919050565b5f82825260208201905092915050565b5f5b8381101561062f578082015181840152602081019050610614565b5f8484015250505050565b5f601f19601f8301169050919050565b5f610654826105f8565b61065e8185610602565b935061066e818560208601610612565b6106778161063a565b840191505092915050565b5f6020820190508181035f83015261069a818461064a565b905092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6106cb826106a2565b9050919050565b6106db816106c1565b82525050565b5f6020820190506106f45f8301846106d2565b92915050565b5f604051905090565b5f80fd5b610710816106c1565b811461071a575f80fd5b50565b5f8135905061072b81610707565b92915050565b5f6020828403121561074657610745610703565b5b5f6107538482850161071d565b91505092915050565b5f819050919050565b61076e8161075c565b8114610778575f80fd5b50565b5f8135905061078981610765565b92915050565b5f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6107c98261063a565b810181811067ffffffffffffffff821117156107e8576107e7610793565b5b80604052505050565b5f6107fa6106fa565b905061080682826107c0565b919050565b5f606082840312156108205761081f61078f565b5b61082a60606107f1565b90505f6108398482850161077b565b5f83015250602061084c8482850161077b565b60208301525060406108608482850161077b565b60408301525092915050565b5f805f60a0848603121561088357610882610703565b5b5f6108908682870161077b565b93505060206108a18682870161077b565b92505060406108b28682870161080b565b9150509250925092565b6108c58161075c565b82525050565b5f6020820190506108de5f8301846108bc565b92915050565b5f819050919050565b5f67ffffffffffffffff82169050919050565b5f819050919050565b5f61092361091e610919846108e4565b610900565b6108ed565b9050919050565b61093381610909565b82525050565b5f60208201905061094c5f83018461092a565b92915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6109898261075c565b91506109948361075c565b92508282039050818111156109ac576109ab610952565b5b92915050565b5f6109bc8261075c565b91506109c78361075c565b92508282026109d58161075c565b915082820484148315176109ec576109eb610952565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f610a2a8261075c565b9150610a358361075c565b925082610a4557610a446109f3565b5b828204905092915050565b5f610a5a8261075c565b9150610a658361075c565b9250828201905080821115610a7d57610a7c610952565b5b9291505056fe4c696e65617220646973636f756e74206d6f64656c3a20446973636f756e7420646563726561736573206c696e6561726c79206f7665722074696d652ea26469706673582212203c15b35a5fe2855722fe7006d6e14924098ce21e15c8bcf636927f02804875d364736f6c63430008160033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.