[Ethernaut] 10. Re-entrancy
1. 문제 아래 컨트랙트의 모든 자금을 탈취하라. // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import 'openzeppelin-contracts-06/math/SafeMath.sol'; contract Reentrance { using SafeMath for uint256; mapping(address => uint) public balances; function donate(address _to) public payable { balances[_to] = balances[_to].add(msg.value); } function balanceOf(address _who) public view returns (uint balance) { ret..
Solidity/Hacking
2024. 1. 22. 12:00