Skip to content

Commit

Permalink
Moralis nodes, some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Klobusnik committed Aug 24, 2021
1 parent 3fe9622 commit ea94edb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@ To run this project, make sure you have set correct API keys for endoints in you

```shell
cat <<EOT >> .env
ZMOK_FR_WS_PROVIDER_URL=wss://api.zmok.io/fr/<ZMOK_APP_ID>
ZMOK_PROVIDER_URL=https://api.zmok.io/mainnet/<ZMOK_APP_ID>
ZMOK_WS_PROVIDER_URL=wss://api.zmok.io/mainnet/<ZMOK_APP_ID>
INFURA_WS_PROVIDER_URL=wss://mainnet.infura.io/ws/v3/<INFURA_API_KEY>
ALCHEMY_WS_PROVIDER_URL=wss://eth-mainnet.ws.alchemyapi.io/v2/ALCHEMY_API_KEY>
ZMOK_FR_PROVIDER_URL=https://api.zmok.io/fr/<ZMOK_APP_ID>
ZMOK_PROVIDER_URL=https://api.zmok.io/mainnet/<ZMOK_APP_ID>
ZMOK_FR_WS_PROVIDER_URL=wss://api.zmok.io/fr/<ZMOK_APP_ID>
INFURA_PROVIDER_URL=https://mainnet.infura.io/v3/<INFURA_API_KEY>
INFURA_WS_PROVIDER_URL=wss://mainnet.infura.io/ws/v3/<INFURA_API_KEY>
ALCHEMY_PROVIDER_URL=https://eth-mainnet.alchemyapi.io/v2/<ALCHEMY_API_KEY>
ALCHEMY_WS_PROVIDER_URL=wss://eth-mainnet.ws.alchemyapi.io/v2/<ALCHEMY_API_KEY>
MORALIS_PROVIDER_URL=https://speedy-nodes-nyc.moralis.io/<MORALIS_API_KEY>/eth/mainnet
MORALIS_WS_PROVIDER_URL=wss://speedy-nodes-nyc.moralis.io/<MORALIS_API_KEY>/eth/mainnet/ws
EOT
```

Expand Down
6 changes: 5 additions & 1 deletion start.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const start = async () => {
{"name": "ZMOK-WS", "url": process.env.ZMOK_WS_PROVIDER_URL},
{"name": "INFURA-WS", "url": process.env.INFURA_WS_PROVIDER_URL},
{"name": "ALCHEMY-WS", "url": process.env.ALCHEMY_WS_PROVIDER_URL},
{"name": "MORALIS-WS", "url": process.env.MORALIS_WS_PROVIDER_URL},
// {"name": "QUICKNODE", "url": "TODO"}
].forEach(async (k, i) => {
let wsProvider = new Web3WsProvider(k.url, wsOptions);
Expand All @@ -85,9 +86,12 @@ const start = async () => {

// JSON RPC providers
while (true) {
[{"name": "ZMOK-FR", "url": process.env.ZMOK_FR_PROVIDER_URL},
[
{"name": "ZMOK-FR", "url": process.env.ZMOK_FR_PROVIDER_URL},
{"name": "ZMOK", "url": process.env.ZMOK_PROVIDER_URL},
{"name": "INFURA", "url": process.env.INFURA_PROVIDER_URL},
{"name": "ALCHEMY", "url": process.env.ALCHEMY_PROVIDER_URL},
{"name": "MORALIS", "url": process.env.MORALIS_PROVIDER_URL},
// {"name": "QUICKNODE", "url": "TODO"}
].forEach(async (k, i) => {
const client = new JsonRpc(k.url);
Expand Down

0 comments on commit ea94edb

Please sign in to comment.