Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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.2 --ipfs-gateway https://ipfs.satsuma.xyz",
"deploy:mainnet": "env-cmd -x -f ../.env goldsky subgraph deploy ip-nft-mainnet/1.3.2 --ipfs-gateway https://ipfs.satsuma.xyz",
Copy link

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 IPFS_HASH environment variable is correctly used in the deploy command.

The deploy scripts reference IPFS_HASH via env-cmd -x -f ../.env, but the goldsky command syntax does not show how it is consumed. The command is:

goldsky subgraph deploy ip-nft-sepolia/1.3.2 --ipfs-gateway https://ipfs.satsuma.xyz

Typically, Goldsky deployments using IPFS require a flag like --from-ipfs-hash <hash> or similar. Confirm that:

  1. The IPFS_HASH variable is actually used by the goldsky command in the environment
  2. The deploy command syntax is complete and correct
  3. Documentation clearly shows developers how to obtain and set IPFS_HASH

Run the following script to verify the Goldsky CLI documentation and expected deploy command syntax:


🌐 Web query:

What is the correct syntax for goldsky subgraph deploy command with IPFS hash?

💡 Result:

Use the --from-ipfs-hash flag. Example:

goldsky subgraph deploy your-subgraph-name/your-version --from-ipfs-hash <YOUR_IPFS_HASH> [--ipfs-gateway https://ipfs.satsuma.xyz]. (docs.goldsky.com)

Sources:
[1] Goldsky docs — Migrate from The Graph.
[2] Goldsky docs — Migrate from Alchemy (example with --ipfs-gateway).

Citations:


Add missing --from-ipfs-hash flag to deploy commands.

The deploy scripts are incomplete. The correct syntax requires the --from-ipfs-hash flag, but your commands omit it:

"deploy:sepolia": "env-cmd -x -f ../.env goldsky subgraph deploy ip-nft-sepolia/1.3.2 --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.2 --from-ipfs-hash $IPFS_HASH --ipfs-gateway https://ipfs.satsuma.xyz",

Without this flag, the IPFS_HASH environment variable loaded by env-cmd is never consumed by the goldsky command.

🤖 Prompt for AI Agents
In subgraph/package.json around lines 11 to 12 the deploy scripts omit the
required --from-ipfs-hash flag so the IPFS_HASH loaded by env-cmd is never
passed to goldsky; update both "deploy:sepolia" and "deploy:mainnet" script
values to include --from-ipfs-hash $IPFS_HASH before the --ipfs-gateway option
(ensuring the environment variable is exported/available via env-cmd) so goldsky
receives the IPFS hash during deployment.

"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