Description:
Smart contract deployed on Ethereum with Factory features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"contracts/Champion.sol": {
"content": "// SPDX-License-Identifier: MIT\r
pragma solidity ^0.8.20;\r
\r
\r
\r
\r
contract Champion {\r
\r
address public immutable owner;\r
\r
string public name;\r
constructor(address _owner) {\r
owner = _owner;\r
}\r
\r
function setChampion(string calldata champion) external payable {\r
require(msg.value >= 0.0001 ether , "Insufficient ETH");\r
name = champion;\r
}\r
\r
function withdraw() external {\r
(bool success, ) = owner.call{value: address(this).balance }(""); \r
require(success, "ETH refund failed");\r
}\r
\r
receive() external payable {}\r
\r
\r
}"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200
},
"debug": {
"revertStrings": "debug"
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
}
}
}}
Submitted on: 2025-10-24 19:09:18
Comments
Log in to comment.
No comments yet.