Skip to content

Commit

Permalink
add hedera
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Feb 10, 2025
1 parent 278b488 commit ca31709
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ DD_ENV=development
#LUKSO_TESTNET_RPC_URL
#METIS_ANDROMEDA_RPC_URL
#GNOSIS_RPC_URL
#HEDERA_RPC_URL

#COINGECKO_API_KEY=
#IPFS_GATEWAYs=[]
Expand Down
2 changes: 1 addition & 1 deletion fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ kill_timeout = "5s"
DEPLOYMENT_ENVIRONMENT = "production"
ENABLE_RESOURCE_MONITOR = "false"
ESTIMATES_LINEARQF_WORKER_POOL_SIZE = "10"
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"
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"
LOG_LEVEL = "debug"
NODE_OPTIONS = "--max-old-space-size=4096"
PORT = "8080"
Expand Down
35 changes: 34 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ type CoingeckoSupportedChainId =
| 1329
| 42
| 42220
| 1088;
| 1088
| 295;

const CHAIN_DATA_VERSION = "87";
const IPFS_DATA_VERSION = "1";
Expand Down Expand Up @@ -1828,6 +1829,38 @@ const CHAINS: Chain[] = [
},
],
},
{
id: 295,
name: "hedera",
rpc: rpcUrl
.default("https://mainnet.hashio.io/api")
.parse(process.env.HEDERA_RPC_URL),
pricesFromTimestamp: Date.UTC(2025, 1, 1, 0, 0, 0),
tokens: [
{
code: "HBAR",
address: "0x0000000000000000000000000000000000000000",
decimals: 8,
priceSource: {
chainId: 295,
address: "0x0000000000000000000000000000000000000000",
},
},
],
subscriptions: [
// Allo V2
{
contractName: "AlloV2/Registry/V1",
address: "0x4aacca72145e1df2aec137e1f3c5e3d75db8b5f3",
fromBlock: 75239000,
},
{
contractName: "AlloV2/Allo/V1",
address: "0x1133eA7Af70876e64665ecD07C0A0476d09465a1",
fromBlock: 75239000,
},
],
},
];

export const getDecimalsForToken = (
Expand Down
1 change: 1 addition & 0 deletions src/prices/coinGecko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const nativeTokens: { [key: number]: string } = {
42220: "celo",
1088: "metis-token",
100: "xdai",
295: "hedera-hashgraph",
};

type TimestampInMs = number;
Expand Down

0 comments on commit ca31709

Please sign in to comment.