Skip to content

Commit acbe840

Browse files
committed
fix: remove unused .env and bitly instance
1 parent 9924412 commit acbe840

File tree

2 files changed

+5
-42
lines changed

2 files changed

+5
-42
lines changed

.env.example

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# Twitter client---
2-
#CONSUMER_KEY=
3-
#CONSUMER_SECRET=
4-
#BEARER_TOKEN=
2+
ACCESS_TOKEN=
3+
ACCESS_TOKEN_SECRET=
4+
CONSUMER_KEY=
5+
CONSUMER_KEY_SECRET=
56

6-
# Bitly client---
7-
BITLY_TOKEN=
87

98
# Web3---
109
GENERALIZED_TCR_VIEW_ADDRESS=0x27BC296DC0b8a6c3cD39326aE9EC14604e96f7BF
1110
PYTHIA_ADDRESS=0x54A92C21c6553a8085066311F2C8D9Db1B5e6610
1211
PROVIDER_URL=https://rpc.xdaichain.com/
1312
IPFS_GATEWAY=https://ipfs.kleros.io
14-
GTCR_SUBGRAPH_URL=https://api.thegraph.com/subgraphs/name/eccentricexit/curate-xdai-ii
1513

1614
# The block time is used calculate how many blocks to scan when fetching
1715
# logs and avoid rate limiting by web3 providers.

index.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
const ethers = require('ethers')
22
const level = require('level')
33
const Twitter = require('twitter-lite')
4-
const fetch = require('node-fetch')
54

65
const _GeneralizedTCRView = require('./abis/GeneralizedTCRView.json')
76
const _GeneralizedTCR = require('./abis/GeneralizedTCR.json')
@@ -38,38 +37,4 @@ const gtcrView = new ethers.Contract(
3837
provider
3938
)
4039

41-
;(async () => {
42-
console.info('Instantiating bitly client:', process.env.BITLY_TOKEN)
43-
const groupIDResponse = await fetch('https://api-ssl.bitly.com/v4/groups', {
44-
method: 'get',
45-
headers: {
46-
Authorization: `Bearer ${process.env.BITLY_TOKEN}`
47-
}
48-
})
49-
50-
const groupID = (await groupIDResponse.json()).groups[0].guid
51-
console.info(`Got bitly groupID ${groupID}`)
52-
53-
const bitly = {
54-
shorten: async url =>
55-
`https://${
56-
(
57-
await (
58-
await fetch('https://api-ssl.bitly.com/v4/shorten', {
59-
method: 'post',
60-
headers: {
61-
Authorization: `Bearer ${process.env.BITLY_TOKEN}`,
62-
'Content-Type': 'application/json'
63-
},
64-
body: JSON.stringify({
65-
long_url: url,
66-
group_guid: groupID
67-
})
68-
})
69-
).json()
70-
).id
71-
}`
72-
}
73-
74-
gtcrBot(provider, pythia, twitterClient, gtcrView, db, bitly)
75-
})()
40+
gtcrBot(provider, pythia, twitterClient, gtcrView, db)

0 commit comments

Comments
 (0)