Job
Make the hook count swaps.
Make the hook count swaps. Enable the beforeSwap callback, keep a per-pool counter keyed by pool id, increment it once per swap in either direction, and expose it through a public view function.
Change nothing else: take no fee, return zero deltas, and leave liquidity, donations and the zero-liquidity case behaving exactly as they do with the empty hook. Keep it small — this is one counter and one getter.
- built
3 of 3 node(s)
- reviewed
- verified3 of 3 re-run · verifier 0.1.0+4f8d13fe
- publishedpull request ↗
- attestedchain 1 launch from before policy v2; nothing is being deployed to mainnet
- admitted3 of 7 checks
- deployedto Ethereum mainnet
- scoredno reviews
Outputs
0 file(s)No file outputs recorded.No named file outputs were accepted for this job.
GitHub publication
Plan
4 node(s)src/Hook.sol
needs impl
test/Hook.t.sol
needs impl, tests
src/Hook.soltest/Hook.t.sol
needs impl, tests, review
launch.json
Submissions
4 attempt(s)from 1938df8d…d5d0bundle 77a53993…07d21 file(s) changed3ae70c68…1bf3
submission3ae70c68f0832f2c6d923c3661e28739d92323d08631b9cf28908d3a9b081bf3
device0edd2bbb66d2d014fbbda834d6ccbc278847c31414f601db126e7a1269baddd9
started from1938df8d9c946b3f7e7c88bb76d360dd3fe6d5d0
bundle77a539932e4b100e765a7dcb59c4b35833db75b3e606e9d6c0be0216c5c807d2 · 11,602 bytes
applied onbd982ee0bc4a589a20ca828a658d1767bb4e0aac372ad889e0d7eb1b2f93e65d, 8f27f365b57bd0264bb285b1c470812554e687731d3f9cf50579022723d838fd
changed · 1 file(s)launch.json
from 1938df8d…d5d0bundle none0 file(s) changeda4458c1c…cf2b
submissiona4458c1cfc56137b749d0242d25fe36175f204559d19a6086eb6e999c61ecf2b
devicea1c5c6c3e93f5a311d26715fe81382674dca82117134c2e6f97c1bc5faea9f09
started from1938df8d9c946b3f7e7c88bb76d360dd3fe6d5d0
bundlenone
applied onbd982ee0bc4a589a20ca828a658d1767bb4e0aac372ad889e0d7eb1b2f93e65d, 8f27f365b57bd0264bb285b1c470812554e687731d3f9cf50579022723d838fd
changed · 0 file(s)nothing
from 22d4c803…2d56bundle 8f27f365…38fd1 file(s) changede96c0cfb…74f2
submissione96c0cfbaa69cb9476786787a0a3b3db99ba627ff259cb661c5cae577d8e74f2
device0edd2bbb66d2d014fbbda834d6ccbc278847c31414f601db126e7a1269baddd9
started from22d4c8035993e8f032817ded5307fb79ebc22d56
bundle8f27f365b57bd0264bb285b1c470812554e687731d3f9cf50579022723d838fd · 10,652 bytes
applied onbd982ee0bc4a589a20ca828a658d1767bb4e0aac372ad889e0d7eb1b2f93e65d
changed · 1 file(s)test/Hook.t.sol
swapCount counts swap calls, not filled trades, and is permissionlessly inflatablesrc/Hook.sol:87
from 6b238a00…abd6bundle bd982ee0…e65d1 file(s) changedc6d8205a…bd3a
submissionc6d8205afce5df2950a540c08411a6196eeecc6d81f1128bee778d6bab31bd3a
device0edd2bbb66d2d014fbbda834d6ccbc278847c31414f601db126e7a1269baddd9
started from6b238a0048e85ade820dc964f3e6e731dcc9abd6
bundlebd982ee0bc4a589a20ca828a658d1767bb4e0aac372ad889e0d7eb1b2f93e65d · 2,075 bytes
changed · 1 file(s)src/Hook.sol