Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
| [Contract Deployer](./contract-deployer/) | [Demo](https://contract-deployer-template.mintbase.xyz/) |
| [Minter](./minter/) | [Demo](https://minter.mintbase.xyz/) |
| [Minsta](https://github.com/Mintbase/minsta) | [Demo](https://minsta.mintbase.xyz/) |
| [Multi-Event Minsta](https://github.com/armsves/ethBerlin04) | [Demo](https://eth-berlin04.vercel.app/) |
| [Marketplace](./marketplace/) | [Demo](https://marketplace-template.mintbase.xyz/) |
| [NFT Stripe Checkout](./nft-stripe-checkout/) | [Demo](https://nft-stripe-checkout.mintbase.xyz/)
| [Token Drop](./simple-token-drop) | [Demo](https://token-drop-template.mintbase.xyz/) |
Expand Down
48 changes: 48 additions & 0 deletions minsta/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#SETUP
NEXT_PUBLIC_MINTING_CLOSED="false"
NEXT_PUBLIC_SHOW_REWARDS="true"
NEXT_PUBLIC_BASE_URL="https://testnet.mintbase.xyz"
NEXT_PUBLIC_MINTBASE_WALLET_URL="https://testnet.wallet.mintbase.xyz"
NEXT_PUBLIC_NFT_CONTRACT_ADDRESS="minsta.mintspace2.testnet"
NEXT_PUBLIC_PROXY_MINTER_CONTRACT_ADDRESS="1.minsta.mintbus.testnet"
NEXT_PUBLIC_LEGACY_PROXY_ADDRESSES="1.minsta.mintbus.testnet"
NEXT_PUBLIC_NETWORK="testnet"
NEXT_PUBLIC_APP_TITLE="Minsta Mintbase"
REPLICATE_API_TOKEN="REPLICATE_API_TOKEN"

# META
NEXT_PUBLIC_META_DESCRIPTION="Share your best moments with Mintbase and Minsta!"
NEXT_PUBLIC_META_TITLE="Mint moments on Mintbase"
NEXT_PUBLIC_TWITTER="Exploring%20unforgettable%20moments%20at%20%23Mintbase%20%40Mintbase%20%40NEARProtocol%20%23BOS%20%23NEAR%0aMint%20yours%20here%3A%20https%3A%2F%2Fminsta.mintbase.xyz"
NEXT_PUBLIC_META_IMAGE="./images/thumbnail.png"

# COLORS
COLOR_PRIMARY=F3F4F8
COLOR_SECONDARY=000
COLOR_MAIN_BACKGROUND=FFFFFF
COLOR_GRADONE=4472ad
COLOR_GRADTWO=009dea
COLOR_CARDONE=E8EAF0
COLOR_CARDTWO=049BE8
COLOR_LINKCOLOR=4f58a3
COLOR_ICON=4B9CE3
COLOR_CAMERA=FFFFFF
COLOR_MODAL_TEXT=000000
COLOR_LEADERBOARD_TEXT=000000
COLOR_HEADER_TEXT=000000
COLOR_MAIN_TEXT=000000
COLOR_FREE_USE_TEXT=0A7D6C
COLOR_PRIMARY_BTN_TEXT=000000
COLOR_SECONDARY_BTN_TEXT=000000

# TEXTS
NEXT_PUBLIC_TEXT_PRIZE_1ST_VAL="10N"
NEXT_PUBLIC_TEXT_PRIZE_2ND_VAL="5N"
NEXT_PUBLIC_TEXT_PRIZE_3RD_VAL="5N"
NEXT_PUBLIC_TEXT_PRIZE_1ST_TITLE="Top 10 on the Leaderboard"
NEXT_PUBLIC_TEXT_PRIZE_2ND_TITLE="Top 11-20 on the Leaderboard"
NEXT_PUBLIC_TEXT_PRIZE_3RD_TITLE="Most liked tweet with the hashtag MINSTA"

NEXT_PUBLIC_TEXT_ABOUT_1ST="Take a picture"
NEXT_PUBLIC_TEXT_ABOUT_2ND="Upload and it will mint as an NFT"
NEXT_PUBLIC_TEXT_ABOUT_3RD="Climb up the Leaderboard by minting"
45 changes: 45 additions & 0 deletions minsta/.env.mainnet.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#SETUP
NEXT_PUBLIC_MINTING_CLOSED="false"
NEXT_PUBLIC_SHOW_REWARDS="true"
NEXT_PUBLIC_BASE_URL="https://mintbase.xyz"
NEXT_PUBLIC_MINTBASE_WALLET_URL="https://wallet.mintbase.xyz"
NEXT_PUBLIC_NFT_CONTRACT_ADDRESS="moments.mintbase1.near"
NEXT_PUBLIC_PROXY_MINTER_CONTRACT_ADDRESS="1.minsta.mintbus.near"
NEXT_PUBLIC_LEGACY_MINTER_ADDRESSES="1.minsta.mintbus.near"
NEXT_PUBLIC_NETWORK="mainnet"
NEXT_PUBLIC_APP_TITLE="Your Name"
REPLICATE_API_TOKEN="REPLICATE_API_TOKEN"

# META
NEXT_PUBLIC_META_DESCRIPTION="Share your best moments with Mintbase and Minsta!"
NEXT_PUBLIC_META_TITLE="Mint moments on Mintbase"
NEXT_PUBLIC_TWITTER="Exploring%20unforgettable%20moments%20at%20%23Mintbase%20%40Mintbase%20%40NEARProtocol%20%23BOS%20%23NEAR%0aMint%20yours%20here%3A%20https%3A%2F%2Fminsta.mintbase.xyz"
NEXT_PUBLIC_META_IMAGE="./images/thumbnail.png"

# COLORS
COLOR_PRIMARY=F3F4F8
COLOR_SECONDARY=000
COLOR_MAIN_BACKGROUND=FFFFFF
COLOR_GRADONE=4472ad
COLOR_GRADTWO=009dea
COLOR_CARDONE=E8EAF0
COLOR_CARDTWO=049BE8
COLOR_LINKCOLOR=4f58a3
COLOR_ICON=4B9CE3
COLOR_CAMERA=FFFFFF
COLOR_MODAL_TEXT=000000
COLOR_LEADERBOARD_TEXT=000000
COLOR_HEADER_TEXT=000000
COLOR_MAIN_TEXT=000000

# TEXTS
NEXT_PUBLIC_TEXT_PRIZE_1ST_VAL="10N"
NEXT_PUBLIC_TEXT_PRIZE_2ND_VAL="5N"
NEXT_PUBLIC_TEXT_PRIZE_3RD_VAL="5N"
NEXT_PUBLIC_TEXT_PRIZE_1ST_TITLE="Top 10 on the Leaderboard"
NEXT_PUBLIC_TEXT_PRIZE_2ND_TITLE="Top 11-20 on the Leaderboard"
NEXT_PUBLIC_TEXT_PRIZE_3RD_TITLE="Most liked tweet with the hashtag MINSTA"

NEXT_PUBLIC_TEXT_ABOUT_1ST="Take a picture"
NEXT_PUBLIC_TEXT_ABOUT_2ND="Upload and it will mint as an NFT"
NEXT_PUBLIC_TEXT_ABOUT_3RD="Climb up the Leaderboard by minting"
3 changes: 3 additions & 0 deletions minsta/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
37 changes: 37 additions & 0 deletions minsta/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts

.env
17 changes: 17 additions & 0 deletions minsta/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Hackaton Center @ EthBerlin04 - Powered by dRPC

### The problem Hackaton Center - Powered by dRPC solves

We wanted to create a cool collectible for hackaton enthusiasts that would evolve as they collect the Hackaton Poap's (QR for simplicity of the MVP)
Each hackaton will have a POAP (QR for simplicity of the MVP) that will redirect to mint the NFT, if you have already have an NFT minted it will raise your level and evolve your NFT giving you a nice collectible NFT as a prize.

### Challenges you ran into
Some problems with the connection of the contract to the frontend since the contract is v2 and the utils are not updated yet we had to manually update and import some parts of the updated code.

### Technology used
Rust for the contract
React for frontend
Mintbase-Js minsta template for starter

install by pnpm install
run locally with pnpm run dev
100 changes: 100 additions & 0 deletions minsta/generate-css.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
// generate-css.js
const fs = require("fs");
const path = require("path");
require("dotenv").config(); // Load environment variables from .env file

const colors = {
primary: process.env.COLOR_PRIMARY || "F3F4F8",
secondary: process.env.COLOR_SECONDARY || "000",
mainBg: process.env.COLOR_MAIN_BACKGROUND || "fdfaa7",
gradOne: process.env.COLOR_GRADONE || "4472ad",
gradTwo: process.env.COLOR_GRADTWO || "009dea",
cardOne: process.env.COLOR_CARDONE || "E8EAF0",
cardTwo: process.env.COLOR_CARDTWO || "049BE8",
linkColor: process.env.COLOR_LINKCOLOR || "4f58a3",
icon: process.env.COLOR_ICON || "4B9CE3",
camera: process.env.COLOR_CAMERA || "FFFFFF",
modalText: process.env.COLOR_MODAL_TEXT || "000000",
leaderboardText: process.env.COLOR_LEADERBOARD_TEXT || "000000",
headerText: process.env.COLOR_HEADER_TEXT || "000000",
mainText: process.env.COLOR_MAIN_TEXT || "000000",
freeUseText: process.env.COLOR_FREE_USE_TEXT || "0A7D6C",
primaryBtnText: process.env.COLOR_PRIMARY_BTN_TEXT || "FFFFFF",
secondaryBtnText: process.env.COLOR_SECONDARY_BTN_TEXT || "000000",
lightBlue: process.env.COLOR_LIGHT_BLUE || "50b0d9",
};

const css = `


.nws-modal-wrapper .nws-modal {
height: auto !important;
}

.nws-modal-wrapper .nws-modal .modal-right {
display: none !important;
}

.nws-modal-wrapper .nws-modal .modal-left {
width: 100%;
border-right: 1px solid
var(--wallet-selector-sidebar-border-color, var(--sidebar-border-color));
padding: 32px 24px;
height: 100%;
overflow: auto;
text-align: center;
}
.nws-modal-wrapper .nws-modal {
height: 215px;
}
.wallet-options-wrapper {
width: 100%;
display: flex;
justify-items: center;
align-items: center;
justify-content: center;
}
.nws-modal-wrapper .nws-modal > .modal-left > div:nth-child(2) {
display: flex;
justify-items: center;
text-align: center;
width: 100%;
}

.nws-modal-wrapper
.modal-left
.wallet-options-wrapper
.options-list-section
.options-list-section-header {
display: none;
}



:root {
--primary: #${colors.primary};
--secondary: #${colors.secondary};
--mainBg: #${colors.mainBg};
--gradOne: #${colors.gradOne};
--gradTwo: #${colors.gradTwo};
--cardOne: #${colors.cardOne};
--cardTwo: #${colors.cardTwo};
--linkColor: #${colors.linkColor};
--icon: #${colors.icon};
--camera: #${colors.camera};
--modalText: #${colors.modalText};
--leaderboardText: #${colors.leaderboardText};
--headerText: #${colors.headerText};
--mainText: #${colors.mainText};
--freeUseText: #${colors.freeUseText};
--bgFreeUse: #${colors.freeUseText}1A;
--primaryBtnText: #${colors.primaryBtnText};
--secondaryBtnText: #${colors.secondaryBtnText};
--lightBlue: #${colors.lightBlue};
}`;

const outputPath = path.resolve(__dirname, "src/style/global.css");

fs.writeFileSync(outputPath, css);

console.log(`CSS file generated at: ${outputPath}`);
15 changes: 15 additions & 0 deletions minsta/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
images: { domains: ["arweave.net", 'image-cache-service-z3w7d7dnea-ew.a.run.app'] },
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;
},
};

module.exports = nextConfig;
67 changes: 67 additions & 0 deletions minsta/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "Mintbase-Templates-Minsta",
"keywords": [
"templates",
"mintbase",
"web3",
"nextjs",
"react",
"selfie",
"minting"
],
"repository": "https://github.com/mintbase/minsta.git",
"homepage": "https;//templates.mintbase.xyz/minsta",
"author": "Mintbase Team <[email protected]>",
"version": "0.1.0",
"private": true,
"scripts": {
"build:css": "node generate-css.js",
"build": "pnpm run build:css && next build",
"dev:css": "node generate-css.js && next dev",
"dev": "pnpm run dev:css",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.5.2",
"@fortawesome/free-brands-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.2",
"@mintbase-js/auth": "0.6.0-beta.5",
"@mintbase-js/react": "0.6.0-beta.5",
"@mintbase-js/rpc": "0.6.0-beta.5",
"@mintbase-js/sdk": "0.6.0-beta.5",
"@mintbase-js/storage": "0.6.0-beta.5",
"@near-wallet-selector/modal-ui": "^8.2.1",
"@tanstack/react-query": "^4.35.3",
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"@typescript-eslint/eslint-plugin": "^7.10.0",
"autoprefixer": "10.4.14",
"cross-fetch": "^4.0.0",
"data-uri-to-buffer": "^5.0.1",
"dotenv": "^16.3.1",
"eslint": "8.46.0",
"eslint-config-next": "13.4.13",
"framer-motion": "^10.16.4",
"graphql": "^16.7.1",
"graphql-request": "^6.1.0",
"isomorphic-unfetch": "^3.1.0",
"lodash": "^4.17.21",
"near-api-js": "2.1.4",
"next": "13.4.13",
"postcss": "8.4.27",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-hot-toast": "^2.4.1",
"react-inlinesvg": "^4.0.4",
"react-webcam": "^7.1.1",
"tailwindcss": "3.3.3",
"typescript": "5.1.6",
"usehooks-ts": "^2.9.1"
},
"devDependencies": {
"@types/lodash": "^4.14.197",
"@types/node": "20.4.9",
"encoding": "^0.1.13"
}
}
Loading