Skip to content

Commit f89efd4

Browse files
chore: define configuration inputs in JSON files and update the doc a… (#986)
* chore: define configuration inputs in JSON files and update the doc about environments * rework the localhost links in doc file * fix lint * wip * Initial plan (#989) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
1 parent e4dd740 commit f89efd4

6 files changed

Lines changed: 394 additions & 97 deletions

File tree

docs/boson-environments.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
[![banner](./assets/banner.png)](https://bosonprotocol.io)
2+
3+
< [Boson Protocol Widgets](../README.md)
4+
5+
## Boson Protocol Environment
6+
7+
Boson Protocol is deployed onto 3 public **environments**, to be used in different contexts, for different reasons and probably by different users:
8+
- ***testing*** is a development environment, very unstable by nature. Unless you're developing on Boson Protocol Components, you shouldn't use this environment.
9+
- ***staging*** is a validation environment, on testnet blockchain, specifically designed to test and discover the Boson Protocol Components without being on a real blockchain.
10+
- ***production*** is the production environment. Everything processed on this environment is **FOR REAL**.
11+
12+
In addition, it's possible to deploy your own environment on your local machine. We call it the ***local*** environment.
13+
14+
## Boson Protocol Configurations
15+
16+
Each environment (except ***local***) is currently deployed on several configurations, corresponding to different blockchains.
17+
18+
The dApps (Marketplace and Dispute Resolution Center) and widgets are able to switch between configurations of the same environment.
19+
20+
The following table recaps all configurations, per environment
21+
22+
<table>
23+
<tr><th>Environment</th><th></th></tr>
24+
<tr><td>production</td><td>
25+
<table>
26+
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr>
27+
<tr><td>production-137-0</td><td>Polygon</td><td>https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-polygon/latest/gn</td></tr>
28+
<tr><td>production-1-0</td><td>Ethereum Mainnet</td><td>https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-ethereum/latest/gn</td></tr>
29+
<tr><td>production-8453-0</td><td>Base</td><td>https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-base/latest/gn</td></tr>
30+
<tr><td>production-10-0</td><td>Optimism</td><td>https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-optimism/latest/gn</td></tr>
31+
<tr><td>production-42161-0</td><td>Arbitrum</td><td>https://api.0xgraph.xyz/api/public/b521f6b7-36c4-4117-8ad5-6b21c6eeb195/subgraphs/boson-arbitrum/latest/gn</td></tr>
32+
</table>
33+
<table>
34+
<tr><th>dApps</th><th></th></tr>
35+
<tr><td>Marketplace</td><td>https://bosonapp.io</td></tr>
36+
<tr><td>Dispute Resolution Center</td><td>https://disputes.bosonprotocol.io</td></tr>
37+
</table>
38+
<table>
39+
<tr><th>Widgets</th><th></th></tr>
40+
<tr><td>Redemption</td><td>https://widgets.bosonprotocol.io/#/redeem</td></tr>
41+
<tr><td>Commit</td><td>https://widgets.bosonprotocol.io/#/commit</td></tr>
42+
<tr><td>Finance</td><td>https://widgets.bosonprotocol.io/#/finance</td></tr></table>
43+
</td></tr>
44+
<tr><td>staging</td><td>
45+
<table>
46+
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr>
47+
<tr><td>staging-80002-0</td><td>Polygon Amoy (testnet)</td><td>https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-amoy/latest/gn</td></tr>
48+
<tr><td>staging-11155111-0</td><td>Ethereum Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-sepolia/latest/gn</td></tr>
49+
<tr><td>staging-84532-0</td><td>Base Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-base/latest/gn</td></tr>
50+
<tr><td>staging-11155420-0</td><td>Optimism Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-optimism/latest/gn</td></tr>
51+
<tr><td>staging-421614-0</td><td>Arbitrum Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/da9367fc-3453-4e08-824f-19fb4281b6a1/subgraphs/boson-staging-arbitrum/latest/gn</td></tr>
52+
</table>
53+
<table>
54+
<tr><th>dApps</th><th></th></tr>
55+
<tr><td>Marketplace</td><td>https://interface-staging.on-fleek.app</td></tr>
56+
<tr><td>Dispute Resolution Center</td><td>https://drcenter-staging.on-fleek.app/</td></tr>
57+
</table>
58+
<table>
59+
<tr><th>Widgets</th><th></th></tr>
60+
<tr><td>Redemption</td><td>https://widgets-staging.on-fleek.app/#/redeem</td></tr>
61+
<tr><td>Commit</td><td>https://widgets-staging.on-fleek.app/#/commit</td></tr>
62+
<tr><td>Finance</td><td>https://widgets-staging.on-fleek.app/#/finance</td></tr></table>
63+
</td></tr>
64+
<tr><td>testing</td><td>
65+
<table>
66+
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr>
67+
<tr><td>testing-80002-0</td><td>Polygon Amoy (testnet)</td><td>https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-amoy/latest/gn</td></tr>
68+
<tr><td>testing-11155111-0</td><td>Ethereum Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-sepolia/latest/gn</td></tr>
69+
<tr><td>testing-84532-0</td><td>Base Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-base/latest/gn</td></tr>
70+
<tr><td>testing-11155420-0</td><td>Optimism Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-optimism/latest/gn</td></tr>
71+
<tr><td>testing-421614-0</td><td>Arbitrum Sepolia (testnet)</td><td>https://api.0xgraph.xyz/api/public/c56471f5-5b1d-4a62-b1de-450044cb7ebc/subgraphs/boson-testing-arbitrum/latest/gn</td></tr>
72+
</table>
73+
<table>
74+
<tr><th>dApps</th><th></th></tr>
75+
<tr><td>Marketplace</td><td>https://interface-test.on-fleek.app</td></tr>
76+
<tr><td>Dispute Resolution Center</td><td>https://drcenter-test.on-fleek.app/</td></tr>
77+
</table>
78+
<table>
79+
<tr><th>Widgets</th><th></th></tr>
80+
<tr><td>Redemption</td><td>https://widgets-test.on-fleek.app/#/redeem</td></tr>
81+
<tr><td>Commit</td><td>https://widgets-test.on-fleek.app/#/commit</td></tr>
82+
<tr><td>Finance</td><td>https://widgets-test.on-fleek.app/#/finance</td></tr></table>
83+
</td></tr>
84+
<tr><td>local</td><td>
85+
<table>
86+
<tr><th>Configuration</th><th>Blockchain</th><th>Subgraph</th></tr>
87+
<tr><td>local-31337-0</td><td>local (testnet)</td><td><a href="http://127.0.0.1:8000/subgraphs/name/boson/corecomponents">http://127.0.0.1:8000/subgraphs/name/boson/corecomponents</a></td></tr>
88+
</table>
89+
<table>
90+
<tr><th>dApps</th><th></th></tr>
91+
<tr><td>Marketplace</td><td><a href="http://localhost:3333">http://localhost:3333</a></td></tr>
92+
<tr><td>Dispute Resolution Center</td><td><a href="http://localhost:3333">http://localhost:3333</a></td></tr>
93+
</table>
94+
<table>
95+
<tr><th>Widgets</th><th></th></tr>
96+
<tr><td>Redemption</td><td><a href="http://localhost:3000/#/redeem">http://localhost:3000/#/redeem</a></td></tr>
97+
<tr><td>Commit</td><td><a href="http://localhost:3000/#/commit">http://localhost:3000/#/commit</a></td></tr>
98+
<tr><td>Finance</td><td><a href="http://localhost:3000/#/finance">http://localhost:3000/#/finance</a></td></tr></table>
99+
</td></tr>
100+
</table>

docs/guides/use-with-react.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,18 @@ npm i @bosonprotocol/react-kit ethers
1515
The most convenient way to initialize the `core-sdk` in a react environment, is to use the `useCoreSdk` hook
1616

1717
```ts
18+
import { hooks } from "@bosonprotocol/react-kit";
19+
1820
// read-only
19-
const readOnlyCoreSdk = useCoreSdk({
20-
envName: "testing"
21+
const readOnlyCoreSdk = hooks.useCoreSdk({
22+
envName: "testing",
23+
configId: "testing-80002-0"
2124
});
2225

2326
// with write capabilities
24-
const writeCoreSdk = useCoreSdk({
27+
const writeCoreSdk = hooks.useCoreSdk({
2528
envName: "testing",
29+
configId: "testing-80002-0",
2630
web3Provider: provider // ethers provider / signer
2731
});
2832
```

0 commit comments

Comments
 (0)