[Ethernaut] 3. CoinFlip
1. 문제 초능력(?)을 사용해서 10번 연속으로 코인 뒤집기의 결과를 맞춰라. // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract CoinFlip { uint256 public consecutiveWins; uint256 lastHash; uint256 FACTOR = 57896044618658097711785492504343953926634992332820282019728792003956564819968; constructor() { consecutiveWins = 0; } function flip(bool _guess) public returns (bool) { uint256 blockValue = uint256(blockhash(bl..
Solidity/Hacking
2024. 1. 7. 14:35