Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Loading...
Loading
Self-destruct was called for this contract at txhash 0x2fc5bedbcd044f36649ce013a02dcbcd141c5b04badea32fd2513481fb0510e9. With EIP-6780, all contract storage and onchain code are retained upon self-destruct.
Minimal Proxy Contract for 0x0a252663dbcc0b073063d6420a40319e438cfa59
Contract Name:
XENTorrent
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 20 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "@openzeppelin/contracts/token/ERC721/ERC721.sol";import "@openzeppelin/contracts/interfaces/IERC2981.sol";import "@openzeppelin/contracts/utils/Base64.sol";import "@openzeppelin/contracts/utils/Strings.sol";import "@faircrypto/xen-crypto/contracts/XENCrypto.sol";import "@faircrypto/xen-crypto/contracts/interfaces/IBurnableToken.sol";import "@faircrypto/xen-crypto/contracts/interfaces/IBurnRedeemable.sol";import "operator-filter-registry/src/DefaultOperatorFilterer.sol";import "./libs/ERC2771Context.sol";import "./interfaces/IERC2771.sol";import "./interfaces/IXENTorrent.sol";import "./interfaces/IXENProxying.sol";import "./libs/MintInfo.sol";import "./libs/Metadata.sol";import "./libs/Array.sol";/*\\ // ||||||||||| |\ || A CRYPTOCURRENCY FOR THE MASSES\\ // || |\\ ||\\ // || ||\\ || PRINCIPLES OF XEN:\\// || || \\ || - No pre-mint; starts with zero supplyXX |||||||| || \\ || - No admin keys
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;/*Extra XEN quotes:"When you realize nothing is lacking, the whole world belongs to you." - Lao Tzu"Each morning, we are born again. What we do today is what matters most." - Buddha"If you are depressed, you are living in the past." - Lao Tzu"In true dialogue, both sides are willing to change." - Thich Nhat Hanh"The spirit of the individual is determined by his domination thought habits." - Bruce Lee"Be the path. Do not seek it." - Yara Tschallener"Bow to no one but your own divinity." - Satya"With insight there is hope for awareness, and with awareness there can be change." - Tom Kenyon"The opposite of depression isn't happiness, it is purpose." - Derek Sivers"If you can't, you must." - Tony Robbins“When you are grateful, fear disappears and abundance appears.” - Lao Tzu“It is in your moments of decision that your destiny is shaped.” - Tony Robbins"Surmounting difficulty is the crucible that forms character." - Tony Robbins"Three things cannot be long hidden: the sun, the moon, and the truth." - Buddha"What you are is what you have been. What you’ll be is what you do now." - Buddha"The best way to take care of our future is to take care of the present moment." - Thich Nhat Hanh*//**@dev a library to supply a XEN string data based on params
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "@openzeppelin/contracts/utils/Strings.sol";import "./DateTime.sol";import "./StringData.sol";import "./FormattedStrings.sol";/*@dev Library to create SVG image for XENFT metadata@dependency depends on DataTime.sol and StringData.sol libraries*/library SVG {// Type to encode all data params for SVG image generationstruct SvgParams {string symbol;address xenAddress;uint256 tokenId;uint256 term;uint256 rank;uint256 count;uint256 maturityTs;uint256 amp;uint256 eaa;uint256 xenBurned;bool redeemed;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;// mapping: NFT tokenId => MintInfo (used in tokenURI generation)// MintInfo encoded as:// term (uint16)// | maturityTs (uint64)// | rank (uint128)// | amp (uint16)// | eaa (uint16)// | class (uint8):// [7] isApex// [6] isLimited// [0-5] powerGroupIdx// | redeemed (uint8)library MintInfo {/**@dev helper to convert Bool to U256 type and make compiler happy*/function toU256(bool x) internal pure returns (uint256 r) {assembly {r := x}}/**
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";import "@openzeppelin/contracts/utils/Strings.sol";import "./MintInfo.sol";import "./DateTime.sol";import "./FormattedStrings.sol";import "./SVG.sol";/**@dev Library contains methods to generate on-chain NFT metadata*/library Metadata {using DateTime for uint256;using MintInfo for uint256;using Strings for uint256;uint256 public constant POWER_GROUP_SIZE = 7_500;uint256 public constant MAX_POWER = 52_500;uint256 public constant COLORS_FULL_SCALE = 300;uint256 public constant SPECIAL_LUMINOSITY = 45;uint256 public constant BASE_SATURATION = 75;uint256 public constant BASE_LUMINOSITY = 38;uint256 public constant GROUP_SATURATION = 100;
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;library FormattedStrings {/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.Base on OpenZeppelin `toString` method from `String` library*/function toFormattedString(uint256 value) internal pure returns (string memory) {// Inspired by OraclizeAPI's implementation - MIT licence// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.solif (value == 0) {return "0";}uint256 temp = value;uint256 digits;while (temp != 0) {digits++;temp /= 10;}uint256 pos;uint256 comas = digits / 3;digits = digits + (digits % 3 == 0 ? comas - 1 : comas);bytes memory buffer = new bytes(digits);while (value != 0) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (metatx/ERC2771Context.sol)pragma solidity ^0.8.10;import "@openzeppelin/contracts/utils/Context.sol";/*** @dev Context variant with ERC2771 support.*/abstract contract ERC2771Context is Context {/// @custom:oz-upgrades-unsafe-allow state-variable-immutable// one-time settable varaddress internal _trustedForwarder;/// @custom:oz-upgrades-unsafe-allow constructorconstructor(address trustedForwarder) {_trustedForwarder = trustedForwarder;}function isTrustedForwarder(address forwarder) public view virtual returns (bool) {return forwarder == _trustedForwarder;}function _msgSender() internal view virtual override returns (address sender) {if (isTrustedForwarder(msg.sender)) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "@openzeppelin/contracts/utils/Strings.sol";import "./BokkyPooBahsDateTimeLibrary.sol";/*@dev Library to convert epoch timestamp to a human-readable Date-Time string@dependency uses BokkyPooBahsDateTimeLibrary.sol library internally*/library DateTime {using Strings for uint256;bytes public constant MONTHS = bytes("JanFebMarAprMayJunJulAugSepOctNovDec");/*** @dev returns month as short (3-letter) string*/function monthAsString(uint256 idx) internal pure returns (string memory) {require(idx > 0, "bad idx");bytes memory str = new bytes(3);uint256 offset = (idx - 1) * 3;str[0] = bytes1(MONTHS[offset]);str[1] = bytes1(MONTHS[offset + 1]);str[2] = bytes1(MONTHS[offset + 2]);return string(str);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;// ----------------------------------------------------------------------------// BokkyPooBah's DateTime Library v1.01//// A gas-efficient Solidity date and time library//// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary//// Tested date range 1970/01/01 to 2345/12/31//// Conventions:// Unit | Range | Notes// :-------- |:-------------:|:-----// timestamp | >= 0 | Unix timestamp, number of seconds since 1970/01/01 00:00:00 UTC// year | 1970 ... 2345 |// month | 1 ... 12 |// day | 1 ... 31 |// hour | 0 ... 23 |// minute | 0 ... 59 |// second | 0 ... 59 |// dayOfWeek | 1 ... 7 | 1 = Monday, ..., 7 = Sunday////// Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018-2019. The MIT Licence.
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;library Array {function idx(uint256[] memory arr, uint256 item) internal pure returns (uint256 i) {for (i = 1; i <= arr.length; i++) {if (arr[i - 1] == item) {return i;}}i = 0;}function addItem(uint256[] storage arr, uint256 item) internal {if (idx(arr, item) == 0) {arr.push(item);}}function removeItem(uint256[] storage arr, uint256 item) internal {uint256 i = idx(arr, item);if (i > 0) {arr[i - 1] = arr[arr.length - 1];arr.pop();}}
1234567891011// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IXENTorrent {event StartTorrent(address indexed user, uint256 count, uint256 term);event EndTorrent(address indexed user, uint256 tokenId, address to);function bulkClaimRank(uint256 count, uint256 term) external returns (uint256);function bulkClaimMintReward(uint256 tokenId, address to) external;}
12345678910// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IXENProxying {function callClaimRank(uint256 term) external;function callClaimMintReward(address to) external;function powerDown() external;}
123456// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IERC2771 {function isTrustedForwarder(address forwarder) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.13;import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";/*** @title OperatorFilterer* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another* registrant's entries in the OperatorFilterRegistry.* @dev This smart contract is meant to be inherited by token contracts so they can use the following:* - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.* - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.*/abstract contract OperatorFilterer {error OperatorNotAllowed(address operator);IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {// If an inheriting token contract is deployed to a network without the registry deployed, the modifier// will not revert, but the contract will need to be registered with the registry once it is deployed in// order for the modifier to filter addresses.if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {if (subscribe) {OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.13;interface IOperatorFilterRegistry {function isOperatorAllowed(address registrant, address operator) external view returns (bool);function register(address registrant) external;function registerAndSubscribe(address registrant, address subscription) external;function registerAndCopyEntries(address registrant, address registrantToCopy) external;function unregister(address addr) external;function updateOperator(address registrant, address operator, bool filtered) external;function updateOperators(address registrant, address[] calldata operators, bool filtered) external;function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;function subscribe(address registrant, address registrantToSubscribe) external;function unsubscribe(address registrant, bool copyExistingEntries) external;function subscriptionOf(address addr) external returns (address registrant);function subscribers(address registrant) external returns (address[] memory);function subscriberAt(address registrant, uint256 index) external returns (address);function copyEntriesOf(address registrant, address registrantToCopy) external;function isOperatorFiltered(address registrant, address operator) external returns (bool);function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);function filteredOperators(address addr) external returns (address[] memory);function filteredCodeHashes(address addr) external returns (bytes32[] memory);function filteredOperatorAt(address registrant, uint256 index) external returns (address);function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
1234567891011121314// SPDX-License-Identifier: MITpragma solidity ^0.8.13;import {OperatorFilterer} from "./OperatorFilterer.sol";/*** @title DefaultOperatorFilterer* @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.*/abstract contract DefaultOperatorFilterer is OperatorFilterer {address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: BSD-4-Clause/** ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting.* Author: Mikhail Vladimirov <mikhail.vladimirov@gmail.com>*/pragma solidity ^0.8.0;/*** Smart contract library of mathematical functions operating with signed* 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is* basically a simple fraction whose numerator is signed 128-bit integer and* denominator is 2^64. As long as denominator is always the same, there is no* need to store it, thus in Solidity signed 64.64-bit fixed point numbers are* represented by int128 type holding only the numerator.*/library ABDKMath64x64 {/** Minimum value signed 64.64-bit fixed point number may have.*/int128 private constant MIN_64x64 = -0x80000000000000000000000000000000;/** Maximum value signed 64.64-bit fixed point number may have.*/int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
12345678910111213141516171819202122232425// 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);}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)pragma solidity ^0.8.0;import "./IERC165.sol";/*** @dev Implementation of the {IERC165} interface.** Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check* for the additional interface id that will be supported. For example:** ```solidity* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);* }* ```** Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.*/abstract contract ERC165 is IERC165 {/*** @dev See {IERC165-supportsInterface}.*/function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)pragma solidity ^0.8.0;/*** @dev String operations.*/library Strings {bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";uint8 private constant _ADDRESS_LENGTH = 20;/*** @dev Converts a `uint256` to its ASCII `string` decimal representation.*/function toString(uint256 value) internal pure returns (string memory) {// Inspired by OraclizeAPI's implementation - MIT licence// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.solif (value == 0) {return "0";}uint256 temp = value;uint256 digits;while (temp != 0) {digits++;
123456789101112131415161718192021222324// 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;}}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)pragma solidity ^0.8.0;/*** @dev Provides a set of functions to operate with Base64 strings.** _Available since v4.5._*/library Base64 {/*** @dev Base64 Encoding/Decoding Table*/string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";/*** @dev Converts a `bytes` to its Bytes64 `string` representation.*/function encode(bytes memory data) internal pure returns (string memory) {/*** Inspired by Brecht Devos (Brechtpd) implementation - MIT licence* https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol*/if (data.length == 0) return "";
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)pragma solidity ^0.8.1;/*** @dev Collection of functions related to the address type*/library Address {/*** @dev Returns true if `account` is a contract.** [IMPORTANT]* ====* It is unsafe to assume that an address for which this function returns* false is an externally-owned account (EOA) and not a contract.** Among others, `isContract` will return false for the following* types of addresses:** - an externally-owned account* - a contract in construction* - an address where a contract will be created* - an address where a contract lived, but was destroyed* ====*
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)pragma solidity ^0.8.0;import "../IERC721.sol";/*** @title ERC-721 Non-Fungible Token Standard, optional metadata extension* @dev See https://eips.ethereum.org/EIPS/eip-721*/interface IERC721Metadata is IERC721 {/*** @dev Returns the token collection name.*/function name() external view returns (string memory);/*** @dev Returns the token collection symbol.*/function symbol() external view returns (string memory);/*** @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.*/function tokenURI(uint256 tokenId) external view returns (string memory);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)pragma solidity ^0.8.0;/*** @title ERC721 token receiver interface* @dev Interface for any contract that wants to support safeTransfers* from ERC721 asset contracts.*/interface IERC721Receiver {/*** @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}* by `operator` from `from`, this function is called.** It must return its Solidity selector to confirm the token transfer.* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.** The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.*/function onERC721Received(address operator,address from,uint256 tokenId,bytes calldata data) external returns (bytes4);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol)pragma solidity ^0.8.0;import "../../utils/introspection/IERC165.sol";/*** @dev Required interface of an ERC721 compliant contract.*/interface IERC721 is IERC165 {/*** @dev Emitted when `tokenId` token is transferred from `from` to `to`.*/event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);/*** @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.*/event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);/*** @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.*/event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol)pragma solidity ^0.8.0;import "./IERC721.sol";import "./IERC721Receiver.sol";import "./extensions/IERC721Metadata.sol";import "../../utils/Address.sol";import "../../utils/Context.sol";import "../../utils/Strings.sol";import "../../utils/introspection/ERC165.sol";/*** @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including* the Metadata extension, but not including the Enumerable extension, which is available separately as* {ERC721Enumerable}.*/contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {using Address for address;using Strings for uint256;// Token namestring private _name;// Token symbol
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)pragma solidity ^0.8.0;import "../IERC20.sol";/*** @dev Interface for the optional metadata functions from the ERC20 standard.** _Available since v4.1._*/interface IERC20Metadata is IERC20 {/*** @dev Returns the name of the token.*/function name() external view returns (string memory);/*** @dev Returns the symbol of the token.*/function symbol() external view returns (string memory);/*** @dev Returns the decimals places of the token.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.0;/*** @dev Interface of the ERC20 standard as defined in the EIP.*/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 amount of tokens in existence.*/
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)pragma solidity ^0.8.0;import "./IERC20.sol";import "./extensions/IERC20Metadata.sol";import "../../utils/Context.sol";/*** @dev Implementation of the {IERC20} interface.** This implementation is agnostic to the way tokens are created. This means* that a supply mechanism has to be added in a derived contract using {_mint}.* For a generic mechanism see {ERC20PresetMinterPauser}.** TIP: For a detailed writeup see our guide* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How* to implement supply mechanisms].** We have followed general OpenZeppelin Contracts guidelines: functions revert* instead returning `false` on failure. This behavior is nonetheless* conventional and does not conflict with the expectations of ERC20* applications.** Additionally, an {Approval} event is emitted on calls to {transferFrom}.
12345678910111213141516171819202122232425// SPDX-License-Identifier: MIT// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)pragma solidity ^0.8.0;import "../utils/introspection/IERC165.sol";/*** @dev Interface for the NFT Royalty Standard.** A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal* support for royalty payments across all NFT marketplaces and ecosystem participants.** _Available since v4.5._*/interface IERC2981 is IERC165 {/*** @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.*/function royaltyInfo(uint256 tokenId, uint256 salePrice)externalviewreturns (address receiver, uint256 royaltyAmount);}
123456// SPDX-License-Identifier: MIT// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)pragma solidity ^0.8.0;import "../utils/introspection/IERC165.sol";
123456789101112// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IStakingToken {event Staked(address indexed user, uint256 amount, uint256 term);event Withdrawn(address indexed user, uint256 amount, uint256 reward);function stake(uint256 amount, uint256 term) external;function withdraw() external;}
123456789101112// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IRankedMintingToken {event RankClaimed(address indexed user, uint256 term, uint256 rank);event MintClaimed(address indexed user, uint256 rewardAmount);function claimRank(uint256 term) external;function claimMintReward() external;}
123456// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IBurnableToken {function burn(address user, uint256 amount) external;}
1234567891011121314// SPDX-License-Identifier: MITpragma solidity ^0.8.10;interface IBurnRedeemable {event Redeemed(address indexed user,address indexed xenContract,address indexed tokenContract,uint256 xenAmount,uint256 tokenAmount);function onTokenBurned(address user, uint256 amount) external;}
1234567891011121314151617181920212223242526// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "./Math.sol";import "@openzeppelin/contracts/token/ERC20/ERC20.sol";import "@openzeppelin/contracts/interfaces/IERC165.sol";import "abdk-libraries-solidity/ABDKMath64x64.sol";import "./interfaces/IStakingToken.sol";import "./interfaces/IRankedMintingToken.sol";import "./interfaces/IBurnableToken.sol";import "./interfaces/IBurnRedeemable.sol";contract XENCrypto is Context, IRankedMintingToken, IStakingToken, IBurnableToken, ERC20("XEN Crypto", "XEN") {using Math for uint256;using ABDKMath64x64 for int128;using ABDKMath64x64 for uint256;// INTERNAL TYPE TO DESCRIBE A XEN MINT INFOstruct MintInfo {address user;uint256 term;uint256 maturityTs;uint256 rank;uint256 amplifier;uint256 eaaRate;}
123456789101112131415161718192021// SPDX-License-Identifier: MITpragma solidity ^0.8.10;import "abdk-libraries-solidity/ABDKMath64x64.sol";library Math {function min(uint256 a, uint256 b) external pure returns (uint256) {if (a > b) return b;return a;}function max(uint256 a, uint256 b) external pure returns (uint256) {if (a > b) return a;return b;}function logX64(uint256 x) external pure returns (int128) {return ABDKMath64x64.log_2(ABDKMath64x64.fromUInt(x));}}
1234567891011121314151617181920212223242526{"remappings": [],"optimizer": {"enabled": true,"runs": 20},"evmVersion": "london","libraries": {"/contracts/libs/MintInfo.sol": {"MintInfo": "0xC739d01beb34E380461BBa9ef8ed1a44874382Be"},"/contracts/libs/Metadata.sol": {"Metadata": "0x1Ac17FFB8456525BfF46870bba7Ed8772ba063a5"}},"outputSelection": {"*": {"*": ["evm.bytecode","evm.deployedBytecode","devdoc","userdoc","metadata","abi"]}
[{"inputs":[{"internalType":"address","name":"xenCrypto_","type":"address"},{"internalType":"uint256[]","name":"burnRates_","type":"uint256[]"},{"internalType":"uint256[]","name":"tokenLimits_","type":"uint256[]"},{"internalType":"uint256","name":"startBlockNumber_","type":"uint256"},{"internalType":"address","name":"forwarder_","type":"address"},{"internalType":"address","name":"royaltyReceiver_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"EndTorrent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"xenContract","type":"address"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"xenAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"Redeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"term","type":"uint256"}],"name":"StartTorrent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"AUTHORS","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BLACKOUT_TERM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COMMON_CATEGORY_COUNTER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIMITED_CATEGORY_TIME_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"POWER_GROUP_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROYALTY_BP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SPECIAL_CATEGORIES_VMU_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"trustedForwarder","type":"address"}],"name":"addForwarder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"to","type":"address"}],"name":"bulkClaimMintReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"},{"internalType":"uint256","name":"term","type":"uint256"}],"name":"bulkClaimRank","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"},{"internalType":"uint256","name":"term","type":"uint256"},{"internalType":"uint256","name":"burning","type":"uint256"}],"name":"bulkClaimRankLimited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"callClaimMintReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"term","type":"uint256"}],"name":"callClaimRank","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"genesisTs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isApex","outputs":[{"internalType":"bool","name":"apex","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"forwarder","type":"address"}],"name":"isTrustedForwarder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"mintInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"burned","type":"uint256"}],"name":"onTokenBurned","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ownedTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"powerDown","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"specialClassesBurnRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"specialClassesCounters","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"specialClassesTokenLimits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startBlockNumber","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":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIdCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vmuCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"xenBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xenCrypto","outputs":[{"internalType":"contract XENCrypto","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.