ETH Price: $3,316.73 (-3.55%)

Token

DegenTweet (TWEET)
 

Overview

Max Total Supply

888 TWEET

Holders

695

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 TWEET
0x3419c7bdf950f958e9356c2219326c4fd2f330fa
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:
DegenTweet

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
No with 200 runs

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

import "./libraries/DiamondCloneMinimalLib.sol";

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

// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦
// 🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦🐦

error FunctionDoesNotExist();

contract DegenTweet {
    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"
      ]
    }
  }
}

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"}]

60806040523480156200001157600080fd5b5060405162000bbb38038062000bbb83398181016040528101906200003791906200043e565b336200004d6200022360201b620003311760201c565b60000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600081600081518110620001025762000101620004a4565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1663f44a9d5284846040516024016200013a929190620005b2565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516200018a919062000669565b600060405180830381855af49150503d8060008114620001c7576040519150601f19603f3d011682016040523d82523d6000602084013e620001cc565b606091505b509150506000815111156200021a57806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620002119190620006df565b60405180910390fd5b50505062000703565b6000807f23a3985ff794c67d8d516a95b83c7dfb32e426521153078d1eadc4dc887e2d3e90508091505090565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620002918262000264565b9050919050565b620002a38162000284565b8114620002af57600080fd5b50565b600081519050620002c38162000298565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200031982620002ce565b810181811067ffffffffffffffff821117156200033b576200033a620002df565b5b80604052505050565b60006200035062000250565b90506200035e82826200030e565b919050565b600067ffffffffffffffff821115620003815762000380620002df565b5b602082029050602081019050919050565b600080fd5b6000620003ae620003a88462000363565b62000344565b90508083825260208201905060208402830185811115620003d457620003d362000392565b5b835b81811015620004015780620003ec8882620002b2565b845260208401935050602081019050620003d6565b5050509392505050565b600082601f830112620004235762000422620002c9565b5b81516200043584826020860162000397565b91505092915050565b600080604083850312156200045857620004576200025a565b5b60006200046885828601620002b2565b925050602083015167ffffffffffffffff8111156200048c576200048b6200025f565b5b6200049a858286016200040b565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b620004de8162000284565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6200051b8162000284565b82525050565b60006200052f838362000510565b60208301905092915050565b6000602082019050919050565b60006200055582620004e4565b620005618185620004ef565b93506200056e8362000500565b8060005b83811015620005a557815162000589888262000521565b975062000596836200053b565b92505060018101905062000572565b5085935050505092915050565b6000604082019050620005c96000830185620004d3565b8181036020830152620005dd818462000548565b90509392505050565b600081519050919050565b600081905092915050565b60005b838110156200061c578082015181840152602081019050620005ff565b838111156200062c576000848401525b50505050565b60006200063f82620005e6565b6200064b8185620005f1565b93506200065d818560208601620005fc565b80840191505092915050565b600062000677828462000632565b915081905092915050565b600081519050919050565b600082825260208201905092915050565b6000620006ab8262000682565b620006b781856200068d565b9350620006c9818560208601620005fc565b620006d481620002ce565b840191505092915050565b60006020820190508181036000830152620006fb81846200069e565b905092915050565b6104a880620007136000396000f3fe60806040523661000b57005b60006100156100a3565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361007d576040517fa9ad62f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3660008037600080366000845af43d6000803e806000811461009e573d6000f35b3d6000fd5b6000806100ae61035e565b905080600201600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610183575061032e565b6000808260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166314bc75606000357fffffffff00000000000000000000000000000000000000000000000000000000166040516024016101fb91906103c6565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610249919061045b565b600060405180830381855afa9150503d8060008114610284576040519150601f19603f3d011682016040523d82523d6000602084013e610289565b606091505b5091509150816102c5576040517ff51970fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015193508260010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610326576000610328565b835b93505050505b90565b6000807f23a3985ff794c67d8d516a95b83c7dfb32e426521153078d1eadc4dc887e2d3e90508091505090565b6000807ff8a1c6908b780da9d81bb8be40154a49e4eccafd820fcb10aeac624fcb8e2f8990508091505090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6103c08161038b565b82525050565b60006020820190506103db60008301846103b7565b92915050565b600081519050919050565b600081905092915050565b60005b838110156104155780820151818401526020810190506103fa565b83811115610424576000848401525b50505050565b6000610435826103e1565b61043f81856103ec565b935061044f8185602086016103f7565b80840191505092915050565b6000610467828461042a565b91508190509291505056fea2646970667358221220a4709a38637378a23021e4dc27db74f3d9c60e22aa6e3b1b8e2618193044b5d964736f6c634300080f0033000000000000000000000000b8ece8aa502937c978b499065f01f2d5dd1fd2e200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000d20ca343fe49dab5c69dce859dfe1a694def645500000000000000000000000083c8e59dad2905e53203f8448f84bd525d82b56b

Deployed Bytecode

0x60806040523661000b57005b60006100156100a3565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361007d576040517fa9ad62f800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3660008037600080366000845af43d6000803e806000811461009e573d6000f35b3d6000fd5b6000806100ae61035e565b905080600201600080357fffffffff00000000000000000000000000000000000000000000000000000000167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169150600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614610183575061032e565b6000808260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166314bc75606000357fffffffff00000000000000000000000000000000000000000000000000000000166040516024016101fb91906103c6565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610249919061045b565b600060405180830381855afa9150503d8060008114610284576040519150601f19603f3d011682016040523d82523d6000602084013e610289565b606091505b5091509150816102c5576040517ff51970fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b602081015193508260010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610326576000610328565b835b93505050505b90565b6000807f23a3985ff794c67d8d516a95b83c7dfb32e426521153078d1eadc4dc887e2d3e90508091505090565b6000807ff8a1c6908b780da9d81bb8be40154a49e4eccafd820fcb10aeac624fcb8e2f8990508091505090565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6103c08161038b565b82525050565b60006020820190506103db60008301846103b7565b92915050565b600081519050919050565b600081905092915050565b60005b838110156104155780820151818401526020810190506103fa565b83811115610424576000848401525b50505050565b6000610435826103e1565b61043f81856103ec565b935061044f8185602086016103f7565b80840191505092915050565b6000610467828461042a565b91508190509291505056fea2646970667358221220a4709a38637378a23021e4dc27db74f3d9c60e22aa6e3b1b8e2618193044b5d964736f6c634300080f0033

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.