Skip to content

Commit 0af9387

Browse files
add hedera (#702)
1 parent 278b488 commit 0af9387

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ DD_ENV=development
4545
#LUKSO_TESTNET_RPC_URL
4646
#METIS_ANDROMEDA_RPC_URL
4747
#GNOSIS_RPC_URL
48+
#HEDERA_RPC_URL
4849

4950
#COINGECKO_API_KEY=
5051
#IPFS_GATEWAYs=[]

fly.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ kill_timeout = "5s"
1717
DEPLOYMENT_ENVIRONMENT = "production"
1818
ENABLE_RESOURCE_MONITOR = "false"
1919
ESTIMATES_LINEARQF_WORKER_POOL_SIZE = "10"
20-
INDEXED_CHAINS = "mainnet,optimism,fantom,arbitrum,polygon,sepolia,avalanche,avalanche-fuji,scroll,scroll-sepolia,base,zksync-era-mainnet,lukso-mainnet,lukso-testnet,celo-mainnet,celo-testnet,metisAndromeda,gnosis,sei-mainnet"
20+
INDEXED_CHAINS = "mainnet,optimism,fantom,arbitrum,polygon,sepolia,avalanche,avalanche-fuji,scroll,scroll-sepolia,base,zksync-era-mainnet,lukso-mainnet,lukso-testnet,celo-mainnet,celo-testnet,metisAndromeda,gnosis,sei-mainnet,hedera"
2121
LOG_LEVEL = "debug"
2222
NODE_OPTIONS = "--max-old-space-size=4096"
2323
PORT = "8080"

src/config.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ type CoingeckoSupportedChainId =
1919
| 1329
2020
| 42
2121
| 42220
22-
| 1088;
22+
| 1088
23+
| 295;
2324

2425
const CHAIN_DATA_VERSION = "87";
2526
const IPFS_DATA_VERSION = "1";
@@ -1828,6 +1829,38 @@ const CHAINS: Chain[] = [
18281829
},
18291830
],
18301831
},
1832+
{
1833+
id: 295,
1834+
name: "hedera",
1835+
rpc: rpcUrl
1836+
.default("https://mainnet.hashio.io/api")
1837+
.parse(process.env.HEDERA_RPC_URL),
1838+
pricesFromTimestamp: Date.UTC(2025, 1, 1, 0, 0, 0),
1839+
tokens: [
1840+
{
1841+
code: "HBAR",
1842+
address: "0x0000000000000000000000000000000000000000",
1843+
decimals: 8,
1844+
priceSource: {
1845+
chainId: 295,
1846+
address: "0x0000000000000000000000000000000000000000",
1847+
},
1848+
},
1849+
],
1850+
subscriptions: [
1851+
// Allo V2
1852+
{
1853+
contractName: "AlloV2/Registry/V1",
1854+
address: "0x4aacca72145e1df2aec137e1f3c5e3d75db8b5f3",
1855+
fromBlock: 75239000,
1856+
},
1857+
{
1858+
contractName: "AlloV2/Allo/V1",
1859+
address: "0x1133eA7Af70876e64665ecD07C0A0476d09465a1",
1860+
fromBlock: 75239000,
1861+
},
1862+
],
1863+
},
18311864
];
18321865

18331866
export const getDecimalsForToken = (

src/prices/coinGecko.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const platforms: { [key: number]: string } = {
1717
42220: "celo",
1818
1088: "metis",
1919
100: "xdai",
20+
295: "hedera-hashgraph",
2021
};
2122

2223
const nativeTokens: { [key: number]: string } = {
@@ -31,6 +32,7 @@ const nativeTokens: { [key: number]: string } = {
3132
42220: "celo",
3233
1088: "metis-token",
3334
100: "xdai",
35+
295: "hedera-hashgraph",
3436
};
3537

3638
type TimestampInMs = number;

0 commit comments

Comments
 (0)