Skip to content

Commit

Permalink
Add blast sepolia chain
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromcunha committed Feb 28, 2024
1 parent 8ddb2a5 commit cf74fe5
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 0 deletions.
3 changes: 3 additions & 0 deletions demo/utils/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,5 +158,8 @@ export default [
},
{
...reservoirChains.frameTestnet
},
{
...reservoirChains.blastSepolia
}
]
25 changes: 25 additions & 0 deletions packages/sdk/src/utils/customChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,33 @@ export const frameTestnet = {
},
} as const satisfies Chain

export const blastSepolia = {
id: 168587773,
name: 'Blast Sepolia',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://sepolia.blast.io'],
},
public: {
http: ['https://sepolia.blast.io'],
},
},
blockExplorers: {
etherscan: {
name: 'BlastScan Sepolia',
url: 'https://testnet.blastscan.io',
},
default: {
name: 'BlastScan Sepolia',
url: 'https://testnet.blastscan.io',
},
},
} as const satisfies Chain

export const customChains = {
ancient8,
ancient8Testnet,
frameTestnet,
blastSepolia,
} as const satisfies Record<string, Chain>
9 changes: 9 additions & 0 deletions packages/sdk/src/utils/reservoirChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,14 @@ const frameTestnet = {
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

const blastSepolia = {
id: 168587773,
name: 'Blast Sepolia',
baseApiUrl: 'https://api-blast-sepolia.reservoir.tools',
paymentTokens: chainPaymentTokensMap[168587773],
checkPollingInterval: 1000,
} satisfies ReservoirBaseChain

export const reservoirChains = {
mainnet,
goerli,
Expand All @@ -229,4 +237,5 @@ export const reservoirChains = {
ancient8,
ancient8Testnet,
frameTestnet,
blastSepolia,
}
8 changes: 8 additions & 0 deletions packages/ui/src/constants/chainIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ import ZoraIconColor from '../img/chains/ZoraIconColor'
import FrameIconDark from '../img/chains/FrameIconDark'
import FrameIconLight from '../img/chains/FrameIconLight'
import FrameIconColor from '../img/chains/FrameIconColor'
import BlastSepoliaIconColor from '../img/chains/BlastSepoliaIconColor'
import BlastSepoliaIconLight from '../img/chains/BlastSepoliaIconLight'
import BlastSepoliaIconDark from '../img/chains/BlastSepoliaIconDark'

const chainIcons = {
[reservoirChains.ancient8.id]: {
Expand Down Expand Up @@ -163,6 +166,11 @@ const chainIcons = {
dark: <FrameIconLight />,
color: <FrameIconColor />,
},
[reservoirChains.blastSepolia.id]: {
light: <BlastSepoliaIconDark />,
dark: <BlastSepoliaIconLight />,
color: <BlastSepoliaIconColor />,
},
}

export default chainIcons
1 change: 1 addition & 0 deletions packages/ui/src/constants/wrappedContractNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ const wrappedContractNames: Record<number, string> = {
888888888: 'WETH', //ancient8
28122024: 'WETH', //ancient8 testnet
68840142: 'WETH', //frametestnet
168587773: 'WETH', //blast sepolia
}
export default wrappedContractNames
1 change: 1 addition & 0 deletions packages/ui/src/constants/wrappedContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const wrappedContracts: Record<number, string> = {
888888888: '0x4200000000000000000000000000000000000006', //ancient8
28122024: '0x4200000000000000000000000000000000000006', //ancient8testnet
68840142: '0x822b4c4713433c6b88547845850a39343bf0957e', //frametestnet
168587773: '0x4200000000000000000000000000000000000006', //blast sepolia
}

export default wrappedContracts
16 changes: 16 additions & 0 deletions packages/ui/src/img/chains/BlastSepoliaIconColor.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'

export default () => (
<svg
width="auto"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.94903 4.125L0.000488281 7.06588H20.3608L19.2358 10.4424H11.0961L10.2799 12.8169H18.5299L17.2505 16.8034H5.71373L8.16226 9.61463L5.47108 7.65405L1.54461 19.875H16.2578L20.052 18.0016L21.3093 13.7972L18.8608 11.8584L22.6549 10.0503L24.0005 6.10737L21.3093 4.125H3.94903Z"
fill="#FDFE00"
/>
</svg>
)
16 changes: 16 additions & 0 deletions packages/ui/src/img/chains/BlastSepoliaIconDark.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'

export default () => (
<svg
width="auto"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.94854 4.125L0 7.06588H20.3603L19.2353 10.4424H11.0956L10.2794 12.8169H18.5294L17.25 16.8034H5.71324L8.16177 9.61463L5.47059 7.65405L1.54412 19.875H16.2574L20.0515 18.0016L21.3088 13.7972L18.8603 11.8584L22.6544 10.0503L24 6.10737L21.3088 4.125H3.94854Z"
fill="#ECEDEE"
/>
</svg>
)
16 changes: 16 additions & 0 deletions packages/ui/src/img/chains/BlastSepoliaIconLight.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react'

export default () => (
<svg
width="auto"
height="100%"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.94854 4.125L0 7.06588H20.3603L19.2353 10.4424H11.0956L10.2794 12.8169H18.5294L17.25 16.8034H5.71324L8.16177 9.61463L5.47059 7.65405L1.54412 19.875H16.2574L20.0515 18.0016L21.3088 13.7972L18.8603 11.8584L22.6544 10.0503L24 6.10737L21.3088 4.125H3.94854Z"
fill="#11181C"
/>
</svg>
)

0 comments on commit cf74fe5

Please sign in to comment.