This project is a tiny Node HTTP server that listens for Sequence webhooks from an ERC-1155 factory. When an ERC1155ItemsDeployed event is present, it fetches the transaction receipt to show the deployed proxy address and the deployer.
- Node 18+ installed
pnpmor plainnodeto run the server
- Install dependencies:
pnpm install
- Start the server:
- With pnpm:
pnpm start - Or directly:
PORT=3000 node server.js
- With pnpm:
- Watch the console for incoming webhook logs. Each request returns
{"status":"ok","receivedAt":"<timestamp>"}.
You can test locally with curl:
curl -X POST http://localhost:3000/example \
-H "Content-Type: application/json" \
-d '{"hello":"webhooks"}'Use ngrok to forward public traffic to your local listener so third-party webhook providers can reach it.
- Install and authenticate ngrok (from https://ngrok.com if you do not already have it).
- Start the local server (as above) on the port you want to expose, e.g.
3000. - In a new terminal, run:
Copy the generated
ngrok http 3000
https://...ngrok.ioforwarding URL. - Configure your webhook provider to send events to the ngrok URL. The listener accepts any path; you can reuse
/or/webhook. - Trigger an event from the provider. You should see the request details printed in the server logs, confirming the webhook was received.
If you change the server port (via the PORT environment variable), update the ngrok command to match: ngrok http $PORT.
- The included
screenshot.pngshows Sequence Builder monitoring an ERC-1155 deployment by listening to the factory contract on Sandchain. - Factory address:
0x024b9949fed1c8dd7154de653456d64aa1093384. - Point webhook listeners at events from this factory to catch new 1155 contract deployments (and then inspect the emitted data in your server logs when the webhook fires).
When a webhook body contains an ERC1155ItemsDeployed log emitted by the factory, the server:
- uses
txnHashto fetch the transaction receipt via Sequence RPC (@0xsequence/network), and - decodes the
ERC1155ItemsDeployedevent withethersto log the deployed proxy address and the deployer (tx.from).
Environment variables:
SEQUENCE_NETWORK(optional): defaults tosandbox-testnetto match the sample factory. Set this to the chain your factory is on (e.g.sand,polygon,arbitrum,mainnet, etc.).PORT(optional): port for the webhook listener.VERBOSE(optional): defaults tofalse. Set totrueto print full receipts.
If the webhook payload matches the shape shown below, you should see logs like:
Wallet 0x927eAA289559ecc0Ee859d833003C756731c9B43 used Factory 0x024b9949fed1c8dd7154de653456d64aa1093384 to deploy items proxy 0x45e21cb37441234976A30214E042e03dC466a35b (txn: 0x05825d7c664037d295b5f36a539d2b0d63a6a4f28c33b0181c03a6c3f7d900a0)
