Skip to content

Commit

Permalink
nft checkout example (#48)
Browse files Browse the repository at this point in the history
* init work

* gitignore

* use internal stripe endpoints

* up
  • Loading branch information
microchipgnu authored Nov 27, 2023
1 parent e7a3d5f commit 5245a6f
Show file tree
Hide file tree
Showing 18 changed files with 5,851 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nft-stripe-checkout/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
NEXT_PUBLIC_NFT_CONTRACT_ADDRESS="stripeteststore.mintspace2.testnet"
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=""
NEXT_PUBLIC_MINTBASE_WALLET_URL="https://testnet.wallet.mintbase.xyz"
NEXT_PUBLIC_NETWORK="testnet"
2 changes: 2 additions & 0 deletions nft-stripe-checkout/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.next
11 changes: 11 additions & 0 deletions nft-stripe-checkout/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Get in touch

- Support: [Join the Telegram](https://tg.me/mintdev)
- Twitter: [@mintbase](https://twitter.com/mintbase)


---


1. Deploy a mintbase contract
2. Add `mintbus.testnet` as a minter to that contract
5 changes: 5 additions & 0 deletions nft-stripe-checkout/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
18 changes: 18 additions & 0 deletions nft-stripe-checkout/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config) {
// eslint-disable-next-line no-param-reassign
config.resolve.fallback = {
...config.resolve.fallback,
fs: false, // https://stackoverflow.com/a/67478653/470749
};

return config;
},

experimental: {
webpackBuildWorker: true,
},
};

module.exports = nextConfig;
38 changes: 38 additions & 0 deletions nft-stripe-checkout/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "engine-nft-checkout",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@mintbase-js/data": "0.5.0-beta.2",
"@mintbase-js/react": "0.5.0-beta.2",
"@mintbase-js/rpc": "0.5.0-beta.2",
"@mintbase-js/sdk": "0.5.0-beta.2",
"@mintbase-js/storage": "0.5.0-beta.2",
"@near-js/accounts": "^0.1.4",
"@stripe/react-stripe-js": "^2.3.1",
"@stripe/stripe-js": "^2.1.10",
"ethers": "^5",
"near-api-js": "^2.1.4",
"next": "^14",
"react": "^18.2",
"react-dom": "^18.2",
"stripe": "^14.2.0"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.1",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}
Loading

4 comments on commit 5245a6f

@vercel
Copy link

@vercel vercel bot commented on 5245a6f Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-starter-react-vite – ./starter/react-vite

starter-react-vite.vercel.app
examples-starter-react-vite-git-main-mintbase.vercel.app
examples-starter-react-vite-mintbase.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5245a6f Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-simple-minter – ./minter

examples-simple-minter-git-main-mintbase.vercel.app
examples-simple-minter.vercel.app
examples-simple-minter-mintbase.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5245a6f Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-simple-marketplace – ./simple-marketplace

examples-simple-marketplace.vercel.app
examples-simple-marketplace-git-main-mintbase.vercel.app
examples-simple-marketplace-mintbase.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5245a6f Nov 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

examples-starter – ./starter/next-js

examples-starter-git-main-mintbase.vercel.app
examples-starter-mintbase.vercel.app
mintbase-starter.vercel.app

Please sign in to comment.