diff --git a/.changeset/story-odyssey-chain.md b/.changeset/story-odyssey-chain.md new file mode 100644 index 000000000..826b508a8 --- /dev/null +++ b/.changeset/story-odyssey-chain.md @@ -0,0 +1,7 @@ +--- +"@reservoir0x/reservoir-sdk": patch +"@reservoir0x/reservoir-kit-ui": patch +"reservoir-kit-demo": patch +--- + +feat: add Story Odyssey chain support diff --git a/demo/pages/_app.tsx b/demo/pages/_app.tsx index 616a544b8..2bfdada3d 100644 --- a/demo/pages/_app.tsx +++ b/demo/pages/_app.tsx @@ -94,6 +94,7 @@ const chains = [ customChains.monadDevnet, customChains.game7, customChains.blast, + customChains.storyOdyssey, ] as [Chain, ...Chain[]] const wagmiConfig = getDefaultConfig({ diff --git a/demo/utils/chains.ts b/demo/utils/chains.ts index b50e19e1e..06d6cd975 100644 --- a/demo/utils/chains.ts +++ b/demo/utils/chains.ts @@ -388,4 +388,7 @@ export default [ { ...reservoirChains.soneium, }, + { + ...reservoirChains.storyOdyssey, + }, ] diff --git a/packages/sdk/src/utils/customChains.ts b/packages/sdk/src/utils/customChains.ts index 73ff43b87..1a3f7f311 100644 --- a/packages/sdk/src/utils/customChains.ts +++ b/packages/sdk/src/utils/customChains.ts @@ -1055,6 +1055,30 @@ export const soneium = { }, } as const satisfies Chain +export const storyOdyssey = { + id: 1516, + name: 'Story Odyssey', + nativeCurrency: { name: 'IP', symbol: 'IP', decimals: 18 }, + rpcUrls: { + default: { + http: ['https://rpc.odyssey.storyrpc.io'], + }, + public: { + http: ['https://rpc.odyssey.storyrpc.io'], + }, + }, + blockExplorers: { + etherscan: { + name: 'Story Odyssey Explorer', + url: 'https://odyssey.storyscan.xyz', + }, + default: { + name: 'Story Odyssey Explorer', + url: 'https://odyssey.storyscan.xyz', + }, + }, +} as const satisfies Chain + export const customChains = { ancient8, ancient8Testnet, @@ -1098,4 +1122,5 @@ export const customChains = { game7, creatorTestnet, soneium, + storyOdyssey, } as const satisfies Record diff --git a/packages/sdk/src/utils/paymentTokens.ts b/packages/sdk/src/utils/paymentTokens.ts index 72656994e..a44b45568 100644 --- a/packages/sdk/src/utils/paymentTokens.ts +++ b/packages/sdk/src/utils/paymentTokens.ts @@ -1189,4 +1189,22 @@ export const chainPaymentTokensMap = { decimals: 18, }, ], + + // Story Odyssey + 1516: [ + { + chainId: 1516, + address: zeroAddress, + symbol: 'IP', + name: 'IP', + decimals: 18, + }, + { + chainId: 1516, + address: '0x1516000000000000000000000000000000000000', + symbol: 'WIP', + name: 'WIP', + decimals: 18, + }, + ], } as Record diff --git a/packages/sdk/src/utils/reservoirChains.ts b/packages/sdk/src/utils/reservoirChains.ts index 73599703e..af4b694c3 100644 --- a/packages/sdk/src/utils/reservoirChains.ts +++ b/packages/sdk/src/utils/reservoirChains.ts @@ -506,6 +506,14 @@ const soneium = { checkPollingInterval: 1000, } satisfies ReservoirBaseChain +const storyOdyssey = { + id: 1516, + name: 'Story Odyssey', + baseApiUrl: 'https://api-story-odyssey.reservoir.tools', + paymentTokens: chainPaymentTokensMap[1516], + checkPollingInterval: 1000, +} satisfies ReservoirBaseChain + export const reservoirChains = { mainnet, polygon, @@ -569,4 +577,5 @@ export const reservoirChains = { game7, creatorTestnet, soneium, + storyOdyssey, } diff --git a/packages/ui/src/constants/chainIcons.tsx b/packages/ui/src/constants/chainIcons.tsx index cce343cca..23f0837db 100644 --- a/packages/ui/src/constants/chainIcons.tsx +++ b/packages/ui/src/constants/chainIcons.tsx @@ -1,5 +1,8 @@ import React from 'react' import { reservoirChains } from '@reservoir0x/reservoir-sdk' +import StoryOdysseyIconDark from '../img/chains/StoryOdysseyIconDark' +import StoryOdysseyIconLight from '../img/chains/StoryOdysseyIconLight' +import StoryOdysseyIconColor from '../img/chains/StoryOdysseyIconColor' import MainnetIconDark from '../img/chains/MainnetIconDark' import MainnetIconLight from '../img/chains/MainnetIconLight' import PolygonIconDark from '../img/chains/PolygonIconDark' @@ -440,6 +443,11 @@ const chainIcons = { dark: , color: , }, + [reservoirChains.storyOdyssey.id]: { + light: , + dark: , + color: , + }, } export default chainIcons diff --git a/packages/ui/src/constants/wrappedContractNames.ts b/packages/ui/src/constants/wrappedContractNames.ts index d349b3a81..18f53f4a4 100644 --- a/packages/ui/src/constants/wrappedContractNames.ts +++ b/packages/ui/src/constants/wrappedContractNames.ts @@ -61,5 +61,6 @@ const wrappedContractNames: Record = { 2187: 'WG7', //game7 4654: 'WETH', // creator testnet 1868: 'WETH', // Soneium + 1516: 'WIP', // Story Odyssey } export default wrappedContractNames diff --git a/packages/ui/src/constants/wrappedContracts.ts b/packages/ui/src/constants/wrappedContracts.ts index 4ebd82bbb..d8dc2ba3f 100644 --- a/packages/ui/src/constants/wrappedContracts.ts +++ b/packages/ui/src/constants/wrappedContracts.ts @@ -61,6 +61,7 @@ const wrappedContracts: Record = { 2187: '0xfa3ed70386b9255fC04aA008A8ad1B0CDa816Fac', //game7 4654: '0x34AF38Ec07708dBC01C5A814fc418D3840448fce', // creator testnet 1868: '0x4200000000000000000000000000000000000006', // Soneium + 1516: '0x1516000000000000000000000000000000000000', // Story Odyssey } export default wrappedContracts diff --git a/packages/ui/src/img/chains/StoryOdysseyIconColor.tsx b/packages/ui/src/img/chains/StoryOdysseyIconColor.tsx new file mode 100644 index 000000000..f40a7c733 --- /dev/null +++ b/packages/ui/src/img/chains/StoryOdysseyIconColor.tsx @@ -0,0 +1,26 @@ +import React from 'react' + +const StoryOdysseyIconColor = () => ( + + + + SO + + +) + +export default StoryOdysseyIconColor diff --git a/packages/ui/src/img/chains/StoryOdysseyIconDark.tsx b/packages/ui/src/img/chains/StoryOdysseyIconDark.tsx new file mode 100644 index 000000000..df5db7af5 --- /dev/null +++ b/packages/ui/src/img/chains/StoryOdysseyIconDark.tsx @@ -0,0 +1,26 @@ +import React from 'react' + +const StoryOdysseyIconDark = () => ( + + + + SO + + +) + +export default StoryOdysseyIconDark diff --git a/packages/ui/src/img/chains/StoryOdysseyIconLight.tsx b/packages/ui/src/img/chains/StoryOdysseyIconLight.tsx new file mode 100644 index 000000000..cd9c529be --- /dev/null +++ b/packages/ui/src/img/chains/StoryOdysseyIconLight.tsx @@ -0,0 +1,26 @@ +import React from 'react' + +const StoryOdysseyIconLight = () => ( + + + + SO + + +) + +export default StoryOdysseyIconLight