From 0133f7db0a7494617bc173a56be5140464e20077 Mon Sep 17 00:00:00 2001 From: Dennis Zoma Date: Mon, 5 Feb 2024 08:53:34 +0100 Subject: [PATCH] chore: Update README.md --- README.md | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 8fa849c..fc83511 100644 --- a/README.md +++ b/README.md @@ -187,29 +187,9 @@ Spinning up a deployment via Vercel is pretty straightforward as the necessary s [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fnext.js%2Ftree%2Fcanary%2Fexamples%2Fhello-world&env=NEXT_PUBLIC_DEFAULT_CHAIN&envDescription=Insert%20%60alephzero-testnet%60%20or%20%60shibuya%60&envLink=https%3A%2F%2Fgithub.com%2Fscio-labs%2Finkathon%23environment-variables&project-name=inkathon&repository-name=inkathon&redirect-url=https%3A%2F%2Fgithub.com%2Fscio-labs%2Finkathon&demo-url=https%3A%2F%2Finkathon.xyz) -### Environment Variables - -One key element making this boilerplate so flexible is the usage of environment variables to configure the active network in the frontend. This is done by setting the `NEXT_PUBLIC_DEFAULT_CHAIN` variable in the `frontend/.env.local` file, or in the Vercel deployment settings respectively. - -
-All Supported Chain Constants - -| Network Identifier | Name | Type | -| ------------------- | ----------------------- | ------- | -| `development` | ️Local Development Node | Testnet | -| `alephzero-testnet` | Aleph Zero Testnet | Testnet | -| `rococo` | Rococo | Testnet | -| `shibuya` | Shibuya Testnet | Testnet | -| `shiden` | Shiden | Mainnet | -| `alephzero` | Aleph Zero | Mainnet | -| `astar` | Astar | Mainnet | - -Source: https://github.com/scio-labs/use-inkathon/blob/main/src/chains.ts - -> [!NOTE] -> Chains can also be supplied manually by creating a [`SubstrateChain`](https://github.com/scio-labs/use-inkathon/blob/main/src/chains.ts#L4) object. If you think a chain is missing, please open an issue or PR. +Alternatively, you can also use the provided Dockerfiles to deploy to any hosting provider of your choice. Read more [here](https://github.com/scio-labs/inkathon/pull/50#issue-2041934251). -
+### Environment Variables All environment variables are imported from `process.env` in [`frontend/src/config/environment.ts`](https://github.com/scio-labs/inkathon/blob/main/frontend/src/config/environment.ts) and re-exported from there. For improved type safety, Always only import environment variables from `@/config/environment` and never directly from `process.env`. @@ -222,6 +202,15 @@ All environment variables are imported from `process.env` in [`frontend/src/conf \*️⃣ Required +#### Supported Chains + +One key element making this boilerplate so flexible is the usage of environment variables to configure the active network in the frontend. This is done by setting the `NEXT_PUBLIC_DEFAULT_CHAIN` variable in the `frontend/.env.local` file, or in the deployment settings respectively. + +If your network is not provided by the `use-inkathon` library, you can add it manually by creating a new [`SubstrateChain`](https://github.com/scio-labs/use-inkathon/blob/main/src/chains.ts#L4) object. If you think a chain is missing, please open an issue or PR. + +> [!IMPORTANT] +> All supported chain constants [can be found here](https://github.com/scio-labs/use-inkathon/blob/main/src/chains.ts) in the `scio-labs/use-inkathon` repository. + ### Contract Deployment In the [Getting Started](#getting-started) section above, we've already deployed the sample `Greeter` contract on a local node. To target a live network, we can use the `CHAIN` environment variable when running the `deploy` script.