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

feat: add tanjiro zkdrop by bigq #206

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
Binary file added space-configs/images/tanjiro_1280x1280.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added space-configs/images/tanjiro_bw_958x1200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions space-configs/main/bigq.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import { SpaceConfig } from "../types";
import { AuthType, ClaimType } from "@sismo-core/sismo-connect-server";

// UPDATE HERE ↓↓↓
export default {
metadata: {
name: "Bigq Space", // UPDATE HERE
description: "This Space is dedicated to all my friends. Have fun experimenting with ZK y'all", // UPDATE HERE
image: "tanjiro_bw_958x1200.png", // UPDATE HERE
socialLinks: [
{
type: "link",
link: "https://www.sismo.io/", // UPDATE HERE
},
{
type: "twitter",
link: "https://twitter.com/Sismo_eth", // UPDATE HERE
},
{
type: "discord",
link: "https://discord.com/invite/sismo", // UPDATE HERE
},
{
type: "github",
link: "https://github.com/sismo-core", // UPDATE HERE
},
],
},
apps: [
{
type: "zkDrop",
metadata: {
name: "Tanjiro ZKDrop", // UPDATE HERE
slug: "claim-this-tanjiro", // UPDATE HERE
description: "Claim your Tanjiro NFT", // UPDATE HERE
tags: ["Airdrop"],
image: "tanjiro_1280x1280.png", // UPDATE HERE
createdAt: new Date("2023-07-03T18:00"), // UPDATE HERE WITH CURRENT DATE
},
sismoConnectRequest: {
appId: "0x86929cc52b44482a7da0aac26f05a6ef",
authRequests: [{ authType: AuthType.VAULT }],

claimRequests: [{ groupId: "0x1af68282b2fea41701d1935d320c9c81" }], // UPDATE HERE WITH YOUR GROUP
},
templateConfig: {
isTransferable: false,
nftMetadata: {
name: "Tanjiro NFT gifted from bigq", // UPDATE HERE
description: "This NFT is only a test. Don't trade it. Nevermind, you can't.", // UPDATE HERE
image: "tanjiro_1280x1280.png", // UPDATE HERE
},
chains: [
{
contractAddress: "0x498310AD2c30349143DcBa65cd6e055d7D68cB4B",
name: "gnosis", // UPDATE HERE choose your chain name
relayerEnabled: true,
},
{
contractAddress: "0x498310AD2c30349143DcBa65cd6e055d7D68cB4B",
name: "optimism", // UPDATE HERE choose your chain name
relayerEnabled: false,
},
{
contractAddress: "0x65D478De77a161CC9824e4c40cc9B979deDED366",
name: "arbitrum", // UPDATE HERE choose your chain name
relayerEnabled: false,
},
{
contractAddress: "0x4744189928214fF879646a24B3FB2A2080152351",
name: "polygon", // UPDATE HERE choose your chain name
relayerEnabled: false,
},
{
contractAddress: "0xBacDAe186628A88f4a6CE1F3D668c889935c8F06",
name: "base-goerli", // UPDATE HERE choose your chain name
relayerEnabled: false,
},
],
step1CtaText: "Prove eligibility",
step2CtaText: "Claim!",
appDescription: "Claim Your Tanjiro!",
},
},
],
} as SpaceConfig;
12 changes: 12 additions & 0 deletions src/libs/contracts/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export enum Network {
OptimismGoerli = "optimism-goerli",
Arbitrum = "arbitrum",
ArbitrumGoerli = "arbitrum-goerli",
Base = "base",
BaseGoerli = "base-goerli",
ScrollTestnet = "scroll-testnet",
}

Expand All @@ -27,6 +29,8 @@ export const networkChainIds: { [network in Network]: number } = {
[Network.OptimismGoerli]: 420,
[Network.Arbitrum]: 42161,
[Network.ArbitrumGoerli]: 421613,
[Network.Base]: 8453,
[Network.BaseGoerli]: 84531,
[Network.ScrollTestnet]: 534353,
};

Expand All @@ -41,12 +45,16 @@ export const networkLabels: { [network in Network]?: string } = {
[Network.OptimismGoerli]: "Optimism Goerli",
[Network.Arbitrum]: "Arbitrum",
[Network.ArbitrumGoerli]: "Arbitrum Goerli",
[Network.Base]: "Base",
[Network.BaseGoerli]: "Base Goerli",
[Network.ScrollTestnet]: "Scroll Testnet",
};

export const networkRpcUrls: { [network in Network]?: string } = {
[Network.Arbitrum]: "https://1rpc.io/arb",
[Network.ArbitrumGoerli]: "https://rpc.goerli.arbitrum.gateway.fm",
[Network.Base]: "https://mainnet.base.org",
[Network.BaseGoerli]: "https://goerli.base.org",
[Network.ScrollTestnet]: "https://alpha-rpc.scroll.io/l2",
};

Expand All @@ -61,6 +69,8 @@ export const explorers: { [network in Network]?: string } = {
[Network.OptimismGoerli]: "https://goerli-optimism.etherscan.io",
[Network.Arbitrum]: "https://arbiscan.io",
[Network.ArbitrumGoerli]: "https://goerli.arbiscan.io",
[Network.Base]: "https://basescan.org/",
[Network.BaseGoerli]: "https://goerli.basescan.org/",
};

export const getTxExplorer = ({ txHash, network }: { txHash: string; network: Network }) => {
Expand All @@ -83,11 +93,13 @@ export const getErc721Explorer = ({
case Network.Mumbai:
case Network.OptimismGoerli:
case Network.Sepolia:
case Network.BaseGoerli:
return `https://testnets.opensea.io/assets/${network}/${contractAddress}${
tokenId ? "/" + tokenId : ""
}`;
case Network.Mainnet:
return `https://opensea.io/assets/ethereum/${contractAddress}${tokenId ? "/" + tokenId : ""}`;
case Network.Base:
case Network.Optimism:
return `https://opensea.io/assets/${network}/${contractAddress}${
tokenId ? "/" + tokenId : ""
Expand Down