Puzzle #2
0xF1A9
Author
0xa85572cd96f1643458f17340b6f0d6549af482f5
fiveoutofnine.eth
SoliditySolidity's logo.Puzzle
Curtacallsverify()
1
// SPDX-License-Identifier: Unlicense
2
pragma solidity ^0.8.17;
3
4
import {IPuzzle} from "../interfaces/IPuzzle.sol";
5
6
/// @title 0xF1A9
7
/// @author fiveoutofnine
8
contract F1A9 is IPuzzle {
9
/// @inheritdoc IPuzzle
10
function name() external pure returns (string memory) {
11
return "0xF1A9";
12
}
13
14
/// @inheritdoc IPuzzle
15
function generate(address _seed) external view returns (uint256) {
16
return (uint256(uint160(_seed)) >> (((block.number >> 8) & 0x1F) << 2)) & 0xFFFF;
17
}
18
19
/// @inheritdoc IPuzzle
20
function verify(uint256 _start, uint256 _solution) external returns (bool) {
21
uint256 prefix = block.timestamp < 1678446000
22
? (0xF1A9 << 16) | _start
23
: 0;
24
25
return
26
prefix == (_solution >> 128) &&
27
ISolve(address(uint160(_solution))).curtaPlayer() == msg.sender;
28
}
29
}
30
31
interface ISolve {
32
function curtaPlayer() external pure returns (address);
33
}
34
First Blood
chainlight.io
00:31:00
45
Time Left

Solve locally (WIP)

  1. Clone GitHub repo + install deps
git clone https://github.com/waterfall-mkt/curta-puzzles.git && cd curta-puzzles && forge install
  1. Set RPC_URL_MAINNET in .env
.env
RPC_URL_MAINNET=""
  1. Write solution + run script
forge script <PATH_TO_PUZZLE> -f mainnet -vvv
This is still WIP.
Waterfall