Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marketplace #74

Merged
merged 123 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
b4d1f4d
update packages
RedBeardEth Dec 5, 2023
9692188
init market components
RedBeardEth Dec 5, 2023
98e5ed2
Merge branch 'testnet' into marketplace
RedBeardEth Dec 6, 2023
aff8e74
add listing modal
RedBeardEth Dec 6, 2023
8369229
fix listing write and styling
RedBeardEth Dec 6, 2023
cc63db4
updates to listing modal and api
RedBeardEth Dec 7, 2023
fe8d724
update packages
RedBeardEth Dec 7, 2023
3f19a6b
add initial buy modal
RedBeardEth Dec 8, 2023
d3834f7
fix token display in listing
RedBeardEth Dec 10, 2023
86da1f1
Merge branch 'main' into marketplace
RedBeardEth Dec 10, 2023
816102f
upgrade packages, updates to buy, list, edit modal
RedBeardEth Dec 11, 2023
e5126e9
fix id issue
RedBeardEth Dec 11, 2023
e24e87e
update for market order event entity mode
RedBeardEth Dec 11, 2023
1c6da44
edit
ponderingdemocritus Dec 11, 2023
3622b21
pass
ponderingdemocritus Dec 11, 2023
58c1736
cleanup
ponderingdemocritus Dec 12, 2023
f325765
styles
ponderingdemocritus Dec 12, 2023
7f1c2ad
collection polish
ponderingdemocritus Dec 12, 2023
460d64d
indexer, order, buy, edit, cancel updates
RedBeardEth Dec 12, 2023
31b1ddd
Merge remote-tracking branch 'origin/loaf-edit' into marketplace
RedBeardEth Dec 12, 2023
860aa0f
fix most bigint issues
RedBeardEth Dec 13, 2023
8eeedad
working buy modal
RedBeardEth Dec 13, 2023
96afb5e
fix merge build issue
RedBeardEth Dec 13, 2023
5d61952
fix tx confirmation state - add various listing parts
RedBeardEth Dec 13, 2023
73959db
listing modals ready
RedBeardEth Dec 13, 2023
bbdb015
style
ponderingdemocritus Dec 14, 2023
442ca83
fix buy modal prepare for price token update
RedBeardEth Dec 14, 2023
9ad6af3
modal cleanup
ponderingdemocritus Dec 14, 2023
f657652
changes for token price
RedBeardEth Dec 15, 2023
5a2131a
fix tokens indexer
RedBeardEth Dec 15, 2023
ad3b95d
add expiration to token
RedBeardEth Dec 15, 2023
ac08234
add OrderActionType to market indexer
RedBeardEth Dec 15, 2023
da34ccb
update webhook branch
RedBeardEth Dec 15, 2023
1164062
edit inngest build query
RedBeardEth Dec 15, 2023
2dbb58d
sort by asc price working
RedBeardEth Dec 15, 2023
98dc4cb
update, remove unused dockerfiles
RedBeardEth Dec 17, 2023
2627a43
add trpc client for RSC
RedBeardEth Dec 18, 2023
844892f
fix price filtering
RedBeardEth Dec 19, 2023
8f5dd01
type: module
RedBeardEth Dec 19, 2023
9e9337c
update token price accept offer indexer
RedBeardEth Dec 19, 2023
e5e29f0
add lords price
ponderingdemocritus Dec 19, 2023
38aa930
fix list for beast contract, half add buy modal to grid page
RedBeardEth Dec 19, 2023
df4e194
working grid page purhcase
RedBeardEth Dec 20, 2023
3c27b27
profile page and polish mak
ponderingdemocritus Dec 20, 2023
565361d
conflict
ponderingdemocritus Dec 20, 2023
21f7679
usd price, listing edit if owner on grid
RedBeardEth Dec 20, 2023
1b9cdef
add list modal, fix insufficient balance c
RedBeardEth Dec 20, 2023
87f01ab
update env
RedBeardEth Dec 20, 2023
bea5332
require wallet connection and fix error states
RedBeardEth Dec 20, 2023
ebb21db
fix sidemenu and token refetch
RedBeardEth Dec 20, 2023
24bc4ac
list view l2 token refetch
RedBeardEth Dec 20, 2023
a5823a7
default price view on table, tidy up, fix beasts
RedBeardEth Dec 20, 2023
08c1cd5
fix minor issues
RedBeardEth Dec 20, 2023
66cb152
fix avnu link and input zero error
RedBeardEth Dec 20, 2023
8857640
remove dead code
RedBeardEth Dec 20, 2023
6ef1cc0
fix build
RedBeardEth Dec 20, 2023
120f504
remove GT mint
RedBeardEth Dec 20, 2023
28d4480
decode token name
RedBeardEth Dec 20, 2023
bbb6976
update packages
RedBeardEth Dec 29, 2023
fd98c92
styles
ponderingdemocritus Dec 29, 2023
d09252a
Merge branch 'marketplace' of https://github.com/BibliothecaDAO/Realm…
RedBeardEth Dec 29, 2023
8e57d88
polish
ponderingdemocritus Dec 29, 2023
87e8174
account polish
ponderingdemocritus Dec 30, 2023
51f64a4
fix listing modals
ponderingdemocritus Dec 30, 2023
cf3db84
Merge branch 'marketplace' of https://github.com/BibliothecaDAO/Realm…
RedBeardEth Dec 31, 2023
ee2a2e0
package update
RedBeardEth Dec 31, 2023
d24690f
fix modal data
ponderingdemocritus Jan 1, 2024
83f8863
polishing
ponderingdemocritus Jan 1, 2024
dcee353
Merge branch 'marketplace' of https://github.com/BibliothecaDAO/Realm…
RedBeardEth Jan 2, 2024
558047e
improved cursor pagination
RedBeardEth Jan 3, 2024
41611db
initial changes for attribute indexing l2 nfts
RedBeardEth Jan 4, 2024
cd69f17
working attribute indexing and fetching from list page
RedBeardEth Jan 9, 2024
aa4d154
test deploy attributes
RedBeardEth Jan 11, 2024
12c0577
add token counts to attributes
RedBeardEth Jan 11, 2024
69f1d65
update packages
RedBeardEth Jan 11, 2024
7f67d5f
update testnet to sepolia
RedBeardEth Jan 12, 2024
e846b1f
update spolia apibara env file
RedBeardEth Jan 12, 2024
ba910fb
correct GT address sepolia
RedBeardEth Jan 12, 2024
d6640ac
log key in idexer
RedBeardEth Jan 12, 2024
15d760c
update indexer for GT hack no image
RedBeardEth Jan 12, 2024
1b9ecb7
fix
RedBeardEth Jan 12, 2024
e76d44b
correct table name market listings
RedBeardEth Jan 12, 2024
28174cd
changes for upgrade trpc @next react-query v5
RedBeardEth Jan 13, 2024
28ed2a9
wagmi v2 init
RedBeardEth Jan 14, 2024
7ebba67
rewrite collection pages, start bridge cleanup
RedBeardEth Jan 15, 2024
a1b166f
cleanup, fix build
RedBeardEth Jan 15, 2024
a0dc409
fix walletconnect projectid
RedBeardEth Jan 15, 2024
40cc44f
fixbuild
RedBeardEth Jan 15, 2024
de6a82d
add rainbowkit styles
RedBeardEth Jan 15, 2024
4d19b89
payment pool
ponderingdemocritus Jan 15, 2024
3aa821e
mege
ponderingdemocritus Jan 15, 2024
8a74c68
fix staking container for wagmi
RedBeardEth Jan 15, 2024
3d17b58
clean up collections folder
RedBeardEth Jan 15, 2024
3983288
airdrop claim
ponderingdemocritus Jan 15, 2024
029dc00
merge
ponderingdemocritus Jan 15, 2024
8b2b1c8
fix build errors
RedBeardEth Jan 15, 2024
3e7d068
update packages
RedBeardEth Jan 15, 2024
575d62d
update apibara mainnet env
RedBeardEth Jan 15, 2024
40e1e55
update postgres-sink
RedBeardEth Jan 15, 2024
d0d949b
update token indexer
RedBeardEth Jan 15, 2024
db72496
Update README.md
RedBeardEth Jan 15, 2024
84a8869
update sink-webhook
RedBeardEth Jan 15, 2024
67f9ff9
Merge remote-tracking branch 'origin/mainnet/marketplace' into market…
RedBeardEth Jan 15, 2024
99d7326
update mainnet metadata indexer
RedBeardEth Jan 16, 2024
93c5be8
update mainnet inngest key
RedBeardEth Jan 16, 2024
f329bc2
log in metadata fetch
RedBeardEth Jan 16, 2024
e9ae0bf
fix blast url
RedBeardEth Jan 16, 2024
231cdf8
update tokenattribute indexer
RedBeardEth Jan 16, 2024
4bd45c8
metadata fetch
RedBeardEth Jan 16, 2024
412693c
working 1 attribute filter
RedBeardEth Jan 17, 2024
e4e5883
fix mint page, GT,
RedBeardEth Jan 17, 2024
6dc9b5a
fix listing delete price to 0
RedBeardEth Jan 17, 2024
cff202e
fix input
ponderingdemocritus Jan 17, 2024
a285e9f
update merkle
ponderingdemocritus Jan 17, 2024
e191a40
package update
RedBeardEth Jan 17, 2024
9219ad6
Merge branch 'mainnet/marketplace' into marketplace
RedBeardEth Jan 17, 2024
7e9ec4e
drop
ponderingdemocritus Jan 19, 2024
75d2286
Merge branch 'marketplace' of https://github.com/BibliothecaDAO/Realm…
ponderingdemocritus Jan 19, 2024
bda95ca
add test merkle
ponderingdemocritus Jan 19, 2024
8a19ec4
conditional
ponderingdemocritus Jan 19, 2024
2d0e12f
meta
ponderingdemocritus Jan 19, 2024
5acc99b
claiming bool
ponderingdemocritus Jan 19, 2024
3cd6f60
added payment pool mainnet
ponderingdemocritus Jan 19, 2024
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
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ AUTH_SECRET='supersecret'
AUTH_DISCORD_ID=''
AUTH_DISCORD_SECRET=''

NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=
NEXT_PUBLIC_ETHPLORER_APIKEY=
25 changes: 25 additions & 0 deletions .env.sepolia
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
RESERVOIR_API_KEY=
NEXT_PUBLIC_ALCHEMY_API=
NEXT_PUBLIC_LOCAL_API=http://localhost:3000/api/
NEXT_PUBLIC_IS_TESTNET=true
NEXT_PUBLIC_STARKNET_CONTRACT_ADDRESS=0xde29d060D45901Fb19ED6C6e959EB22d8626708e
NEXT_PUBLIC_ETHERSCAN_URL=https://goerli.etherscan.io
NEXT_PUBLIC_VOYAGER_URL=https://goerli.voyager.online
NEXT_PUBLIC_STARKSCAN_URL=https://testnet.starkscan.co
NEXT_PUBLIC_SUBGRAPH_NAME=redbeardeth/starknet-bridge-goerli
NEXT_PUBLIC_APIBARA_HANDLE=goerli-graphql
NEXT_PUBLIC_REALMS_SUBGRAPH_NAME=bibliothecadao/goerli-realms


# @see https://next-auth.js.org/configuration/options#nextauth_url
AUTH_URL='http://localhost:3000'

# You can generate the secret via 'openssl rand -base64 32' on Unix
# @see https://next-auth.js.org/configuration/options#secret
AUTH_SECRET='supersecret'

