diff --git a/packages/splits-kit/package.json b/packages/splits-kit/package.json index d57e616b..293222f7 100644 --- a/packages/splits-kit/package.json +++ b/packages/splits-kit/package.json @@ -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", diff --git a/packages/splits-kit/src/constants/chains.ts b/packages/splits-kit/src/constants/chains.ts index 2216a4fc..7ea3fca1 100644 --- a/packages/splits-kit/src/constants/chains.ts +++ b/packages/splits-kit/src/constants/chains.ts @@ -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', @@ -86,6 +101,7 @@ export const SupportedChainsList = [ ronin, saigon, celo, + robinhood, ] as const type SupportedChain = (typeof SupportedChainsList)[number] @@ -295,4 +311,11 @@ export const CHAIN_INFO: ChainInfo = { symbol: 'CELO', }, }, + [robinhood.id]: { + label: 'Robinhood Chain', + logoUrl: '/networks/robinhood_logo.svg', + nativeCurrency: { + symbol: 'ETH', + }, + }, } diff --git a/packages/splits-kit/storybook/constants/chains.ts b/packages/splits-kit/storybook/constants/chains.ts index 05c0c695..e2d3ff48 100644 --- a/packages/splits-kit/storybook/constants/chains.ts +++ b/packages/splits-kit/storybook/constants/chains.ts @@ -31,6 +31,7 @@ import { SupportedChainId, tempoTestnet, tempoMainnet, + robinhood, } from '../../src/constants/chains' interface L1StorybookChainInfo { @@ -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, diff --git a/packages/splits-kit/storybook/public/networks/robinhood_logo.svg b/packages/splits-kit/storybook/public/networks/robinhood_logo.svg new file mode 100644 index 00000000..2d8f8537 --- /dev/null +++ b/packages/splits-kit/storybook/public/networks/robinhood_logo.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/splits-sdk-react/package.json b/packages/splits-sdk-react/package.json index 4d71135f..c553f012 100644 --- a/packages/splits-sdk-react/package.json +++ b/packages/splits-sdk-react/package.json @@ -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", diff --git a/packages/splits-sdk/package.json b/packages/splits-sdk/package.json index 53c1f393..17e1b63e 100644 --- a/packages/splits-sdk/package.json +++ b/packages/splits-sdk/package.json @@ -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", diff --git a/packages/splits-sdk/src/constants/index.ts b/packages/splits-sdk/src/constants/index.ts index 4c387f2b..4085f268 100644 --- a/packages/splits-sdk/src/constants/index.ts +++ b/packages/splits-sdk/src/constants/index.ts @@ -217,6 +217,7 @@ export enum ChainId { SAIGON = 2021, CELO = 42220, AVALANCHE = 43114, + ROBINHOOD = 4663, } export const ETHEREUM_CHAIN_IDS = [ChainId.MAINNET] @@ -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, @@ -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 = [ @@ -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 @@ -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, @@ -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 = [ @@ -572,6 +583,13 @@ export const CHAIN_INFO: { }, startBlockV2: 72287712, }, + [ChainId.ROBINHOOD]: { + startBlock: 60856806, + nativeCurrency: { + symbol: 'ETH', + }, + startBlockV2: 60856806, + }, } export enum TransactionType {