Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Berachain #106

Merged
merged 3 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/server/.wundergraph/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ export const CHAIN_ETHEREUM = "Ethereum";
export const CHAIN_FANTOM = "Fantom";
export const CHAIN_POLYGON = "Polygon";
export const CHAIN_BASE = "Base";
export const CHAIN_BERACHAIN = "Berachain";

export enum Chains {
ARBITRUM = CHAIN_ARBITRUM,
ETHEREUM = CHAIN_ETHEREUM,
FANTOM = CHAIN_FANTOM,
POLYGON = CHAIN_POLYGON,
BASE = CHAIN_BASE,
BERACHAIN = CHAIN_BERACHAIN,
};

export const TOKEN_SUPPLY_TYPE_BONDS_DEPOSITS = "OHM Bonds (Burnable Deposits)";
Expand Down
17 changes: 17 additions & 0 deletions apps/server/.wundergraph/fragments/protocolMetric.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,20 @@ fragment Fragment_ProtocolMetricBase on treasuryBase_ProtocolMetric {
timestamp
totalValueLocked
}

fragment Fragment_ProtocolMetricBerachain on treasuryBerachain_ProtocolMetric {
id
block
currentAPY
currentIndex
date
gOhmPrice
gOhmTotalSupply
nextDistributedOhm
nextEpochRebase
ohmPrice
ohmTotalSupply
sOhmCirculatingSupply
timestamp
totalValueLocked
}
20 changes: 20 additions & 0 deletions apps/server/.wundergraph/fragments/tokenRecord.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,23 @@ fragment Fragment_TokenRecordBase on treasuryBase_TokenRecord {
value
valueExcludingOhm
}

fragment Fragment_TokenRecordBerachain on treasuryBerachain_TokenRecord {
id
balance
block
blockchain
category
date
isBluechip
isLiquid
multiplier
rate
source
sourceAddress
timestamp
token
tokenAddress
value
valueExcludingOhm
}
17 changes: 17 additions & 0 deletions apps/server/.wundergraph/fragments/tokenSupply.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,20 @@ fragment Fragment_TokenSupplyBase on treasuryBase_TokenSupply {
tokenAddress
type
}

fragment Fragment_TokenSupplyBerachain on treasuryBerachain_TokenSupply {
id
balance
block
blockchain
date
pool
poolAddress
source
sourceAddress
supplyBalance
timestamp
token
tokenAddress
type
}
32 changes: 31 additions & 1 deletion apps/server/.wundergraph/metricHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RequestLogger } from "@wundergraph/sdk/server";
import { CATEGORY_POL, CATEGORY_STABLE, CATEGORY_VOLATILE, CHAIN_ARBITRUM, CHAIN_BASE, CHAIN_ETHEREUM, CHAIN_FANTOM, CHAIN_POLYGON, Chains, TOKEN_SUPPLY_TYPE_BONDS_DEPOSITS, TOKEN_SUPPLY_TYPE_BONDS_PREMINTED, TOKEN_SUPPLY_TYPE_BONDS_VESTING_DEPOSITS, TOKEN_SUPPLY_TYPE_BONDS_VESTING_TOKENS, TOKEN_SUPPLY_TYPE_BOOSTED_LIQUIDITY_VAULT, TOKEN_SUPPLY_TYPE_LENDING, TOKEN_SUPPLY_TYPE_LIQUIDITY, TOKEN_SUPPLY_TYPE_OFFSET, TOKEN_SUPPLY_TYPE_TOTAL_SUPPLY, TOKEN_SUPPLY_TYPE_TREASURY, TokenSupplyCategories } from "./constants";
import { CATEGORY_POL, CATEGORY_STABLE, CATEGORY_VOLATILE, CHAIN_ARBITRUM, CHAIN_BASE, CHAIN_BERACHAIN, CHAIN_ETHEREUM, CHAIN_FANTOM, CHAIN_POLYGON, Chains, TOKEN_SUPPLY_TYPE_BONDS_DEPOSITS, TOKEN_SUPPLY_TYPE_BONDS_PREMINTED, TOKEN_SUPPLY_TYPE_BONDS_VESTING_DEPOSITS, TOKEN_SUPPLY_TYPE_BONDS_VESTING_TOKENS, TOKEN_SUPPLY_TYPE_BOOSTED_LIQUIDITY_VAULT, TOKEN_SUPPLY_TYPE_LENDING, TOKEN_SUPPLY_TYPE_LIQUIDITY, TOKEN_SUPPLY_TYPE_OFFSET, TOKEN_SUPPLY_TYPE_TOTAL_SUPPLY, TOKEN_SUPPLY_TYPE_TREASURY, TokenSupplyCategories } from "./constants";
import { ProtocolMetric } from "./protocolMetricHelper";
import { TokenRecord } from "./tokenRecordHelper";
import { TokenSupply } from "./tokenSupplyHelper";
Expand All @@ -13,6 +13,7 @@ const OHM_ADDRESSES: string[] = [
"0x64aa3364f17a4d01c6f1751fd97c2bd3d7e7f1d5".toLowerCase(), // Mainnet
"0xf0cb2dc0db5e6c66B9a70Ac27B06b878da017028".toLowerCase(), // Arbitrum
"0x060cb087a9730E13aa191f31A6d86bFF8DfcdCC0".toLowerCase(), // Base
"0x18878Df23e2a36f81e820e4b47b4A40576D3159C".toLowerCase(), // Berachain
];

