DeployFactory

0x6258e4d2950757a749a4d4683a7342261ce12471

Verification
Unverified
v0.8.25+commit.b61c2a91
Type
Contract
1,144 bytes
ABI entries
3
1 read · 1 write
License
none

Contract information

Address
0x6258e4d2950757a749a4d4683a7342261ce12471
Chain
Robinhood Chain (4663)
Compiler
v0.8.25+commit.b61c2a91
Optimization
Enabled
Creation tx
0x2c64cd93a8…2fe491640e

Token

Not a token

This contract does not expose ERC-20 metadata.

Read contract (1)

getAddress(bytes32)address

Events (1)

contractAddress

ABI

[
  {
    "anonymous": false,
    "inputs": [
      {
        "indexed": true,
        "internalType": "address",
        "name": "newaddr",
        "type": "address"
      }
    ],
    "name": "contractAddress",
    "type": "event"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "salt",
        "type": "bytes32"
      },
      {
        "internalType": "bytes",
        "name": "creationCode",
        "type": "bytes"
      },
      {
        "internalType": "uint256",
        "name": "value",
        "type": "uint256"
      }
    ],
    "name": "deploy",
    "outputs": [],
    "stateMutability": "nonpayable",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "bytes32",
        "name": "salt",
        "type": "bytes32"
      }
    ],
    "name": "getAddress",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]

Source code

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../interface/IDeployFactory.sol";
import "./CREATE3.sol";

contract DeployFactory is IDeployFactory {
    event contractAddress(address indexed newaddr);

    function deploy(bytes32 salt, bytes memory creationCode, uint256 value) external override {
        address newContract = CREATE3.deploy(salt, creationCode, value);

        emit contractAddress(newContract);
    }

    function getAddress(bytes32 salt) public view override returns (address) {
        return CREATE3.getDeployed(salt);
    }
}
Chain explorer2993msChain node77ms