Skip to content

Commit

Permalink
Merge pull request #525 from reservoirprotocol/jaden/shape-support
Browse files Browse the repository at this point in the history
feat: adding apechain and shape
  • Loading branch information
JadenDurnford committed Sep 11, 2024
2 parents 3b7e819 + 810582a commit ccf45b5
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 18 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.7.12",
"@reservoir0x/reservoir-kit-ui": "^2.7.16",
"@sentry/nextjs": "^7.85.0",
"@tanstack/react-query": "5.20.2",
"@types/uuid": "^9.0.1",
Expand Down
18 changes: 18 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.
18 changes: 18 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.
10 changes: 10 additions & 0 deletions public/icons/shape-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.
10 changes: 10 additions & 0 deletions public/icons/shape-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.
26 changes: 26 additions & 0 deletions utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -525,4 +525,30 @@ export default [
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.forma.checkPollingInterval,
},
{
...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: 'apecoin',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.apechain.checkPollingInterval,
},
{
...customChains.shape,
name: 'Shape',
lightIconUrl: '/icons/shape-icon-light.svg',
darkIconUrl: '/icons/shape-icon-dark.svg',
reservoirBaseUrl: reservoirChains.shape.baseApiUrl,
proxyApi: '/api/reservoir/shape',
routePrefix: 'shape',
apiKey: process.env.RESERVOIR_API_KEY,
coingeckoId: 'ethereum',
oracleBidsEnabled: true,
checkPollingInterval: reservoirChains.shape.checkPollingInterval,
},
] as ReservoirChain[]
38 changes: 37 additions & 1 deletion utils/paymentTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ export const chainPaymentTokensMap = {
decimals: 18,
},
],

// forma
984122: [
{
Expand All @@ -763,4 +763,40 @@ export const chainPaymentTokensMap = {
decimals: 18,
},
],

// Apechain
33139: [
{
chainId: 33139,
address: zeroAddress,
symbol: 'APE',
name: 'APE',
decimals: 18,
},
{
chainId: 33139,
address: '0x8073b2158aa023dd7f8d4799c883b65daf6baa57',
symbol: 'WAPE',
name: 'WAPE',
decimals: 18,
},
],

// shape
360: [
{
chainId: 360,
address: zeroAddress,
symbol: 'ETH',
name: 'Shape ETH',
decimals: 18,
},
{
chainId: 360,
address: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4',
symbol: 'WETH',
name: 'Shape WETH',
decimals: 18,
},
],
} as Record<number, PaymentToken[]>
2 changes: 2 additions & 0 deletions utils/wrappedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const wrappedContracts: Record<number, string> = {
1329: '0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7', // sei
8333: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4', // b3
984122: '0xd5eace1274dbf70960714f513db207433615a263', // forma
33139: '0x8073b2158aa023dd7f8d4799c883b65daf6baa57', // apechain
360: '0x48a9b22b80f566e88f0f1dcc90ea15a8a3bae8a4', // shape
}

export default wrappedContracts
53 changes: 37 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1753,11 +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.16":
version "2.7.16"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-kit-ui/-/reservoir-kit-ui-2.7.16.tgz#6cf62884be47765d95f1440d5cc04d84d6b414e8"
integrity sha512-5le4ixFEWKqpRwE5Cw1e0ouB7Uj1KlBJQZpdIPxcrfaq7PPCmY+A3+iFNb5j/VmIzPtbgDmZ0DGQiGGDEPqvbw==
dependencies:
"@fortawesome/fontawesome-svg-core" "^6.1.1"
"@fortawesome/free-solid-svg-icons" "^6.1.1"
Expand All @@ -1773,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.13"
"@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.13":
version "2.4.13"
resolved "https://registry.yarnpkg.com/@reservoir0x/reservoir-sdk/-/reservoir-sdk-2.4.13.tgz#d45c2c6affaed3f0d7bf34bef1b4cb3ca1e02d7d"
integrity sha512-ceHpXIbkkZFMGg/13wvpI5RUA/0olkkfSaqssib+LtVCEilk3CbqskdZtalDhHSIz6WciZ8oIpotbGV9cCXsMg==
dependencies:
axios "^1.6.7"

Expand Down Expand Up @@ -6530,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 @@ -6628,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 @@ -7222,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 @@ -7241,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 ccf45b5

Please sign in to comment.