A Next.js web application providing a user-friendly interface for decoding Compound governance proposals.
- Interactive web UI for decoding proposals
- Supports multiple input formats (proposal ID, calldata, raw details)
- Collapsible call tree visualization
- Chain badges for cross-chain operations
- REST API endpoint for programmatic access
- Node.js 20+
- pnpm 9+
- Environment variables configured (see monorepo root
.compound-config.json.example)
-
Install dependencies from the monorepo root:
pnpm install
-
Create a
.compound-config.jsonfile in the monorepo root with required API keys and RPC URLs.
From the monorepo root:
pnpm --filter @compound-security/portal devOr from this directory:
pnpm devThe app will be available at http://localhost:3000.
Decode a governance proposal programmatically.
By Proposal ID:
{
"type": "id",
"proposalId": 527
}By Calldata:
{
"type": "calldata",
"calldata": "0x..."
}By Details:
{
"type": "details",
"details": {
"targets": ["0x..."],
"values": ["0"],
"calldatas": ["0x..."],
"descriptionHash": "0x..."
},
"metadata": {
"governor": "0x...",
"proposalId": "123",
"chainId": 1
}
}{
"success": true,
"data": {
"proposalId": "527",
"governor": "0x...",
"chainId": 1,
"calls": [...]
}
}# Build (from monorepo root)
docker build -f apps/portal/Dockerfile . -t compound-portal
# Run
docker run -p 3000:3000 compound-portal