Draft a hook deployment to sign
Validates `params` against the hook's real constructor and returns the **unsigned** deployment: the constructor arguments ABI-encoded, the address suffix the deploy must land on, and the hook's audit status. **Nothing is deployed and nothing is signed.** There is no key in this module and no broadcast call in it. The caller signs the transaction through the B0 signing path and putty never holds the signer, which is the same split the Launch Kit keeps. **Nothing is defaulted into existence.** A parameter the hook does not take is a **400** naming the names it does take; a required one that is missing is a **400** naming it; a value that is not the right shape for its declared type is a **400** naming the shape. Every argument arrives as a string and is encoded as the Solidity type the constructor declares — a `uint24` sent as a JSON `number` has already lost precision on the wire. A `hookId` that is not in the catalog is a **404** that lists the ids that are. It is never a default and never a 400, because a caller who asked for a hook that does not exist and got one that does would sign a transaction for something they did not choose. **`expectedAddress` is `null` until a CREATE2 salt has been mined** for these exact constructor arguments on this chain. Mining is a search, not a calculation, and a client must show "not mined yet" rather than a guessed or zero address. The treasury parameter goes through the same `assertTreasurySafe` guard the pool and launch paths use, so a fee cannot be pointed at the zero address — a transaction that is valid onchain and silently wrong.
Validates params against the hook's real constructor and returns the unsigned deployment: the constructor arguments ABI-encoded, the address suffix the deploy must land on, and the hook's audit status. Nothing is deployed and nothing is signed. There is no key in this module and no broadcast call in it. The caller signs the transaction through the B0 signing path and putty never holds the signer, which is the same split the Launch Kit keeps. Nothing is defaulted into existence. A parameter the hook does not take is a 400 naming the names it does take; a required one that is missing is a 400 naming it; a value that is not the right shape for its declared type is a 400 naming the shape. Every argument arrives as a string and is encoded as the Solidity type the constructor declares — a uint24 sent as a JSON number has already lost precision on the wire. A hookId that is not in the catalog is a 404 that lists the ids that are. It is never a default and never a 400, because a caller who asked for a hook that does not exist and got one that does would sign a transaction for something they did not choose. expectedAddress is null until a CREATE2 salt has been mined for these exact constructor arguments on this chain. Mining is a search, not a calculation, and a client must show "not mined yet" rather than a guessed or zero address. The treasury parameter goes through the same assertTreasurySafe guard the pool and launch paths use, so a fee cannot be pointed at the zero address — a transaction that is valid onchain and silently wrong.
Request Body
application/json
The catalog id and its constructor arguments as strings.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/hook-catalog" \ -H "Content-Type: application/json" \ -d '{ "hookId": "string", "params": { "property1": "string", "property2": "string" } }'{ "hookId": "string", "calldata": "string", "expectedAddress": "string", "hookFlags": "string", "auditStatus": "audited"}