Skip to content

Commit c2af01d

Browse files
authored
Merge pull request #616 from gitcoinco/metis
index metis
2 parents 326f2ba + 1b25d80 commit c2af01d

File tree

4 files changed

+47
-2
lines changed

4 files changed

+47
-2
lines changed

.env.example

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ DATABASE_URL=postgres://postgres:postgres@localhost:5432/grants_stack_indexer
3939
#CELO_TESTNET_RPC_URL=
4040
#LUKSO_MAINNET_RPC_URL=
4141
#LUKSO_TESTNET_RPC_URL
42+
# METIS_ANDROMEDA_RPC_URL
4243

4344
#COINGECKO_API_KEY=
4445
#IPFS_GATEWAY=

fly.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ kill_timeout = '5s'
1616
DEPLOYMENT_ENVIRONMENT = 'production'
1717
ENABLE_RESOURCE_MONITOR = 'false'
1818
ESTIMATES_LINEARQF_WORKER_POOL_SIZE = '10'
19-
INDEXED_CHAINS = 'mainnet,optimism,fantom,pgn-testnet,pgn-mainnet,arbitrum,polygon,sepolia,avalanche,avalanche-fuji,scroll,scroll-sepolia,base,zksync-era-mainnet,lukso-mainnet,lukso-testnet,celo-mainnet,celo-testnet,sei-mainnet'
19+
INDEXED_CHAINS = 'mainnet,optimism,fantom,pgn-testnet,pgn-mainnet,arbitrum,polygon,sepolia,avalanche,avalanche-fuji,scroll,scroll-sepolia,base,zksync-era-mainnet,lukso-mainnet,lukso-testnet,celo-mainnet,celo-testnet,sei-mainnet,metisAndromeda'
2020
LOG_LEVEL = 'debug'
2121
NODE_OPTIONS = '--max-old-space-size=4096'
2222
PORT = '8080'

src/config.ts

+43-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ type CoingeckoSupportedChainId =
1717
| 713715
1818
| 1329
1919
| 42
20-
| 42220;
20+
| 42220
21+
| 1088;
2122

2223
const CHAIN_DATA_VERSION = "71";
2324

@@ -1702,6 +1703,47 @@ const CHAINS: Chain[] = [
17021703
},
17031704
],
17041705
},
1706+
{
1707+
id: 1088,
1708+
name: "metisAndromeda",
1709+
rpc: rpcUrl
1710+
.default("https://andromeda.metis.io/?owner=1088")
1711+
.parse(process.env.METIS_ANDROMEDA_RPC_URL),
1712+
pricesFromTimestamp: Date.UTC(2024, 0, 1, 0, 0, 0),
1713+
tokens: [
1714+
{
1715+
code: "METIS",
1716+
address: "0x0000000000000000000000000000000000000000",
1717+
decimals: 18,
1718+
priceSource: {
1719+
chainId: 1,
1720+
address: "0x9e32b13ce7f2e80a01932b42553652e053d6ed8e",
1721+
},
1722+
},
1723+
{
1724+
code: "METIS",
1725+
address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
1726+
decimals: 18,
1727+
priceSource: {
1728+
chainId: 1,
1729+
address: "0x9e32b13ce7f2e80a01932b42553652e053d6ed8e",
1730+
},
1731+
},
1732+
],
1733+
subscriptions: [
1734+
// Allo V2
1735+
{
1736+
contractName: "AlloV2/Registry/V1",
1737+
address: "0x4aacca72145e1df2aec137e1f3c5e3d75db8b5f3",
1738+
fromBlock: 17860000,
1739+
},
1740+
{
1741+
contractName: "AlloV2/Allo/V1",
1742+
address: "0xB087535DB0df98fC4327136e897A5985E5Cfbd66",
1743+
fromBlock: 17860000,
1744+
},
1745+
],
1746+
},
17051747
];
17061748

17071749
export const getDecimalsForToken = (

src/prices/coinGecko.ts

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const platforms: { [key: number]: string } = {
1515
1329: "sei-network",
1616
42: "lukso",
1717
42220: "celo",
18+
1088: "metis",
1819
};
1920

2021
const nativeTokens: { [key: number]: string } = {
@@ -27,6 +28,7 @@ const nativeTokens: { [key: number]: string } = {
2728
1329: "sei-network",
2829
42: "lukso-token",
2930
42220: "celo",
31+
1088: "metis-token",
3032
};
3133

3234
type TimestampInMs = number;

0 commit comments

Comments
 (0)