ETH Price: $3,102.55 (-0.04%)

Token

Oddesey (ODD)
 

Overview

Max Total Supply

5,555 ODD

Holders

2,767

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 ODD
0x0D25b93a6AFd230424e09D24762434209c64E2Bc
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
Oddesey

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 2 : Oddesey.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./libraries/DiamondCloneMinimalLib.sol";

// Contract Author: https://juicelabs.io

//   ▄██████▄  ████████▄  ████████▄     ▄████████    ▄████████    ▄████████ ▄██   ▄
//  ███    ███ ███   ▀███ ███   ▀███   ███    ███   ███    ███   ███    ███ ███   ██▄
//  ███    ███ ███    ███ ███    ███   ███    █▀    ███    █▀    ███    █▀  ███▄▄▄███
//  ███    ███ ███    ███ ███    ███  ▄███▄▄▄       ███         ▄███▄▄▄     ▀▀▀▀▀▀███
//  ███    ███ ███    ███ ███    ███ ▀▀███▀▀▀     ▀███████████ ▀▀███▀▀▀     ▄██   ███
//  ███    ███ ███    ███ ███    ███   ███    █▄           ███   ███    █▄  ███   ███
//  ███    ███ ███   ▄███ ███   ▄███   ███    ███    ▄█    ███   ███    ███ ███   ███
//   ▀██████▀  ████████▀  ████████▀    ██████████  ▄████████▀    ██████████  ▀█████▀

error FunctionDoesNotExist();

contract Oddesey {
    event OwnershipTransferred(
        address indexed previousOwner,
        address indexed newOwner
    );

    constructor(address sawAddress, address[] memory facetAddresses) {
        // set the owner
        DiamondCloneMinimalLib.accessControlStorage()._owner = msg.sender;
        emit OwnershipTransferred(address(0), msg.sender);

        // First facet should be the diamondFacet
        (, bytes memory err) = facetAddresses[0].delegatecall(
            abi.encodeWithSelector(
                0xf44a9d52, // initializeDiamondClone Selector
                sawAddress,
                facetAddresses
            )
        );
        if (err.length > 0) {
            revert(string(err));
        }
    }

    // Find facet for function that is called and execute the
    // function if a facet is found and return any value.
    fallback() external payable {
        // retrieve the facet address
        address facet = DiamondCloneMinimalLib._getFacetAddressForCall();

        // check if the facet address exists on the saw AND is included in our local cut
        if (facet == address(0)) revert FunctionDoesNotExist();

        // Execute external function from facet using delegatecall and return any value.
        assembly {
            // copy function selector and any arguments
            calldatacopy(0, 0, calldatasize())
            // execute function call using the facet
            let result := delegatecall(gas(), facet, 0, calldatasize(), 0, 0)
            // get any return value
            returndatacopy(0, 0, returndatasize())
            // return any return value or error back to the caller
            switch result
            case 0 {
                revert(0, returndatasize())
            }
            default {
                return(0, returndatasize())
            }
        }
    }

    receive() external payable {}
}

File 2 of 2 : DiamondCloneMinimalLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

error FailedToFetchFacet();

