Skip to content

Commit

Permalink
Merge branch 'jaden/apechain-support' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JadenDurnford committed Sep 5, 2024
2 parents eff2526 + 8d3d889 commit b6543d2
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 61 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Reservoir Market v2 is lightly configurable with the configurations below. You c
| NEXT_PUBLIC_DATADOG_CLIENT_TOKEN | `false` | Datadog client token for configuring analytics. | pubdaddswww4dad449dadas12ada123bae |
| NEXT_PUBLIC_DATADOG_APPLICATION_ID | `false` | Datadog application id for configuring analytics. | 123cccbb-1234-1111-4411-abc12345612afgds |
| NEXT_PUBLIC_MARKETPLACE_SOURCE | `false` | Marketplace source, used to attribute a source to orders. Must be a valid domain | reservoir.tools |
| NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID | `true` | WalletConnect project ID required for wallet connectivity. | d3f452b37a8f91ca7732e89bd3f67c12 |


In addition to the configuration above we've also added comments prefixed with `CONFIGURABLE:` throughout the app pointing out some pieces of code where you could customize functionality. After cloning the app make sure to search the repo for the aforementioned prefix.

Expand Down
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.7.12",
"@reservoir0x/reservoir-kit-ui": "^2.7.15",
"@sentry/nextjs": "^7.85.0",
"@tanstack/react-query": "5.20.2",
"@types/uuid": "^9.0.1",
Expand Down
57 changes: 57 additions & 0 deletions public/icons/apechain-icon-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions public/icons/apechain-icon-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 22 additions & 35 deletions utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -513,32 +513,6 @@ export default [
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.sei.checkPollingInterval,
},
{
...customChains.b3Testnet,
name: 'B3 Testnet',
lightIconUrl: '/icons/b3-testnet-icon-light.svg',
darkIconUrl: '/icons/b3-testnet-icon-dark.svg',
reservoirBaseUrl: reservoirChains.b3Testnet.baseApiUrl,
proxyApi: '/api/reservoir/b3Testnet',
routePrefix: 'b3Testnet',
apiKey: process.env.RESERVOIR_API_KEY,
coingeckoId: 'ethereum',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.b3Testnet.checkPollingInterval,
},
{
...customChains.flowPreviewnet,
name: 'Flow Previewnet',
lightIconUrl: '/icons/flow-previewnet-icon-light.svg',
darkIconUrl: '/icons/flow-previewnet-icon-dark.svg',
reservoirBaseUrl: reservoirChains.flowPreviewnet.baseApiUrl,
proxyApi: '/api/reservoir/flowPreviewnet',
routePrefix: 'flowPreviewnet',
apiKey: process.env.RESERVOIR_API_KEY,
coingeckoId: 'flow',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.flowPreviewnet.checkPollingInterval,
},
{
...customChains.boss,
name: 'Boss',
Expand All @@ -552,6 +526,19 @@ export default [
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.boss.checkPollingInterval,
},
{
...customChains.b3,
name: 'B3',
lightIconUrl: '/icons/b3-icon-light.svg',
darkIconUrl: '/icons/b3-icon-dark.svg',
reservoirBaseUrl: reservoirChains.b3.baseApiUrl,
proxyApi: '/api/reservoir/b3',
routePrefix: 'b3',
apiKey: process.env.RESERVOIR_API_KEY,
coingeckoId: 'ethereum',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.b3.checkPollingInterval,
},
{
...customChains.forma,
name: 'Forma',
Expand All @@ -566,16 +553,16 @@ export default [
checkPollingInterval: reservoirChains.forma.checkPollingInterval,
},
{
...customChains.b3,
name: 'B3',
lightIconUrl: '/icons/b3-icon-light.svg',
darkIconUrl: '/icons/b3-icon-dark.svg',
reservoirBaseUrl: reservoirChains.b3.baseApiUrl,
proxyApi: '/api/reservoir/b3',
routePrefix: 'b3',
...customChains.apechain,
name: 'Apechain',
lightIconUrl: '/icons/apechain-icon-light.svg',
darkIconUrl: '/icons/apechain-icon-dark.svg',
reservoirBaseUrl: reservoirChains.apechain.baseApiUrl,
proxyApi: '/api/reservoir/apechain',
routePrefix: 'apechain',
apiKey: process.env.RESERVOIR_API_KEY,
coingeckoId: 'ethereum',
coingeckoId: 'apecoin',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.b3.checkPollingInterval,
checkPollingInterval: reservoirChains.apechain.checkPollingInterval,
},
] as ReservoirChain[]
39 changes: 29 additions & 10 deletions utils/paymentTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,24 @@ export const chainPaymentTokensMap = {
},
],

