Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #231 from reservoirprotocol/main
Browse files Browse the repository at this point in the history
Merge main
  • Loading branch information
d3or authored Aug 31, 2023
2 parents bf3d703 + 43dda3d commit 9fb66ec
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 2 deletions.
28 changes: 28 additions & 0 deletions src/custom/bridge-to-base/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
export const fetchToken = async (chainId, { contract, tokenId }) => {
return {
contract,
tokenId,
collection: contract.toLowerCase(),
slug: "bridge-to-base",
name: `Bridge to Base ${tokenId}`,
description:
"Base is for everyone, everywhere. Bridge to Base to join us as the journey begins.\\n\\nThis NFT commemorates you being early — you’re one of the first to teleport into the next generation of the internet as we work to bring billions of people onchain.\\n\\nIt’s Onchain Summer and we’re excited to celebrate with you.",
imageUrl:
"https://lh3.googleusercontent.com/CsTRDND79fhWyy0icODaBNmUANFQlDPTmFekuJTkFV7U27BtsMtO-iabwbibkntLumFOSzWeJGCFXLNEw0lZH-ZU-WlID1jdVA",
mediaUrl: null,
attributes: [
{
key: "number",
value: `${tokenId}`,
kind: "string",
rank: 1,
},
{
key: "name",
value: "Bridge to Base",
kind: "string",
rank: 1,
},
],
};
};
20 changes: 20 additions & 0 deletions src/custom/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as copyrightInfringement from "./copyright-infringement";
import * as bridgeToBase from "./bridge-to-base";

export const hasCustomCollectionHandler = (chainId, contract) =>
Boolean(customCollection[`${chainId},${contract}`]);
Expand Down Expand Up @@ -49,6 +50,13 @@ customCollection["1,0x6c4a0c95d02366a8be460108e222ddf58451d1c0"] = copyrightInfr
customCollection["1,0x32d753b840b475832950f6ad140b403f4a467f2c"] = copyrightInfringement;
customCollection["1,0xa6edad01bf197b0ff7c1a8a456731bd2081d6940"] = copyrightInfringement;
customCollection["1,0x254f0ed9a40b81402c86dcb5bc064dc036a5b7cc"] = copyrightInfringement;
customCollection["1,0x6ca95b029e1bca507c87d42b46157a76dab54ec2"] = copyrightInfringement;
customCollection["1,0xd6cc89ef815cfd8f30e3fe8319b3983351c93d31"] = copyrightInfringement;
customCollection["1,0xba60a90d76d44819acb8452a9f89632d57f5692f"] = copyrightInfringement;
customCollection["1,0x6fd6679c599afc1b78985a614adc8a3f8c02eb6b"] = copyrightInfringement;
customCollection["1,0x552ea1b419d4ac9f5ec2048979b1eb29406ee6eb"] = copyrightInfringement;
customCollection["1,0x6dbc1f3961fd606feaf5fb73245aa4b2674d1e66"] = copyrightInfringement;
customCollection["1,0x6c2b0a6269d09d0d22999e68c7be174e5a026c7e"] = copyrightInfringement;

customCollection["137,0xcf77e25cf1bfc57634bb7b95887b7120935a0d7f"] = copyrightInfringement;
customCollection["137,0x27bde07c5d651856c483583899ed6823da3648b7"] = copyrightInfringement;
Expand All @@ -64,6 +72,7 @@ customCollection["137,0xe193c12252c12de24566ed7013004419c162cc81"] = copyrightIn
customCollection["137,0x6d4cf64abac53c8a447e93e662b2e806ba9bb708"] = copyrightInfringement;
customCollection["137,0x18aea30b288d8df78eb0eb6e04b984238abde97e"] = copyrightInfringement;
customCollection["137,0x85efb3603ec84a0fa18f512a3a017422e893c5da"] = copyrightInfringement;
customCollection["137,0xc21acefb1fc169c3904b56eab6f7b4872c585419"] = copyrightInfringement;

customCollection["5,0x002cb3af46ad013a98b174a61711c0f725084bc0"] = copyrightInfringement;

Expand Down Expand Up @@ -102,6 +111,13 @@ custom["1,0x6c4a0c95d02366a8be460108e222ddf58451d1c0"] = copyrightInfringement;
custom["1,0x32d753b840b475832950f6ad140b403f4a467f2c"] = copyrightInfringement;
custom["1,0xa6edad01bf197b0ff7c1a8a456731bd2081d6940"] = copyrightInfringement;
custom["1,0x254f0ed9a40b81402c86dcb5bc064dc036a5b7cc"] = copyrightInfringement;
custom["1,0x6ca95b029e1bca507c87d42b46157a76dab54ec2"] = copyrightInfringement;
custom["1,0xd6cc89ef815cfd8f30e3fe8319b3983351c93d31"] = copyrightInfringement;
custom["1,0xba60a90d76d44819acb8452a9f89632d57f5692f"] = copyrightInfringement;
custom["1,0x6fd6679c599afc1b78985a614adc8a3f8c02eb6b"] = copyrightInfringement;
custom["1,0x552ea1b419d4ac9f5ec2048979b1eb29406ee6eb"] = copyrightInfringement;
custom["1,0x6dbc1f3961fd606feaf5fb73245aa4b2674d1e66"] = copyrightInfringement;
custom["1,0x6c2b0a6269d09d0d22999e68c7be174e5a026c7e"] = copyrightInfringement;

