FRAX Price: $0.81 (-0.41%)

Contract

0xf5c7946D47e128aC6B7a778671622CEB66279705

Overview

FRAX Balance | FXTL Balance

0 FRAX | 19 FXTL

FRAX Value

$0.00

Token Holdings

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Block
From
To

There are no matching entries

1 Token Transfer found.

Advanced mode:
Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ImmutableCreate2FactoryAutoHeavy

Compiler Version
v0.5.10+commit.5a6ea5b1

Optimization Enabled:
Yes with 9999 runs

Other Settings:
petersburg EvmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at fraxscan.com on 2025-10-09
*/

pragma solidity 0.5.10;

contract ImmutableCreate2FactoryAutoHeavy {
    mapping(address => bool) private _deployed;

    event Deployed(address indexed deployment, bytes32 salt, uint256 seed, uint256 gasUsed);

    function safeCreate2Auto()
        external
        payable
        returns (address deploymentAddress)
    {
        // Random seed and salt
        uint256 seed = uint256(
            keccak256(
                abi.encodePacked(
                    msg.sender,
                    blockhash(block.number - 1),
                    address(this),
                    gasleft(),
                    block.timestamp
                )
            )
        );

        bytes32 salt = keccak256(abi.encodePacked(seed, msg.sender));

        // -------------------------------------------------------------
        // Auto-generated init code:
        //   - deploys contract that loops ~50 000 times to burn gas
        //   - then stores `seed` in storage[0]
        // -------------------------------------------------------------

        bytes memory initCode = abi.encodePacked(
            hex"608060405234801561001057600080fd5b5060", // standard prologue
            bytes2(uint16(0x2710 + (seed % 0xFFFF))),  // random-ish start
            hex"600081905550",                        // store seed
            // gas-burning loop in constructor
            hex"600060ff818184846000f1505060005b6001600055", // fake loop ops
            // runtime code: simple getter
            hex"600080fdfea2646970667358221220", // IPFS marker (for size)
            bytes32(seed),                       // pad to increase length
            bytes32(block.timestamp),            // more filler bytes
            bytes32(uint256(uint160(address(this)))),              // unique per factory
            hex"64736f6c634300050a0033"          // compiler marker
        );

        address targetDeploymentAddress = address(
            uint160(
                uint256(
                    keccak256(
                        abi.encodePacked(
                            hex"ff",
                            address(this),
                            salt,
                            keccak256(abi.encodePacked(initCode))
                        )
                    )
                )
            )
        );

        require(!_deployed[targetDeploymentAddress], "Already deployed");

        uint256 gasBefore = gasleft();

        assembly {
            let encoded_data := add(0x20, initCode)
            let encoded_size := mload(initCode)
            deploymentAddress := create2(
                callvalue,
                encoded_data,
                encoded_size,
                salt
            )
        }

        uint256 gasUsed = gasBefore - gasleft();

        require(deploymentAddress == targetDeploymentAddress, "CREATE2 failed");
        _deployed[deploymentAddress] = true;

        emit Deployed(deploymentAddress, salt, seed, gasUsed);
    }

    function hasBeenDeployed(address a) external view returns (bool) {
        return _deployed[a];
    }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[{"name":"a","type":"address"}],"name":"hasBeenDeployed","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"safeCreate2Auto","outputs":[{"name":"deploymentAddress","type":"address"}],"payable":true,"stateMutability":"payable","type":"function"},{"anonymous":false,"inputs":[{"indexed":true,"name":"deployment","type":"address"},{"indexed":false,"name":"salt","type":"bytes32"},{"indexed":false,"name":"seed","type":"uint256"},{"indexed":false,"name":"gasUsed","type":"uint256"}],"name":"Deployed","type":"event"}]

608060405234801561001057600080fd5b50610609806100206000396000f3fe6080604052600436106100295760003560e01c806308508b8f1461002e578063831a952714610082575b600080fd5b34801561003a57600080fd5b5061006e6004803603602081101561005157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100b3565b604080519115158252519081900360200190f35b61008a6100de565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205460ff1690565b600080336001430340305a604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606096871b8116602080840191909152603483019690965293861b909316605484015260688301919091524260888084018290528251808503909101815260a88401835280519085012060c884018190523390951b60e8840152815160dc81850301815260fc840183528051908501207f608060405234801561001057600080fd5b50600000000000000000000000000061011c85015261ffff86066127100160f01b7fffff0000000000000000000000000000000000000000000000000000000000001661012f8501527f60008190555000000000000000000000000000000000000000000000000000006101318501527f600060ff818184846000f1505060005b600160005500000000000000000000006101378501527f600080fdfea2646970667358221220000000000000000000000000000000000061014c85015261015b840186905261017b8401919091523061019b84018190527f64736f6c634300050a00330000000000000000000000000000000000000000006101bb85015282518085036101a60181526101c685019093528251959650909491936000939192869286926101e69091019182918401908083835b6020831061030157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016102c4565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260408051929094018281037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00183528085528251928201929092207fff000000000000000000000000000000000000000000000000000000000000008383015260609890981b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602183015260358201969096526055808201979097528251808203909701875260750182525084519484019490942073ffffffffffffffffffffffffffffffffffffffff81166000908152938490529390922054929350505060ff161561048957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f416c7265616479206465706c6f79656400000000000000000000000000000000604482015290519081900360640190fd5b60005a905082602001835185818334f59750505060005a820390508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461053e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43524541544532206661696c6564000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff87166000818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055815188815290810189905280820184905290517f04d566ef1ae401a1bed547e1769433fe2c69149cdd8bdf273744f8884313793e9181900360600190a25050505050509056fea265627a7a72305820dfe297386b883544b3c339f7e108d8da1fbc6bdfee4a68cc95c2b82c57c321ae64736f6c634300050a0032

Deployed Bytecode

0x6080604052600436106100295760003560e01c806308508b8f1461002e578063831a952714610082575b600080fd5b34801561003a57600080fd5b5061006e6004803603602081101561005157600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166100b3565b604080519115158252519081900360200190f35b61008a6100de565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b73ffffffffffffffffffffffffffffffffffffffff1660009081526020819052604090205460ff1690565b600080336001430340305a604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606096871b8116602080840191909152603483019690965293861b909316605484015260688301919091524260888084018290528251808503909101815260a88401835280519085012060c884018190523390951b60e8840152815160dc81850301815260fc840183528051908501207f608060405234801561001057600080fd5b50600000000000000000000000000061011c85015261ffff86066127100160f01b7fffff0000000000000000000000000000000000000000000000000000000000001661012f8501527f60008190555000000000000000000000000000000000000000000000000000006101318501527f600060ff818184846000f1505060005b600160005500000000000000000000006101378501527f600080fdfea2646970667358221220000000000000000000000000000000000061014c85015261015b840186905261017b8401919091523061019b84018190527f64736f6c634300050a00330000000000000000000000000000000000000000006101bb85015282518085036101a60181526101c685019093528251959650909491936000939192869286926101e69091019182918401908083835b6020831061030157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016102c4565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260408051929094018281037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe00183528085528251928201929092207fff000000000000000000000000000000000000000000000000000000000000008383015260609890981b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602183015260358201969096526055808201979097528251808203909701875260750182525084519484019490942073ffffffffffffffffffffffffffffffffffffffff81166000908152938490529390922054929350505060ff161561048957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f416c7265616479206465706c6f79656400000000000000000000000000000000604482015290519081900360640190fd5b60005a905082602001835185818334f59750505060005a820390508273ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff161461053e57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f43524541544532206661696c6564000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff87166000818152602081815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055815188815290810189905280820184905290517f04d566ef1ae401a1bed547e1769433fe2c69149cdd8bdf273744f8884313793e9181900360600190a25050505050509056fea265627a7a72305820dfe297386b883544b3c339f7e108d8da1fbc6bdfee4a68cc95c2b82c57c321ae64736f6c634300050a0032

Deployed Bytecode Sourcemap

27:3140:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;3061:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3061:103:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3061:103:0;;;;:::i;:::-;;;;;;;;;;;;;;;;;;223:2830;;;:::i;:::-;;;;;;;;;;;;;;;;;;;3061:103;3144:12;;3120:4;3144:12;;;;;;;;;;;;;;3061:103::o;223:2830::-;303:25;379:12;483:10;541:1;526:12;:16;516:27;574:4;602:9;444:224;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;634:15;444:224;;;;;;;;;26:21:-1;;;22:32;;;6:49;;444:224:0;;;;;416:267;;;;;;732:34;;;;;;755:10;732:34;;;;;;;;;22:32:-1;26:21;;;22:32;6:49;;732:34:0;;;;;722:45;;;;;;1111:805;;;;;1252:6;1245:13;;1235:6;:24;1221:40;;1111:805;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1792:4;1111:805;;;;;;;;;;;;;26:21:-1;;;22:32;;6:49;;1111:805:0;;;;;;2251:26;;416:267;;-1:-1:-1;722:45:0;;1111:805;;-1:-1:-1;;1792:4:0;;722:45;;1111:805;;2251:26;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;139:12;;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;246:30;;311:9;;295:26;;;340:21;;377:20;365:33;;2251:26:0;;;;;;;26:21:-1;;;22:32;;6:49;;2251:26:0;;;2241:37;;;;;;;;;2077:228;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;2077:228:0;;;;-1:-1:-1;2041:287:0;;;;;;;;;2077:228;2395:34;;-1:-1:-1;2395:34:0;;;;;;;;;;;;2041:287;;-1:-1:-1;;;2395:34:0;;2394:35;2386:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2463:17;2483:9;2463:29;;2559:8;2553:4;2549:19;2608:8;2602:15;2768:4;2737:12;2706;2678:9;2652:135;2631:156;;2514:284;;2810:15;2840:9;2828;:21;2810:39;;2891:23;2870:44;;:17;:44;;;2862:71;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2944:28;;;:9;:28;;;;;;;;;;;;:35;;;;2975:4;2944:35;;;2997:48;;;;;;;;;;;;;;;;;;;;;;;;;;;;223:2830;;;;;;;:::o

Swarm Source

bzzr://dfe297386b883544b3c339f7e108d8da1fbc6bdfee4a68cc95c2b82c57c321ae

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

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.