@probecli/cli 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +77 -2
- package/bin/probe.mjs +7 -0
- package/dist/probe.mjs +2604 -0
- package/package.json +62 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 PROBE contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,78 @@
|
|
|
1
|
-
#
|
|
1
|
+
# probe
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The command-line tool for [PROBE](https://probecli.com): reproducible tests for Uniswap v4 hooks on Robinhood Chain.
|
|
4
|
+
|
|
5
|
+
- **Check any deployed hook** with nine safety checks at one block. Free, no key needed.
|
|
6
|
+
- **Run funded testing jobs.** Write or generate Foundry test cases against a pinned snapshot. The verifier reproduces each one, and the ProbeJobs contract pays once for each new execution path.
|
|
7
|
+
|
|
8
|
+
```shell
|
|
9
|
+
npm install -g @probecli/cli
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Needs Node 22.18 or later. Running jobs also needs [Foundry](https://getfoundry.sh) and git. Checking hooks needs neither.
|
|
13
|
+
|
|
14
|
+
## Check a hook
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
probe check 0x0af57f62982d03066ef917acad87f771c06528ec
|
|
18
|
+
probe check 0x0af57f62982d03066ef917acad87f771c06528ec --publish
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
It reads the chain at one block and checks that:
|
|
22
|
+
|
|
23
|
+
- the address flags are valid;
|
|
24
|
+
- every enabled callback exists;
|
|
25
|
+
- the hook is bound to the real PoolManager;
|
|
26
|
+
- its callbacks revert for any other caller.
|
|
27
|
+
|
|
28
|
+
It also reports whether the hook is upgradeable, owned by a single key, uses SELFDESTRUCT or DELEGATECALL, or lacks verified source.
|
|
29
|
+
|
|
30
|
+
`--publish` has the verifier rerun the check at the same block and sign it. The result then appears at [probecli.com/hooks](https://probecli.com/hooks) with a badge you can put in a README. A pass is evidence about one property at one block, not an audit.
|
|
31
|
+
|
|
32
|
+
Anyone can check a published result without trusting the website:
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
probe hooks # hooks with a published check
|
|
36
|
+
probe verify hook 0x0af57f62982d03066ef917acad87f771c06528ec # signature, signer, and signer approved on-chain
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Run a job
|
|
40
|
+
|
|
41
|
+
```shell
|
|
42
|
+
probe init # creates your operator key; rewards are paid to its address
|
|
43
|
+
probe doctor # checks Node, Foundry, git, the verifier, the chain and your key
|
|
44
|
+
probe jobs # funded jobs
|
|
45
|
+
probe job <job> # scope, rules, budget and results so far
|
|
46
|
+
probe work <job> --dry-run # run cases locally, submit nothing
|
|
47
|
+
probe work <job> # submit the cases that pass
|
|
48
|
+
probe withdraw <job> # withdraw what you earned
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
On first use, the CLI downloads the job's workspace from the public repository into `~/.probe`. Foundry also fetches the Solidity compiler the job pins.
|
|
52
|
+
|
|
53
|
+
With `ANTHROPIC_API_KEY` set, an agent proposes new cases. Without it, write your own:
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
probe case new <job> FeeAfterNextBlock
|
|
57
|
+
probe case check <job> FeeAfterNextBlock.t.sol
|
|
58
|
+
probe work <job> --case FeeAfterNextBlock.t.sol
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Before you work a job, confirm its scope and rules are the ones fixed at funding:
|
|
62
|
+
|
|
63
|
+
```shell
|
|
64
|
+
probe verify job volume-discount-fee-swaps # recomputes the spec hash and compares it with getJob(id)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
`probe help` lists every command.
|
|
68
|
+
|
|
69
|
+
If `npm install -g` fails with EACCES, your Node lives in a folder your user cannot write. Set `npm config set prefix ~/.npm-global`, add `~/.npm-global/bin` to your PATH, and install again, or run `npx @probecli/cli` without installing.
|
|
70
|
+
|
|
71
|
+
## Links
|
|
72
|
+
|
|
73
|
+
- Website and docs: [probecli.com](https://probecli.com)
|
|
74
|
+
- Source, contract and verifier: [github.com/probecli/probe](https://github.com/probecli/probe)
|
|
75
|
+
- Changelog: [CHANGELOG.md](https://github.com/probecli/probe/blob/main/CHANGELOG.md)
|
|
76
|
+
- Updates: [@probecli](https://x.com/probecli)
|
|
77
|
+
|
|
78
|
+
MIT licensed.
|
package/bin/probe.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Entry point for the probe CLI. In the repository, Node 22.18+ runs the
|
|
3
|
+
// TypeScript sources directly. The npm package ships the bundled dist/probe.mjs.
|
|
4
|
+
import { existsSync } from "node:fs";
|
|
5
|
+
|
|
6
|
+
const src = new URL("../src/cli/main.ts", import.meta.url);
|
|
7
|
+
await import(existsSync(src) ? src.href : new URL("../dist/probe.mjs", import.meta.url).href);
|