const GOHM_ADDRESSES: string[] = [
Expand Down Expand Up @@ -223,6 +224,7 @@ const getRecordsForTypes = (
[Chains.FANTOM]: [...previousChainRecords[Chains.FANTOM], ...currentTypeRecords.filter(record => record.blockchain === CHAIN_FANTOM)],
[Chains.POLYGON]: [...previousChainRecords[Chains.POLYGON], ...currentTypeRecords.filter(record => record.blockchain === CHAIN_POLYGON)],
[Chains.BASE]: [...previousChainRecords[Chains.BASE], ...currentTypeRecords.filter(record => record.blockchain === CHAIN_BASE)],
[Chains.BERACHAIN]: [...previousChainRecords[Chains.BERACHAIN], ...currentTypeRecords.filter(record => record.blockchain === CHAIN_BERACHAIN)],
};

return [newRecords, newChainRecords];
Expand All @@ -232,6 +234,7 @@ const getRecordsForTypes = (
[Chains.FANTOM]: [] as TokenSupply[],
[Chains.POLYGON]: [] as TokenSupply[],
[Chains.BASE]: [] as TokenSupply[],
[Chains.BERACHAIN]: [] as TokenSupply[],
} as ChainSupplies]);

// Sum to get the balance and supply balance
Expand All @@ -244,6 +247,7 @@ const getRecordsForTypes = (
[Chains.FANTOM]: getBalancesForTypes(chainSupplies[Chains.FANTOM], ohmIndex)[1],
[Chains.POLYGON]: getBalancesForTypes(chainSupplies[Chains.POLYGON], ohmIndex)[1],
[Chains.BASE]: getBalancesForTypes(chainSupplies[Chains.BASE], ohmIndex)[1],
[Chains.BERACHAIN]: getBalancesForTypes(chainSupplies[Chains.BERACHAIN], ohmIndex)[1],
}

return {
Expand Down Expand Up @@ -516,13 +520,15 @@ const getTreasuryAssetValue = (
[Chains.FANTOM]: previousChainValues[Chains.FANTOM] + (currentRecord.blockchain === CHAIN_FANTOM ? currentValue : 0),
[Chains.POLYGON]: previousChainValues[Chains.POLYGON] + (currentRecord.blockchain === CHAIN_POLYGON ? currentValue : 0),
[Chains.BASE]: previousChainValues[Chains.BASE] + (currentRecord.blockchain === CHAIN_BASE ? currentValue : 0),
[Chains.BERACHAIN]: previousChainValues[Chains.BERACHAIN] + (currentRecord.blockchain === CHAIN_BERACHAIN ? currentValue : 0),
};
const newChainRecords: ChainRecords = {
[Chains.ARBITRUM]: [...previousChainRecords[Chains.ARBITRUM], ...(currentRecord.blockchain === CHAIN_ARBITRUM ? [currentRecord] : [])],
[Chains.ETHEREUM]: [...previousChainRecords[Chains.ETHEREUM], ...(currentRecord.blockchain === CHAIN_ETHEREUM ? [currentRecord] : [])],
[Chains.FANTOM]: [...previousChainRecords[Chains.FANTOM], ...(currentRecord.blockchain === CHAIN_FANTOM ? [currentRecord] : [])],
[Chains.POLYGON]: [...previousChainRecords[Chains.POLYGON], ...(currentRecord.blockchain === CHAIN_POLYGON ? [currentRecord] : [])],
[Chains.BASE]: [...previousChainRecords[Chains.BASE], ...(currentRecord.blockchain === CHAIN_BASE ? [currentRecord] : [])],
[Chains.BERACHAIN]: [...previousChainRecords[Chains.BERACHAIN], ...(currentRecord.blockchain === CHAIN_BERACHAIN ? [currentRecord] : [])],
};

return [newTotalValue, newRecords, newChainValues, newChainRecords];
Expand All @@ -535,13 +541,15 @@ const getTreasuryAssetValue = (
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
} as ChainValues,
{
[Chains.ARBITRUM]: [] as TokenRecord[],
[Chains.ETHEREUM]: [] as TokenRecord[],
[Chains.FANTOM]: [] as TokenRecord[],
[Chains.POLYGON]: [] as TokenRecord[],
[Chains.BASE]: [] as TokenRecord[],
[Chains.BERACHAIN]: [] as TokenRecord[],
} as ChainRecords]);

