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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@
</td>
</tr>
<tr>
<td style="width:100px; text-align:center;">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest to move the chain to the next row
Image

<div align="center">
<img alt="Robinhood Chain" src="https://robinhood.com/favicon.ico" width="24"/>
<br>Robinhood
</div>
</td>
<td style="width:100px; text-align:center;">
<div align="center">
<img alt="coming soon" src="https://i.imgur.com/CexTjqF.png" width="22"/>
Expand Down
22 changes: 22 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { defineChain } from "viem";
import {
bsc,
base,
Expand All @@ -20,6 +21,25 @@ import {
} from "viem/chains";
import type { SupportedChainId } from "./types";

// Robinhood Chain is not exported from viem/chains, so we define it locally.
export const robinhoodChain = defineChain({
id: 4663,
name: "Robinhood Chain",
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: { http: ["https://rpc.chain.robinhood.com"] },
},
blockExplorers: {
default: {
name: "Blockscout",
url: "https://robinhoodchain.blockscout.com",
},
},
contracts: {
multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11" },
},
});


export const FORWARDING_MULTICALL_ABI = [
{
Expand Down Expand Up @@ -134,6 +154,7 @@ export const SUPPORTED_CHAINS = [
worldchain,
monad,
abstract,
robinhoodChain,
];

export const NATIVE_SYMBOL_BY_CHAIN_ID: { [key in SupportedChainId]: string } =
Expand All @@ -156,6 +177,7 @@ export const NATIVE_SYMBOL_BY_CHAIN_ID: { [key in SupportedChainId]: string } =
[berachain.id]: berachain.nativeCurrency.symbol,
[worldchain.id]: worldchain.nativeCurrency.symbol,
[abstract.id]: abstract.nativeCurrency.symbol,
[robinhoodChain.id]: robinhoodChain.nativeCurrency.symbol,
};

export const NATIVE_TOKEN_ADDRESS = `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE`;
Expand Down
4 changes: 3 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
monad,
abstract,
} from "viem/chains";
import { robinhoodChain } from "./constants";

import type {
Hex,
Expand Down Expand Up @@ -47,7 +48,8 @@ export type SupportedChainId =
| typeof avalanche.id
| typeof berachain.id
| typeof worldchain.id
| typeof abstract.id;
| typeof abstract.id
| typeof robinhoodChain.id;

export interface EnrichLogsArgs {
transactionReceipt: TransactionReceipt;
Expand Down
7 changes: 6 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ import {
monad,
abstract,
} from "viem/chains";
import { NATIVE_SYMBOL_BY_CHAIN_ID, NATIVE_TOKEN_ADDRESS } from "../constants";
import {
NATIVE_SYMBOL_BY_CHAIN_ID,
NATIVE_TOKEN_ADDRESS,
robinhoodChain,
} from "../constants";
import type { Address } from "viem";
import type {
Trace,
Expand Down Expand Up @@ -50,6 +54,7 @@ export function isChainIdSupported(
berachain.id,
worldchain.id,
abstract.id,
robinhoodChain.id,
];
return supportedChainIds.includes(chainId);
}
Expand Down
Loading