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": []
}
}}
Submitted on: 2025-11-06 21:09:27
Comments
Log in to comment.
No comments yet.