Skip to content

Commit

Permalink
update fetchers for blitmap heaven.computer and make generic tool for…
Browse files Browse the repository at this point in the history
… copying over metadata name
  • Loading branch information
iainnash committed Oct 4, 2021
1 parent ba8b249 commit 9ee29b5
Show file tree
Hide file tree
Showing 5 changed files with 1,408 additions and 33 deletions.
3 changes: 3 additions & 0 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ export const FOUNDATION_TOKEN_ADDRESS =
export const WRAPPED_CRYPTOPUNKS_TOKEN_ADDRESS =
'0xb7F7F6C52F2e2fdb1963Eab30438024864c313F6'

export const BLITMAP_TOKEN_ADDRESS =
'0x8d04a8c79cEB0889Bdd12acdF3Fa9D207eD3Ff63'

export const KNOWN_ORIGIN_TOKEN_ADDRESS =
'0xFBeef911Dc5821886e1dda71586d90eD28174B7d'

Expand Down
4 changes: 0 additions & 4 deletions src/metadata/fetcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
BLITMAP_TOKEN_ADDRESS,
HASHMASKS_TOKEN_ADDRESS,
LOOT_TOKEN_ADDRESS,
ZORA_RINKEBY_TOKEN_ADDRESS,
Expand All @@ -8,7 +7,6 @@ import {
import { fetchZoraMeta } from './zora'
import { fetchHashmaskMeta } from './hashmasks'
import { JsonRpcProvider } from '@ethersproject/providers'
import { fetchBlitmapMeta } from './blimap'
import { fetchLootMeta } from './loot'

export function fetchOnChainData(
Expand All @@ -22,8 +20,6 @@ export function fetchOnChainData(
case ZORA_TOKEN_ADDRESS:
case ZORA_RINKEBY_TOKEN_ADDRESS:
return fetchZoraMeta(tokenAddress, tokenId, provider)
case BLITMAP_TOKEN_ADDRESS:
return fetchBlitmapMeta(tokenAddress, tokenId, provider)
case LOOT_TOKEN_ADDRESS:
return fetchLootMeta(tokenAddress, tokenId, provider)
default:
Expand Down
1 change: 0 additions & 1 deletion src/metadata/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './blimap'
export * from './fetcher'
export * from './hashmasks'
export * from './loot'
Expand Down
6 changes: 2 additions & 4 deletions src/metadata/normaliser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@ export function normaliseURIData(
if (isAddressMatch(tokenAddress, HEAVEN_COMPUTER_TOKEN_ADDRESS)) {
normalisedData = {
...normalisedData,
...(normalisedData.media && normalisedData.media && {
contentURL: normalisedData.image,
// ¯\_(ツ)_/¯
contentURLMimeType: 'video/mp4',
...(normalisedData.animation_url && {
animation_url: normalisedData.image,
})
}
}
Expand Down
Loading

0 comments on commit 9ee29b5

Please sign in to comment.