custom["137,0xcf77e25cf1bfc57634bb7b95887b7120935a0d7f"] = copyrightInfringement;
custom["137,0x27bde07c5d651856c483583899ed6823da3648b7"] = copyrightInfringement;
Expand All @@ -117,8 +133,12 @@ custom["137,0xe193c12252c12de24566ed7013004419c162cc81"] = copyrightInfringement
custom["137,0x6d4cf64abac53c8a447e93e662b2e806ba9bb708"] = copyrightInfringement;
custom["137,0x18aea30b288d8df78eb0eb6e04b984238abde97e"] = copyrightInfringement;
custom["137,0x85efb3603ec84a0fa18f512a3a017422e893c5da"] = copyrightInfringement;
custom["137,0xc21acefb1fc169c3904b56eab6f7b4872c585419"] = copyrightInfringement;

custom["5,0x002cb3af46ad013a98b174a61711c0f725084bc0"] = copyrightInfringement;

// Emblem Vault - temporary to prevent trading during migration
custom["1,0x82c7a8f707110f5fbb16184a5933e9f78a34c6ab"] = copyrightInfringement;

// Bridge To Base
custom["8453,0xea2a41c02fa86a4901826615f9796e603c6a4491"] = bridgeToBase;
4 changes: 4 additions & 0 deletions src/extend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ extendCollection["1,0x0a1bbd57033f57e7b6743621b79fcb9eb2ce3676"] = artblocksEngi
extendCollection["1,0x942bc2d3e7a589fe5bd4a5c6ef9727dfd82f5c8a"] = artblocksEngine;
extendCollection["1,0x32d4be5ee74376e08038d652d4dc26e62c67f436"] = artblocksEngine;
extendCollection["1,0xea698596b6009a622c3ed00dd5a8b5d1cae4fc36"] = artblocksEngine;
extendCollection["1,0x145789247973c5d612bf121e9e4eef84b63eb707"] = artblocksEngine;
extendCollection["5,0xe480a895de49b49e37a8f0a8bd7e07fc9844cdb9"] = artblocksEngine;
extendCollection["42161,0x47a91457a3a1f700097199fd63c039c4784384ab"] = artblocksEngine;

Expand Down Expand Up @@ -214,6 +215,8 @@ extend["1,0x2a86c5466f088caebf94e071a77669bae371cd87"] = feralFile;

// Boys of Summer
extend["5,0x7ba399e03ca7598b2e6d56ba97961282edc9ad65"] = boysOfSummer;
extend["1,0xc92ab2dff994dd77c0d2fe09f21d5cf9ea2bcc0a"] = boysOfSummer;

// BrainDrops
extend["1,0xdfde78d2baec499fe18f2be74b6c287eed9511d7"] = brainDrops;

Expand Down Expand Up @@ -243,6 +246,7 @@ extend["1,0x0a1bbd57033f57e7b6743621b79fcb9eb2ce3676"] = artblocksEngine;
extend["1,0x942bc2d3e7a589fe5bd4a5c6ef9727dfd82f5c8a"] = artblocksEngine;
extend["1,0x32d4be5ee74376e08038d652d4dc26e62c67f436"] = artblocksEngine;
extend["1,0xea698596b6009a622c3ed00dd5a8b5d1cae4fc36"] = artblocksEngine;
extend["1,0x145789247973c5d612bf121e9e4eef84b63eb707"] = artblocksEngine;
extend["5,0xe480a895de49b49e37a8f0a8bd7e07fc9844cdb9"] = artblocksEngine;
extend["42161,0x47a91457a3a1f700097199fd63c039c4784384ab"] = artblocksEngine;

Expand Down
8 changes: 6 additions & 2 deletions src/fetchers/simplehash.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ const getNetworkName = (chainId) => {
return "ethereum-goerli";
}

if (network == "mumbai") {
return "polygon-mumbai";
}

return network;
};

Expand Down Expand Up @@ -101,9 +105,10 @@ export const fetchCollection = async (chainId, { contract, tokenId }) => {

export const fetchTokens = async (chainId, tokens) => {
const network = getNetworkName(chainId);

const searchParams = new URLSearchParams();

const nftIds = tokens.map(({ contract, tokenId }) => `${network}.${contract}.${tokenId}`);

searchParams.append("nft_ids", nftIds.join(","));

const url = `https://api.simplehash.com/api/v0/nfts/assets?${searchParams.toString()}`;
Expand All @@ -128,7 +133,6 @@ export const fetchTokens = async (chainId, tokens) => {

export const fetchContractTokens = async (chainId, contract, continuation) => {
const network = getNetworkName(chainId);

const searchParams = new URLSearchParams();
if (continuation) {
searchParams.append("cursor", continuation);
Expand Down

0 comments on commit 9fb66ec

Please sign in to comment.