-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9234aca
Showing
79 changed files
with
14,870 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
WRITE_TO_DB_SECONDS=20 | ||
FRONTEND_URL=["http://localhost:5007"] | ||
PORT=5006 | ||
CHAIN_ID=56 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules | ||
.env | ||
scraper.log | ||
missing.json | ||
config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const EnumChainId = require("./enum/chain.id"); | ||
const { toCheckSum } = require("./utils/addresses"); | ||
let scraperConfig = { | ||
[EnumChainId.BSC]: { | ||
"save_price": true, // do you want the scraper to save the price records of the tokens ? | ||
"save_transactions": true, // do you want the scraper to save every swap transaction ? | ||
"calculate_pair_fees": true, // do you want the scraper to save the fees of all the pairs ? | ||
"whitelist_enabled": false,// do you want the scraper to scrape only specific given tokens ? | ||
"whitelist": [ // pass here the tokens to whitelist as the example one | ||
toCheckSum("0xc748673057861a797275CD8A068AbB95A902e8de") // example whitelisted token | ||
], | ||
"use_checkpoint_when_restart": false, // if the scraper crashes, it has to scrape all the block since the latest one scraped? | ||
"http_provider": "<your_http_provider>", // to fill | ||
"ws_provider": "<your_ws_provider>", // to fill | ||
} | ||
} | ||
module.exports = scraperConfig; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
const EnumCommonAddresses = { | ||
ZERO: "0x0000000000000000000000000000000000000000" | ||
}; | ||
|
||
module.exports = EnumCommonAddresses; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const EnumBulkTypes = { | ||
TOKEN_HISTORY: 'tokenHistory', | ||
TOKEN_BASIC: 'tokenBasic', | ||
HISTORY_PRICE: 'historyPrice', | ||
HISOTRY_TRANSACTION: 'historyTransacton', | ||
ROUTERS: 'routers' | ||
} | ||
module.exports = EnumBulkTypes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const EnumChainId = { | ||
BSC: 56, | ||
BSC_TESTNET: 97, | ||
ETH: 1, | ||
POLYGON: 137, | ||
RINKEBY: 4 | ||
} | ||
module.exports = EnumChainId; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const UtilsAddresses = require("../utils/addresses"); | ||
const EnumChainId = require("./chain.id"); | ||
|
||
const EnumContracts = { | ||
[EnumChainId.BSC]: { | ||
MAIN_ROUTER: UtilsAddresses.toCheckSum("0x10ED43C718714eb63d5aA57B78B54704E256024E"), // Pancake | ||
MAIN_FACTORY: UtilsAddresses.toCheckSum("0xca143ce32fe78f1f7019d7d551a6402fc5350c73") // Pancake | ||
} | ||
}; | ||
|
||
module.exports = EnumContracts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
var EnumChainId = require('./chain.id'); | ||
var UtilsAddresses =require('../utils/addresses'); | ||
|
||
const EnumMainTokens = { | ||
[EnumChainId.BSC_TESTNET]: { | ||
ETH: { | ||
address: UtilsAddresses.toCheckSum("0xd66c6b4f0be8ce5b39d52e0fd1344c389929b378"), | ||
decimals: 18 | ||
},// | ||
BUSD: { | ||
address: UtilsAddresses.toCheckSum("0xed24fc36d5ee211ea25a80239fb8c4cfd80f12ee"), | ||
decimals: 18 | ||
},// | ||
DAI: { | ||
address: UtilsAddresses.toCheckSum("0xec5dcb5dbf4b114c9d0f65bccab49ec54f6a0867"), | ||
decimals: 18 | ||
},// | ||
BTC: { | ||
address: UtilsAddresses.toCheckSum("0x6ce8da28e2f864420840cf74474eff5fd80e65b8"), | ||
decimals: 18 | ||
},// | ||
XRP: { | ||
address: UtilsAddresses.toCheckSum("0xa83575490d7df4e2f47b7d38ef351a2722ca45b9"), | ||
decimals: 18 | ||
},// | ||
USDC: { | ||
address: UtilsAddresses.toCheckSum("0x64544969ed7ebf5f083679233325356ebe738930"), | ||
decimals: 18 | ||
},// | ||
USDT: { | ||
address: UtilsAddresses.toCheckSum("0x337610d27c682e347c9cd60bd4b3b107c9d34ddd"), | ||
decimals: 18 | ||
},// | ||
CST: { | ||
address: UtilsAddresses.toCheckSum("0x0730eCd23F920d00C2D7AC5b245675B8423b0Ef1"), | ||
decimals: 9 | ||
} | ||
}, | ||
[EnumChainId.BSC]: { | ||
BTC: { | ||
address: UtilsAddresses.toCheckSum("0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c"), | ||
decimals: 18 | ||
},// | ||
DOT: { | ||
address: UtilsAddresses.toCheckSum("0x7083609fce4d1d8dc0c979aab8c869ea2c873402"), | ||
decimals: 18 | ||
},// | ||
|
||
WBNB: { | ||
address: UtilsAddresses.toCheckSum("0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"), | ||
decimals: 18 | ||
}, | ||
BUSD: { | ||
address: UtilsAddresses.toCheckSum("0xe9e7cea3dedca5984780bafc599bd69add087d56"), | ||
decimals: 18 | ||
},// | ||
USDC: { | ||
address: UtilsAddresses.toCheckSum("0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d"), | ||
decimals: 18 | ||
},// | ||
USDT: { | ||
address: UtilsAddresses.toCheckSum("0x55d398326f99059ff775485246999027b3197955"), | ||
decimals: 18 | ||
},// | ||
DAI: { | ||
address: UtilsAddresses.toCheckSum("0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3"), | ||
decimals: 18 | ||
} | ||
} | ||
} | ||
|
||
EnumMainTokens[EnumChainId.BSC].STABLECOINS = [ "BUSD", "USDC", "USDT", "DAI" ].map( e => EnumMainTokens[EnumChainId.BSC][e].address ); | ||
EnumMainTokens[EnumChainId.BSC].MAIN = EnumMainTokens[EnumChainId.BSC]["WBNB"]; | ||
|
||
// [0x10ED43C718714eb63d5aA57B78B54704E256024E, 0x10ED43C718714eb63d5aA57B78B54704E256024E,0x10ED43C718714eb63d5aA57B78B54704E256024E,0x10ED43C718714eb63d5aA57B78B54704E256024E,0x0000000000000000000000000000000000000000] | ||
// [0xe9e7cea3dedca5984780bafc599bd69add087d56, 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c, 0x55d398326f99059ff775485246999027b3197955, 0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d] | ||
// 1000000000000000000 | ||
module.exports = EnumMainTokens; | ||
|
||
// usdc -> usdt -> ice -> ftm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[LAST SCRAPED] 17085098 | ||
[UPDATING UP TO BLOCK] 17085164 | ||
Mongodb Connected | ||
[SLAVE 0] scraped 17085098 0.163. Pairs updated: 53 | ||
[SCRAPED CB] 17085098 | ||
[SLAVE 0] scraped 17085099 0.097. Pairs updated: 51 | ||
[SCRAPED CB] 17085099 | ||
[SLAVE 0] scraped 17085100 0.24. Pairs updated: 68 | ||
[SCRAPED CB] 17085100 | ||
[SLAVE 0] scraped 17085101 0.153. Pairs updated: 30 | ||
[SCRAPED CB] 17085101 | ||
[SLAVE 0] scraped 17085102 1.132. Pairs updated: 47 | ||
[SCRAPED CB] 17085102 | ||
[SLAVE 0] scraped 17085103 0.3. Pairs updated: 50 | ||
[SCRAPED CB] 17085103 | ||
[SLAVE 0] scraped 17085104 0.122. Pairs updated: 54 | ||
[SCRAPED CB] 17085104 | ||
[SCRAPED CB] 17085105 | ||
[SLAVE 0] scraped 17085105 0.283. Pairs updated: 75 | ||
[SLAVE 0] scraped 17085106 0.114. Pairs updated: 68 | ||
[SCRAPED CB] 17085106 | ||
[SLAVE 0] scraped 17085107 0.147. Pairs updated: 51 | ||
[SCRAPED CB] 17085107 | ||
[SLAVE 0] scraped 17085108 0.195. Pairs updated: 70 | ||
[SCRAPED CB] 17085108 |
Empty file.
Empty file.
Empty file.
Oops, something went wrong.