From 4674dd2ec86a6a7ae2c42c0292b02b400b686919 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Fri, 7 Nov 2025 10:52:29 +0000 Subject: [PATCH 1/5] chore: define configuration inputs in JSON files and update the doc about environments --- docs/boson-environments.md | 100 ++++++++++ packages/common/src/configs.ts | 189 ++++++++++--------- packages/common/src/inputs/ipfsGateways.json | 74 ++++++++ packages/common/src/inputs/rpcUrls.json | 58 ++++++ packages/common/src/inputs/subgraphs.json | 58 ++++++ 5 files changed, 385 insertions(+), 94 deletions(-) create mode 100644 docs/boson-environments.md create mode 100644 packages/common/src/inputs/ipfsGateways.json create mode 100644 packages/common/src/inputs/rpcUrls.json create mode 100644 packages/common/src/inputs/subgraphs.json diff --git a/docs/boson-environments.md b/docs/boson-environments.md new file mode 100644 index 000000000..11342eb8d --- /dev/null +++ b/docs/boson-environments.md @@ -0,0 +1,100 @@ +[![banner](./assets/banner.png)](https://bosonprotocol.io) + +< [Boson Protocol Widgets](../README.md) + +## Boson Protocol Environment + +Boson Protocol is deployed onto 3 public **environments**, to be used in different contexts, for different reasons and probably by different users: + - ***testing*** is a development environment, very unstable by nature. Unless you're developing on Boson Protocol Components, you shouldn't use this environment. + - ***staging*** is a validation environment, on testnet blockchain, specifically designed to test and discover the Boson Protocol Components without being on a real blockchain. + - ***production*** is the production environment. Everything processed on this environment is **FOR REAL**. + +In addition, it's possible to deploy your own environment on your local machine. We call it the ***local*** environment. + +## Boson Protocol Configurations + +Each environment (except ***local***) is currently deployed on several configurations, corresponding to different blockchains. + +The dApps (Marketplace and Dispute Resolution Center) and widgets are able to switch between configurations of the same environment. + +The following table recaps all configurations, per environment + + + + + + + +
Environment
production + + + + + + + +
ConfigurationBlockchainSubgraph
production-137-0Polygonhttps://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-polygon/latest/gn
production-1-0Ethereum Mainnethttps://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-ethereum/latest/gn
production-8453-0Basehttps://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-base/latest/gn
production-10-0Optimismhttps://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-optimism/latest/gn
production-42161-0Arbitrumhttps://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-arbitrum/latest/gn
+ + + + +
dApps
Marketplacehttps://bosonapp.io
Dispute Resolution Centerhttps://disputes.bosonprotocol.io
+ + + + +
Widgets
Redemptionhttps://widgets.bosonprotocol.io/#/redeem
Commithttps://widgets.bosonprotocol.io/#/commit
Financehttps://widgets.bosonprotocol.io/#/finance
+
staging + + + + + + + +
ConfigurationBlockchainSubgraph
staging-80002-0Polygon Amoy (testnet)https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-amoy/latest/gn
staging-11155111-0Ethereum Sepolia (testnet)https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-sepolia/latest/gn
staging-84532-0Base Sepolia (testnet)https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-base/latest/gn
staging-11155420-0Optimism Sepolia (testnet)https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-optimism/latest/gn
staging-421614-0Arbitrum Sepolia (testnet)https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-arbitrum/latest/gn
+ + + + +
dApps
Marketplacehttps://interface-staging.on-fleek.app
Dispute Resolution Centerhttps://drcenter-staging.on-fleek.app/
+ + + + +
Widgets
Redemptionhttps://widgets-staging.on-fleek.app/#/redeem
Commithttps://widgets-staging.on-fleek.app/#/commit
Financehttps://widgets-staging.on-fleek.app/#/finance
+
testing + + + + + + + +
ConfigurationBlockchainSubgraph
testing-80002-0Polygon Amoy (testnet)https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-amoy/latest/gn
testing-11155111-0Ethereum Sepolia (testnet)https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-sepolia/latest/gn
testing-84532-0Base Sepolia (testnet)https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-base/latest/gn
testing-11155420-0Optimism Sepolia (testnet)https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-optimism/latest/gn
testing-421614-0Arbitrum Sepolia (testnet)https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-arbitrum/latest/gn
+ + + + +
dApps
Marketplacehttps://interface-test.on-fleek.app
Dispute Resolution Centerhttps://drcenter-test.on-fleek.app/
+ + + + +
Widgets
Redemptionhttps://widgets-test.on-fleek.app/#/redeem
Commithttps://widgets-test.on-fleek.app/#/commit
Financehttps://widgets-test.on-fleek.app/#/finance
+
local + + + +
ConfigurationBlockchainSubgraph
local-31337-0local (testnet)http://127.0.0.1:8000/subgraphs/name/boson/corecomponents
+ + + + +
dApps
Marketplacehttp://localhost:3333
Dispute Resolution Centerhttp://localhost:3333
+ + + + +
Widgets
Redemptionhttp://localhost:3000/#/redeem
Commithttp://localhost:3000/#/commit
Financehttp://localhost:3000/#/finance
+
diff --git a/packages/common/src/configs.ts b/packages/common/src/configs.ts index 86c08724e..16b97cb79 100644 --- a/packages/common/src/configs.ts +++ b/packages/common/src/configs.ts @@ -11,6 +11,9 @@ import { ProtocolConfig } from "./types"; import protocolAddressesJson from "./generated/protocolAddresses.json"; +import subgraphsJson from "./inputs/subgraphs.json"; +import rpcUrlsJson from "./inputs/rpcUrls.json"; +import ipfsGatewaysJson from "./inputs/ipfsGateways.json"; const protocolAddresses = protocolAddressesJson as ProtocolAddressesConfig; @@ -26,10 +29,10 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(31337), nativeCoin: chainIdToInfo.get(31337), getTxExplorerUrl: chainIdToGraphTx.get(31337), - subgraphUrl: "http://127.0.0.1:8000/subgraphs/name/boson/corecomponents", - jsonRpcUrl: "http://127.0.0.1:8545", - theGraphIpfsUrl: "http://127.0.0.1:5001", - ipfsMetadataUrl: "http://127.0.0.1:5001", + subgraphUrl: subgraphsJson.local["local-31337-0"][0], + jsonRpcUrl: rpcUrlsJson.local["local-31337-0"][0], + theGraphIpfsUrl: ipfsGatewaysJson.local["local-31337-0"].theGraphIpfsUrl, + ipfsMetadataUrl: ipfsGatewaysJson.local["local-31337-0"].ipfsMetadataUrl, contracts: { protocolDiamond: "0xa513E6E4b8f2a923D98304ec87F64353C4D5C853", priceDiscoveryClient: "0x8A791620dd6260079BF849Dc5567aDC3F2FdC318", @@ -63,12 +66,10 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(80002), nativeCoin: chainIdToInfo.get(80002), getTxExplorerUrl: chainIdToGraphTx.get(80002), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-amoy/latest/gn", - jsonRpcUrl: - "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.testing["testing-80002-0"][0], + jsonRpcUrl: rpcUrlsJson.testing["testing-80002-0"][0], + theGraphIpfsUrl: ipfsGatewaysJson.testing["testing-80002-0"].theGraphIpfsUrl, + ipfsMetadataUrl: ipfsGatewaysJson.testing["testing-80002-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.testing[80002].protocolDiamond, priceDiscoveryClient: @@ -97,12 +98,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(11155111), nativeCoin: chainIdToInfo.get(11155111), getTxExplorerUrl: chainIdToGraphTx.get(11155111), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-sepolia/latest/gn", - jsonRpcUrl: - "https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.testing["testing-11155111-0"][0], + jsonRpcUrl: rpcUrlsJson.testing["testing-11155111-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.testing["testing-11155111-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.testing["testing-11155111-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.testing[11155111].protocolDiamond, priceDiscoveryClient: @@ -125,12 +126,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(84532), nativeCoin: chainIdToInfo.get(84532), getTxExplorerUrl: chainIdToGraphTx.get(84532), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-base/latest/gn", - jsonRpcUrl: - "https://base-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.testing["testing-84532-0"][0], + jsonRpcUrl: rpcUrlsJson.testing["testing-84532-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.testing["testing-84532-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.testing["testing-84532-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.testing[84532].protocolDiamond, priceDiscoveryClient: @@ -157,12 +158,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(11155420), nativeCoin: chainIdToInfo.get(11155420), getTxExplorerUrl: chainIdToGraphTx.get(11155420), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-optimism/latest/gn", - jsonRpcUrl: - "https://optimism-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.testing["testing-11155420-0"][0], + jsonRpcUrl: rpcUrlsJson.testing["testing-11155420-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.testing["testing-11155420-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.testing["testing-11155420-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.testing[11155420].protocolDiamond, priceDiscoveryClient: @@ -189,12 +190,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(421614), nativeCoin: chainIdToInfo.get(421614), getTxExplorerUrl: chainIdToGraphTx.get(421614), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-arbitrum/latest/gn", - jsonRpcUrl: - "https://arbitrum-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.testing["testing-421614-0"][0], + jsonRpcUrl: rpcUrlsJson.testing["testing-421614-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.testing["testing-421614-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.testing["testing-421614-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.testing[421614].protocolDiamond, priceDiscoveryClient: @@ -223,12 +224,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(80002), nativeCoin: chainIdToInfo.get(80002), getTxExplorerUrl: chainIdToGraphTx.get(80002), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-amoy/latest/gn", - jsonRpcUrl: - "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.staging["staging-80002-0"][0], + jsonRpcUrl: rpcUrlsJson.staging["staging-80002-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.staging["staging-80002-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.staging["staging-80002-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.staging[80002].protocolDiamond, priceDiscoveryClient: @@ -257,12 +258,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(11155111), nativeCoin: chainIdToInfo.get(11155111), getTxExplorerUrl: chainIdToGraphTx.get(11155111), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-sepolia/latest/gn", - jsonRpcUrl: - "https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.staging["staging-11155111-0"][0], + jsonRpcUrl: rpcUrlsJson.staging["staging-11155111-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.staging["staging-11155111-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.staging["staging-11155111-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.staging[11155111].protocolDiamond, priceDiscoveryClient: @@ -284,12 +285,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(84532), nativeCoin: chainIdToInfo.get(84532), getTxExplorerUrl: chainIdToGraphTx.get(84532), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-base/latest/gn", - jsonRpcUrl: - "https://base-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.staging["staging-84532-0"][0], + jsonRpcUrl: rpcUrlsJson.staging["staging-84532-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.staging["staging-84532-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.staging["staging-84532-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.staging[84532].protocolDiamond, priceDiscoveryClient: @@ -315,12 +316,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(11155420), nativeCoin: chainIdToInfo.get(11155420), getTxExplorerUrl: chainIdToGraphTx.get(11155420), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-optimism/latest/gn", - jsonRpcUrl: - "https://optimism-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.staging["staging-11155420-0"][0], + jsonRpcUrl: rpcUrlsJson.staging["staging-11155420-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.staging["staging-11155420-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.staging["staging-11155420-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.staging[11155420].protocolDiamond, priceDiscoveryClient: @@ -346,12 +347,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(421614), nativeCoin: chainIdToInfo.get(421614), getTxExplorerUrl: chainIdToGraphTx.get(421614), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-arbitrum/latest/gn", - jsonRpcUrl: - "https://arbitrum-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.staging["staging-421614-0"][0], + jsonRpcUrl: rpcUrlsJson.staging["staging-421614-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.staging["staging-421614-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.staging["staging-421614-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.staging[421614].protocolDiamond, priceDiscoveryClient: @@ -379,12 +380,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(137), nativeCoin: chainIdToInfo.get(137), getTxExplorerUrl: chainIdToGraphTx.get(137), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-polygon/latest/gn", - jsonRpcUrl: - "https://polygon-mainnet.infura.io/v3/383117b55d614525b07f03b5979c5f19", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.production["production-137-0"][0], + jsonRpcUrl: rpcUrlsJson.production["production-137-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.production["production-137-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.production["production-137-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.production[137].protocolDiamond, priceDiscoveryClient: @@ -411,12 +412,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(1), nativeCoin: chainIdToInfo.get(1), getTxExplorerUrl: chainIdToGraphTx.get(1), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-ethereum/latest/gn", - jsonRpcUrl: - "https://mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.production["production-1-0"][0], + jsonRpcUrl: rpcUrlsJson.production["production-1-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.production["production-1-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.production["production-1-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.production[1].protocolDiamond, priceDiscoveryClient: @@ -438,12 +439,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(8453), nativeCoin: chainIdToInfo.get(8453), getTxExplorerUrl: chainIdToGraphTx.get(8453), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-base/latest/gn", - jsonRpcUrl: - "https://base-mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.production["production-8453-0"][0], + jsonRpcUrl: rpcUrlsJson.production["production-8453-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.production["production-8453-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.production["production-8453-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.production[8453].protocolDiamond, priceDiscoveryClient: @@ -469,12 +470,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(10), nativeCoin: chainIdToInfo.get(10), getTxExplorerUrl: chainIdToGraphTx.get(10), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-optimism/latest/gn", - jsonRpcUrl: - "https://optimism-mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.production["production-10-0"][0], + jsonRpcUrl: rpcUrlsJson.production["production-10-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.production["production-10-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.production["production-10-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.production[10].protocolDiamond, priceDiscoveryClient: @@ -500,12 +501,12 @@ export const envConfigs = { defaultTokens: chainIdToDefaultTokens.get(42161), nativeCoin: chainIdToInfo.get(42161), getTxExplorerUrl: chainIdToGraphTx.get(42161), - subgraphUrl: - "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-arbitrum/latest/gn", - jsonRpcUrl: - "https://arbitrum-mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e", - theGraphIpfsUrl: "https://api.0xgraph.xyz/ipfs", - ipfsMetadataUrl: "https://ipfs.infura.io:5001", + subgraphUrl: subgraphsJson.production["production-42161-0"][0], + jsonRpcUrl: rpcUrlsJson.production["production-42161-0"][0], + theGraphIpfsUrl: + ipfsGatewaysJson.production["production-42161-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.production["production-42161-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.production[42161].protocolDiamond, priceDiscoveryClient: diff --git a/packages/common/src/inputs/ipfsGateways.json b/packages/common/src/inputs/ipfsGateways.json new file mode 100644 index 000000000..39ff9422f --- /dev/null +++ b/packages/common/src/inputs/ipfsGateways.json @@ -0,0 +1,74 @@ +{ + "local": { + "local-31337-0": { + "theGraphIpfsUrl": "http://127.0.0.1:5001", + "ipfsMetadataUrl": "http://127.0.0.1:5001" + } + }, + "testing": { + "testing-80002-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "testing-11155111-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "testing-84532-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "testing-11155420-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "testing-421614-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + } + }, + "staging": { + "staging-80002-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "staging-11155111-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "staging-84532-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "staging-11155420-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "staging-421614-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + } + }, + "production": { + "production-137-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "production-1-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "production-8453-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "production-10-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + }, + "production-42161-0": { + "theGraphIpfsUrl": "https://api.0xgraph.xyz/ipfs", + "ipfsMetadataUrl": "https://ipfs.infura.io:5001" + } + } +} \ No newline at end of file diff --git a/packages/common/src/inputs/rpcUrls.json b/packages/common/src/inputs/rpcUrls.json new file mode 100644 index 000000000..d77fb431e --- /dev/null +++ b/packages/common/src/inputs/rpcUrls.json @@ -0,0 +1,58 @@ +{ + "local": { + "local-31337-0": [ + "http://127.0.0.1:8545" + ] + }, + "testing": { + "testing-80002-0": [ + "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "testing-11155111-0": [ + "https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "testing-84532-0": [ + "https://base-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "testing-11155420-0": [ + "https://optimism-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "testing-421614-0": [ + "https://arbitrum-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ] + }, + "staging": { + "staging-80002-0": [ + "https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "staging-11155111-0": [ + "https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "staging-84532-0": [ + "https://base-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "staging-11155420-0": [ + "https://optimism-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ], + "staging-421614-0": [ + "https://arbitrum-sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300" + ] + }, + "production": { + "production-137-0": [ + "https://polygon-mainnet.infura.io/v3/383117b55d614525b07f03b5979c5f19" + ], + "production-1-0": [ + "https://mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e" + ], + "production-8453-0": [ + "https://base-mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e" + ], + "production-10-0": [ + "https://optimism-mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e" + ], + "production-42161-0": [ + "https://arbitrum-mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e" + ] + } +} \ No newline at end of file diff --git a/packages/common/src/inputs/subgraphs.json b/packages/common/src/inputs/subgraphs.json new file mode 100644 index 000000000..5803987fb --- /dev/null +++ b/packages/common/src/inputs/subgraphs.json @@ -0,0 +1,58 @@ +{ + "local": { + "local-31337-0": [ + "http://127.0.0.1:8000/subgraphs/name/boson/corecomponents" + ] + }, + "testing": { + "testing-80002-0": [ + "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-amoy/latest/gn" + ], + "testing-11155111-0": [ + "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-sepolia/latest/gn" + ], + "testing-84532-0": [ + "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-base/latest/gn" + ], + "testing-11155420-0": [ + "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-optimism/latest/gn" + ], + "testing-421614-0": [ + "https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-arbitrum/latest/gn" + ] + }, + "staging": { + "staging-80002-0": [ + "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-amoy/latest/gn" + ], + "staging-11155111-0": [ + "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-sepolia/latest/gn" + ], + "staging-84532-0": [ + "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-base/latest/gn" + ], + "staging-11155420-0": [ + "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-optimism/latest/gn" + ], + "staging-421614-0": [ + "https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-arbitrum/latest/gn" + ] + }, + "production": { + "production-137-0": [ + "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-polygon/latest/gn" + ], + "production-1-0": [ + "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-ethereum/latest/gn" + ], + "production-8453-0": [ + "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-base/latest/gn" + ], + "production-10-0": [ + "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-optimism/latest/gn" + ], + "production-42161-0": [ + "https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-arbitrum/latest/gn" + ] + } +} \ No newline at end of file From bf96e4ac6f4b0350da1c3226217883e2911d21ea Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Fri, 7 Nov 2025 10:57:20 +0000 Subject: [PATCH 2/5] rework the localhost links in doc file --- docs/boson-environments.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/boson-environments.md b/docs/boson-environments.md index 11342eb8d..4d7a89ef1 100644 --- a/docs/boson-environments.md +++ b/docs/boson-environments.md @@ -84,17 +84,17 @@ The following table recaps all configurations, per environment local - +
ConfigurationBlockchainSubgraph
local-31337-0local (testnet)http://127.0.0.1:8000/subgraphs/name/boson/corecomponents
local-31337-0local (testnet)http://127.0.0.1:8000/subgraphs/name/boson/corecomponents
- - + +
dApps
Marketplacehttp://localhost:3333
Dispute Resolution Centerhttp://localhost:3333
Marketplacehttp://localhost:3333
Dispute Resolution Centerhttp://localhost:3333
- - -
Widgets
Redemptionhttp://localhost:3000/#/redeem
Commithttp://localhost:3000/#/commit
Financehttp://localhost:3000/#/finance
+Redemptionhttp://localhost:3000/#/redeem +Commithttp://localhost:3000/#/commit +Financehttp://localhost:3000/#/finance From a02e9dd3543144d17eab4141f41da8e946005ac6 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Fri, 7 Nov 2025 11:08:08 +0000 Subject: [PATCH 3/5] fix lint --- packages/common/src/configs.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/common/src/configs.ts b/packages/common/src/configs.ts index 16b97cb79..ae3250d35 100644 --- a/packages/common/src/configs.ts +++ b/packages/common/src/configs.ts @@ -68,8 +68,10 @@ export const envConfigs = { getTxExplorerUrl: chainIdToGraphTx.get(80002), subgraphUrl: subgraphsJson.testing["testing-80002-0"][0], jsonRpcUrl: rpcUrlsJson.testing["testing-80002-0"][0], - theGraphIpfsUrl: ipfsGatewaysJson.testing["testing-80002-0"].theGraphIpfsUrl, - ipfsMetadataUrl: ipfsGatewaysJson.testing["testing-80002-0"].ipfsMetadataUrl, + theGraphIpfsUrl: + ipfsGatewaysJson.testing["testing-80002-0"].theGraphIpfsUrl, + ipfsMetadataUrl: + ipfsGatewaysJson.testing["testing-80002-0"].ipfsMetadataUrl, contracts: { protocolDiamond: protocolAddresses.testing[80002].protocolDiamond, priceDiscoveryClient: From 982fefdf5aafd7dc9d0ec5d9d5be77f516d901c3 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Fri, 7 Nov 2025 11:52:14 +0000 Subject: [PATCH 4/5] wip --- docs/guides/use-with-react.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/guides/use-with-react.md b/docs/guides/use-with-react.md index 065e2a6cc..108c747e4 100644 --- a/docs/guides/use-with-react.md +++ b/docs/guides/use-with-react.md @@ -15,14 +15,18 @@ npm i @bosonprotocol/react-kit ethers The most convenient way to initialize the `core-sdk` in a react environment, is to use the `useCoreSdk` hook ```ts +import { hooks } from "@bosonprotocol/react-kit"; + // read-only -const readOnlyCoreSdk = useCoreSdk({ - envName: "testing" +const readOnlyCoreSdk = hooks.useCoreSdk({ + envName: "testing", + configId: "testing-80002-0" }); // with write capabilities -const writeCoreSdk = useCoreSdk({ +const writeCoreSdk = hooks.useCoreSdk({ envName: "testing", + configId: "testing-80002-0", web3Provider: provider // ethers provider / signer }); ``` From fb1ec66a4b808c946d477caed5b83213b0669474 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 10 Nov 2025 16:22:10 +0000 Subject: [PATCH 5/5] Initial plan (#989) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>