https://github.com/crossmint/embedded-crosschain-ethers-v5
https://github.com/crossmint/embedded-crosschain-ethers-v5
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/crossmint/embedded-crosschain-ethers-v5
- Owner: Crossmint
- Created: 2024-01-25T02:18:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T20:01:26.000Z (over 2 years ago)
- Last Synced: 2024-12-31T04:42:42.859Z (over 1 year ago)
- Language: TypeScript
- Size: 3.28 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 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.