FRAX Price: $0.85 (+6.26%)

Contract

0x16de95d9199Fceb3546565909eB52a4726B14311

Overview

FRAX Balance | FXTL Balance

0 FRAX | 6,601 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

3 Internal Transactions and 1 Token Transfer found.

Latest 3 internal transactions

Advanced mode:
Parent Transaction Hash Block From To
81808852024-08-09 3:01:21539 days ago1723172481
0x16de95d9...726B14311
 Contract Creation0 FRAX
81800442024-08-09 2:33:19539 days ago1723170799
0x16de95d9...726B14311
 Contract Creation0 FRAX
81791942024-08-09 2:04:59539 days ago1723169099
0x16de95d9...726B14311
 Contract Creation0 FRAX

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PackRegistry

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

// From:
// https://github.com/erc6551/reference/blob/main/src/ERC6551Registry.sol

import "@openzeppelin/contracts/utils/Create2.sol";

import "./interfaces/IERC6551Registry.sol";
import "./lib/ERC6551Bytecode.sol";

contract PackRegistry is IERC6551Registry {
    error AccountCreationFailed();

    function createAccount(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt,
        bytes calldata initData
    ) external returns (address) {
        bytes memory code = ERC6551BytecodeLib.getCreationCode(
            implementation,
            chainId,
            tokenContract,
            tokenId,
            salt
        );

        address _account = Create2.computeAddress(
            bytes32(salt),
            keccak256(code)
        );

        if (_account.code.length != 0) return _account;

        emit AccountCreated(
            _account,
            implementation,
            chainId,
            tokenContract,
            tokenId,
            salt
        );

        assembly {
            _account := create2(0, add(code, 0x20), mload(code), salt)
        }

        if (_account == address(0)) revert AccountCreationFailed();

        if (initData.length != 0) {
            (bool success, bytes memory result) = _account.call(initData);

            if (!success) {
                assembly {
                    revert(add(result, 32), mload(result))
                }
            }
        }

        return _account;
    }

    function account(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt
    ) external view returns (address) {
        bytes32 bytecodeHash = keccak256(
            ERC6551BytecodeLib.getCreationCode(
                implementation,
                chainId,
                tokenContract,
                tokenId,
                salt
            )
        );

        return Create2.computeAddress(bytes32(salt), bytecodeHash);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Create2.sol)

pragma solidity ^0.8.20;

/**
 * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
 * `CREATE2` can be used to compute in advance the address where a smart
 * contract will be deployed, which allows for interesting new mechanisms known
 * as 'counterfactual interactions'.
 *
 * See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
 * information.
 */
library Create2 {
    /**
     * @dev Not enough balance for performing a CREATE2 deploy.
     */
    error Create2InsufficientBalance(uint256 balance, uint256 needed);

    /**
     * @dev There's no code to deploy.
     */
    error Create2EmptyBytecode();

    /**
     * @dev The deployment failed.
     */
    error Create2FailedDeployment();

    /**
     * @dev Deploys a contract using `CREATE2`. The address where the contract
     * will be deployed can be known in advance via {computeAddress}.
     *
     * The bytecode for a contract can be obtained from Solidity with
     * `type(contractName).creationCode`.
     *
     * Requirements:
     *
     * - `bytecode` must not be empty.
     * - `salt` must have not been used for `bytecode` already.
     * - the factory must have a balance of at least `amount`.
     * - if `amount` is non-zero, `bytecode` must have a `payable` constructor.
     */
    function deploy(uint256 amount, bytes32 salt, bytes memory bytecode) internal returns (address addr) {
        if (address(this).balance < amount) {
            revert Create2InsufficientBalance(address(this).balance, amount);
        }
        if (bytecode.length == 0) {
            revert Create2EmptyBytecode();
        }
        /// @solidity memory-safe-assembly
        assembly {
            addr := create2(amount, add(bytecode, 0x20), mload(bytecode), salt)
        }
        if (addr == address(0)) {
            revert Create2FailedDeployment();
        }
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy}. Any change in the
     * `bytecodeHash` or `salt` will result in a new destination address.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash) internal view returns (address) {
        return computeAddress(salt, bytecodeHash, address(this));
    }

    /**
     * @dev Returns the address where a contract will be stored if deployed via {deploy} from a contract located at
     * `deployer`. If `deployer` is this contract's address, returns the same value as {computeAddress}.
     */
    function computeAddress(bytes32 salt, bytes32 bytecodeHash, address deployer) internal pure returns (address addr) {
        /// @solidity memory-safe-assembly
        assembly {
            let ptr := mload(0x40) // Get free memory pointer

            // |                   | ↓ ptr ...  ↓ ptr + 0x0B (start) ...  ↓ ptr + 0x20 ...  ↓ ptr + 0x40 ...   |
            // |-------------------|---------------------------------------------------------------------------|
            // | bytecodeHash      |                                                        CCCCCCCCCCCCC...CC |
            // | salt              |                                      BBBBBBBBBBBBB...BB                   |
            // | deployer          | 000000...0000AAAAAAAAAAAAAAAAAAA...AA                                     |
            // | 0xFF              |            FF                                                             |
            // |-------------------|---------------------------------------------------------------------------|
            // | memory            | 000000...00FFAAAAAAAAAAAAAAAAAAA...AABBBBBBBBBBBBB...BBCCCCCCCCCCCCC...CC |
            // | keccak(start, 85) |            ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ |

            mstore(add(ptr, 0x40), bytecodeHash)
            mstore(add(ptr, 0x20), salt)
            mstore(ptr, deployer) // Right-aligned with 12 preceding garbage bytes
            let start := add(ptr, 0x0b) // The hashed data starts at the final garbage byte which we will set to 0xff
            mstore8(start, 0xff)
            addr := keccak256(start, 85)
        }
    }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC6551Registry {
    /**
     * @dev The registry SHALL emit the AccountCreated event upon successful account creation
     */
    event AccountCreated(
        address account,
        address indexed implementation,
        uint256 chainId,
        address indexed tokenContract,
        uint256 indexed tokenId,
        uint256 salt
    );

    /**
     * @dev Creates a token bound account for a non-fungible token
     *
     * If account has already been created, returns the account address without calling create2
     *
     * If initData is not empty and account has not yet been created, calls account with
     * provided initData after creation
     *
     * Emits AccountCreated event
     *
     * @return the address of the account
     */
    function createAccount(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 seed,
        bytes calldata initData
    ) external returns (address);

    /**
     * @dev Returns the computed token bound account address for a non-fungible token
     *
     * @return The computed address of the token bound account
     */
    function account(
        address implementation,
        uint256 chainId,
        address tokenContract,
        uint256 tokenId,
        uint256 salt
    ) external view returns (address);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

// From:
// https://github.com/erc6551/reference/blob/main/src/lib/ERC6551BytecodeLib.sol

library ERC6551BytecodeLib {
    function getCreationCode(
        address implementation_,
        uint256 chainId_,
        address tokenContract_,
        uint256 tokenId_,
        uint256 salt_
    ) internal pure returns (bytes memory) {
        return
            abi.encodePacked(
                hex"3d60ad80600a3d3981f3363d3d373d3d3d363d73",
                implementation_,
                hex"5af43d82803e903d91602b57fd5bf3",
                abi.encode(salt_, chainId_, tokenContract_, tokenId_)
            );
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[],"name":"AccountCreationFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"implementation","type":"address"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"salt","type":"uint256"}],"name":"AccountCreated","type":"event"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"}],"name":"account","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes","name":"initData","type":"bytes"}],"name":"createAccount","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5061082c806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80635e9bc5361461003b578063da7323b31461006b575b600080fd5b610055600480360381019061005091906103cb565b61009b565b6040516100629190610455565b60405180910390f35b610085600480360381019061008091906104d5565b6100cd565b6040516100929190610455565b60405180910390f35b6000806100ab8787878787610299565b8051906020012090506100c18360001b826102ed565b91505095945050505050565b6000806100dd8989898989610299565b905060006100f58660001b83805190602001206102ed565b905060008173ffffffffffffffffffffffffffffffffffffffff163b1461012057809250505061028e565b868873ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167f07fba7bba1191da7ee1155dcfa0030701c9c9a9cc34a93b991fc6fd0c9268d8f848d8b60405161018293929190610593565b60405180910390a4858251602084016000f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036101fc576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008585905014610288576000808273ffffffffffffffffffffffffffffffffffffffff168787604051610231929190610609565b6000604051808303816000865af19150503d806000811461026e576040519150601f19603f3d011682016040523d82523d6000602084013e610273565b606091505b50915091508161028557805160208201fd5b50505b80925050505b979650505050505050565b606085828686866040516020016102b39493929190610622565b6040516020818303038152906040526040516020016102d39291906107b8565b604051602081830303815290604052905095945050505050565b60006102fa838330610302565b905092915050565b6000604051836040820152846020820152828152600b810160ff815360558120925050509392505050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061036282610337565b9050919050565b61037281610357565b811461037d57600080fd5b50565b60008135905061038f81610369565b92915050565b6000819050919050565b6103a881610395565b81146103b357600080fd5b50565b6000813590506103c58161039f565b92915050565b600080600080600060a086880312156103e7576103e661032d565b5b60006103f588828901610380565b9550506020610406888289016103b6565b945050604061041788828901610380565b9350506060610428888289016103b6565b9250506080610439888289016103b6565b9150509295509295909350565b61044f81610357565b82525050565b600060208201905061046a6000830184610446565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261049557610494610470565b5b8235905067ffffffffffffffff8111156104b2576104b1610475565b5b6020830191508360018202830111156104ce576104cd61047a565b5b9250929050565b600080600080600080600060c0888a0312156104f4576104f361032d565b5b60006105028a828b01610380565b97505060206105138a828b016103b6565b96505060406105248a828b01610380565b95505060606105358a828b016103b6565b94505060806105468a828b016103b6565b93505060a088013567ffffffffffffffff81111561056757610566610332565b5b6105738a828b0161047f565b925092505092959891949750929550565b61058d81610395565b82525050565b60006060820190506105a86000830186610446565b6105b56020830185610584565b6105c26040830184610584565b949350505050565b600081905092915050565b82818337600083830152505050565b60006105f083856105ca565b93506105fd8385846105d5565b82840190509392505050565b60006106168284866105e4565b91508190509392505050565b60006080820190506106376000830187610584565b6106446020830186610584565b6106516040830185610446565b61065e6060830184610584565b95945050505050565b600081905092915050565b7f3d60ad80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000600082015250565b60006106a8601483610667565b91506106b382610672565b601482019050919050565b60008160601b9050919050565b60006106d6826106be565b9050919050565b60006106e8826106cb565b9050919050565b6107006106fb82610357565b6106dd565b82525050565b7f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000600082015250565b600061073c600f83610667565b915061074782610706565b600f82019050919050565b600081519050919050565b60005b8381101561077b578082015181840152602081019050610760565b60008484015250505050565b600061079282610752565b61079c81856105ca565b93506107ac81856020860161075d565b80840191505092915050565b60006107c38261069b565b91506107cf82856106ef565b6014820191506107de8261072f565b91506107ea8284610787565b9150819050939250505056fea26469706673582212208f52ddcb65c2e812c4215dd977f1b1d9821f22258a53394fa43806f0afc821f964736f6c63430008140033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100365760003560e01c80635e9bc5361461003b578063da7323b31461006b575b600080fd5b610055600480360381019061005091906103cb565b61009b565b6040516100629190610455565b60405180910390f35b610085600480360381019061008091906104d5565b6100cd565b6040516100929190610455565b60405180910390f35b6000806100ab8787878787610299565b8051906020012090506100c18360001b826102ed565b91505095945050505050565b6000806100dd8989898989610299565b905060006100f58660001b83805190602001206102ed565b905060008173ffffffffffffffffffffffffffffffffffffffff163b1461012057809250505061028e565b868873ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff167f07fba7bba1191da7ee1155dcfa0030701c9c9a9cc34a93b991fc6fd0c9268d8f848d8b60405161018293929190610593565b60405180910390a4858251602084016000f59050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036101fc576040517f20188a5900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008585905014610288576000808273ffffffffffffffffffffffffffffffffffffffff168787604051610231929190610609565b6000604051808303816000865af19150503d806000811461026e576040519150601f19603f3d011682016040523d82523d6000602084013e610273565b606091505b50915091508161028557805160208201fd5b50505b80925050505b979650505050505050565b606085828686866040516020016102b39493929190610622565b6040516020818303038152906040526040516020016102d39291906107b8565b604051602081830303815290604052905095945050505050565b60006102fa838330610302565b905092915050565b6000604051836040820152846020820152828152600b810160ff815360558120925050509392505050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061036282610337565b9050919050565b61037281610357565b811461037d57600080fd5b50565b60008135905061038f81610369565b92915050565b6000819050919050565b6103a881610395565b81146103b357600080fd5b50565b6000813590506103c58161039f565b92915050565b600080600080600060a086880312156103e7576103e661032d565b5b60006103f588828901610380565b9550506020610406888289016103b6565b945050604061041788828901610380565b9350506060610428888289016103b6565b9250506080610439888289016103b6565b9150509295509295909350565b61044f81610357565b82525050565b600060208201905061046a6000830184610446565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261049557610494610470565b5b8235905067ffffffffffffffff8111156104b2576104b1610475565b5b6020830191508360018202830111156104ce576104cd61047a565b5b9250929050565b600080600080600080600060c0888a0312156104f4576104f361032d565b5b60006105028a828b01610380565b97505060206105138a828b016103b6565b96505060406105248a828b01610380565b95505060606105358a828b016103b6565b94505060806105468a828b016103b6565b93505060a088013567ffffffffffffffff81111561056757610566610332565b5b6105738a828b0161047f565b925092505092959891949750929550565b61058d81610395565b82525050565b60006060820190506105a86000830186610446565b6105b56020830185610584565b6105c26040830184610584565b949350505050565b600081905092915050565b82818337600083830152505050565b60006105f083856105ca565b93506105fd8385846105d5565b82840190509392505050565b60006106168284866105e4565b91508190509392505050565b60006080820190506106376000830187610584565b6106446020830186610584565b6106516040830185610446565b61065e6060830184610584565b95945050505050565b600081905092915050565b7f3d60ad80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000600082015250565b60006106a8601483610667565b91506106b382610672565b601482019050919050565b60008160601b9050919050565b60006106d6826106be565b9050919050565b60006106e8826106cb565b9050919050565b6107006106fb82610357565b6106dd565b82525050565b7f5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000600082015250565b600061073c600f83610667565b915061074782610706565b600f82019050919050565b600081519050919050565b60005b8381101561077b578082015181840152602081019050610760565b60008484015250505050565b600061079282610752565b61079c81856105ca565b93506107ac81856020860161075d565b80840191505092915050565b60006107c38261069b565b91506107cf82856106ef565b6014820191506107de8261072f565b91506107ea8284610787565b9150819050939250505056fea26469706673582212208f52ddcb65c2e812c4215dd977f1b1d9821f22258a53394fa43806f0afc821f964736f6c63430008140033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.