Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 5 additions & 0 deletions .changeset/hip-spoons-go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

Add Arc testnet to chains package
Comment on lines +2 to +5
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Bump version to minor (new public export).

This adds a new public export (arcTestnet) to packages/thirdweb, which is a public API change. Per policy: patch for non-API changes; minor for new/modified public API.

Apply:

----
-"thirdweb": patch
+---
+"thirdweb": minor
 ---
 
 Add Arc testnet to chains package

Based on learnings.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
.changeset/hip-spoons-go.md lines 2-5: The changeset currently sets "thirdweb":
patch despite adding a new public export (arcTestnet), which requires a minor
bump; update the changeset to use "minor" instead of "patch" for the thirdweb
package and keep the release notes describing the new public export so the
package versioning correctly reflects the public API change.

17 changes: 17 additions & 0 deletions packages/thirdweb/src/chains/chain-definitions/arc-testnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { defineChain } from "../utils.js";

/**
* @chain
*/
export const arcTestnet = /* @__PURE__ */ defineChain({
Comment on lines +3 to +6
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Add full TSDoc with compiling example and custom tag.

Public symbols in packages/thirdweb must include TSDoc with an @example and a custom tag. Please replace the brief comment with a complete block.

Apply:

-/**
- * @chain
- */
+/**
+ * Arc Testnet predefined chain.
+ *
+ * @chain
+ * @beta
+ * @example
+ * import { createThirdwebClient } from "thirdweb";
+ * import { arcTestnet, getRpcUrlForChain } from "thirdweb/chains";
+ *
+ * const client = createThirdwebClient({ clientId: process.env.TW_CLIENT_ID! });
+ * const rpcUrl = getRpcUrlForChain(arcTestnet, client);
+ * // use rpcUrl with your provider or SDK calls
+ */

As per coding guidelines.

🤖 Prompt for AI Agents
packages/thirdweb/src/chains/chain-definitions/arc-testnet.ts lines 3-6: the
brief comment must be replaced with a complete TSDoc block for the exported
public symbol; add a descriptive one-line summary, an optional short remarks
section, the required custom tag (e.g. @chain) and a compiling @example that
shows importing defineChain and using arcTestnet (a minimal, executable snippet
that TypeScript can compile), and ensure the block sits immediately above the
export so the doc is attached to export const arcTestnet.

blockExplorers: [
{
name: "Arc Testnet Explorer",
url: "https://testnet.arcscan.app",
},
],
id: 5042002,
name: "Arc Testnet",
nativeCurrency: { decimals: 6, name: "USDC", symbol: "USDC" },
testnet: true,
});
1 change: 1 addition & 0 deletions packages/thirdweb/src/exports/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export { anvil } from "../chains/chain-definitions/anvil.js";
export { arbitrum } from "../chains/chain-definitions/arbitrum.js";
export { arbitrumNova } from "../chains/chain-definitions/arbitrum-nova.js";
export { arbitrumSepolia } from "../chains/chain-definitions/arbitrum-sepolia.js";
export { arcTestnet } from "../chains/chain-definitions/arc-testnet.js";
export { assetChainTestnet } from "../chains/chain-definitions/assetchain-testnet.js";
export { astriaEvmDusknet } from "../chains/chain-definitions/astria-evm-dusknet.js";
export { avalanche } from "../chains/chain-definitions/avalanche.js";
Expand Down
Loading