Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 57 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Approve | 19186201 | 351 days ago | IN | 0 ETH | 0.0037496 | ||||
Approve | 19186196 | 351 days ago | IN | 0 ETH | 0.0034828 | ||||
Approve | 19186196 | 351 days ago | IN | 0 ETH | 0.0036047 | ||||
Approve | 19186195 | 351 days ago | IN | 0 ETH | 0.00359293 | ||||
Approve | 19186187 | 351 days ago | IN | 0 ETH | 0.00395527 | ||||
Approve | 19186186 | 351 days ago | IN | 0 ETH | 0.00434886 | ||||
Approve | 19186183 | 351 days ago | IN | 0 ETH | 0.00413355 | ||||
Approve | 19186182 | 351 days ago | IN | 0 ETH | 0.00440299 | ||||
Approve | 19186182 | 351 days ago | IN | 0 ETH | 0.00440299 | ||||
Approve | 19186181 | 351 days ago | IN | 0 ETH | 0.00398023 | ||||
Approve | 19186181 | 351 days ago | IN | 0 ETH | 0.00408244 | ||||
Approve | 19186180 | 351 days ago | IN | 0 ETH | 0.00423172 | ||||
Approve | 19186180 | 351 days ago | IN | 0 ETH | 0.00433424 | ||||
Approve | 19186180 | 351 days ago | IN | 0 ETH | 0.00433424 | ||||
Approve | 19186179 | 351 days ago | IN | 0 ETH | 0.00379339 | ||||
Approve | 19186179 | 351 days ago | IN | 0 ETH | 0.00379339 | ||||
Approve | 19186179 | 351 days ago | IN | 0 ETH | 0.00379339 | ||||
Approve | 19186179 | 351 days ago | IN | 0 ETH | 0.00379339 | ||||
Approve | 19186179 | 351 days ago | IN | 0 ETH | 0.00389057 | ||||
Approve | 19186179 | 351 days ago | IN | 0 ETH | 0.00389537 | ||||
Approve | 19186178 | 351 days ago | IN | 0 ETH | 0.00337838 | ||||
Approve | 19186177 | 351 days ago | IN | 0 ETH | 0.00313731 | ||||
Approve | 19186177 | 351 days ago | IN | 0 ETH | 0.00313731 | ||||
Approve | 19186177 | 351 days ago | IN | 0 ETH | 0.00323848 | ||||
Approve | 19186177 | 351 days ago | IN | 0 ETH | 0.00338442 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Mezzi
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT /* ____ ,----, ,----, ,--, ,--, ,' , `. ,---,. .' .`| .' .`| ,---, ,--.'| ,----.. ,--.'| ,-+-,.' _ | ,' .' | .' .' ; .' .' ; ,`--.' | ,--, | : / / \ ,--, | : ,-+-. ; , || ,---.' | ,---, ' .' ,---, ' .' | : : ,---.'| : ' / . : ,---.'| : ' ,--.'|' | ;| | | .' | : ./ | : ./ : | ' ; : | | ; . / ;. \ ; : | | ; | | ,', | ': : : |-, ; | .' / ; | .' / | : | | | : _' | . ; / ` ; | | : _' | | | / | | || : | ;/| `---' / ; `---' / ; ' ' ; : : |.' | ; | ; \ ; | : : |.' | ' | : | : |, | : .' / ; / / ; / | | | | ' ' ; : | : | ; | ' | ' ' ; : ; . | ; |--' | | |-, ; / /--, ; / /--, ' : ; \ \ .'. | . | ' ' ' : \ \ .'. | | : | | , ' : ;/| / / / .`| / / / .`| | | ' `---`: | ' ' ; \; / | `---`: | ' | : ' |/ | | \ ./__; : ./__; : ' : | ' ; | \ \ ', / ' ; | ; | |`-' | : .' | : .' | : .' ; |.' | : ; ; : / | : ; | ;/ | | ,' ; | .' ; | .' '---' ' ,/ \ \ .' ' ,/ '---' `----' `---' `---' '--' `---` '--' */ pragma solidity ^0.8.0; import "./ERC404/ERC404.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract Mezzi is ERC404 { string public boxURI; string public baseURI; constructor() ERC404("Mezzi", "Mezzi", 18, 404, msg.sender) { balanceOf[msg.sender] = 404 * 10 ** 18; } function setBoxURI(string memory _boxURI) public onlyOwner { boxURI = _boxURI; } function setBaseURI(string memory _baseURI) public onlyOwner { baseURI = _baseURI; } function setNameSymbol( string memory _name, string memory _symbol ) public onlyOwner { _setNameSymbol(_name, _symbol); } function tokenURI(uint256 id) public view override returns (string memory) { if (bytes(baseURI).length > 0) { return string.concat(baseURI, Strings.toString(id)); } else { return string.concat(boxURI); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _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) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; abstract contract Ownable { event OwnershipTransferred(address indexed user, address indexed newOwner); error Unauthorized(); error InvalidOwner(); address public owner; modifier onlyOwner() virtual { if (msg.sender != owner) revert Unauthorized(); _; } constructor(address _owner) { if (_owner == address(0)) revert InvalidOwner(); owner = _owner; emit OwnershipTransferred(address(0), _owner); } function transferOwnership(address _owner) public virtual onlyOwner { if (_owner == address(0)) revert InvalidOwner(); owner = _owner; emit OwnershipTransferred(msg.sender, _owner); } function revokeOwnership() public virtual onlyOwner { owner = address(0); emit OwnershipTransferred(msg.sender, address(0)); } } abstract contract ERC721Receiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC721Receiver.onERC721Received.selector; } } /// @notice ERC404 /// A gas-efficient, mixed ERC20 / ERC721 implementation /// with native liquidity and fractionalization. /// /// This is an experimental standard designed to integrate /// with pre-existing ERC20 / ERC721 support as smoothly as /// possible. /// /// @dev In order to support full functionality of ERC20 and ERC721 /// supply assumptions are made that slightly constraint usage. /// Ensure decimals are sufficiently large (standard 18 recommended) /// as ids are effectively encoded in the lowest range of amounts. /// /// NFTs are spent on ERC20 functions in a FILO queue, this is by /// design. /// abstract contract ERC404 is Ownable { // Events event ERC20Transfer( address indexed from, address indexed to, uint256 amount ); event Approval( address indexed owner, address indexed spender, uint256 amount ); event Transfer( address indexed from, address indexed to, uint256 indexed id ); event ERC721Approval( address indexed owner, address indexed spender, uint256 indexed id ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); // Errors error NotFound(); error AlreadyExists(); error InvalidRecipient(); error InvalidSender(); error UnsafeRecipient(); // Metadata /// @dev Token name string public name; /// @dev Token symbol string public symbol; /// @dev Decimals for fractional representation uint8 public immutable decimals; /// @dev Total supply in fractionalized representation uint256 public immutable totalSupply; /// @dev Current mint counter, monotonically increasing to ensure accurate ownership uint256 public minted; // Mappings /// @dev Balance of user in fractional representation mapping(address => uint256) public balanceOf; /// @dev Allowance of user in fractional representation mapping(address => mapping(address => uint256)) public allowance; /// @dev Approval in native representaion mapping(uint256 => address) public getApproved; /// @dev Approval for all in native representation mapping(address => mapping(address => bool)) public isApprovedForAll; /// @dev Owner of id in native representation mapping(uint256 => address) internal _ownerOf; /// @dev Array of owned ids in native representation mapping(address => uint256[]) internal _owned; /// @dev Tracks indices for the _owned mapping mapping(uint256 => uint256) internal _ownedIndex; /// @dev Addresses whitelisted from minting / burning for gas savings (pairs, routers, etc) mapping(address => bool) public whitelist; // Constructor constructor( string memory _name, string memory _symbol, uint8 _decimals, uint256 _totalNativeSupply, address _owner ) Ownable(_owner) { name = _name; symbol = _symbol; decimals = _decimals; totalSupply = _totalNativeSupply * (10 ** decimals); } /// @notice Initialization function to set pairs / etc /// saving gas by avoiding mint / burn on unnecessary targets function setWhitelist(address target, bool state) public onlyOwner { whitelist[target] = state; } /// @notice Function to find owner of a given native token function ownerOf(uint256 id) public view virtual returns (address owner) { owner = _ownerOf[id]; if (owner == address(0)) { revert NotFound(); } } /// @notice tokenURI must be implemented by child contract function tokenURI(uint256 id) public view virtual returns (string memory); /// @notice Function for token approvals /// @dev This function assumes id / native if amount less than or equal to current max id function approve( address spender, uint256 amountOrId ) public virtual returns (bool) { if (amountOrId <= minted && amountOrId > 0) { address owner = _ownerOf[amountOrId]; if (msg.sender != owner && !isApprovedForAll[owner][msg.sender]) { revert Unauthorized(); } getApproved[amountOrId] = spender; emit Approval(owner, spender, amountOrId); } else { allowance[msg.sender][spender] = amountOrId; emit Approval(msg.sender, spender, amountOrId); } return true; } /// @notice Function native approvals function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } /// @notice Function for mixed transfers /// @dev This function assumes id / native if amount less than or equal to current max id function transferFrom( address from, address to, uint256 amountOrId ) public virtual { if (amountOrId <= minted) { if (from != _ownerOf[amountOrId]) { revert InvalidSender(); } if (to == address(0)) { revert InvalidRecipient(); } if ( msg.sender != from && !isApprovedForAll[from][msg.sender] && msg.sender != getApproved[amountOrId] ) { revert Unauthorized(); } balanceOf[from] -= _getUnit(); unchecked { balanceOf[to] += _getUnit(); } _ownerOf[amountOrId] = to; delete getApproved[amountOrId]; // update _owned for sender uint256 updatedId = _owned[from][_owned[from].length - 1]; _owned[from][_ownedIndex[amountOrId]] = updatedId; // pop _owned[from].pop(); // update index for the moved id _ownedIndex[updatedId] = _ownedIndex[amountOrId]; // push token to to owned _owned[to].push(amountOrId); // update index for to owned _ownedIndex[amountOrId] = _owned[to].length - 1; emit Transfer(from, to, amountOrId); emit ERC20Transfer(from, to, _getUnit()); } else { uint256 allowed = allowance[from][msg.sender]; if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amountOrId; _transfer(from, to, amountOrId); } } /// @notice Function for fractional transfers function transfer( address to, uint256 amount ) public virtual returns (bool) { return _transfer(msg.sender, to, amount); } /// @notice Function for native transfers with contract support function safeTransferFrom( address from, address to, uint256 id ) public virtual { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721Receiver(to).onERC721Received(msg.sender, from, id, "") != ERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /// @notice Function for native transfers with contract support and callback data function safeTransferFrom( address from, address to, uint256 id, bytes calldata data ) public virtual { transferFrom(from, to, id); if ( to.code.length != 0 && ERC721Receiver(to).onERC721Received(msg.sender, from, id, data) != ERC721Receiver.onERC721Received.selector ) { revert UnsafeRecipient(); } } /// @notice Internal function for fractional transfers function _transfer( address from, address to, uint256 amount ) internal returns (bool) { uint256 unit = _getUnit(); uint256 balanceBeforeSender = balanceOf[from]; uint256 balanceBeforeReceiver = balanceOf[to]; balanceOf[from] -= amount; unchecked { balanceOf[to] += amount; } // Skip burn for certain addresses to save gas if (!whitelist[from]) { uint256 tokens_to_burn = (balanceBeforeSender / unit) - (balanceOf[from] / unit); for (uint256 i = 0; i < tokens_to_burn; i++) { _burn(from); } } // Skip minting for certain addresses to save gas if (!whitelist[to]) { uint256 tokens_to_mint = (balanceOf[to] / unit) - (balanceBeforeReceiver / unit); for (uint256 i = 0; i < tokens_to_mint; i++) { _mint(to); } } emit ERC20Transfer(from, to, amount); return true; } // Internal utility logic function _getUnit() internal view returns (uint256) { return 10 ** decimals; } function _mint(address to) internal virtual { if (to == address(0)) { revert InvalidRecipient(); } unchecked { minted++; } uint256 id = minted; if (_ownerOf[id] != address(0)) { revert AlreadyExists(); } _ownerOf[id] = to; _owned[to].push(id); _ownedIndex[id] = _owned[to].length - 1; emit Transfer(address(0), to, id); } function _burn(address from) internal virtual { if (from == address(0)) { revert InvalidSender(); } uint256 id = _owned[from][_owned[from].length - 1]; _owned[from].pop(); delete _ownedIndex[id]; delete _ownerOf[id]; delete getApproved[id]; emit Transfer(from, address(0), id); } function _setNameSymbol( string memory _name, string memory _symbol ) internal { name = _name; symbol = _symbol; } }
{ "evmVersion": "paris", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyExists","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidSender","type":"error"},{"inputs":[],"name":"NotFound","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"inputs":[],"name":"UnsafeRecipient","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"ERC721Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","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":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amountOrId","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boxURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revokeOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","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":"id","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":"string","name":"_baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_boxURI","type":"string"}],"name":"setBoxURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"setNameSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amountOrId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040805180820182526005808252644d657a7a6960d81b602080840182905284518086019095529184529083015290601261019433808062000067576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03831690811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001620000be8682620001c1565b506002620000cd8582620001c1565b5060ff83166080819052620000e490600a620003a2565b620000f09083620003ba565b60a05250503360009081526004602052604090206815e6a0538429d00000905550620003d4915050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200014557607f821691505b6020821081036200016657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bc576000816000526020600020601f850160051c81016020861015620001975750805b601f850160051c820191505b81811015620001b857828155600101620001a3565b5050505b505050565b81516001600160401b03811115620001dd57620001dd6200011a565b620001f581620001ee845462000130565b846200016c565b602080601f8311600181146200022d5760008415620002145750858301515b600019600386901b1c1916600185901b178555620001b8565b600085815260208120601f198616915b828110156200025e578886015182559484019460019091019084016200023d565b50858210156200027d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115620002e4578160001904821115620002c857620002c86200028d565b80851615620002d657918102915b93841c9390800290620002a8565b509250929050565b600082620002fd575060016200039c565b816200030c575060006200039c565b8160018114620003255760028114620003305762000350565b60019150506200039c565b60ff8411156200034457620003446200028d565b50506001821b6200039c565b5060208310610133831016604e8410600b841016171562000375575081810a6200039c565b620003818383620002a3565b80600019048211156200039857620003986200028d565b0290505b92915050565b6000620003b360ff841683620002ec565b9392505050565b80820281158282048414176200039c576200039c6200028d565b60805160a051611b8f6200040160003960006102350152600081816102870152610e9d0152611b8f6000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c80636c0360eb116100f9578063b88d4fde11610097578063dd62ed3e11610071578063dd62ed3e146103e8578063e985e9c514610413578063f291785014610441578063f2fde38b1461044957600080fd5b8063b88d4fde146103af578063b99b8f00146103c2578063c87b56dd146103d557600080fd5b806395d89b41116100d357806395d89b411461035e5780639b19251a14610366578063a22cb46514610389578063a9059cbb1461039c57600080fd5b80636c0360eb1461032357806370a082311461032b5780638da5cb5b1461034b57600080fd5b8063313ce56711610166578063504334c211610140578063504334c2146102d757806353d6fd59146102ea57806355f804b3146102fd5780636352211e1461031057600080fd5b8063313ce5671461028257806342842e0e146102bb5780634f02c420146102ce57600080fd5b806306fdde03146101ae578063081812fc146101cc578063095ea7b31461020d57806318160ddd1461023057806323b872dd146102655780632b9689581461027a575b600080fd5b6101b661045c565b6040516101c39190611451565b60405180910390f35b6101f56101da366004611484565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b61022061021b3660046114b4565b6104ea565b60405190151581526020016101c3565b6102577f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016101c3565b6102786102733660046114de565b61063b565b005b6102786109c4565b6102a97f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016101c3565b6102786102c93660046114de565b610a2a565b61025760035481565b6102786102e53660046115bd565b610aff565b6102786102f8366004611621565b610b37565b61027861030b36600461165d565b610b8c565b6101f561031e366004611484565b610bc2565b6101b6610bfd565b61025761033936600461169a565b60046020526000908152604090205481565b6000546101f5906001600160a01b031681565b6101b6610c0a565b61022061037436600461169a565b600b6020526000908152604090205460ff1681565b610278610397366004611621565b610c17565b6102206103aa3660046114b4565b610c83565b6102786103bd3660046116b5565b610c97565b6102786103d036600461165d565b610d5a565b6101b66103e3366004611484565b610d90565b6102576103f6366004611750565b600560209081526000928352604080842090915290825290205481565b610220610421366004611750565b600760209081526000928352604080842090915290825290205460ff1681565b6101b6610ded565b61027861045736600461169a565b610dfa565b6001805461046990611783565b80601f016020809104026020016040519081016040528092919081815260200182805461049590611783565b80156104e25780601f106104b7576101008083540402835291602001916104e2565b820191906000526020600020905b8154815290600101906020018083116104c557829003601f168201915b505050505081565b600060035482111580156104fe5750600082115b156105d5576000828152600860205260409020546001600160a01b031633811480159061054f57506001600160a01b038116600090815260076020908152604080832033845290915290205460ff16155b1561056c576040516282b42960e81b815260040160405180910390fd5b60008381526006602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350610631565b3360008181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b6003548111610955576000818152600860205260409020546001600160a01b0384811691161461067e57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166106a557604051634e46966960e11b815260040160405180910390fd5b336001600160a01b038416148015906106e257506001600160a01b038316600090815260076020908152604080832033845290915290205460ff16155b801561070557506000818152600660205260409020546001600160a01b03163314155b15610722576040516282b42960e81b815260040160405180910390fd5b61072a610e96565b6001600160a01b038416600090815260046020526040812080549091906107529084906117d3565b909155506107609050610e96565b6001600160a01b03808416600081815260046020908152604080832080549096019095558582526008815284822080546001600160a01b0319908116909417905560068152848220805490931690925591861682526009905290812080546107ca906001906117d3565b815481106107da576107da6117e6565b60009182526020808320909101546001600160a01b0387168352600982526040808420868552600a9093529092205481549293508392811061081e5761081e6117e6565b60009182526020808320909101929092556001600160a01b0386168152600990915260409020805480610853576108536117fc565b600082815260208082208301600019908101839055909201909255838252600a8152604080832054848452818420556001600160a01b0386168084526009835290832080546001818101835582865293852001869055925290546108b791906117d3565b6000838152600a602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4826001600160a01b0316846001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148761093e610e96565b60405190815260200160405180910390a350505050565b6001600160a01b038316600090815260056020908152604080832033845290915290205460001981146109b15761098c82826117d3565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b6109bc848484610ec8565b50505b505050565b6000546001600160a01b031633146109ee576040516282b42960e81b815260040160405180910390fd5b600080546001600160a01b031916815560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b610a3583838361063b565b6001600160a01b0382163b15801590610ae15750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad49190611812565b6001600160e01b03191614155b156109bf57604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610b29576040516282b42960e81b815260040160405180910390fd5b610b338282611076565b5050565b6000546001600160a01b03163314610b61576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610bb6576040516282b42960e81b815260040160405180910390fd5b600d610b33828261188c565b6000818152600860205260409020546001600160a01b031680610bf85760405163c5723b5160e01b815260040160405180910390fd5b919050565b600d805461046990611783565b6002805461046990611783565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610c90338484610ec8565b9392505050565b610ca285858561063b565b6001600160a01b0384163b15801590610d3c5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610cec9033908a9089908990899060040161194c565b6020604051808303816000875af1158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190611812565b6001600160e01b03191614155b156109bc57604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610d84576040516282b42960e81b815260040160405180910390fd5b600c610b33828261188c565b60606000600d8054610da190611783565b90501115610ddb57600d610db48361108f565b604051602001610dc5929190611a13565b6040516020818303038152906040529050919050565b600c604051602001610dc59190611a38565b600c805461046990611783565b6000546001600160a01b03163314610e24576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116610e4b576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000610ec37f0000000000000000000000000000000000000000000000000000000000000000600a611b28565b905090565b600080610ed3610e96565b6001600160a01b038087166000818152600460205260408082208054948a1683529082205492825293945091929091869190610f0f83866117d3565b90915550506001600160a01b03808716600090815260046020908152604080832080548a019055928a168252600b9052205460ff16610fa1576001600160a01b038716600090815260046020526040812054610f6c908590611b37565b610f768585611b37565b610f8091906117d3565b905060005b81811015610f9e57610f9689611122565b600101610f85565b50505b6001600160a01b0386166000908152600b602052604090205460ff1661101c576000610fcd8483611b37565b6001600160a01b038816600090815260046020526040902054610ff1908690611b37565b610ffb91906117d3565b905060005b81811015611019576110118861124a565b600101611000565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e0314878760405161106191815260200190565b60405180910390a35060019695505050505050565b6001611082838261188c565b5060026109bf828261188c565b6060600061109c83611355565b600101905060008167ffffffffffffffff8111156110bc576110bc61151a565b6040519080825280601f01601f1916602001820160405280156110e6576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846110f057509392505050565b6001600160a01b03811661114957604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600960205260408120805461116f906001906117d3565b8154811061117f5761117f6117e6565b9060005260206000200154905060096000836001600160a01b03166001600160a01b031681526020019081526020016000208054806111c0576111c06117fc565b600082815260208082208301600019908101839055909201909255828252600a815260408083208390556008825280832080546001600160a01b031990811690915560069092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03811661127157604051634e46966960e11b815260040160405180910390fd5b60038054600101908190556000818152600860205260409020546001600160a01b0316156112b25760405163119b4fd360e11b815260040160405180910390fd5b600081815260086020908152604080832080546001600160a01b0319166001600160a01b03871690811790915580845260098352908320805460018181018355828652938520018590559252905461130a91906117d3565b6000828152600a602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106113945772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106113c0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106113de57662386f26fc10000830492506010015b6305f5e10083106113f6576305f5e100830492506008015b612710831061140a57612710830492506004015b6064831061141c576064830492506002015b600a83106106355760010192915050565b60005b83811015611448578181015183820152602001611430565b50506000910152565b602081526000825180602084015261147081604085016020870161142d565b601f01601f19169190910160400192915050565b60006020828403121561149657600080fd5b5035919050565b80356001600160a01b0381168114610bf857600080fd5b600080604083850312156114c757600080fd5b6114d08361149d565b946020939093013593505050565b6000806000606084860312156114f357600080fd5b6114fc8461149d565b925061150a6020850161149d565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261154157600080fd5b813567ffffffffffffffff8082111561155c5761155c61151a565b604051601f8301601f19908116603f011681019082821181831017156115845761158461151a565b8160405283815286602085880101111561159d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156115d057600080fd5b823567ffffffffffffffff808211156115e857600080fd5b6115f486838701611530565b9350602085013591508082111561160a57600080fd5b5061161785828601611530565b9150509250929050565b6000806040838503121561163457600080fd5b61163d8361149d565b91506020830135801515811461165257600080fd5b809150509250929050565b60006020828403121561166f57600080fd5b813567ffffffffffffffff81111561168657600080fd5b61169284828501611530565b949350505050565b6000602082840312156116ac57600080fd5b610c908261149d565b6000806000806000608086880312156116cd57600080fd5b6116d68661149d565b94506116e46020870161149d565b935060408601359250606086013567ffffffffffffffff8082111561170857600080fd5b818801915088601f83011261171c57600080fd5b81358181111561172b57600080fd5b89602082850101111561173d57600080fd5b9699959850939650602001949392505050565b6000806040838503121561176357600080fd5b61176c8361149d565b915061177a6020840161149d565b90509250929050565b600181811c9082168061179757607f821691505b6020821081036117b757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610635576106356117bd565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006020828403121561182457600080fd5b81516001600160e01b031981168114610c9057600080fd5b601f8211156109bf576000816000526020600020601f850160051c810160208610156118655750805b601f850160051c820191505b8181101561188457828155600101611871565b505050505050565b815167ffffffffffffffff8111156118a6576118a661151a565b6118ba816118b48454611783565b8461183c565b602080601f8311600181146118ef57600084156118d75750858301515b600019600386901b1c1916600185901b178555611884565b600085815260208120601f198616915b8281101561191e578886015182559484019460019091019084016118ff565b508582101561193c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b600081546119ad81611783565b600182811680156119c557600181146119da57611a09565b60ff1984168752821515830287019450611a09565b8560005260208060002060005b85811015611a005781548a8201529084019082016119e7565b50505082870194505b5050505092915050565b6000611a1f82856119a0565b8351611a2f81836020880161142d565b01949350505050565b6000610c9082846119a0565b600181815b80851115611a7f578160001904821115611a6557611a656117bd565b80851615611a7257918102915b93841c9390800290611a49565b509250929050565b600082611a9657506001610635565b81611aa357506000610635565b8160018114611ab95760028114611ac357611adf565b6001915050610635565b60ff841115611ad457611ad46117bd565b50506001821b610635565b5060208310610133831016604e8410600b8410161715611b02575081810a610635565b611b0c8383611a44565b8060001904821115611b2057611b206117bd565b029392505050565b6000610c9060ff841683611a87565b600082611b5457634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220fa829210ad809529113cf5da6efdc1d22ceca07f80d710a286bdd6ab06a86df364736f6c63430008180033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80636c0360eb116100f9578063b88d4fde11610097578063dd62ed3e11610071578063dd62ed3e146103e8578063e985e9c514610413578063f291785014610441578063f2fde38b1461044957600080fd5b8063b88d4fde146103af578063b99b8f00146103c2578063c87b56dd146103d557600080fd5b806395d89b41116100d357806395d89b411461035e5780639b19251a14610366578063a22cb46514610389578063a9059cbb1461039c57600080fd5b80636c0360eb1461032357806370a082311461032b5780638da5cb5b1461034b57600080fd5b8063313ce56711610166578063504334c211610140578063504334c2146102d757806353d6fd59146102ea57806355f804b3146102fd5780636352211e1461031057600080fd5b8063313ce5671461028257806342842e0e146102bb5780634f02c420146102ce57600080fd5b806306fdde03146101ae578063081812fc146101cc578063095ea7b31461020d57806318160ddd1461023057806323b872dd146102655780632b9689581461027a575b600080fd5b6101b661045c565b6040516101c39190611451565b60405180910390f35b6101f56101da366004611484565b6006602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101c3565b61022061021b3660046114b4565b6104ea565b60405190151581526020016101c3565b6102577f000000000000000000000000000000000000000000000015e6a0538429d0000081565b6040519081526020016101c3565b6102786102733660046114de565b61063b565b005b6102786109c4565b6102a97f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016101c3565b6102786102c93660046114de565b610a2a565b61025760035481565b6102786102e53660046115bd565b610aff565b6102786102f8366004611621565b610b37565b61027861030b36600461165d565b610b8c565b6101f561031e366004611484565b610bc2565b6101b6610bfd565b61025761033936600461169a565b60046020526000908152604090205481565b6000546101f5906001600160a01b031681565b6101b6610c0a565b61022061037436600461169a565b600b6020526000908152604090205460ff1681565b610278610397366004611621565b610c17565b6102206103aa3660046114b4565b610c83565b6102786103bd3660046116b5565b610c97565b6102786103d036600461165d565b610d5a565b6101b66103e3366004611484565b610d90565b6102576103f6366004611750565b600560209081526000928352604080842090915290825290205481565b610220610421366004611750565b600760209081526000928352604080842090915290825290205460ff1681565b6101b6610ded565b61027861045736600461169a565b610dfa565b6001805461046990611783565b80601f016020809104026020016040519081016040528092919081815260200182805461049590611783565b80156104e25780601f106104b7576101008083540402835291602001916104e2565b820191906000526020600020905b8154815290600101906020018083116104c557829003601f168201915b505050505081565b600060035482111580156104fe5750600082115b156105d5576000828152600860205260409020546001600160a01b031633811480159061054f57506001600160a01b038116600090815260076020908152604080832033845290915290205460ff16155b1561056c576040516282b42960e81b815260040160405180910390fd5b60008381526006602090815260409182902080546001600160a01b0319166001600160a01b038881169182179092559251868152908416917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350610631565b3360008181526005602090815260408083206001600160a01b03881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35b5060015b92915050565b6003548111610955576000818152600860205260409020546001600160a01b0384811691161461067e57604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0382166106a557604051634e46966960e11b815260040160405180910390fd5b336001600160a01b038416148015906106e257506001600160a01b038316600090815260076020908152604080832033845290915290205460ff16155b801561070557506000818152600660205260409020546001600160a01b03163314155b15610722576040516282b42960e81b815260040160405180910390fd5b61072a610e96565b6001600160a01b038416600090815260046020526040812080549091906107529084906117d3565b909155506107609050610e96565b6001600160a01b03808416600081815260046020908152604080832080549096019095558582526008815284822080546001600160a01b0319908116909417905560068152848220805490931690925591861682526009905290812080546107ca906001906117d3565b815481106107da576107da6117e6565b60009182526020808320909101546001600160a01b0387168352600982526040808420868552600a9093529092205481549293508392811061081e5761081e6117e6565b60009182526020808320909101929092556001600160a01b0386168152600990915260409020805480610853576108536117fc565b600082815260208082208301600019908101839055909201909255838252600a8152604080832054848452818420556001600160a01b0386168084526009835290832080546001818101835582865293852001869055925290546108b791906117d3565b6000838152600a602052604080822092909255905183916001600160a01b0380871692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4826001600160a01b0316846001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e03148761093e610e96565b60405190815260200160405180910390a350505050565b6001600160a01b038316600090815260056020908152604080832033845290915290205460001981146109b15761098c82826117d3565b6001600160a01b03851660009081526005602090815260408083203384529091529020555b6109bc848484610ec8565b50505b505050565b6000546001600160a01b031633146109ee576040516282b42960e81b815260040160405180910390fd5b600080546001600160a01b031916815560405133907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3565b610a3583838361063b565b6001600160a01b0382163b15801590610ae15750604051630a85bd0160e11b8082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610ab0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad49190611812565b6001600160e01b03191614155b156109bf57604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610b29576040516282b42960e81b815260040160405180910390fd5b610b338282611076565b5050565b6000546001600160a01b03163314610b61576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610bb6576040516282b42960e81b815260040160405180910390fd5b600d610b33828261188c565b6000818152600860205260409020546001600160a01b031680610bf85760405163c5723b5160e01b815260040160405180910390fd5b919050565b600d805461046990611783565b6002805461046990611783565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000610c90338484610ec8565b9392505050565b610ca285858561063b565b6001600160a01b0384163b15801590610d3c5750604051630a85bd0160e11b808252906001600160a01b0386169063150b7a0290610cec9033908a9089908990899060040161194c565b6020604051808303816000875af1158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190611812565b6001600160e01b03191614155b156109bc57604051633da6393160e01b815260040160405180910390fd5b6000546001600160a01b03163314610d84576040516282b42960e81b815260040160405180910390fd5b600c610b33828261188c565b60606000600d8054610da190611783565b90501115610ddb57600d610db48361108f565b604051602001610dc5929190611a13565b6040516020818303038152906040529050919050565b600c604051602001610dc59190611a38565b600c805461046990611783565b6000546001600160a01b03163314610e24576040516282b42960e81b815260040160405180910390fd5b6001600160a01b038116610e4b576040516349e27cff60e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6000610ec37f0000000000000000000000000000000000000000000000000000000000000012600a611b28565b905090565b600080610ed3610e96565b6001600160a01b038087166000818152600460205260408082208054948a1683529082205492825293945091929091869190610f0f83866117d3565b90915550506001600160a01b03808716600090815260046020908152604080832080548a019055928a168252600b9052205460ff16610fa1576001600160a01b038716600090815260046020526040812054610f6c908590611b37565b610f768585611b37565b610f8091906117d3565b905060005b81811015610f9e57610f9689611122565b600101610f85565b50505b6001600160a01b0386166000908152600b602052604090205460ff1661101c576000610fcd8483611b37565b6001600160a01b038816600090815260046020526040902054610ff1908690611b37565b610ffb91906117d3565b905060005b81811015611019576110118861124a565b600101611000565b50505b856001600160a01b0316876001600160a01b03167fe59fdd36d0d223c0c7d996db7ad796880f45e1936cb0bb7ac102e7082e0314878760405161106191815260200190565b60405180910390a35060019695505050505050565b6001611082838261188c565b5060026109bf828261188c565b6060600061109c83611355565b600101905060008167ffffffffffffffff8111156110bc576110bc61151a565b6040519080825280601f01601f1916602001820160405280156110e6576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846110f057509392505050565b6001600160a01b03811661114957604051636edaef2f60e11b815260040160405180910390fd5b6001600160a01b0381166000908152600960205260408120805461116f906001906117d3565b8154811061117f5761117f6117e6565b9060005260206000200154905060096000836001600160a01b03166001600160a01b031681526020019081526020016000208054806111c0576111c06117fc565b600082815260208082208301600019908101839055909201909255828252600a815260408083208390556008825280832080546001600160a01b031990811690915560069092528083208054909216909155518291906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b03811661127157604051634e46966960e11b815260040160405180910390fd5b60038054600101908190556000818152600860205260409020546001600160a01b0316156112b25760405163119b4fd360e11b815260040160405180910390fd5b600081815260086020908152604080832080546001600160a01b0319166001600160a01b03871690811790915580845260098352908320805460018181018355828652938520018590559252905461130a91906117d3565b6000828152600a602052604080822092909255905182916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106113945772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef810000000083106113c0576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc1000083106113de57662386f26fc10000830492506010015b6305f5e10083106113f6576305f5e100830492506008015b612710831061140a57612710830492506004015b6064831061141c576064830492506002015b600a83106106355760010192915050565b60005b83811015611448578181015183820152602001611430565b50506000910152565b602081526000825180602084015261147081604085016020870161142d565b601f01601f19169190910160400192915050565b60006020828403121561149657600080fd5b5035919050565b80356001600160a01b0381168114610bf857600080fd5b600080604083850312156114c757600080fd5b6114d08361149d565b946020939093013593505050565b6000806000606084860312156114f357600080fd5b6114fc8461149d565b925061150a6020850161149d565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261154157600080fd5b813567ffffffffffffffff8082111561155c5761155c61151a565b604051601f8301601f19908116603f011681019082821181831017156115845761158461151a565b8160405283815286602085880101111561159d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080604083850312156115d057600080fd5b823567ffffffffffffffff808211156115e857600080fd5b6115f486838701611530565b9350602085013591508082111561160a57600080fd5b5061161785828601611530565b9150509250929050565b6000806040838503121561163457600080fd5b61163d8361149d565b91506020830135801515811461165257600080fd5b809150509250929050565b60006020828403121561166f57600080fd5b813567ffffffffffffffff81111561168657600080fd5b61169284828501611530565b949350505050565b6000602082840312156116ac57600080fd5b610c908261149d565b6000806000806000608086880312156116cd57600080fd5b6116d68661149d565b94506116e46020870161149d565b935060408601359250606086013567ffffffffffffffff8082111561170857600080fd5b818801915088601f83011261171c57600080fd5b81358181111561172b57600080fd5b89602082850101111561173d57600080fd5b9699959850939650602001949392505050565b6000806040838503121561176357600080fd5b61176c8361149d565b915061177a6020840161149d565b90509250929050565b600181811c9082168061179757607f821691505b6020821081036117b757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610635576106356117bd565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b60006020828403121561182457600080fd5b81516001600160e01b031981168114610c9057600080fd5b601f8211156109bf576000816000526020600020601f850160051c810160208610156118655750805b601f850160051c820191505b8181101561188457828155600101611871565b505050505050565b815167ffffffffffffffff8111156118a6576118a661151a565b6118ba816118b48454611783565b8461183c565b602080601f8311600181146118ef57600084156118d75750858301515b600019600386901b1c1916600185901b178555611884565b600085815260208120601f198616915b8281101561191e578886015182559484019460019091019084016118ff565b508582101561193c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b038681168252851660208201526040810184905260806060820181905281018290526000828460a0840137600060a0848401015260a0601f19601f85011683010190509695505050505050565b600081546119ad81611783565b600182811680156119c557600181146119da57611a09565b60ff1984168752821515830287019450611a09565b8560005260208060002060005b85811015611a005781548a8201529084019082016119e7565b50505082870194505b5050505092915050565b6000611a1f82856119a0565b8351611a2f81836020880161142d565b01949350505050565b6000610c9082846119a0565b600181815b80851115611a7f578160001904821115611a6557611a656117bd565b80851615611a7257918102915b93841c9390800290611a49565b509250929050565b600082611a9657506001610635565b81611aa357506000610635565b8160018114611ab95760028114611ac357611adf565b6001915050610635565b60ff841115611ad457611ad46117bd565b50506001821b610635565b5060208310610133831016604e8410600b8410161715611b02575081810a610635565b611b0c8383611a44565b8060001904821115611b2057611b206117bd565b029392505050565b6000610c9060ff841683611a87565b600082611b5457634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220fa829210ad809529113cf5da6efdc1d22ceca07f80d710a286bdd6ab06a86df364736f6c63430008180033
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.