# Preconfigured Discord OAuth provider, works out-of-the-box
# @see https://next-auth.js.org/providers/discord
AUTH_DISCORD_ID='test'
AUTH_DISCORD_SECRET='test'
# DATABASE_URL=mysql://USERNAME:[email protected]/DATABASE_NAME?ssl={"rejectUnauthorized":true}
2 changes: 1 addition & 1 deletion .github/workflows/deploySubgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

strategy:
matrix:
type: ["mainnet", "goerli"]
type: ["mainnet", "sepolia"]

env:
TYPE: ${{ matrix.type }}
Expand Down
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"eslint.rules.customizations": [{ "rule": "*", "severity": "warn" }],
Expand All @@ -19,4 +21,7 @@
"deno.enable": false,
"deno.lint": false,
"deno.unstable": false
/*"deno.enable": true,
"deno.lint": true,
"deno.unstable": true*/
}
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ Realms.World is the information and activity hub for entrance to the Realms Auto
- [`packages/subgraph`](https://bibliothecadao.github.io/subgraph) - The L1 Starknet Messaging Indexer for Bridge Transactions
- [`packages/apibara`](https://bibliothecadao.github.io/starknet-indexer) = The L2 indexer for Bridge and NFT Transactions

### Running the app

This will launch storybook and the Realms.World client.

```bash
bun i
```
Expand All @@ -38,7 +42,7 @@ bun run dev

## Enviroment Variables

Depending on which environment you want to run, either copy the values from `.env.goerli` or `.env.mainnet` into your `.env` file.
Depending on which environment you want to run, either copy the values from `.env.sepolia` or `.env.mainnet` into your `.env` file.

### Documentation

Expand All @@ -57,7 +61,7 @@ We will review your contribution and provide feedback. Once your changes have be

### To add a Game

Check out the docs at [Add Data Docs](https://docs.realms.world/data)
Check out the docs at [Add Data Docs](https://docs.realms.world/data) - WIP for Loot Survivor mods

### License

Expand Down
6 changes: 0 additions & 6 deletions apps/auth-proxy/.tsconfig

This file was deleted.

3 changes: 3 additions & 0 deletions apps/auth-proxy/nitro.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default defineNitroConfig({
logLevel: -999,
});
8 changes: 4 additions & 4 deletions apps/auth-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@auth/core": "^0.18.4"
"@auth/core": "^0.21.0"
},
"devDependencies": {
"@realms-world/eslint-config": "workspace:*",
"@realms-world/prettier-config": "workspace:*",
"@realms-world/tailwind-config": "workspace:*",
"@realms-world/tsconfig": "workspace:*",
"eslint": "^8.55.0",
"eslint": "^8.56.0",
"nitropack": "^2.8.1",
"prettier": "^3.1.0",
"typescript": "^5.3.2"
"prettier": "^3.2.4",
"typescript": "^5.3.3"
},
"eslintConfig": {
"root": true,
Expand Down
28 changes: 15 additions & 13 deletions apps/auth-proxy/routes/[...auth].ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ import { Auth } from "@auth/core";
import Discord from "@auth/core/providers/discord";
import { eventHandler, toWebRequest } from "h3";

export default eventHandler(async (event) =>
Auth(toWebRequest(event), {
secret: process.env.AUTH_SECRET,
trustHost: !!process.env.VERCEL,
redirectProxyUrl: process.env.AUTH_REDIRECT_PROXY_URL,
providers: [
Discord({
clientId: process.env.AUTH_DISCORD_ID,
clientSecret: process.env.AUTH_DISCORD_SECRET,
}),
],
}),
);
export default eventHandler(async (event) => {
if (!event.context.matchedRoute.params.auth.endsWith("inngest")) {
return Auth(toWebRequest(event), {
secret: process.env.AUTH_SECRET,
trustHost: !!process.env.VERCEL,
redirectProxyUrl: process.env.AUTH_REDIRECT_PROXY_URL,
providers: [
Discord({
clientId: process.env.AUTH_DISCORD_ID,
clientSecret: process.env.AUTH_DISCORD_SECRET,
}),
],
});
}
});
6 changes: 6 additions & 0 deletions apps/auth-proxy/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "@realms-world/tsconfig/base.json",
"include": [
"routes"
]
}
2 changes: 1 addition & 1 deletion apps/docs/frontend/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ bun run dev

## Enviroment Variables

Depending on which environemnt you want to run, either copy the values from `.env.goerli` or `.env.mainnet` into your `.env` file.
Depending on which environemnt you want to run, either copy the values from `.env.sepolia` or `.env.mainnet` into your `.env` file.

## Indexers

Expand Down
38 changes: 19 additions & 19 deletions apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,24 @@
},
"dependencies": {
"@expo/metro-config": "^0.10.7",
"@shopify/flash-list": "1.6.1",
"@tanstack/react-query": "4.35.7",
"@trpc/client": "^10.44.1",
"@trpc/react-query": "^10.44.1",
"@trpc/server": "^10.44.1",
"expo": "^49.0.13",
"@shopify/flash-list": "1.6.3",
"@tanstack/react-query": "5.17.15",
"@trpc/client": "^10.45.0",
"@trpc/react-query": "^10.45.0",
"@trpc/server": "^10.45.0",
"expo": "^49.0.21",
"expo-constants": "~14.4.2",
"expo-linking": "~6.0.0",
"expo-router": "2.0.9",
"expo-router": "2.0.14",
"expo-splash-screen": "~0.22.0",
"expo-status-bar": "~1.7.1",
"nativewind": "^2.0.11",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.72.6",
"react-native-gesture-handler": "~2.13.3",
"react-native-safe-area-context": "4.7.2",
"react-native-screens": "~3.26.0",
"react-native": "0.73.0",
"react-native-gesture-handler": "~2.14.0",
"react-native-safe-area-context": "4.8.0",
"react-native-screens": "~3.29.0",
"superjson": "2.2.1"
},
"devDependencies": {
Expand All @@ -41,16 +41,16 @@
"@realms-world/prettier-config": "workspace:*",
"@realms-world/tailwind-config": "workspace:*",
"@realms-world/tsconfig": "workspace:*",
"@babel/core": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/runtime": "^7.23.4",
"@babel/core": "^7.23.6",
"@babel/preset-env": "^7.23.6",
"@babel/runtime": "^7.23.6",
"@expo/config-plugins": "^7.2.5",
"@types/babel__core": "^7.20.5",
"@types/react": "^18.2.42",
"eslint": "^8.55.0",
"prettier": "^3.1.0",
"tailwindcss": "3.3.5",
"typescript": "^5.3.2"
"@types/react": "^18.2.48",
"eslint": "^8.56.0",
"prettier": "^3.2.4",
"tailwindcss": "3.4.1",
"typescript": "^5.3.3"
},
"eslintConfig": {
"root": true,
Expand Down
76 changes: 38 additions & 38 deletions apps/homepages/realms-adventurers/apolloClient.ts
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
import {
ApolloClient,
InMemoryCache,
ApolloLink,
createHttpLink,
} from '@apollo/client';
import { MultiAPILink } from '@habx/apollo-multi-endpoint-link';
ApolloClient,
ApolloLink,
createHttpLink,
InMemoryCache,
} from "@apollo/client";
import { MultiAPILink } from "@habx/apollo-multi-endpoint-link";

const APOLLO_ENDPOINTS: { [index: string]: { [index: string]: string } } = {
mainnet: {
realms:
'https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/realms',
starkIndexer: 'https://sea-turtle-app-cm9oe.ondigitalocean.app/graphql',
ecosystem:
'https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/loot-ecosystem',
},
goerli: {
realms:
'https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/realms-goerli',
starkIndexer: 'https://dev-indexer-gu226.ondigitalocean.app/graphql',
ecosystem:
'https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/loot-ecosystem-goerli',
},
mainnet: {
realms:
"https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/realms",
starkIndexer: "https://sea-turtle-app-cm9oe.ondigitalocean.app/graphql",
ecosystem:
"https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/loot-ecosystem",
},
sepolia: {
realms:
"https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/realms-goerli",
starkIndexer: "https://dev-indexer-gu226.ondigitalocean.app/graphql",
ecosystem:
"https://api.thegraph.com/subgraphs/name/bibliothecaforadventurers/loot-ecosystem-goerli",
},
};
const network = process.env.NEXT_PUBLIC_NETWORK || 'goerli';
const network = process.env.NEXT_PUBLIC_NETWORK || "goerli";

export default new ApolloClient({
link: ApolloLink.from([
new MultiAPILink({
endpoints: APOLLO_ENDPOINTS[network],
httpSuffix: '',
createHttpLink: () => createHttpLink(),
}),
]),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {},
},
Realm: {
keyFields: ['realmId'],
},
},
link: ApolloLink.from([
new MultiAPILink({
endpoints: APOLLO_ENDPOINTS[network],
httpSuffix: "",
createHttpLink: () => createHttpLink(),
}),
});
]),
cache: new InMemoryCache({
typePolicies: {
Query: {
fields: {},
},
Realm: {
keyFields: ["realmId"],
},
},
}),
});
4 changes: 2 additions & 2 deletions apps/nextjs/next.config.mjs → apps/nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Importing env files here to validate on build
import "./src/env.mjs";
import "@realms-world/auth/env.mjs";
import "./src/env.js";
import "@realms-world/auth/env.js";

import createMDX from "@next/mdx";

Expand Down
Loading