Skip to content

Commit eb902f6

Browse files
authored
Merge pull request #279 from OlympusDAO/base-pol
Improvements to POL indexing
2 parents 5d54a52 + 6ad715e commit eb902f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+9122
-162
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"remove-local": "graph remove --node http://localhost:8020/ olympus",
1515
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 olympus",
1616
"ls-deadcode": "yarn ts-prune -p tsconfig.ts-prune.json | grep -v 'used in module'",
17-
"subgraph": "yarn ts-node bin/subgraph/src/index.ts"
17+
"subgraph": "yarn ts-node bin/subgraph/src/index.ts",
18+
"lint": "eslint --fix ."
1819
},
1920
"dependencies": {
2021
"@apollo/client": "^3.8.4",

subgraphs/arbitrum/src/contracts/Contracts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { BigDecimal, BigInt, log } from "@graphprotocol/graph-ts";
33
import { ERC20 } from "../../../shared/generated/Price/ERC20";
44
import { TokenRecord } from "../../../shared/generated/schema";
55
import { getERC20TokenRecordFromWallet } from "../../../shared/src/contracts/ERC20";
6+
import { getTokenRecordValue } from "../../../shared/src/utils/TokenRecordHelper";
67
import { DAO_WALLET } from "../../../shared/src/Wallets";
78
import {
89
BLOCKCHAIN,
@@ -11,10 +12,9 @@ import {
1112
ERC20_JONES,
1213
ERC20_TOKENS_ARBITRUM,
1314
ERC20_WETH,
14-
JONES_WRITE_OFF_BLOCK,
1515
getProtocolAddresses,
16+
JONES_WRITE_OFF_BLOCK,
1617
} from "./Constants";
17-
import { getTokenRecordValue } from "../../../shared/src/utils/TokenRecordHelper";
1818

1919
export function getContractName(
2020
contractAddress: string,

subgraphs/arbitrum/src/contracts/Sentiment.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts";
22

33
import { TokenSupply } from "../../../shared/generated/schema";
4-
import { ERC20_OHM, SENTIMENT_LTOKEN } from "./Constants";
5-
import { ERC20 } from "../../generated/TokenRecords-arbitrum/ERC20";
64
import { toDecimal } from "../../../shared/src/utils/Decimals";
7-
import { TYPE_LENDING, createTokenSupply } from "../../../shared/src/utils/TokenSupplyHelper";
5+
import { createTokenSupply,TYPE_LENDING } from "../../../shared/src/utils/TokenSupplyHelper";
6+
import { ERC20 } from "../../generated/TokenRecords-arbitrum/ERC20";
7+
import { ERC20_OHM, SENTIMENT_LTOKEN } from "./Constants";
88
import { getContractName, getWalletAddressesForContract } from "./Contracts";
99

1010
export function getSentimentSupply(timestamp: BigInt, blockNumber: BigInt): TokenSupply[] {

subgraphs/arbitrum/src/contracts/Silo.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts";
22

33
import { TokenSupply } from "../../../shared/generated/schema";
4-
import { ERC20_OHM } from "./Constants";
5-
import { ERC20 } from "../../generated/TokenRecords-arbitrum/ERC20";
64
import { toDecimal } from "../../../shared/src/utils/Decimals";
7-
import { TYPE_LENDING, createTokenSupply } from "../../../shared/src/utils/TokenSupplyHelper";
5+
import { createTokenSupply,TYPE_LENDING } from "../../../shared/src/utils/TokenSupplyHelper";
6+
import { ERC20 } from "../../generated/TokenRecords-arbitrum/ERC20";
7+
import { ERC20_OHM } from "./Constants";
88
import { getContractName, getWalletAddressesForContract } from "./Contracts";
99

1010
// Hard-coding this for now. If we wanted this to be generalisable, we would use the Silo Repository contract.

subgraphs/arbitrum/src/treasury/OhmCalculations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ import { ERC20 } from "../../generated/TokenRecords-arbitrum/ERC20";
1010
import { OlympusLender } from "../../generated/TokenRecords-arbitrum/OlympusLender";
1111
import { CIRCULATING_SUPPLY_WALLETS, ERC20_GOHM_SYNAPSE, ERC20_OHM, OLYMPUS_LENDER, SENTIMENT_DEPLOYMENTS, SENTIMENT_LTOKEN, SILO_ADDRESS, SILO_DEPLOYMENTS } from "../contracts/Constants";
1212
import { getContractName } from "../contracts/Contracts";
13-
import { PRICE_HANDLERS } from "../price/PriceLookup";
14-
import { getSiloSupply } from "../contracts/Silo";
1513
import { getSentimentSupply } from "../contracts/Sentiment";
14+
import { getSiloSupply } from "../contracts/Silo";
15+
import { PRICE_HANDLERS } from "../price/PriceLookup";
1616

1717
/**
1818
* Block after which the Silo repository will be used, instead of manual deployments.

subgraphs/base/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Base Subgraph Changelog
22

3+
## 1.0.2 (2025-01-10)
4+
5+
- Adds price handler for ERC4626 tokens
6+
- Adds price handler for Uniswap V3 (specifically, underlying token balances)
7+
- Adds tracking of USDS, sUSDS and OHM-sUSDS LP
8+
39
## 0.0.1 (2024-06-04)
410

511
- Adds POL in Uniswap V2

subgraphs/base/config.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"id": "QmdqJ1zoExrs8u2T93wXSRWSx5VSKqKWTV4gCE2vszGwgt",
2+
"id": "QmYgw9fWpiriYBj6NL8U8952Gsrxfvdfe3hxHE25UJm56A",
33
"org": "olympusdao",
44
"name": "protocol-metrics-base",
5-
"version": "0.0.2"
6-
}
5+
"version": "1.0.2"
6+
}

0 commit comments

Comments
 (0)