https://github.com/crossmint/embedded-crosschain-demo
https://github.com/crossmint/embedded-crosschain-demo
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/crossmint/embedded-crosschain-demo
- Owner: Crossmint
- Created: 2024-03-05T23:52:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T22:59:09.000Z (about 2 years ago)
- Last Synced: 2024-12-31T04:42:37.713Z (over 1 year ago)
- Language: TypeScript
- Homepage: https://embedded-crosschain-demo.vercel.app
- Size: 4.5 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This project demonstrates using Crossmint's embedded NFT checkout with cross-chain crypto payments. In this example, rainbowkit v2.x is used to connect the browser wallet.
## Getting Started
Setup a local environment file by using the `env.sample` as a template or simply copy the below into a new file named `.env.local`.
> Note that the Crossmint `projectId` and `collectionId` values are **not** sensitive and can be shared to the client.
```
NEXT_PUBLIC_PROJECT_ID=
NEXT_PUBLIC_SOLANA_ID=
NEXT_PUBLIC_BASE_ID=
NEXT_PUBLIC_POLYGON_ID=
NEXT_PUBLIC_ENVIRONMENT="staging"
NEXT_PUBLIC_WALLET_CONNECT_ID=
```
This demo is unique in that it supports minting from three different collections to help showcase the ability to mint with ETH on other chains. Normally, you'd only have a single collection setup. Adjust as necessary to fit your needs.
Clone this repository and install dependencies:
```bash
git clone git@github.com:Crossmint/embedded-crosschain-demo.git
cd embedded-crosschain-demo
pnpm install
```
Run the app locally:
```bash
pnpm dev
```
Connect your wallet, set a destination wallet and click the Pay button.
> Once the payment process has started the send ETH transaction takes about 10 seconds to complete before the SDK proceeds to the minting step. You should consider adding a more informative UI during this step.