Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
8 changes: 6 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ VITE_ABSOLUTE_URL_PREFIX=https://app.shapeshift.com

# Dev tools
VITE_FEATURE_PERFORMANCE_PROFILER=false
VITE_FEATURE_ROBINHOOD=false

# chat woot
VITE_CHATWOOT_TOKEN=jmoXp9BPMSPEYHeJX5YKT15Q
Expand Down Expand Up @@ -218,13 +219,14 @@ VITE_NEAR_NODE_URL_FALLBACK_1=https://near.lava.build
VITE_NEAR_NODE_URL_FALLBACK_2=https://rpc.fastnear.com
VITE_PLASMA_NODE_URL=https://rpc.plasma.to
VITE_PLUME_NODE_URL=https://rpc.plume.org
VITE_ROBINHOOD_NODE_URL=https://rpc.mainnet.chain.robinhood.com
VITE_SCROLL_NODE_URL=https://rpc.scroll.io
VITE_SEI_NODE_URL=https://evm-rpc.sei-apis.com
VITE_SONEIUM_NODE_URL=https://rpc.soneium.org
VITE_SONIC_NODE_URL=https://rpc.soniclabs.com
VITE_STARKNET_NODE_URL=https://rpc.starknet.lava.build
VITE_STORY_NODE_URL=https://mainnet.storyrpc.io
VITE_SUI_NODE_URL=https://fullnode.mainnet.sui.io:443
VITE_SUI_NODE_URL=https://sui-rpc.publicnode.com
VITE_TON_NODE_URL=https://toncenter.com/api/v2/jsonRPC
VITE_TRON_GRID_API_KEY=17430894-392e-44e8-b015-4a9c4fe17546
VITE_TRON_NODE_URL=https://api.trongrid.io
Expand Down Expand Up @@ -328,6 +330,7 @@ VITE_JITO_BLOCK_ENGINE_URL=https://mainnet.block-engine.jito.wtf

# relay
VITE_RELAY_API_URL=https://api.relay.link
VITE_RELAY_API_KEY=d62274fb-1edd-481a-b952-632896ebf830

# affiliate revenue
VITE_AFFILIATE_REVENUE_URL=https://api.revenue.shapeshift.com
Expand All @@ -352,7 +355,8 @@ VITE_YIELD_XYZ_API_KEY=06903960-e442-4870-81eb-03ff3ad4c035

# Across Protocol
VITE_ACROSS_API_URL=https://app.across.to/api
VITE_ACROSS_INTEGRATOR_ID=
VITE_ACROSS_INTEGRATOR_ID=0x021c
VITE_ACROSS_API_KEY=acx_UsQJEgNekMMkqXP9KMD3Ol7hqRrP8Yrf

# deBridge DLN
VITE_DEBRIDGE_API_URL=https://dln.debridge.finance/v1.0
Expand Down
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ VITE_FEATURE_YIELD_MULTI_ACCOUNT=true
VITE_FEATURE_AGENTIC_CHAT=true
VITE_FEATURE_MM_NATIVE_MULTICHAIN=true
VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true
VITE_FEATURE_ROBINHOOD=true

# mixpanel
VITE_MIXPANEL_TOKEN=a867ce40912a6b7d01d088cf62b0e1ff
Expand Down
30 changes: 30 additions & 0 deletions chains/robinhood.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"camelName": "robinhood",
"pascalName": "Robinhood",
"upperName": "ROBINHOOD",
"chainId": 4663,
"viemChainName": "robinhood",
"nativeSymbol": "ETH",
"nativeName": "Ethereum",
"nativePrecision": 18,
"isNativeEth": true,
"color": "#00C805",
"networkIconUrl": "https://assets.relay.link/icons/4663/light.png",
"nativeIconUrl": "https://assets.coingecko.com/coins/images/279/large/ethereum.png",
"explorerUrl": "https://robinhoodchain.blockscout.com",
"explorerAddressLink": "https://robinhoodchain.blockscout.com/address/",
"explorerTxLink": "https://robinhoodchain.blockscout.com/tx/",
"rpcUrl": "https://rpc.mainnet.chain.robinhood.com",
"publicRpcUrls": ["https://rpc.mainnet.chain.robinhood.com", "https://robinhood-rpc.publicnode.com"],
"coingeckoPlatform": "robinhood",
"wrappedNativeAddress": "0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73",
"relatedAssetKey": "eip155:1/slip44:60",
"shortName": "RH",
"swappers": {
"relay": { "supported": true, "relayChainId": 4663 },
"across": { "supported": true },
"portals": { "supported": false },
"zerion": { "supported": false },
"yieldxyz": { "supported": false }
}
}
11 changes: 11 additions & 0 deletions headers/csps/chains/robinhood.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { loadEnv } from 'vite'

