MyContract

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "Test2.sol": {
      "content": "// SPDX-License-Identifier: MIT
pragma solidity 0.8.30;

interface IERC20 {
    function transferFrom(address,address,uint256) external returns (bool);
}

contract MyContract {
    IERC20 public weth;

    constructor(IERC20 _weth) payable {
        weth = _weth;
    }

    function foo() external {
        require(weth.transferFrom(msg.sender, address(this), 0.005 ether));
        if (tx.origin == msg.sender) {
            msg.sender.call{value: 0.010 ether}("");
        }
    }

    receive() external payable {}
}
"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    },
    "remappings": []
  }
}}

Tags:
Factory|addr:0x48556b76290e81ef99d0c98c2c5d648eed5b5eee|verified:true|block:23742527|tx:0x5611b626efcec8502a10a3b4e8332db5684d6fd882332d16332619a26a6bcfbe|first_check:1762459766

Submitted on: 2025-11-06 21:09:27

Comments

Log in to comment.

No comments yet.