// b3
8333: [
{
chainId: 8333,
address: zeroAddress,
symbol: 'ETH',
name: 'B3 ETH',
decimals: 18,
},
{
chainId: 8333,
address: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4',
symbol: 'WETH',
name: 'B3 WETH',
decimals: 18,
},
],

// forma
984122: [
{
Expand All @@ -764,23 +782,24 @@ export const chainPaymentTokensMap = {
address: '0xd5eace1274dbf70960714f513db207433615a263',
symbol: 'WTIA',
name: 'WTIA',
}
decimals: 18,
},
],

// b3
8333: [
// Apechain
33139: [
{
chainId: 8333,
chainId: 33139,
address: zeroAddress,
symbol: 'ETH',
name: 'B3 ETH',
symbol: 'APE',
name: 'APE',
decimals: 18,
},
{
chainId: 8333,
address: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4',
symbol: 'WETH',
name: 'B3 WETH',
chainId: 33139,
address: '0x8073b2158aa023dd7f8d4799c883b65daf6baa57',
symbol: 'WAPE',
name: 'WAPE',
decimals: 18,
},
],
Expand Down
1 change: 1 addition & 0 deletions utils/wrappedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const wrappedContracts: Record<number, string> = {
646: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4', // flow previewnet
984122: '0xd5eace1274dbf70960714f513db207433615a263', // forma
8333: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4', // b3
33139: '0x8073b2158aa023dd7f8d4799c883b65daf6baa57', // apechain
}

export default wrappedContracts
52 changes: 37 additions & 15 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.7.12":
version "2.7.12"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-2.7.12.tgz#76ecb6085ad6d03cf7cc3d3d35bac0fd7b07df95"
integrity sha512-AdaS8mTCwBnlM9jFMalBTX+PaIbJ+uBnTxm1EOuvemSPxDtY0cgMwsxq9Bvj1uwq/VFLEMZ1HiAlYrXQehXvNQ==
"@reservoir0x/reservoir-kit-ui@^2.7.15":
version "2.7.15"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-2.7.15.tgz#68aa2ae5fcc5d711611f4edbac9ac181a08f9215"
integrity sha512-Q7IqUrl5a7t70yUhDbs/tfC8U3BvMoMQ/05H9NbSHjaV2fPRD6UPCoY0C0rkcofIpr1mSf/awnINDWX+mpLI0w==
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.4.9"
"@reservoir0x/reservoir-sdk" "2.4.12"
"@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.4.9":
version "2.4.9"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-2.4.9.tgz#7c1d530c72b74658c14b80e6cdd85eda7e8f9b0f"
integrity sha512-94bDPeycrEss1I8kHp5lkSYNncVSnwpcGMaS01DamXptP+I5wcw040Ua0qFLQ2gAcmcOXTlXTa2sGGaHKMoXsA==
"@reservoir0x/reservoir-sdk@2.4.12":
version "2.4.12"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-2.4.12.tgz#c25f6ac50c1df478d884965e11c0f286c933092b"
integrity sha512-OopXaOiZjq4zScC0Y4UIRjQMB8IdISvHoiNxu7UDjSb0wgN84gRZuncR/ib+JR+IBhscFqpXsZgVyFQ8Wx2A6g==
dependencies:
axios "^1.6.7"

Expand Down Expand Up @@ -6529,8 +6529,16 @@ strict-uri-encode@^2.0.0:
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==

"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
name string-width-cjs
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -6627,8 +6635,14 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
name strip-ansi-cjs
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -7221,8 +7235,7 @@ which@^2.0.1, which@^2.0.2:
dependencies:
isexe "^2.0.0"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
name wrap-ansi-cjs
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -7240,6 +7253,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit b6543d2

Please sign in to comment.