2.5k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill jb-pay-hook- SKILL.md5.3 KB
Overview
This skill generates custom Juicebox V5 pay hooks from natural language specifications. It produces Solidity contracts implementing IJBPayHook and/or IJBRulesetDataHook along with Foundry tests and optional deployment scripts. It first evaluates whether an off-the-shelf solution (buyback hook, 721 hook, or Revnet) already fits the requirement and only generates custom code when needed.
How this skill works
You describe desired behavior in plain English and the skill asks clarifying questions when necessary. It selects the simplest applicable pattern (simple pay hook or combined data+pay hook), generates Solidity sources and interfaces, and includes Foundry tests with fork testing against deployed contracts. The output includes terminal validation, correct V5 terminology, and optional deployment scripts on request.
When to use it
- You need a custom routing or accounting behavior not covered by existing hooks.
- You want to modify minting weight or intercept forwarded funds before they are recorded.
- You require automated post-payment logic that executes with forwarded funds.
- You need an autonomous project pattern (contract-as-owner) with delegated permissions.
- You want Foundry tests and forked integration tests alongside generated contracts.
Best practices
- Check off-the-shelf options (nana-buyback-hook, nana-721-hook, Revnet) before coding.
- Prefer a simple afterPayRecordedWith-only hook unless you must change weight or routing.
- Always validate the caller is a recognized Juicebox terminal in afterPayRecordedWith.
- Include view-only beforePayRecordedWith when modifying weight or returning hook specs.
- Generate Foundry fork tests to validate behavior against mainnet deployments.
Example use cases
- Route 10% of every payment to a charity address and forward the rest to the project.
- Mint a custom ERC20 proportional to payments and distribute to a beneficiary.
- Award tiered NFT rewards on payments using a combined data hook to set tiers.
- Build an autonomous Revnet-style deployer that owns the project and enforces rules.
- Credit off-chain points to payers based on payment amount and record metadata.
FAQ
No. I first evaluate off-the-shelf solutions and will recommend deploying an existing hook or a Revnet if it fits the use case.
Do generated contracts include tests?
Yes. I produce Foundry tests with fork testing scaffolding and example assertions against deployed contracts.
Which interface should I implement?
Use IJBPayHook for post-payment logic only; implement IJBRulesetDataHook as well if you need to adjust weight or return hook specifications before payment recording.