import { PUBLIC_RPC_URLS } from '../../../packages/contracts/src/publicRpcUrls'
import type { Csp } from '../../types'

const mode = process.env.MODE ?? process.env.NODE_ENV ?? 'development'
const env = loadEnv(mode, process.cwd(), '')

export const csp: Csp = {
'connect-src': [env.VITE_ROBINHOOD_NODE_URL, ...PUBLIC_RPC_URLS.robinhood],
}
2 changes: 1 addition & 1 deletion headers/csps/chains/sui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export const csp: Csp = {
env.VITE_SUI_NODE_URL,
'https://mainnet.suiet.app/',
'https://api-sui.cetus.zone',
'https://fullnode.mainnet.sui.io/',
'https://sui-rpc.publicnode.com/',
],
}
2 changes: 2 additions & 0 deletions headers/csps/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { csp as optimism } from './chains/optimism'
import { csp as plasma } from './chains/plasma'
import { csp as plume } from './chains/plume'
import { csp as polygon } from './chains/polygon'
import { csp as robinhood } from './chains/robinhood'
import { csp as scroll } from './chains/scroll'
import { csp as sei } from './chains/sei'
import { csp as solana } from './chains/solana'
Expand Down Expand Up @@ -208,4 +209,5 @@ export const csps = [
railway,
discord,
yieldxyz,
robinhood,
]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
"use-long-press": "^3.3.0",
"uuid": "^9.0.0",
"vaul": "^1.1.2",
"viem": "2.43.5",
"viem": "2.55.11",
"wagmi": "^2.9.2",
"web-vitals": "^2.1.4",
"wouter": "^3.6.0",
Expand Down Expand Up @@ -382,7 +382,7 @@
"react": "19.2.4",
"react-dom": "19.2.4",
"@testing-library/dom": "8.20.1",
"viem": "2.43.5",
"viem": "2.55.11",
"msw": "*",
"ethers": "*",
"starknet": "9.4.0",
Expand Down

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions packages/caip/src/adapters/coingecko/generated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import flowevm from "./eip155_747/adapter.json";
import celo from "./eip155_42220/adapter.json";
import sei from "./eip155_1329/adapter.json";
import abstract from "./eip155_2741/adapter.json";
import robinhood from "./eip155_4663/adapter.json";
import cosmos from "./cosmos_cosmoshub-4/adapter.json";
import thorchain from "./cosmos_thorchain-1/adapter.json";
import mayachain from "./cosmos_mayachain-mainnet-v1/adapter.json";
Expand Down Expand Up @@ -86,6 +87,7 @@ export {
celo,
sei,
abstract,
robinhood,
cosmos,
thorchain,
mayachain,
Expand Down
7 changes: 7 additions & 0 deletions packages/caip/src/adapters/coingecko/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ describe('adapters:coingecko', () => {
assetNamespace: 'slip44',
assetReference: ASSET_REFERENCE.Soneium,
})
const ethOnRobinhood = toAssetId({
chainNamespace,
chainReference: CHAIN_REFERENCE.RobinhoodMainnet,
assetNamespace: 'slip44',
assetReference: ASSET_REFERENCE.Robinhood,
})
expect(coingeckoToAssetIds('ethereum')).toEqual([
ethOnEthereum,
ethOnOptimism,
Expand All @@ -155,6 +161,7 @@ describe('adapters:coingecko', () => {
ethOnUnichain,
ethOnSoneium,
ethOnAbstract,
ethOnRobinhood,
])
})

Expand Down
6 changes: 6 additions & 0 deletions packages/caip/src/adapters/coingecko/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
plasmaChainId,
plumeChainId,
polygonChainId,
robinhoodChainId,
scrollChainId,
seiChainId,
solanaChainId,
Expand Down Expand Up @@ -100,6 +101,7 @@ export enum CoingeckoAssetPlatform {
Ton = 'the-open-network',
Near = 'near-protocol',
Abstract = 'abstract',
Robinhood = 'robinhood',
}

type CoinGeckoId = string
Expand Down Expand Up @@ -198,6 +200,8 @@ export const chainIdToCoingeckoAssetPlatform = (chainId: ChainId): string => {
return CoingeckoAssetPlatform.Soneium
case CHAIN_REFERENCE.SeiMainnet:
return CoingeckoAssetPlatform.Sei
case CHAIN_REFERENCE.RobinhoodMainnet:
return CoingeckoAssetPlatform.Robinhood
default:
throw new Error(
`chainNamespace ${chainNamespace}, chainReference ${chainReference} not supported.`,
Expand Down Expand Up @@ -367,6 +371,8 @@ export const coingeckoAssetPlatformToChainId = (
return tonChainId
case CoingeckoAssetPlatform.Near:
return nearChainId
case CoingeckoAssetPlatform.Robinhood:
return robinhoodChainId
default:
return undefined
}
Expand Down
3 changes: 3 additions & 0 deletions packages/caip/src/adapters/coingecko/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ describe('adapters:coingecko:utils', () => {
'eip155:2741': {
'eip155:2741/slip44:60': 'ethereum',
},
'eip155:4663': {
'eip155:4663/slip44:60': 'ethereum',
},
'near:mainnet': {
'near:mainnet/slip44:397': 'near',
},
Expand Down
17 changes: 17 additions & 0 deletions packages/caip/src/adapters/coingecko/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ import {
plumeChainId,
polygonAssetId,
polygonChainId,
robinhoodAssetId,
robinhoodChainId,
scrollAssetId,
scrollChainId,
solanaChainId,
Expand Down Expand Up @@ -664,6 +666,20 @@ export const parseData = (coins: CoingeckoCoin[]): AssetMap => {
}
}

if (Object.keys(platforms).includes(CoingeckoAssetPlatform.Robinhood)) {
try {
const assetId = toAssetId({
chainNamespace: CHAIN_NAMESPACE.Evm,
chainReference: CHAIN_REFERENCE.RobinhoodMainnet,
assetNamespace: 'erc20',
assetReference: platforms[CoingeckoAssetPlatform.Robinhood],
})
prev[robinhoodChainId][assetId] = id
} catch {
// unable to create assetId, skip token
}
}

return prev
},
{
Expand Down Expand Up @@ -706,6 +722,7 @@ export const parseData = (coins: CoingeckoCoin[]): AssetMap => {
[suiChainId]: { [suiAssetId]: 'sui' },
[nearChainId]: { [nearAssetId]: 'near' },
[tonChainId]: { [tonAssetId]: 'the-open-network' },
[robinhoodChainId]: { [robinhoodAssetId]: 'ethereum' },
},
)

Expand Down
5 changes: 5 additions & 0 deletions packages/caip/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const ltcAssetId: AssetId = 'bip122:12a765e31ffd4059bada1e25190f6e98/slip
export const zecAssetId: AssetId = 'bip122:00040fe8ec8471911baa1db1266ea15d/slip44:133'

export const ethAssetId: AssetId = 'eip155:1/slip44:60'
export const robinhoodAssetId: AssetId = 'eip155:4663/slip44:60'
export const abstractAssetId: AssetId = 'eip155:2741/slip44:60'
export const avalancheAssetId: AssetId = 'eip155:43114/slip44:60'
export const optimismAssetId: AssetId = 'eip155:10/slip44:60'
Expand Down Expand Up @@ -97,6 +98,7 @@ export const ltcChainId: ChainId = 'bip122:12a765e31ffd4059bada1e25190f6e98'
export const zecChainId: ChainId = 'bip122:00040fe8ec8471911baa1db1266ea15d'

export const ethChainId: ChainId = 'eip155:1'
export const robinhoodChainId: ChainId = 'eip155:4663'
export const abstractChainId: ChainId = 'eip155:2741'
export const avalancheChainId: ChainId = 'eip155:43114'
export const optimismChainId: ChainId = 'eip155:10'
Expand Down Expand Up @@ -211,6 +213,7 @@ export const CHAIN_REFERENCE = {
StarknetMainnet: 'SN_MAIN', // https://namespaces.chainagnostic.org/starknet/caip2
TonMainnet: 'mainnet', // TON Mainnet
AbstractMainnet: '2741', // https://abscan.org
RobinhoodMainnet: '4663', // https://chainlist.org/chain/4663
} as const

export const ASSET_NAMESPACE = {
Expand Down Expand Up @@ -278,6 +281,7 @@ export const ASSET_REFERENCE = {
Starknet: '9004',
Ton: '607',
Abstract: '60', // evm chain which uses ethereum derivation path as common practice
Robinhood: '60', // evm chain which uses ethereum derivation path as common practice
} as const

export const VALID_CHAIN_IDS: ValidChainMap = Object.freeze({
Expand Down Expand Up @@ -324,6 +328,7 @@ export const VALID_CHAIN_IDS: ValidChainMap = Object.freeze({
CHAIN_REFERENCE.SeiMainnet,
CHAIN_REFERENCE.CeloMainnet,
CHAIN_REFERENCE.AbstractMainnet,
CHAIN_REFERENCE.RobinhoodMainnet,
],
[CHAIN_NAMESPACE.CosmosSdk]: [
CHAIN_REFERENCE.CosmosHubMainnet,
Expand Down
4 changes: 2 additions & 2 deletions packages/chain-adapters/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/chain-adapters",
"version": "11.5.0",
"version": "11.5.1",
"repository": "https://github.com/shapeshift/web",
"license": "MIT",
"type": "module",
Expand Down Expand Up @@ -54,7 +54,7 @@
"multicoin-address-validator": "^0.5.12",
"node-polyglot": "^2.4.0",
"p-queue": "^8.0.1",
"viem": "2.43.5"
"viem": "2.55.11"
},
"devDependencies": {
"@types/bs58check": "^2.1.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/chain-adapters/src/evm/EvmBaseAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import {
supportsPlasma,
supportsPlume,
supportsPolygon,
supportsRobinhood,
supportsScroll,
supportsSei,
supportsSoneium,
Expand Down Expand Up @@ -135,6 +136,7 @@ export const evmChainIds = [
KnownChainIds.SoneiumMainnet,
KnownChainIds.SeiMainnet,
KnownChainIds.AbstractMainnet,
KnownChainIds.RobinhoodMainnet,
] as const

export type EvmChainAdapter = EvmBaseAdapter<EvmChainId>
Expand Down Expand Up @@ -283,6 +285,8 @@ export abstract class EvmBaseAdapter<T extends EvmChainId> implements IChainAdap
return supportsSoneium(wallet)
case Number(fromChainId(KnownChainIds.SeiMainnet).chainReference):
return supportsSei(wallet)
case Number(fromChainId(KnownChainIds.RobinhoodMainnet).chainReference):
return supportsRobinhood(wallet)
default:
return false
}
Expand Down Expand Up @@ -490,6 +494,11 @@ export abstract class EvmBaseAdapter<T extends EvmChainId> implements IChainAdap
symbol: 'ETH',
explorer: 'https://abscan.org',
},
[KnownChainIds.RobinhoodMainnet]: {
name: 'Ethereum',
symbol: 'ETH',
explorer: 'https://robinhoodchain.blockscout.com',
},
}[this.chainId]

try {
Expand Down
2 changes: 2 additions & 0 deletions packages/chain-adapters/src/evm/SecondClassEvmAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
mantleChainId,
modeChainId,
plumeChainId,
robinhoodChainId,
seiChainId,
soneiumChainId,
sonicChainId,
Expand Down Expand Up @@ -75,6 +76,7 @@ const WRAPPED_NATIVE_CONTRACT_BY_CHAIN_ID: Partial<Record<ChainId, string>> = {
[storyChainId]: '0x1514000000000000000000000000000000000000',
[plumeChainId]: '0xea237441c92cae6fc17caaf9a7acb3f953be4bd1',
[seiChainId]: '0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7',
[robinhoodChainId]: '0x0Bd7D308f8E1639FAb988df18A8011f41EAcAD73',
}
const BATCH_SIZE = 500

Expand Down
1 change: 1 addition & 0 deletions packages/chain-adapters/src/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ export * as bob from './bob'
export * as mode from './mode'
export * as soneium from './soneium'
export * as sei from './sei'
export * as robinhood from './robinhood'
Loading
Loading