Skip to content

Commit

Permalink
Merge branch 'jaden/platf-4012-proof-of-play-boss-support' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JadenDurnford committed Jul 23, 2024
2 parents 3cdbc38 + 4da7ede commit dcafda3
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@radix-ui/react-toggle-group": "^1.0.1",
"@radix-ui/react-tooltip": "1.0.6",
"@rainbow-me/rainbowkit": "2.1.2",
"@reservoir0x/reservoir-kit-ui": "2.6.2",
"@reservoir0x/reservoir-kit-ui": "^2.7.6",
"@sentry/nextjs": "^7.85.0",
"@tanstack/react-query": "5.20.2",
"@types/uuid": "^9.0.1",
Expand Down
26 changes: 20 additions & 6 deletions pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { WagmiProvider, http } from 'wagmi'
import { chainIdToAlchemyNetworkMap } from 'utils/chainIdToAlchemyNetworkMap'
import { _transports } from '@rainbow-me/rainbowkit/dist/config/getDefaultConfig'
import { Chain, mainnet } from 'viem/chains'
import { Chain, mainnet, skaleNebula } from 'viem/chains'

//CONFIGURABLE: Use nextjs to load your own custom font: https://nextjs.org/docs/basic-features/font-optimization
const inter = Inter({
Expand All @@ -63,14 +63,14 @@ const wagmiConfig = getDefaultConfig({
projectId: WALLET_CONNECT_PROJECT_ID,
chains: (supportedChains.length === 0 ? [mainnet] : supportedChains) as [
Chain,
...Chain[],
...Chain[]
],
ssr: true,
transports: supportedChains.reduce((transportsConfig: _transports, chain) => {
const network = chainIdToAlchemyNetworkMap[chain.id]
if (network && ALCHEMY_API_KEY) {
transportsConfig[chain.id] = http(
`https://${network}.g.alchemy.com/v2/${ALCHEMY_API_KEY}`,
`https://${network}.g.alchemy.com/v2/${ALCHEMY_API_KEY}`
)
} else {
transportsConfig[chain.id] = http() // Fallback to default HTTP transport
Expand Down Expand Up @@ -141,14 +141,14 @@ function MyApp({
setRainbowKitTheme(
rainbowDarkTheme({
borderRadius: 'small',
}),
})
)
} else {
setReservoirKitTheme(reservoirLightTheme(reservoirKitThemeOverrides))
setRainbowKitTheme(
rainbowLightTheme({
borderRadius: 'small',
}),
})
)
}
}, [theme])
Expand Down Expand Up @@ -203,14 +203,28 @@ function MyApp({
checkPollingInterval: checkPollingInterval,
paymentTokens: chainPaymentTokensMap[id],
}
},
}
),
logLevel: 4,
source: source,
normalizeRoyalties: NORMALIZE_ROYALTIES,
//CONFIGURABLE: Set your marketplace fee and recipient, (fee is in BPS)
// Note that this impacts orders created on your marketplace (offers/listings)
// marketplaceFees: ['0x03508bB71268BBA25ECaCC8F620e01866650532c:250'],
convertLink:
marketplaceChain.id === skaleNebula.id
? {
customUrl: ({ toCurrency }) => {
if (!toCurrency || toCurrency.symbol === 'ETH') {
return 'https://portal.skale.space/bridge?from=mainnet&to=green-giddy-denebola&token=eth&type=eth'
} else if (toCurrency) {
return `https://portal.skale.space/bridge?from=mainnet&to=green-giddy-denebola&token=${toCurrency.symbol}&type=erc20`
} else {
return 'https://portal.skale.space/bridge?from=mainnet&to=green-giddy-denebola'
}
},
}
: undefined,
}}
theme={reservoirKitTheme}
>
Expand Down
13 changes: 13 additions & 0 deletions utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,4 +539,17 @@ export default [
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.flowPreviewnet.checkPollingInterval,
},
{
...customChains.boss,
name: 'Boss',
lightIconUrl: '/icons/apex-pop-icon-light.svg',
darkIconUrl: '/icons/apex-pop-icon-dark.svg',
reservoirBaseUrl: reservoirChains.boss.baseApiUrl,
proxyApi: '/api/reservoir/boss',
routePrefix: 'boss',
apiKey: process.env.RESERVOIR_API_KEY,
coingeckoId: 'ethereum',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.boss.checkPollingInterval,
},
] as ReservoirChain[]
28 changes: 28 additions & 0 deletions utils/paymentTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,34 @@ export const chainPaymentTokensMap = {
name: 'WETH',
decimals: 18,
},
{
chainId: 1,
address: zeroAddress,
symbol: 'ETH',
name: 'ETH',
decimals: 18,
},
{
chainId: 10,
address: zeroAddress,
symbol: 'ETH',
name: 'Optimism ETH',
decimals: 18,
},
{
chainId: 8453,
address: zeroAddress,
symbol: 'ETH',
name: 'Base ETH',
decimals: 18,
},
{
chainId: 42161,
address: zeroAddress,
symbol: 'ETH',
name: 'Arbitrum ETH',
decimals: 18,
},
],

