From 3211782d54532aa460f060bef478d08221692981 Mon Sep 17 00:00:00 2001 From: Arjun Rao <2940142+arjun-io@users.noreply.github.com> Date: Wed, 30 Oct 2024 15:29:03 -0400 Subject: [PATCH] fix single oracle fetch, beta.3 --- contracts/Lens.sol | 2 +- package.json | 2 +- src/lib/markets/chain.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/Lens.sol b/contracts/Lens.sol index 01c82e6..8f0e2b5 100644 --- a/contracts/Lens.sol +++ b/contracts/Lens.sol @@ -344,7 +344,7 @@ contract MarketMetadataLens { IGasOracle settlementGasOracle; } - function metadata(IMarket[] memory markets) public view returns (MarketMetadata[] memory marketMetadata) { + function metadataBatch(IMarket[] memory markets) public view returns (MarketMetadata[] memory marketMetadata) { marketMetadata = new MarketMetadata[](markets.length); for (uint i = 0; i < markets.length; i++) { marketMetadata[i] = metadata(markets[i]); diff --git a/package.json b/package.json index 46757e8..dfd1609 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@perennial/sdk", - "version": "0.0.3-beta.2", + "version": "0.0.3-beta.3", "description": "", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/lib/markets/chain.ts b/src/lib/markets/chain.ts index 8c52a51..9457331 100644 --- a/src/lib/markets/chain.ts +++ b/src/lib/markets/chain.ts @@ -39,7 +39,7 @@ export async function fetchMarketOracles( const lensResult = await publicClient.readContract({ address: marketMetadataLens, abi: MarketMetadataLensAbi, - functionName: 'metadata', + functionName: 'metadataBatch', args: [marketsWithAddress.map(({ marketAddress }) => marketAddress)], stateOverride: [ {