// minimal inline subset of the full DiamondCloneLib to reduce deployment gas costs
library DiamondCloneMinimalLib {
    bytes32 constant DIAMOND_CLONE_STORAGE_POSITION =
        keccak256("diamond.standard.diamond.clone.storage");
    bytes32 constant ACCESS_CONTROL_STORAGE_POSITION =
        keccak256("Access.Control.library.storage");

    struct DiamondCloneStorage {
        // address of the diamond saw contract
        address diamondSawAddress;
        // mapping to all the facets this diamond implements.
        mapping(address => bool) facetAddresses;
        // gas cache
        mapping(bytes4 => address) selectorGasCache;
    }

    struct AccessControlStorage {
        address _owner;
    }

    function diamondCloneStorage()
        internal
        pure
        returns (DiamondCloneStorage storage s)
    {
        bytes32 position = DIAMOND_CLONE_STORAGE_POSITION;
        assembly {
            s.slot := position
        }
    }

    // calls externally to the saw to find the appropriate facet to delegate to
    function _getFacetAddressForCall() internal view returns (address addr) {
        DiamondCloneStorage storage s = diamondCloneStorage();

        addr = s.selectorGasCache[msg.sig];
        if (addr != address(0)) {
            return addr;
        }

        (bool success, bytes memory res) = s.diamondSawAddress.staticcall(
            abi.encodeWithSelector(0x14bc7560, msg.sig) // facetAddressForSelector
        );

        if (!success) revert FailedToFetchFacet();

        assembly {
            addr := mload(add(res, 32))
        }

        return s.facetAddresses[addr] ? addr : address(0);
    }

    function accessControlStorage()
        internal
        pure
        returns (AccessControlStorage storage s)
    {
        bytes32 position = ACCESS_CONTROL_STORAGE_POSITION;
        assembly {
            s.slot := position
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"sawAddress","type":"address"},{"internalType":"address[]","name":"facetAddresses","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FailedToFetchFacet","type":"error"},{"inputs":[],"name":"FunctionDoesNotExist","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162000b8c38038062000b8c83398181016040528101906200003791906200032d565b336200004d6200024760201b620003321760201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008160008151811062000126577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663f44a9d5284846040516024016200015e929190620004be565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051620001ae9190620004a5565b600060405180830381855af49150503d8060008114620001eb576040519150601f19603f3d011682016040523d82523d6000602084013e620001f0565b606091505b509150506000815111156200023e57806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002359190620004f2565b60405180910390fd5b505050620006d3565b6000807f23a3985ff794c67d8d516a95b83c7dfb32e426521153078d1eadc4dc887e2d3e90508091505090565b60006200028b62000285846200053f565b62000516565b90508083825260208201905082856020860282011115620002ab57600080fd5b60005b85811015620002df5781620002c48882620002e9565b845260208401935060208301925050600181019050620002ae565b5050509392505050565b600081519050620002fa81620006b9565b92915050565b600082601f8301126200031257600080fd5b81516200032484826020860162000274565b91505092915050565b600080604083850312156200034157600080fd5b60006200035185828601620002e9565b925050602083015167ffffffffffffffff8111156200036f57600080fd5b6200037d8582860162000300565b9150509250929050565b6000620003958383620003a1565b60208301905092915050565b620003ac81620005d9565b82525050565b620003bd81620005d9565b82525050565b6000620003d0826200057e565b620003dc8185620005ac565b9350620003e9836200056e565b8060005b838110156200042057815162000404888262000387565b975062000411836200059f565b925050600181019050620003ed565b5085935050505092915050565b60006200043a8262000589565b620004468185620005bd565b9350620004588185602086016200060d565b80840191505092915050565b6000620004718262000594565b6200047d8185620005c8565b93506200048f8185602086016200060d565b6200049a81620006a8565b840191505092915050565b6000620004b382846200042d565b915081905092915050565b6000604082019050620004d56000830185620003b2565b8181036020830152620004e98184620003c3565b90509392505050565b600060208201905081810360008301526200050e818462000464565b905092915050565b60006200052262000535565b905062000530828262000643565b919050565b6000604051905090565b600067ffffffffffffffff8211156200055d576200055c62000679565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600082825260208201905092915050565b6000620005e682620005ed565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60005b838110156200062d57808201518184015260208101905062000610565b838111156200063d576000848401525b50505050565b6200064e82620006a8565b810181811067ffffffffffffffff8211171562000670576200066f62000679565b5b80604052505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b620006c481620005d9565b8114620006d057600080fd5b50565b6104a980620006e36000396000f3fe60806040523661000b57005b60006100156100a4565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561007e576040517fa9ad62f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3660008037600080366000845af43d6000803e806000811461009f573d6000f35b3d6000fd5b6000806100af61035f565b905080600201600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610184575061032f565b6000808260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166314bc75606000357fffffffff00000000000000000000000000000000000000000000000000000000166040516024016101fc91906103e3565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161024a91906103cc565b600060405180830381855afa9150503d8060008114610285576040519150601f19603f3d011682016040523d82523d6000602084013e61028a565b606091505b5091509150816102c6576040517ff51970fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015193508260010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610327576000610329565b835b93505050505b90565b6000807f23a3985ff794c67d8d516a95b83c7dfb32e426521153078d1eadc4dc887e2d3e90508091505090565b6000807ff8a1c6908b780da9d81bb8be40154a49e4eccafd820fcb10aeac624fcb8e2f8990508091505090565b61039581610414565b82525050565b60006103a6826103fe565b6103b08185610409565b93506103c0818560208601610440565b80840191505092915050565b60006103d8828461039b565b915081905092915050565b60006020820190506103f8600083018461038c565b92915050565b600081519050919050565b600081905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60005b8381101561045e578082015181840152602081019050610443565b8381111561046d576000848401525b5050505056fea26469706673582212202e82632f98737e231b82b37522f73d63b261cb88799ce837c78afa6df2c0f48164736f6c63430008040033000000000000000000000000b8ece8aa502937c978b499065f01f2d5dd1fd2e200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d20ca343fe49dab5c69dce859dfe1a694def645500000000000000000000000083c8e59dad2905e53203f8448f84bd525d82b56b

Deployed Bytecode

0x60806040523661000b57005b60006100156100a4565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561007e576040517fa9ad62f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3660008037600080366000845af43d6000803e806000811461009f573d6000f35b3d6000fd5b6000806100af61035f565b905080600201600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610184575061032f565b6000808260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166314bc75606000357fffffffff00000000000000000000000000000000000000000000000000000000166040516024016101fc91906103e3565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161024a91906103cc565b600060405180830381855afa9150503d8060008114610285576040519150601f19603f3d011682016040523d82523d6000602084013e61028a565b606091505b5091509150816102c6576040517ff51970fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015193508260010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610327576000610329565b835b93505050505b90565b6000807f23a3985ff794c67d8d516a95b83c7dfb32e426521153078d1eadc4dc887e2d3e90508091505090565b6000807ff8a1c6908b780da9d81bb8be40154a49e4eccafd820fcb10aeac624fcb8e2f8990508091505090565b61039581610414565b82525050565b60006103a6826103fe565b6103b08185610409565b93506103c0818560208601610440565b80840191505092915050565b60006103d8828461039b565b915081905092915050565b60006020820190506103f8600083018461038c565b92915050565b600081519050919050565b600081905092915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b60005b8381101561045e578082015181840152602081019050610443565b8381111561046d576000848401525b5050505056fea26469706673582212202e82632f98737e231b82b37522f73d63b261cb88799ce837c78afa6df2c0f48164736f6c63430008040033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b8ece8aa502937c978b499065f01f2d5dd1fd2e200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d20ca343fe49dab5c69dce859dfe1a694def645500000000000000000000000083c8e59dad2905e53203f8448f84bd525d82b56b

-----Decoded View---------------
Arg [0] : sawAddress (address): 0xB8Ece8Aa502937c978B499065F01f2D5dd1FD2e2
Arg [1] : facetAddresses (address[]): 0xd20ca343fe49Dab5C69dCE859dFE1a694DeF6455,0x83c8e59daD2905E53203F8448f84bD525D82b56B

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000b8ece8aa502937c978b499065f01f2d5dd1fd2e2
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 000000000000000000000000d20ca343fe49dab5c69dce859dfe1a694def6455
Arg [4] : 00000000000000000000000083c8e59dad2905e53203f8448f84bd525d82b56b


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.