Skip to content

Commit

Permalink
switch from etherscan api to llama api for block by timestamp (DefiLl…
Browse files Browse the repository at this point in the history
  • Loading branch information
slasher125 authored Aug 6, 2022
1 parent 7cd5efa commit c6ed946
Show file tree
Hide file tree
Showing 8 changed files with 822 additions and 116 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,8 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ETHERSCAN: ${{ secrets.ETHERSCAN}}
FANTOMSCAN: ${{ secrets.FANTOMSCAN }}
POLYGONSCAN: ${{ secrets.POLYGONSCAN }}
SNOWTRACE: ${{ secrets.SNOWTRACE }}
ARBISCAN: ${{ secrets.ARBISCAN }}
OPTIMISM: ${{ secrets.OPTIMISM }}
INFURA_CONNECTION: ${{ secrets.INFURA_CONNECTION }}
ALCHEMY_CONNECTION_POLYGON: ${{ secrets.ALCHEMY_CONNECTION_POLYGON }}
ALCHEMY_CONNECTION_ARBITRUM: ${{ secrets.ALCHEMY_CONNECTION_ARBITRUM }}
XDAI: ${{ secrets.XDAI }}
XDAI_RPC: ${{ secrets.XDAI_RPC }}
CRONOS_RPC: ${{ secrets.CRONOS_RPC }}
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@ jobs:
uses: actions/checkout@v2
- name: Run changes files through test script
env:
ETHERSCAN: ${{ secrets.ETHERSCAN}}
FANTOMSCAN: ${{ secrets.FANTOMSCAN }}
POLYGONSCAN: ${{ secrets.POLYGONSCAN }}
SNOWTRACE: ${{ secrets.SNOWTRACE }}
ARBISCAN: ${{ secrets.ARBISCAN }}
OPTIMISM: ${{ secrets.OPTIMISM }}
XDAI: ${{ secrets.XDAI }}
INFURA_CONNECTION: ${{ secrets.INFURA_CONNECTION }}
ALCHEMY_CONNECTION_POLYGON: ${{ secrets.ALCHEMY_CONNECTION_POLYGON }}
ALCHEMY_CONNECTION_ARBITRUM: ${{ secrets.ALCHEMY_CONNECTION_ARBITRUM }}
Expand Down
29 changes: 12 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
An adaptor is just a javascript (or typescript) file that exports an async function that returns an array of objects that represent pools of a protocol. The pools follow the following schema (all values are just examples):

```typescript
interface Pool {
pool: string
chain: string
project: string
symbol: string
tvlUsd: number
apyBase?: number
apyReward?: number
rewardTokens?: Array<string>
underlyingTokens?: Array<string>,
interface Pool {
pool: string;
chain: string;
project: string;
symbol: string;
tvlUsd: number;
apyBase?: number;
apyReward?: number;
rewardTokens?: Array<string>;
underlyingTokens?: Array<string>;
}

```
```typescript

```typescript
{
pool: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae90xb53c1a33016b2dc2ff3653530bff1848a515c8c5", // unique identifier for the pool
chain: "Ethereum", // chain where the pool is
Expand Down Expand Up @@ -90,10 +90,5 @@ This is not needed if you just want to contribute an a new protocol through an a

```
ETHERSCAN=
FANTOMSCAN=
POLYGONSCAN=
SNOWTRACE=
ARBISCAN=
OPTIMISM=
INFURA_CONNECTION=
```
7 changes: 0 additions & 7 deletions env.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ try {
const fs = require('fs');
module.exports = {
// API keys
ETHERSCAN: process.env.ETHERSCAN,
FANTOMSCAN: process.env.FANTOMSCAN,
POLYGONSCAN: process.env.POLYGONSCAN,
SNOWTRACE: process.env.SNOWTRACE,
ARBISCAN: process.env.ARBISCAN,
OPTIMISM: process.env.OPTIMISM,
INFURA_CONNECTION: process.env.INFURA_CONNECTION,
ALCHEMY_CONNECTION_POLYGON: process.env.ALCHEMY_CONNECTION_POLYGON,
ALCHEMY_CONNECTION_ARBITRUM: process.env.ALCHEMY_CONNECTION_ARBITRUM,
XDAI: process.env.XDAI,
XDAI_RPC: process.env.XDAI_RPC,
CRONOS_RPC: process.env.CRONOS_RPC,
// ADAPTOR LIST
Expand Down
7 changes: 0 additions & 7 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,9 @@ functions:
batchSize: 2
functionResponseType: ReportBatchItemFailures
environment:
ETHERSCAN: ${file(./env.js):ETHERSCAN}
FANTOMSCAN: ${file(./env.js):FANTOMSCAN}
POLYGONSCAN: ${file(./env.js):POLYGONSCAN}
SNOWTRACE: ${file(./env.js):SNOWTRACE}
ARBISCAN: ${file(./env.js):ARBISCAN}
OPTIMISM: ${file(./env.js):OPTIMISM}
INFURA_CONNECTION: ${file(./env.js):INFURA_CONNECTION}
ALCHEMY_CONNECTION_POLYGON: ${file(./env.js):ALCHEMY_CONNECTION_POLYGON}
ALCHEMY_CONNECTION_ARBITRUM: ${file(./env.js):ALCHEMY_CONNECTION_ARBITRUM}
XDAI: ${file(./env.js):XDAI}
XDAI_RPC: ${file(./env.js):XDAI_RPC}
CRONOS_RPC: ${file(./env.js):CRONOS_RPC}

Expand Down
Loading

0 comments on commit c6ed946

Please sign in to comment.