// polygonZkEvm
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1753,10 +1753,10 @@
dependencies:
"@react-hookz/deep-equal" "^1.0.3"

"@reservoir0x/reservoir-kit-ui@2.6.2":
version "2.6.2"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-2.6.2.tgz#7a85f3f55090657bcd1e413a3bf0592d79abea8b"
integrity sha512-fPzR+IZdU0Q8g3cFfUdqOAJpGsSHCoanF+IgsJyDU0FUXq+sapPcTZ/bDYz7+oBy9A9qyrR7fhh1rLfUs8dBpg==
"@reservoir0x/reservoir-kit-ui@^2.7.6":
version "2.7.6"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-2.7.6.tgz#3ba605655aa9d8ddbfaf2378a656e78d70159685"
integrity sha512-0DiqLDly60qlA1ohVCMLWYIx3jCYiDT9tUmVR4eyYqSrjfUDXPjAu2/tRoEw3IcazItb8V+LZdDw55eo3RCrTA==
dependencies:
"@fortawesome/fontawesome-svg-core" "^6.1.1"
"@fortawesome/free-solid-svg-icons" "^6.1.1"
Expand All @@ -1772,18 +1772,18 @@
"@radix-ui/react-toggle-group" "1.0.4"
"@radix-ui/react-tooltip" "1.0.6"
"@react-hookz/web" "^19.2.0"
"@reservoir0x/reservoir-sdk" "2.3.0"
"@reservoir0x/reservoir-sdk" "2.4.5"
"@stitches/react" "1.3.1-1"
dayjs "^1.11.4"
flatpickr "^4.6.13"
framer-motion "^6.4.2"
react-flatpickr "^3.10.13"
swr "2.0.1"

"@reservoir0x/reservoir-sdk@2.3.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-2.3.0.tgz#a0568eee033e12b10f5672fe524f4b64f87488a4"
integrity sha512-u341EVzoOVM+VfG9nSax8mpxRCXbHpiSv25Wa6DYoYg88S2HIAFGDbQea6e7a9AZHA+Whw9dKnGEmDs/Ga4FMw==
"@reservoir0x/reservoir-sdk@2.4.5":
version "2.4.5"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-2.4.5.tgz#6cf1c6c08fe418ae05ff7104ef9c6f27229f7552"
integrity sha512-26doyAOIzYtSmttup17qo1NQM19ZLPwkiqAVyoRACRJXAyktOFJwCnSqSx2gGl9QbMhkVUJ9Da3SQ397d3dI+g==
dependencies:
axios "^1.6.7"

Expand Down

0 comments on commit dcafda3

Please sign in to comment.