diff --git a/.cache/cache.db b/.cache/cache.db deleted file mode 100644 index 76fa110..0000000 Binary files a/.cache/cache.db and /dev/null differ diff --git a/config.yaml b/config.yaml index afc96f7..f628cd5 100644 --- a/config.yaml +++ b/config.yaml @@ -93,9 +93,8 @@ networks: # - 0x24b3fDCdD9fef844fB3094ef43c0A6Ac23a6dF9E # - name: WrappedERC20 - id: 100 - #start_block: 12529458 + start_block: 12529458 # start_block: 36486013 - start_block: 37148256 contracts: - name: HubV2 address: diff --git a/src/ipfs.ts b/src/ipfs.ts index f402024..3bbe03d 100644 --- a/src/ipfs.ts +++ b/src/ipfs.ts @@ -1,7 +1,7 @@ import multihash from "multihashes"; import { Profile } from "./types"; -import { ProfileCache } from "./cache"; -import { Avatar, eventLog } from "generated"; +/* import { ProfileCache } from "./cache"; + */ import { Avatar, eventLog } from "generated"; import { uint8ArrayToCidV0 } from "./utils"; // Simple config with only needed values @@ -80,12 +80,12 @@ export async function getProfileMetadataFromIpfs( } const slicedDigest = metadataDigest.slice(2, metadataDigest.length); - const cache = await ProfileCache.init(); + /* const cache = await ProfileCache.init(); const cacheResult = await cache.read(slicedDigest); if (cacheResult) { return cacheResult; - } + } */ const cidV0 = uint8ArrayToCidV0( Uint8Array.from(Buffer.from(slicedDigest, "hex")) @@ -97,7 +97,7 @@ export async function getProfileMetadataFromIpfs( console.log(`IPFS fetch from ${endpoint} took ${timeTaken.toFixed(2)}ms`); if (data) { console.log("Adding IPFS data to cache", data); - await cache.add(slicedDigest, cidV0, data); + //await cache.add(slicedDigest, cidV0, data); return { cidV0, data }; } } diff --git a/src/utils.ts b/src/utils.ts index c4cba83..03e0dfc 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,6 +1,5 @@ import multihash from "multihashes"; import { Profile } from "./types"; -import { ProfileCache } from "./cache"; import { Avatar, eventLog } from "generated"; /**