return [totalValue, allRecords, chainValues, chainRecords];
Expand Down Expand Up @@ -619,13 +627,15 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
timestamps: {
[Chains.ARBITRUM]: 0,
[Chains.ETHEREUM]: timestamp,
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
ohmIndex: 0,
ohmApy: 0,
Expand All @@ -636,6 +646,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
ohmCirculatingSupply: 0,
ohmCirculatingSupplyComponents: {
Expand All @@ -644,6 +655,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
ohmFloatingSupply: 0,
ohmFloatingSupplyComponents: {
Expand All @@ -652,6 +664,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
ohmBackedSupply: 0,
gOhmBackedSupply: 0,
Expand All @@ -661,6 +674,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
ohmSupplyCategories: {
[TokenSupplyCategories.BONDS_DEPOSITS]: 0,
Expand All @@ -686,6 +700,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
treasuryLiquidBacking: 0,
treasuryLiquidBackingComponents: {
Expand All @@ -694,6 +709,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: 0,
[Chains.POLYGON]: 0,
[Chains.BASE]: 0,
[Chains.BERACHAIN]: 0,
},
treasuryLiquidBackingPerOhmFloating: 0,
treasuryLiquidBackingPerOhmBacked: 0,
Expand Down Expand Up @@ -729,13 +745,15 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: getBlock(assetValues.marketValueChainRecords.Fantom),
[Chains.POLYGON]: getBlock(assetValues.marketValueChainRecords.Polygon),
[Chains.BASE]: getBlock(assetValues.marketValueChainRecords.Base),
[Chains.BERACHAIN]: getBlock(assetValues.marketValueChainRecords.Berachain),
},
timestamps: {
[Chains.ARBITRUM]: getTimestamp(assetValues.marketValueChainRecords.Arbitrum),
[Chains.ETHEREUM]: getTimestamp(assetValues.marketValueChainRecords.Ethereum),
[Chains.FANTOM]: getTimestamp(assetValues.marketValueChainRecords.Fantom),
[Chains.POLYGON]: getTimestamp(assetValues.marketValueChainRecords.Polygon),
[Chains.BASE]: getTimestamp(assetValues.marketValueChainRecords.Base),
[Chains.BERACHAIN]: getTimestamp(assetValues.marketValueChainRecords.Berachain),
},
ohmIndex: ohmIndex,
ohmApy: ohmApy,
Expand All @@ -746,6 +764,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: ohmTotalSupply.chainSupplyBalances.Fantom,
[Chains.POLYGON]: ohmTotalSupply.chainSupplyBalances.Polygon,
[Chains.BASE]: ohmTotalSupply.chainSupplyBalances.Base,
[Chains.BERACHAIN]: ohmTotalSupply.chainSupplyBalances.Berachain,
},
ohmCirculatingSupply: ohmCirculatingSupply.supplyBalance,
ohmCirculatingSupplyComponents: {
Expand All @@ -754,6 +773,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: ohmCirculatingSupply.chainSupplyBalances.Fantom,
[Chains.POLYGON]: ohmCirculatingSupply.chainSupplyBalances.Polygon,
[Chains.BASE]: ohmCirculatingSupply.chainSupplyBalances.Base,
[Chains.BERACHAIN]: ohmCirculatingSupply.chainSupplyBalances.Berachain,
},
ohmFloatingSupply: ohmFloatingSupply.supplyBalance,
ohmFloatingSupplyComponents: {
Expand All @@ -762,6 +782,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: ohmFloatingSupply.chainSupplyBalances.Fantom,
[Chains.POLYGON]: ohmFloatingSupply.chainSupplyBalances.Polygon,
[Chains.BASE]: ohmFloatingSupply.chainSupplyBalances.Base,
[Chains.BERACHAIN]: ohmFloatingSupply.chainSupplyBalances.Berachain,
},
ohmBackedSupply: ohmBackedSupply.supplyBalance,
gOhmBackedSupply: getGOhmBackedSupply(ohmBackedSupply.supplyBalance, ohmIndex),
Expand All @@ -771,6 +792,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: ohmBackedSupply.chainSupplyBalances.Fantom,
[Chains.POLYGON]: ohmBackedSupply.chainSupplyBalances.Polygon,
[Chains.BASE]: ohmBackedSupply.chainSupplyBalances.Base,
[Chains.BERACHAIN]: ohmBackedSupply.chainSupplyBalances.Berachain,
},
ohmSupplyCategories: supplyCategories[0],
ohmPrice: ohmPrice,
Expand All @@ -785,6 +807,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: assetValues.marketValueChainValues.Fantom,
[Chains.POLYGON]: assetValues.marketValueChainValues.Polygon,
[Chains.BASE]: assetValues.marketValueChainValues.Base,
[Chains.BERACHAIN]: assetValues.marketValueChainValues.Berachain,
},
treasuryLiquidBacking: assetValues.liquidBacking,
treasuryLiquidBackingComponents: {
Expand All @@ -793,6 +816,7 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: assetValues.liquidBackingChainValues.Fantom,
[Chains.POLYGON]: assetValues.liquidBackingChainValues.Polygon,
[Chains.BASE]: assetValues.liquidBackingChainValues.Base,
[Chains.BERACHAIN]: assetValues.liquidBackingChainValues.Berachain,
},
treasuryLiquidBackingPerOhmFloating: getLiquidBackingPerOhmFloating(assetValues.liquidBacking, ohmFloatingSupply.supplyBalance),
treasuryLiquidBackingPerOhmBacked: getLiquidBackingPerOhmBacked(assetValues.liquidBacking, ohmBackedSupply.supplyBalance),
Expand All @@ -805,41 +829,47 @@ export const getMetricObject = (log: RequestLogger, tokenRecords: TokenRecord[],
[Chains.FANTOM]: ohmTotalSupply.chainRecords.Fantom,
[Chains.POLYGON]: ohmTotalSupply.chainRecords.Polygon,
[Chains.BASE]: ohmTotalSupply.chainRecords.Base,
[Chains.BERACHAIN]: ohmTotalSupply.chainRecords.Berachain,
},
ohmCirculatingSupplyRecords: {
[Chains.ARBITRUM]: ohmCirculatingSupply.chainRecords.Arbitrum,
[Chains.ETHEREUM]: ohmCirculatingSupply.chainRecords.Ethereum,
[Chains.FANTOM]: ohmCirculatingSupply.chainRecords.Fantom,
[Chains.POLYGON]: ohmCirculatingSupply.chainRecords.Polygon,
[Chains.BASE]: ohmCirculatingSupply.chainRecords.Base,
[Chains.BERACHAIN]: ohmCirculatingSupply.chainRecords.Berachain,
},
ohmFloatingSupplyRecords: {
[Chains.ARBITRUM]: ohmFloatingSupply.chainRecords.Arbitrum,
[Chains.ETHEREUM]: ohmFloatingSupply.chainRecords.Ethereum,
[Chains.FANTOM]: ohmFloatingSupply.chainRecords.Fantom,
[Chains.POLYGON]: ohmFloatingSupply.chainRecords.Polygon,
[Chains.BASE]: ohmFloatingSupply.chainRecords.Base,
[Chains.BERACHAIN]: ohmFloatingSupply.chainRecords.Berachain,
},
ohmBackedSupplyRecords: {
[Chains.ARBITRUM]: ohmBackedSupply.chainRecords.Arbitrum,
[Chains.ETHEREUM]: ohmBackedSupply.chainRecords.Ethereum,
[Chains.FANTOM]: ohmBackedSupply.chainRecords.Fantom,
[Chains.POLYGON]: ohmBackedSupply.chainRecords.Polygon,
[Chains.BASE]: ohmBackedSupply.chainRecords.Base,
[Chains.BERACHAIN]: ohmBackedSupply.chainRecords.Berachain,
},
treasuryMarketValueRecords: {
[Chains.ARBITRUM]: assetValues.marketValueChainRecords.Arbitrum,
[Chains.ETHEREUM]: assetValues.marketValueChainRecords.Ethereum,
[Chains.FANTOM]: assetValues.marketValueChainRecords.Fantom,
[Chains.POLYGON]: assetValues.marketValueChainRecords.Polygon,
[Chains.BASE]: assetValues.marketValueChainRecords.Base,
[Chains.BERACHAIN]: assetValues.marketValueChainRecords.Berachain,
},
treasuryLiquidBackingRecords: {
[Chains.ARBITRUM]: assetValues.liquidBackingChainRecords.Arbitrum,
[Chains.ETHEREUM]: assetValues.liquidBackingChainRecords.Ethereum,
[Chains.FANTOM]: assetValues.liquidBackingChainRecords.Fantom,
[Chains.POLYGON]: assetValues.liquidBackingChainRecords.Polygon,
[Chains.BASE]: assetValues.liquidBackingChainRecords.Base,
[Chains.BERACHAIN]: assetValues.liquidBackingChainRecords.Berachain,
},
} : {},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default createOperation.query({
fantomBlock: z.number({ description: "Fantom block number" }),
polygonBlock: z.number({ description: "Polygon block number" }),
baseBlock: z.number({ description: "Base block number" }),
berachainBlock: z.number({ description: "Berachain block number" }),
}),
handler: async (ctx) => {
const FUNC = `atBlock/internal/protocolMetrics`;
Expand All @@ -30,6 +31,7 @@ export default createOperation.query({
fantomBlock: ctx.input.fantomBlock.toString(),
polygonBlock: ctx.input.polygonBlock.toString(),
baseBlock: ctx.input.baseBlock.toString(),
berachainBlock: ctx.input.berachainBlock.toString(),
},
});

