Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/splits-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsplits/splits-kit",
"version": "2.4.0",
"version": "2.5.0-alpha.0",
"description": "UI Components for working with 0xSplits contracts",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
Expand Down
23 changes: 23 additions & 0 deletions packages/splits-kit/src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ import {
} from 'viem/chains'
import { defineChain } from 'viem'

export const robinhood = defineChain({
id: 4663,
name: 'Robinhood Chain',
nativeCurrency: { name: 'Ether', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: { http: ['https://rpc.mainnet.chain.robinhood.com'] },
},
blockExplorers: {
default: {
name: 'Blockscout',
url: 'https://robinhoodchain.blockscout.com',
},
},
})

export const tempoTestnet = defineChain({
id: 42431,
name: 'Tempo Testnet',
Expand Down Expand Up @@ -86,6 +101,7 @@ export const SupportedChainsList = [
ronin,
saigon,
celo,
robinhood,
] as const

type SupportedChain = (typeof SupportedChainsList)[number]
Expand Down Expand Up @@ -295,4 +311,11 @@ export const CHAIN_INFO: ChainInfo = {
symbol: 'CELO',
},
},
[robinhood.id]: {
label: 'Robinhood Chain',
logoUrl: '/networks/robinhood_logo.svg',
nativeCurrency: {
symbol: 'ETH',
},
},
}
8 changes: 8 additions & 0 deletions packages/splits-kit/storybook/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
SupportedChainId,
tempoTestnet,
tempoMainnet,
robinhood,
} from '../../src/constants/chains'

interface L1StorybookChainInfo {
Expand All @@ -48,6 +49,13 @@ type ChainInfo = {
}

export const STORYBOOK_CHAIN_INFO: ChainInfo = {
[robinhood.id]: {
...CHAIN_INFO[robinhood.id],
viemChain: robinhood,
rpcUrls: [
`https://robinhood-mainnet.g.alchemy.com/v2/${process.env.STORYBOOK_ALCHEMY_API_KEY}`,
],
},
[mainnet.id]: {
...CHAIN_INFO[mainnet.id],
viemChain: mainnet,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/splits-sdk-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsplits/splits-sdk-react",
"version": "4.4.0",
"version": "4.5.0-alpha.0",
"description": "React wrapper for the 0xSplits SDK",
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/splits-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@0xsplits/splits-sdk",
"version": "6.5.0",
"version": "6.6.0-alpha.0",
"description": "SDK for the 0xSplits protocol",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts",
Expand Down
26 changes: 22 additions & 4 deletions packages/splits-sdk/src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ export enum ChainId {
SAIGON = 2021,
CELO = 42220,
AVALANCHE = 43114,
ROBINHOOD = 4663,
}

export const ETHEREUM_CHAIN_IDS = [ChainId.MAINNET]
Expand All @@ -241,6 +242,7 @@ export const ABSTRACT_CHAIN_IDS = [ChainId.ABSTRACT, ChainId.ABSTRACT_SEPOLIA]
export const RONIN_CHAIN_IDS = [ChainId.RONIN, ChainId.SAIGON]
export const CELO_CHAIN_IDS = [ChainId.CELO]
export const AVALANCHE_CHAIN_IDS = [ChainId.AVALANCHE]
export const ROBINHOOD_CHAIN_IDS = [ChainId.ROBINHOOD]

export const ALL_CHAIN_IDS = [
...ETHEREUM_CHAIN_IDS,
Expand All @@ -258,6 +260,7 @@ export const ALL_CHAIN_IDS = [
...PLUME_CHAIN_IDS,
...TEMPO_CHAIN_IDS,
...AVALANCHE_CHAIN_IDS,
...ROBINHOOD_CHAIN_IDS,
]

export const SPLITS_SUPPORTED_CHAIN_IDS = [
Expand Down Expand Up @@ -305,6 +308,7 @@ export const SPLITS_V2_SUPPORTED_CHAIN_IDS = [
ChainId.SAIGON,
ChainId.CELO,
ChainId.AVALANCHE,
ChainId.ROBINHOOD,
]

// These chains use a different value for block.number than the actual block number
Expand All @@ -314,6 +318,7 @@ export const INVALID_BLOCK_NUMBER_CHAIN_IDS = [
ChainId.ARBITRUM,
ChainId.PLUME,
ChainId.PLUME_TESTNET,
ChainId.ROBINHOOD,
]
export const SPLITS_SUBGRAPH_CHAIN_IDS = [
ChainId.MAINNET,
Expand All @@ -330,25 +335,31 @@ export const SPLITS_SUBGRAPH_CHAIN_IDS = [
ChainId.BASE_SEPOLIA,
]
export const WATERFALL_CHAIN_IDS = ALL_CHAIN_IDS.slice().filter(
(id) => id !== ChainId.ZORA_SEPOLIA && id !== ChainId.BLAST,
(id) =>
id !== ChainId.ZORA_SEPOLIA &&
id !== ChainId.BLAST &&
id !== ChainId.ROBINHOOD,
)
export const LIQUID_SPLIT_CHAIN_IDS = ALL_CHAIN_IDS.slice().filter(
(id) =>
id !== ChainId.ZORA_SEPOLIA &&
id !== ChainId.BASE_SEPOLIA &&
id !== ChainId.BLAST,
id !== ChainId.BLAST &&
id !== ChainId.ROBINHOOD,
)
export const VESTING_CHAIN_IDS = ALL_CHAIN_IDS.slice().filter(
(id) =>
id !== ChainId.ZORA_SEPOLIA &&
id !== ChainId.BASE_SEPOLIA &&
id !== ChainId.BLAST,
id !== ChainId.BLAST &&
id !== ChainId.ROBINHOOD,
)
export const TEMPLATES_CHAIN_IDS = ALL_CHAIN_IDS.slice().filter(
(id) =>
id !== ChainId.ZORA_SEPOLIA &&
id !== ChainId.BASE_SEPOLIA &&
id !== ChainId.BLAST,
id !== ChainId.BLAST &&
id !== ChainId.ROBINHOOD,
)

export const SWAPPER_CHAIN_IDS = [
Expand Down Expand Up @@ -572,6 +583,13 @@ export const CHAIN_INFO: {
},
startBlockV2: 72287712,
},
[ChainId.ROBINHOOD]: {
startBlock: 60856806,
nativeCurrency: {
symbol: 'ETH',
},
startBlockV2: 60856806,
},
}

export enum TransactionType {
Expand Down