Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
ExponentialPremiumPriceOracle
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT
pragma solidity ~0.8.17;
import "./StablePriceOracle.sol";
contract ExponentialPremiumPriceOracle is StablePriceOracle {
uint256 constant GRACE_PERIOD = 90 days;
uint256 immutable startPremium;
uint256 immutable endValue;
constructor(
AggregatorInterface _usdOracle,
uint256[] memory _rentPrices,
uint256 _startPremium,
uint256 totalDays
) StablePriceOracle(_usdOracle, _rentPrices) {
startPremium = _startPremium;
endValue = _startPremium >> totalDays;
}
uint256 constant PRECISION = 1e18;
uint256 constant bit1 = 999989423469314432; // 0.5 ^ 1/65536 * (10 ** 18)
uint256 constant bit2 = 999978847050491904; // 0.5 ^ 2/65536 * (10 ** 18)
uint256 constant bit3 = 999957694548431104;
uint256 constant bit4 = 999915390886613504;
uint256 constant bit5 = 999830788931929088;
uint256 constant bit6 = 999661606496243712;
uint256 constant bit7 = 999323327502650752;
uint256 constant bit8 = 998647112890970240;
uint256 constant bit9 = 997296056085470080;
uint256 constant bit10 = 994599423483633152;
uint256 constant bit11 = 989228013193975424;
uint256 constant bit12 = 978572062087700096;
uint256 constant bit13 = 957603280698573696;
uint256 constant bit14 = 917004043204671232;
uint256 constant bit15 = 840896415253714560;
uint256 constant bit16 = 707106781186547584;
/**
* @dev Returns the pricing premium in internal base units.
*/
function _premium(
string memory,
uint256 expires,
uint256
) internal view override returns (uint256) {
expires = expires + GRACE_PERIOD;
if (expires > block.timestamp) {
return 0;
}
uint256 elapsed = block.timestamp - expires;
uint256 premium = decayedPremium(startPremium, elapsed);
if (premium >= endValue) {
return premium - endValue;
}
return 0;
}
/**
* @dev Returns the premium price at current time elapsed
* @param startPremium starting price
* @param elapsed time past since expiry
*/
function decayedPremium(
uint256 startPremium,
uint256 elapsed
) public pure returns (uint256) {
uint256 daysPast = (elapsed * PRECISION) / 1 days;
uint256 intDays = daysPast / PRECISION;
uint256 premium = startPremium >> intDays;
uint256 partDay = (daysPast - intDays * PRECISION);
uint256 fraction = (partDay * (2 ** 16)) / PRECISION;
uint256 totalPremium = addFractionalPremium(fraction, premium);
return totalPremium;
}
function addFractionalPremium(
uint256 fraction,
uint256 premium
) internal pure returns (uint256) {
if (fraction & (1 << 0) != 0) {
premium = (premium * bit1) / PRECISION;
}
if (fraction & (1 << 1) != 0) {
premium = (premium * bit2) / PRECISION;
}
if (fraction & (1 << 2) != 0) {
premium = (premium * bit3) / PRECISION;
}
if (fraction & (1 << 3) != 0) {
premium = (premium * bit4) / PRECISION;
}
if (fraction & (1 << 4) != 0) {
premium = (premium * bit5) / PRECISION;
}
if (fraction & (1 << 5) != 0) {
premium = (premium * bit6) / PRECISION;
}
if (fraction & (1 << 6) != 0) {
premium = (premium * bit7) / PRECISION;
}
if (fraction & (1 << 7) != 0) {
premium = (premium * bit8) / PRECISION;
}
if (fraction & (1 << 8) != 0) {
premium = (premium * bit9) / PRECISION;
}
if (fraction & (1 << 9) != 0) {
premium = (premium * bit10) / PRECISION;
}
if (fraction & (1 << 10) != 0) {
premium = (premium * bit11) / PRECISION;
}
if (fraction & (1 << 11) != 0) {
premium = (premium * bit12) / PRECISION;
}
if (fraction & (1 << 12) != 0) {
premium = (premium * bit13) / PRECISION;
}
if (fraction & (1 << 13) != 0) {
premium = (premium * bit14) / PRECISION;
}
if (fraction & (1 << 14) != 0) {
premium = (premium * bit15) / PRECISION;
}
if (fraction & (1 << 15) != 0) {
premium = (premium * bit16) / PRECISION;
}
return premium;
}
function supportsInterface(
bytes4 interfaceID
) public view virtual override returns (bool) {
return super.supportsInterface(interfaceID);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 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: 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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* 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[EIP 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);
}//SPDX-License-Identifier: MIT
pragma solidity >=0.8.17 <0.9.0;
interface IPriceOracle {
struct Price {
uint256 base;
uint256 premium;
}
/**
* @dev Returns the price to register or renew a name.
* @param name The name being registered or renewed.
* @param expires When the name presently expires (0 if this is a new registration).
* @param duration How long the name is being registered or extended for, in seconds.
* @return base premium tuple of base price + premium price
*/
function price(
string calldata name,
uint256 expires,
uint256 duration
) external view returns (Price calldata);
}//SPDX-License-Identifier: MIT
pragma solidity ~0.8.17;
import "./IPriceOracle.sol";
import "./StringUtils.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
interface AggregatorInterface {
function latestAnswer() external view returns (int256);
}
// StablePriceOracle sets a price in USD, based on an oracle.
contract StablePriceOracle is IPriceOracle {
using StringUtils for *;
// Rent in base price units by length
uint256 public immutable price1Letter;
uint256 public immutable price2Letter;
uint256 public immutable price3Letter;
uint256 public immutable price4Letter;
uint256 public immutable price5Letter;
// Oracle address
AggregatorInterface public immutable usdOracle;
event RentPriceChanged(uint256[] prices);
constructor(AggregatorInterface _usdOracle, uint256[] memory _rentPrices) {
usdOracle = _usdOracle;
price1Letter = _rentPrices[0];
price2Letter = _rentPrices[1];
price3Letter = _rentPrices[2];
price4Letter = _rentPrices[3];
price5Letter = _rentPrices[4];
}
function price(
string calldata name,
uint256 expires,
uint256 duration
) external view override returns (IPriceOracle.Price memory) {
uint256 len = name.strlen();
uint256 basePrice;
if (len >= 5) {
basePrice = price5Letter * duration;
} else if (len == 4) {
basePrice = price4Letter * duration;
} else if (len == 3) {
basePrice = price3Letter * duration;
} else if (len == 2) {
basePrice = price2Letter * duration;
} else {
basePrice = price1Letter * duration;
}
return
IPriceOracle.Price({
base: attoUSDToWei(basePrice),
premium: attoUSDToWei(_premium(name, expires, duration))
});
}
/**
* @dev Returns the pricing premium in wei.
*/
function premium(
string calldata name,
uint256 expires,
uint256 duration
) external view returns (uint256) {
return attoUSDToWei(_premium(name, expires, duration));
}
/**
* @dev Returns the pricing premium in internal base units.
*/
function _premium(
string memory name,
uint256 expires,
uint256 duration
) internal view virtual returns (uint256) {
return 0;
}
function attoUSDToWei(uint256 amount) internal view returns (uint256) {
uint256 ethPrice = uint256(usdOracle.latestAnswer());
return (amount * 1e8) / ethPrice;
}
function weiToAttoUSD(uint256 amount) internal view returns (uint256) {
uint256 ethPrice = uint256(usdOracle.latestAnswer());
return (amount * ethPrice) / 1e8;
}
function supportsInterface(
bytes4 interfaceID
) public view virtual returns (bool) {
return
interfaceID == type(IERC165).interfaceId ||
interfaceID == type(IPriceOracle).interfaceId;
}
}pragma solidity >=0.8.4;
library StringUtils {
/**
* @dev Returns the length of a given string
*
* @param s The string to measure the length of
* @return The length of the input string
*/
function strlen(string memory s) internal pure returns (uint256) {
uint256 len;
uint256 i = 0;
uint256 bytelength = bytes(s).length;
for (len = 0; i < bytelength; len++) {
bytes1 b = bytes(s)[i];
if (b < 0x80) {
i += 1;
} else if (b < 0xE0) {
i += 2;
} else if (b < 0xF0) {
i += 3;
} else if (b < 0xF8) {
i += 4;
} else if (b < 0xFC) {
i += 5;
} else {
i += 6;
}
}
return len;
}
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 1300
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract AggregatorInterface","name":"_usdOracle","type":"address"},{"internalType":"uint256[]","name":"_rentPrices","type":"uint256[]"},{"internalType":"uint256","name":"_startPremium","type":"uint256"},{"internalType":"uint256","name":"totalDays","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"prices","type":"uint256[]"}],"name":"RentPriceChanged","type":"event"},{"inputs":[{"internalType":"uint256","name":"startPremium","type":"uint256"},{"internalType":"uint256","name":"elapsed","type":"uint256"}],"name":"decayedPremium","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"expires","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"premium","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"uint256","name":"expires","type":"uint256"},{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"price","outputs":[{"components":[{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"premium","type":"uint256"}],"internalType":"struct IPriceOracle.Price","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price1Letter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price2Letter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price3Letter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price4Letter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price5Letter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usdOracle","outputs":[{"internalType":"contract AggregatorInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6101806040523480156200001257600080fd5b50604051620010863803806200108683398101604081905262000035916200012c565b6001600160a01b0384166101205282518490849081906000906200005d576200005d62000227565b6020026020010151608081815250508060018151811062000082576200008262000227565b602002602001015160a0818152505080600281518110620000a757620000a762000227565b602002602001015160c0818152505080600381518110620000cc57620000cc62000227565b602002602001015160e0818152505080600481518110620000f157620000f162000227565b60209081029190910101516101005250506101408290521c61016052506200023d9050565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156200014357600080fd5b84516001600160a01b03811681146200015b57600080fd5b602086810151919550906001600160401b03808211156200017b57600080fd5b818801915088601f8301126200019057600080fd5b815181811115620001a557620001a562000116565b8060051b604051601f19603f83011681018181108582111715620001cd57620001cd62000116565b60405291825284820192508381018501918b831115620001ec57600080fd5b938501935b828510156200020c57845184529385019392850192620001f1565b60408b01516060909b0151999c909b50975050505050505050565b634e487b7160e01b600052603260045260246000fd5b60805160a05160c05160e05161010051610120516101405161016051610db3620002d3600039600081816108590152610883015260006108300152600081816101c7015261074b01526000818161015301526102d401526000818161023a015261030d01526000818161018d015261033f015260008181610213015261037101526000818160f0015261039b0152610db36000f3fe608060405234801561001057600080fd5b50600436106100be5760003560e01c8063a200e15311610076578063c8a4271f1161005b578063c8a4271f146101c2578063cd5d2c741461020e578063d820ed421461023557600080fd5b8063a200e15314610188578063a34e3596146101af57600080fd5b806350e9a715116100a757806350e9a7151461012057806359b6b86c1461014e57806359e1777c1461017557600080fd5b806301ffc9a7146100c35780632c0fd74c146100eb575b600080fd5b6100d66100d1366004610bdd565b61025c565b60405190151581526020015b60405180910390f35b6101127f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100e2565b61013361012e366004610c1f565b61026d565b604080518251815260209283015192810192909252016100e2565b6101127f000000000000000000000000000000000000000000000000000000000000000081565b610112610183366004610c9e565b610433565b6101127f000000000000000000000000000000000000000000000000000000000000000081565b6101126101bd366004610c1f565b6104ce565b6101e97f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b6101127f000000000000000000000000000000000000000000000000000000000000000081565b6101127f000000000000000000000000000000000000000000000000000000000000000081565b60006102678261051f565b92915050565b604080518082019091526000808252602082015260006102c286868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506105b792505050565b90506000600582106102ff576102f8847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b90506103c2565b81600403610331576102f8847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b81600303610363576102f8847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b81600203610395576102f8847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b6103bf847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b90505b60405180604001604052806103d683610746565b81526020016104266104218a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91506107fa9050565b610746565b9052979650505050505050565b6000806201518061044c670de0b6b3a764000085610cd6565b6104569190610ced565b9050600061046c670de0b6b3a764000083610ced565b905084811c6000610485670de0b6b3a764000084610cd6565b61048f9085610d0f565b90506000670de0b6b3a76400006104a98362010000610cd6565b6104b39190610ced565b905060006104c182856108bd565b9998505050505050505050565b600061051661042186868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506107fa9050565b95945050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061026757507fffffffff0000000000000000000000000000000000000000000000000000000082167f50e9a715000000000000000000000000000000000000000000000000000000001492915050565b8051600090819081905b8082101561073d5760008583815181106105dd576105dd610d22565b01602001516001600160f81b03191690507f800000000000000000000000000000000000000000000000000000000000000081101561062857610621600184610d38565b925061072a565b7fe0000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561066557610621600284610d38565b7ff0000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610156106a257610621600384610d38565b7ff8000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610156106df57610621600484610d38565b7ffc000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561071c57610621600584610d38565b610727600684610d38565b92505b508261073581610d4b565b9350506105c1565b50909392505050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190610d64565b9050806107e9846305f5e100610cd6565b6107f39190610ced565b9392505050565b60006108096276a70084610d38565b92504283111561081b575060006107f3565b60006108278442610d0f565b905060006108557f000000000000000000000000000000000000000000000000000000000000000083610433565b90507f000000000000000000000000000000000000000000000000000000000000000081106108b1576108a87f000000000000000000000000000000000000000000000000000000000000000082610d0f565b925050506107f3565b50600095945050505050565b600060018316156108f057670de0b6b3a76400006108e3670de0ad151d09418084610cd6565b6108ed9190610ced565b91505b600283161561092157670de0b6b3a7640000610914670de0a3769959680084610cd6565b61091e9190610ced565b91505b600483161561095257670de0b6b3a7640000610945670de09039a5fa510084610cd6565b61094f9190610ced565b91505b600883161561098357670de0b6b3a7640000610976670de069c00f3e120084610cd6565b6109809190610ced565b91505b60108316156109b457670de0b6b3a76400006109a7670de01cce21c9440084610cd6565b6109b19190610ced565b91505b60208316156109e557670de0b6b3a76400006109d8670ddf82ef46ce100084610cd6565b6109e29190610ced565b91505b6040831615610a1657670de0b6b3a7640000610a09670dde4f458f8e8d8084610cd6565b610a139190610ced565b91505b6080831615610a4757670de0b6b3a7640000610a3a670ddbe84213d5f08084610cd6565b610a449190610ced565b91505b610100831615610a7957670de0b6b3a7640000610a6c670dd71b7aa6df5b8084610cd6565b610a769190610ced565b91505b610200831615610aab57670de0b6b3a7640000610a9e670dcd86e7f28cde0084610cd6565b610aa89190610ced565b91505b610400831615610add57670de0b6b3a7640000610ad0670dba71a3084ad68084610cd6565b610ada9190610ced565b91505b610800831615610b0f57670de0b6b3a7640000610b02670d94961b13dbde8084610cd6565b610b0c9190610ced565b91505b611000831615610b4157670de0b6b3a7640000610b34670d4a171c35c9838084610cd6565b610b3e9190610ced565b91505b612000831615610b7357670de0b6b3a7640000610b66670cb9da519ccfb70084610cd6565b610b709190610ced565b91505b614000831615610ba557670de0b6b3a7640000610b98670bab76d59c18d68084610cd6565b610ba29190610ced565b91505b618000831615610bd757670de0b6b3a7640000610bca6709d025defee4df8084610cd6565b610bd49190610ced565b91505b50919050565b600060208284031215610bef57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146107f357600080fd5b60008060008060608587031215610c3557600080fd5b843567ffffffffffffffff80821115610c4d57600080fd5b818701915087601f830112610c6157600080fd5b813581811115610c7057600080fd5b886020828501011115610c8257600080fd5b6020928301999098509187013596604001359550909350505050565b60008060408385031215610cb157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761026757610267610cc0565b600082610d0a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561026757610267610cc0565b634e487b7160e01b600052603260045260246000fd5b8082018082111561026757610267610cc0565b600060018201610d5d57610d5d610cc0565b5060010190565b600060208284031215610d7657600080fd5b505191905056fea26469706673582212202f367baa7e38083ab11fe6251d0dac4c55d4d507b0208df054acbe0c97eb6baf64736f6c634300081100330000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000052b7d2dcc80cd2e4000000000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001275209157690000000000000000000000000000000000000000000000000000049d482455da00000000000000000000000000000000000000000000000000000024ea4122af
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100be5760003560e01c8063a200e15311610076578063c8a4271f1161005b578063c8a4271f146101c2578063cd5d2c741461020e578063d820ed421461023557600080fd5b8063a200e15314610188578063a34e3596146101af57600080fd5b806350e9a715116100a757806350e9a7151461012057806359b6b86c1461014e57806359e1777c1461017557600080fd5b806301ffc9a7146100c35780632c0fd74c146100eb575b600080fd5b6100d66100d1366004610bdd565b61025c565b60405190151581526020015b60405180910390f35b6101127f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100e2565b61013361012e366004610c1f565b61026d565b604080518251815260209283015192810192909252016100e2565b6101127f00000000000000000000000000000000000000000000000000000024ea4122af81565b610112610183366004610c9e565b610433565b6101127f000000000000000000000000000000000000000000000000000012752091576981565b6101126101bd366004610c1f565b6104ce565b6101e97f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841981565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e2565b6101127f000000000000000000000000000000000000000000000000000000000000000081565b6101127f0000000000000000000000000000000000000000000000000000049d482455da81565b60006102678261051f565b92915050565b604080518082019091526000808252602082015260006102c286868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506105b792505050565b90506000600582106102ff576102f8847f00000000000000000000000000000000000000000000000000000024ea4122af610cd6565b90506103c2565b81600403610331576102f8847f0000000000000000000000000000000000000000000000000000049d482455da610cd6565b81600303610363576102f8847f0000000000000000000000000000000000000000000000000000127520915769610cd6565b81600203610395576102f8847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b6103bf847f0000000000000000000000000000000000000000000000000000000000000000610cd6565b90505b60405180604001604052806103d683610746565b81526020016104266104218a8a8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508c92508b91506107fa9050565b610746565b9052979650505050505050565b6000806201518061044c670de0b6b3a764000085610cd6565b6104569190610ced565b9050600061046c670de0b6b3a764000083610ced565b905084811c6000610485670de0b6b3a764000084610cd6565b61048f9085610d0f565b90506000670de0b6b3a76400006104a98362010000610cd6565b6104b39190610ced565b905060006104c182856108bd565b9998505050505050505050565b600061051661042186868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152508892508791506107fa9050565b95945050505050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a700000000000000000000000000000000000000000000000000000000148061026757507fffffffff0000000000000000000000000000000000000000000000000000000082167f50e9a715000000000000000000000000000000000000000000000000000000001492915050565b8051600090819081905b8082101561073d5760008583815181106105dd576105dd610d22565b01602001516001600160f81b03191690507f800000000000000000000000000000000000000000000000000000000000000081101561062857610621600184610d38565b925061072a565b7fe0000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561066557610621600284610d38565b7ff0000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610156106a257610621600384610d38565b7ff8000000000000000000000000000000000000000000000000000000000000006001600160f81b0319821610156106df57610621600484610d38565b7ffc000000000000000000000000000000000000000000000000000000000000006001600160f81b03198216101561071c57610621600584610d38565b610727600684610d38565b92505b508261073581610d4b565b9350506105c1565b50909392505050565b6000807f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841973ffffffffffffffffffffffffffffffffffffffff166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d89190610d64565b9050806107e9846305f5e100610cd6565b6107f39190610ced565b9392505050565b60006108096276a70084610d38565b92504283111561081b575060006107f3565b60006108278442610d0f565b905060006108557f00000000000000000000000000000000000000000052b7d2dcc80cd2e400000083610433565b90507f00000000000000000000000000000000000000000000000295be96e64066972081106108b1576108a87f00000000000000000000000000000000000000000000000295be96e64066972082610d0f565b925050506107f3565b50600095945050505050565b600060018316156108f057670de0b6b3a76400006108e3670de0ad151d09418084610cd6565b6108ed9190610ced565b91505b600283161561092157670de0b6b3a7640000610914670de0a3769959680084610cd6565b61091e9190610ced565b91505b600483161561095257670de0b6b3a7640000610945670de09039a5fa510084610cd6565b61094f9190610ced565b91505b600883161561098357670de0b6b3a7640000610976670de069c00f3e120084610cd6565b6109809190610ced565b91505b60108316156109b457670de0b6b3a76400006109a7670de01cce21c9440084610cd6565b6109b19190610ced565b91505b60208316156109e557670de0b6b3a76400006109d8670ddf82ef46ce100084610cd6565b6109e29190610ced565b91505b6040831615610a1657670de0b6b3a7640000610a09670dde4f458f8e8d8084610cd6565b610a139190610ced565b91505b6080831615610a4757670de0b6b3a7640000610a3a670ddbe84213d5f08084610cd6565b610a449190610ced565b91505b610100831615610a7957670de0b6b3a7640000610a6c670dd71b7aa6df5b8084610cd6565b610a769190610ced565b91505b610200831615610aab57670de0b6b3a7640000610a9e670dcd86e7f28cde0084610cd6565b610aa89190610ced565b91505b610400831615610add57670de0b6b3a7640000610ad0670dba71a3084ad68084610cd6565b610ada9190610ced565b91505b610800831615610b0f57670de0b6b3a7640000610b02670d94961b13dbde8084610cd6565b610b0c9190610ced565b91505b611000831615610b4157670de0b6b3a7640000610b34670d4a171c35c9838084610cd6565b610b3e9190610ced565b91505b612000831615610b7357670de0b6b3a7640000610b66670cb9da519ccfb70084610cd6565b610b709190610ced565b91505b614000831615610ba557670de0b6b3a7640000610b98670bab76d59c18d68084610cd6565b610ba29190610ced565b91505b618000831615610bd757670de0b6b3a7640000610bca6709d025defee4df8084610cd6565b610bd49190610ced565b91505b50919050565b600060208284031215610bef57600080fd5b81357fffffffff00000000000000000000000000000000000000000000000000000000811681146107f357600080fd5b60008060008060608587031215610c3557600080fd5b843567ffffffffffffffff80821115610c4d57600080fd5b818701915087601f830112610c6157600080fd5b813581811115610c7057600080fd5b886020828501011115610c8257600080fd5b6020928301999098509187013596604001359550909350505050565b60008060408385031215610cb157600080fd5b50508035926020909101359150565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761026757610267610cc0565b600082610d0a57634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561026757610267610cc0565b634e487b7160e01b600052603260045260246000fd5b8082018082111561026757610267610cc0565b600060018201610d5d57610d5d610cc0565b5060010190565b600060208284031215610d7657600080fd5b505191905056fea26469706673582212202f367baa7e38083ab11fe6251d0dac4c55d4d507b0208df054acbe0c97eb6baf64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000052b7d2dcc80cd2e4000000000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001275209157690000000000000000000000000000000000000000000000000000049d482455da00000000000000000000000000000000000000000000000000000024ea4122af
-----Decoded View---------------
Arg [0] : _usdOracle (address): 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
Arg [1] : _rentPrices (uint256[]): 0,0,20294266869609,5073566717402,158548959919
Arg [2] : _startPremium (uint256): 100000000000000000000000000
Arg [3] : totalDays (uint256): 21
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000052b7d2dcc80cd2e4000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000127520915769
Arg [8] : 0000000000000000000000000000000000000000000000000000049d482455da
Arg [9] : 00000000000000000000000000000000000000000000000000000024ea4122af
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.