Thanks for your interest in contributing! KaiSign Extension is a Chrome extension that uses the KaiSign on-chain metadata registry for transaction decoding and verification. It's under active development and PRs are welcome — whether you're fixing a decoding bug, adding a new protocol, or improving the UI.
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<your-username>/KaiSign-Extension.git cd KaiSign-Extension
- Load the extension in Chrome:
- Go to
chrome://extensions/ - Enable Developer mode
- Click Load unpacked and select the repo root
- Go to
- Make your changes and test them
No build step — the extension runs directly from source.
- No build tools or bundlers — all code runs as-is in the browser
- No external runtime dependencies — the extension is self-contained (Node.js is only used for tests)
- Match existing code style — vanilla JS, no frameworks, consistent naming
- MAIN vs. ISOLATED world — understand which world your code runs in:
- MAIN world scripts (
content-script.js,decode.js, etc.) share the page's JS context - ISOLATED world (
bridge-script.js) bridges messages to the background service worker - Use
fetchViaBackground()/rpcCallViaBackground()for network requests from MAIN world
- MAIN world scripts (
This is the most impactful way to contribute. Many contracts and protocols don't decode correctly yet — PRs that improve decoding coverage are especially welcome.
-
Create metadata — Add an ERC-7730 JSON file in
tests/fixtures/metadata/protocols/:{ "$schema": "https://eips.ethereum.org/assets/eip-7730/erc7730-v1.schema.json", "context": { "contract": { "deployments": [ { "chainId": 1, "address": "0x..." } ], "abi": [ ... ] } }, "display": { "formats": { "0xSELECTOR": { "intent": "Description of what this function does", "fields": [ ... ] } } } } -
Add test cases — Create a test file with real transaction calldata. See existing tests in
tests/for the pattern. -
Test locally:
cd tests npm install npm test
-
Submit a PR — include the protocol name, contract address, and which functions you added.
You can test metadata changes live in the browser before submitting a PR:
-
Start the local server:
cd tests npm install npm run local-server -
Point the extension at it:
- Open extension options (right-click extension icon → Options)
- Set Backend API URL to
http://localhost:3000 - Save settings
-
Iterate: Edit your metadata JSON in
tests/fixtures/metadata/protocols/, restart the server, and trigger the transaction on a dapp to see your changes decoded in real time.
The local server falls back to the production API for any contract not found in your local fixtures, so the extension continues to work normally for all other transactions.
If you encounter a transaction that KaiSign doesn't decode:
- Note the contract address and function selector
- Look up the ABI on Etherscan or the protocol's docs
- Create the metadata JSON following the ERC-7730 format
- Test with real calldata from the transaction
Use clear, descriptive commit messages:
Add Aave V3 Pool metadata for supply and withdraw functions
Fix tuple[] decoding for nested ParaSwap calldata
Update popup styling for EIP-712 display
Prefix with the action: Add, Fix, Update, Remove, Refactor.
- One PR per feature or fix — keep changes focused
- Include test cases when adding protocol support or fixing decoders
- Describe what and why in the PR description
- No hardcoded values — use parameters, metadata, or config
- No secrets — never commit API keys or credentials
- Changes work when loaded as an unpacked extension
- Tests pass (
cd tests && npm test) - New protocol metadata follows ERC-7730 format
- No hardcoded addresses, keys, or secrets
- Commit message is descriptive
Some tests require API keys for on-chain verification. Copy the template:
cp tests/.env.example tests/.envSee tests/.env.example for details. Tests that require missing keys will be skipped.
cd tests
npm install
npm testDapp → MAIN world scripts → bridge-script.js (ISOLATED) → background.js
↓
External APIs
- decode.js — Pure ABI decoder using keccak256 + SimpleInterface
- metadata.js — Loads ERC-7730 metadata for known contracts
- recursive-decoder.js — Unwraps nested calls (multicall, Diamond facets)
- content-script.js — Intercepts wallet RPCs, renders the popup UI
- background.js — Service worker handling CORS-bypassed fetches and RPC calls
Open an issue on GitHub or reach out at dev@cipherlogic.xyz.