Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
ALCHEMY_KEY=
THEGRAPH_API_TOKEN=
SATSUMA_DEPLOY_KEY=
# You can find the IPFS hash by querying your Alchemy subgraph endpoint:
# query {
# _meta {
# deployment
# }
# }
#
IPFS_HASH=

#these are deterministic when deployed in that order on a fresh node with hardhat (anvil) seed
IPNFT_ADDRESS=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
Expand Down
4 changes: 2 additions & 2 deletions subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"build:sepolia": "graph codegen && graph build --network sepolia",
"build:mainnet": "graph codegen && graph build --network mainnet",
"deploy:local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 moleculeprotocol/ipnft-subgraph",
"deploy:sepolia": "env-cmd -x -f ../.env graph deploy ip-nft-sepolia --version-label 1.3.2 --node https://subgraphs.alchemy.com/api/subgraphs/deploy --ipfs https://ipfs.satsuma.xyz --deploy-key \\$SATSUMA_DEPLOY_KEY",
"deploy:mainnet": "env-cmd -x -f ../.env graph deploy ip-nft-mainnet --version-label 1.3.2 --node https://subgraphs.alchemy.com/api/subgraphs/deploy --ipfs https://ipfs.satsuma.xyz --deploy-key \\$SATSUMA_DEPLOY_KEY",
"deploy:sepolia": "env-cmd -x -f ../.env goldsky subgraph deploy ip-nft-sepolia/1.3.3 --from-ipfs-hash \\$IPFS_HASH --ipfs-gateway https://ipfs.satsuma.xyz",
"deploy:mainnet": "env-cmd -x -f ../.env goldsky subgraph deploy ip-nft-mainnet/1.3.3 --from-ipfs-hash \\$IPFS_HASH --ipfs-gateway https://ipfs.satsuma.xyz",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify .env.example and subgraph/README.md are updated with deployment documentation.

The deploy scripts reference the IPFS_HASH environment variable (Line 11-12). Developers need clear documentation on:

  1. Where to find/generate the IPFS_HASH value for deployments
  2. How to obtain and set SATSUMA_DEPLOY_KEY
  3. Step-by-step deployment instructions

Run the following script to verify environment variable documentation and README updates:


🏁 Script executed:

#!/bin/bash
# Description: Verify .env.example and README files have Goldsky deployment documentation

echo "=== Checking .env.example for IPFS_HASH and SATSUMA_DEPLOY_KEY ==="
if [ -f ".env.example" ]; then
  grep -A 2 "IPFS_HASH\|SATSUMA_DEPLOY_KEY" .env.example || echo "⚠️  Missing environment variable documentation"
else
  echo "⚠️  .env.example not found"
fi

echo -e "\n=== Checking subgraph/README.md for Goldsky deployment documentation ==="
if [ -f "subgraph/README.md" ]; then
  grep -i "goldsky\|deploy:sepolia\|deploy:mainnet\|IPFS_HASH" subgraph/README.md && echo "✓ Found Goldsky deployment docs" || echo "⚠️  Missing Goldsky deployment documentation in subgraph/README.md"
else
  echo "⚠️  subgraph/README.md not found"
fi

echo -e "\n=== Checking root README.md for deployment setup instructions ==="
if [ -f "README.md" ]; then
  grep -A 10 -i "deploy\|goldsky" README.md | head -20 || echo "⚠️  Missing deployment section in root README"
else
  echo "⚠️  README.md not found"
fi

Length of output: 3983


Add Goldsky deployment documentation to subgraph/README.md.

Verification shows .env.example contains IPFS_HASH and SATSUMA_DEPLOY_KEY environment variables with basic documentation. However, subgraph/README.md is missing Goldsky deployment workflow instructions. Developers need clear steps in the subgraph README explaining how to:

  • Obtain and set IPFS_HASH from the Alchemy subgraph endpoint
  • Obtain and set SATSUMA_DEPLOY_KEY
  • Run npm run deploy:sepolia and npm run deploy:mainnet
🤖 Prompt for AI Agents
In subgraph/package.json around lines 11 to 12, the repo defines npm scripts
deploy:sepolia and deploy:mainnet using IPFS_HASH and a Goldsky (Satsuma) deploy
key but subgraph/README.md lacks instructions; update subgraph/README.md to add
a "Goldsky / Satsuma deployment" section that (1) shows how to obtain the
IPFS_HASH by fetching the Alchemy subgraph endpoint (include the exact curl/HTTP
request pattern and where to copy the returned IPFS hash), (2) explains how to
obtain/set SATSUMA_DEPLOY_KEY (where to get the key from Goldsky/Satsuma and how
to store it in .env or environment), (3) documents running the scripts npm run
deploy:sepolia and npm run deploy:mainnet (including the requirement to have
.env populated, env-cmd usage, and the IPFS gateway), and (4) add a brief
verification step to confirm deployment succeeded; keep the instructions concise
and copy-pastable for developers.

"create:local": "graph create --node http://localhost:8020/ moleculeprotocol/ipnft-subgraph",
"remove:local": "graph remove --node http://localhost:8020/ moleculeprotocol/ipnft-subgraph",
"test": "graph test"
Expand Down