verify()
1// SPDX-License-Identifier: Unlicense2pragma solidity ^0.8.17;3 4import {IPuzzle} from "../interfaces/IPuzzle.sol";5 6/// @title 0xF1A97/// @author fiveoutofnine8contract F1A9 is IPuzzle {9 /// @inheritdoc IPuzzle10 function name() external pure returns (string memory) {11 return "0xF1A9";12 }13 14 /// @inheritdoc IPuzzle15 function generate(address _seed) external view returns (uint256) {16 return (uint256(uint160(_seed)) >> (((block.number >> 8) & 0x1F) << 2)) & 0xFFFF;17 }18 19 /// @inheritdoc IPuzzle20 function verify(uint256 _start, uint256 _solution) external returns (bool) {21 uint256 prefix = block.timestamp < 167844600022 ? (0xF1A9 << 16) | _start23 : 0;24 25 return26 prefix == (_solution >> 128) &&27 ISolve(address(uint160(_solution))).curtaPlayer() == msg.sender;28 }29}30 31interface ISolve {32 function curtaPlayer() external pure returns (address);33}34
git clone https://github.com/waterfall-mkt/curta-puzzles.git && cd curta-puzzles && forge install
RPC_URL_MAINNET
.env
RPC_URL_MAINNET=""
forge script <PATH_TO_PUZZLE> -f mainnet -vvv