An open API service indexing awesome lists of open source software.

https://github.com/crossmint/embedded-crosschain-ethers-v5


https://github.com/crossmint/embedded-crosschain-ethers-v5

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

          

This project demonstrates using Crossmint's embedded NFT checkout with cross-chain crypto payments. In this example ethers v5 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="42c43e55-f92d-4b25-bc99-d8309b6e1f38"
NEXT_PUBLIC_COLLECTION_ID="f992e52c-afaa-46d5-9fba-214754383d0c"
NEXT_PUBLIC_ENVIRONMENT="staging"
```

Clone this repository and install dependencies:

```bash
git clone git@github.com:Crossmint/embedded-crosschain-ethers-v5.git

cd embedded-crosschain-ethers-v5

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.