Expand Down
2 changes: 2 additions & 0 deletions apps/server/.wundergraph/operations/atBlock/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default createOperation.query({
fantomBlock: z.number({ description: "Fantom block number" }),
polygonBlock: z.number({ description: "Polygon block number" }),
baseBlock: z.number({ description: "Base block number" }),
berachainBlock: z.number({ description: "Berachain block number" }),
}),
handler: async (ctx) => {
const FUNC = `atBlock/metrics`;
Expand All @@ -23,6 +24,7 @@ export default createOperation.query({
fantomBlock: ctx.input.fantomBlock,
polygonBlock: ctx.input.polygonBlock,
baseBlock: ctx.input.baseBlock,
berachainBlock: ctx.input.berachainBlock,
};

const protocolMetricsQueryResult = await ctx.operations.query({
Expand Down
2 changes: 2 additions & 0 deletions apps/server/.wundergraph/operations/atBlock/tokenRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default createOperation.query({
fantomBlock: z.number({ description: "Fantom block number" }),
polygonBlock: z.number({ description: "Polygon block number" }),
baseBlock: z.number({ description: "Base block number" }),
berachainBlock: z.number({ description: "Berachain block number" }),
}),
handler: async (ctx) => {
const FUNC = "atBlock/tokenRecords";
Expand All @@ -28,6 +29,7 @@ export default createOperation.query({
fantomBlock: ctx.input.fantomBlock.toString(),
polygonBlock: ctx.input.polygonBlock.toString(),
baseBlock: ctx.input.baseBlock.toString(),
berachainBlock: ctx.input.berachainBlock.toString(),
},
});

Expand Down
2 changes: 2 additions & 0 deletions apps/server/.wundergraph/operations/atBlock/tokenSupplies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default createOperation.query({
fantomBlock: z.number({ description: "Fantom block number" }),
polygonBlock: z.number({ description: "Polygon block number" }),
baseBlock: z.number({ description: "Base block number" }),
berachainBlock: z.number({ description: "Berachain block number" }),
}),
handler: async (ctx) => {
const FUNC = "atBlock/tokenSupplies";
Expand All @@ -28,6 +29,7 @@ export default createOperation.query({
fantomBlock: ctx.input.fantomBlock.toString(),
polygonBlock: ctx.input.polygonBlock.toString(),
baseBlock: ctx.input.baseBlock.toString(),
berachainBlock: ctx.input.berachainBlock.toString(),
},
});

Expand Down
Loading
Loading