Skip to content

Conversation

@nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Jan 15, 2026

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 15, 2026

🦋 Changeset detected

Latest commit: 1431b0c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@graphprotocol/grc-20 Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@nikgraf nikgraf force-pushed the nik/support-new-api branch from 8c1afe3 to 1431b0c Compare January 15, 2026 09:58
@nikgraf nikgraf merged commit 91f6fc3 into main Jan 15, 2026
3 checks passed
@nikgraf nikgraf requested a review from Copilot January 15, 2026 10:01
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for a new API environment by introducing a TESTNET_V2 network option. The change enables the SDK to work with the new testnet contracts and API endpoint while maintaining backward compatibility with the existing TESTNET and MAINNET networks.

Changes:

  • Added TESTNET_V2 as a new network option throughout the codebase
  • Introduced a centralized Network type and getApiOrigin() function to replace inline conditionals
  • Updated documentation to indicate that certain examples are outdated when working with new contracts

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/graph/constants.ts Added TESTNET_V2_API_ORIGIN constant, Network type, and getApiOrigin() helper function
src/graph/index.ts Exported new TESTNET_V2_API_ORIGIN, Network type, and getApiOrigin function
src/types.ts Updated CreateImageParams network property to include TESTNET_V2
src/ipfs.ts Replaced inline network conditionals with Network type and getApiOrigin() function
src/ipfs.test.ts Updated test to use TESTNET_V2 network
src/graph/create-space.ts Replaced inline network conditional with getApiOrigin() function
src/graph/create-image.ts Added TESTNET_V2 to alternative gateway condition
src/encoding.ts Replaced inline network conditional with getApiOrigin() function
README.md Added comments indicating outdated examples when working with new contracts
.changeset/eighty-trams-poke.md Changelog entry for the new network option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nikgraf nikgraf deleted the nik/support-new-api branch January 15, 2026 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants