Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.
Open
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
7 changes: 6 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
DISCORD_TOKEN=
JSON_RPC_URL=
MAINNET_JSON_RPC_URL=
OPTIMISM_JSON_RPC_URL=
POLYGON_JSON_RPC_URL=
ARBITRUM_JSON_RPC_URL=
POLYGON_ZKEVM_JSON_RPC_URL=
SUBGRAPH_APIKEY=

# Twitter
TWITTER_API_KEY=
Expand Down
9 changes: 8 additions & 1 deletion src/config/etherProvider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { ethers } from 'ethers';
import 'dotenv/config';
import { ChainIds } from '../globals/chainIds';

const provider = new ethers.JsonRpcProvider(process.env.JSON_RPC_URL);
const provider = {
[ChainIds.POLYGON_ZKEVM]: new ethers.JsonRpcProvider(process.env.POLYGON_ZKEVM_JSON_RPC_URL),
[ChainIds.MAINNET]: new ethers.JsonRpcProvider(process.env.MAINNET_JSON_RPC_URL),
[ChainIds.ARBITRUM]: new ethers.JsonRpcProvider(process.env.ARBITRUM_JSON_RPC_URL),
[ChainIds.OPTIMISM]: new ethers.JsonRpcProvider(process.env.OPTIMISM_JSON_RPC_URL),
[ChainIds.POLYGON]: new ethers.JsonRpcProvider(process.env.POLYGON_JSON_RPC_URL),
};

export default provider;
84 changes: 42 additions & 42 deletions src/data/abi/ERC20.json
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
[
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
]
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
]
42 changes: 21 additions & 21 deletions src/data/abi/FxGauge.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
[
{
"inputs": [],
"name": "stakingToken",
"outputs":[{"internalType":"address","name":"","type":"address"}],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
]
{
"inputs": [],
"name": "stakingToken",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
]
Loading