ETH Price: $3,607.86 (+4.50%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

1 Internal Transaction found.

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
176693602023-07-11 9:03:23542 days ago1689066203  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MerkleFunderDepository

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000 runs

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

import "./interfaces/IMerkleFunderDepository.sol";

/// @title Contract that is deployed through MerkleFunder and keeps the funds
/// that can be transferred within the limitations specified by the respective
/// Merkle tree
/// @notice As noted above, this contract should only be deployed by a
/// MerkleFunder contract. Since the owner address and the Merkle tree root are
/// immutable, the only way to update these is to deploy a new
/// MerkleFunderDepository with the desired parameters and have the owner of
/// the previous MerkleFunderDepository withdraw the funds to the new one.
contract MerkleFunderDepository is IMerkleFunderDepository {
    /// @notice Address of the MerkleFunder that deployed this contract
    address public immutable override merkleFunder;

    /// @notice Owner address
    address public immutable override owner;

    /// @notice Merkle tree root
    bytes32 public immutable override root;

    /// @dev Argument validation is done in MerkleFunder to reduce the
    /// bytecode of this contract
    /// @param _owner Owner address
    /// @param _root Merkle tree root
    constructor(address _owner, bytes32 _root) {
        merkleFunder = msg.sender;
        owner = _owner;
        root = _root;
    }

    /// @dev Funds transferred to this contract can be transferred by anyone
    /// within the limitations of the respective Merkle tree
    receive() external payable {}

    /// @notice Called by the MerkleFunder that has deployed this contract to
    /// transfer its funds within the limitations of the respective Merkle tree
    /// or to allow the owner to withdraw funds
    /// @dev Argument validation is done in MerkleFunder to reduce the bytecode
    /// of this contract.
    /// This function is omitted in the interface because it is intended to
    /// only be called by MerkleFunder.
    /// @param recipient Recipient address
    /// @param amount Amount
    function transfer(address recipient, uint256 amount) external {
        if (msg.sender != merkleFunder) revert SenderNotMerkleFunder();
        // MerkleFunder checks for balance so MerkleFunderDepository does not
        // need to
        (bool success, ) = recipient.call{value: amount}("");
        if (!success) revert TransferUnsuccessful();
        // MerkleFunder emits the event so MerkleFunderDepository does not need
        // to
    }
}

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

interface IMerkleFunderDepository {
    error SenderNotMerkleFunder();

    error TransferUnsuccessful();

    function merkleFunder() external view returns (address);

    function owner() external view returns (address);

    function root() external view returns (bytes32);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"bytes32","name":"_root","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"SenderNotMerkleFunder","type":"error"},{"inputs":[],"name":"TransferUnsuccessful","type":"error"},{"inputs":[],"name":"merkleFunder","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e060405234801561001057600080fd5b5060405161038638038061038683398101604081905261002f9161004a565b336080526001600160a01b039190911660a05260c052610084565b6000806040838503121561005d57600080fd5b82516001600160a01b038116811461007457600080fd5b6020939093015192949293505050565b60805160a05160c0516102ce6100b8600039600061011501526000606101526000818160bf015261015d01526102ce6000f3fe6080604052600436106100435760003560e01c80638da5cb5b1461004f578063a8c54545146100ad578063a9059cbb146100e1578063ebf0c7171461010357600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100b957600080fd5b506100837f000000000000000000000000000000000000000000000000000000000000000081565b3480156100ed57600080fd5b506101016100fc366004610253565b610145565b005b34801561010f57600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100a4565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101b4576040517f7d5820a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b505090508061024e576040517f28dc5c3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6000806040838503121561026657600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461028a57600080fd5b94602093909301359350505056fea264697066735822122064ed49ef8d4b4d3f9725a7395b4ebf0f32e867e2dcc558528a1c1a023050fb1864736f6c6343000811003300000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de1a1908c4d7d69c82cb4a5206d6e88a4fd6fd6a39ad24b0df8e5150eef3e4d7369

Deployed Bytecode

0x6080604052600436106100435760003560e01c80638da5cb5b1461004f578063a8c54545146100ad578063a9059cbb146100e1578063ebf0c7171461010357600080fd5b3661004a57005b600080fd5b34801561005b57600080fd5b506100837f00000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de181565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b3480156100b957600080fd5b506100837f00000000000000000000000004d2b3ddcdb2790571ca01f4768e3cc98fcb0d2b81565b3480156100ed57600080fd5b506101016100fc366004610253565b610145565b005b34801561010f57600080fd5b506101377fa1908c4d7d69c82cb4a5206d6e88a4fd6fd6a39ad24b0df8e5150eef3e4d736981565b6040519081526020016100a4565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000004d2b3ddcdb2790571ca01f4768e3cc98fcb0d2b16146101b4576040517f7d5820a800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d806000811461020e576040519150601f19603f3d011682016040523d82523d6000602084013e610213565b606091505b505090508061024e576040517f28dc5c3300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b6000806040838503121561026657600080fd5b823573ffffffffffffffffffffffffffffffffffffffff8116811461028a57600080fd5b94602093909301359350505056fea264697066735822122064ed49ef8d4b4d3f9725a7395b4ebf0f32e867e2dcc558528a1c1a023050fb1864736f6c63430008110033

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

00000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de1a1908c4d7d69c82cb4a5206d6e88a4fd6fd6a39ad24b0df8e5150eef3e4d7369

-----Decoded View---------------
Arg [0] : _owner (address): 0x07b589f06bD0A5324c4E2376d66d2F4F25921DE1
Arg [1] : _root (bytes32): 0xa1908c4d7d69c82cb4a5206d6e88a4fd6fd6a39ad24b0df8e5150eef3e4d7369

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000007b589f06bd0a5324c4e2376d66d2f4f25921de1
Arg [1] : a1908c4d7d69c82cb4a5206d6e88a4fd6fd6a39ad24b0df8e5150eef3e4d7369


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.