Skip to content

Commit

Permalink
Merge pull request #330 from ourzora/base-deploy
Browse files Browse the repository at this point in the history
Add base mainnet
  • Loading branch information
neokry authored Aug 4, 2023
2 parents 7c65683 + 5b4f154 commit ab1b57c
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 2 deletions.
6 changes: 6 additions & 0 deletions apps/subgraph/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@
"startBlock": 597700
}
},
"base": {
"Manager": {
"address": "0x3ac0e64fe2931f8e082c6bb29283540de9b5371c",
"startBlock": 1991500
}
},
"base-testnet": {
"Manager": {
"address": "0x550c326d688fD51ae65AC6A2d48749E631023A03",
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const PUBLIC_MANAGER_ADDRESS = {
[CHAIN_ID.OPTIMISM]: '0x3ac0E64Fe2931f8e082C6Bb29283540DE9b5371C' as AddressType,
[CHAIN_ID.GOERLI]: '0x0E9F3382Cf2508E3bc83248B5b4707FbA86D7Ee0' as AddressType,
[CHAIN_ID.OPTIMISM_GOERLI]: '0x5f9c1e7E31875beAa6ba6B0AB573a4AbEcC95d67' as AddressType,
[CHAIN_ID.BASE]: '0x3ac0e64fe2931f8e082c6bb29283540de9b5371c' as AddressType,
[CHAIN_ID.BASE_GOERLI]: '0x550c326d688fD51ae65AC6A2d48749E631023A03' as AddressType,
[CHAIN_ID.ZORA]: '0x3ac0E64Fe2931f8e082C6Bb29283540DE9b5371C' as AddressType,
[CHAIN_ID.ZORA_GOERLI]: '0xc521f85613985b7e417fccd5b348f64263d79397' as AddressType,
Expand All @@ -26,6 +27,7 @@ export const PUBLIC_ZORA_NFT_CREATOR = {
[CHAIN_ID.OPTIMISM]: '0x7d1a46c6e614A0091c39E102F2798C27c1fA8892' as AddressType,
[CHAIN_ID.GOERLI]: '0xb9583D05Ba9ba8f7F14CCEe3Da10D2bc0A72f519' as AddressType,
[CHAIN_ID.OPTIMISM_GOERLI]: '0x3C1ebcF36Ca9DD9371c9aA99c274e4988906c6E3' as AddressType,
[CHAIN_ID.BASE]: '0x58C3ccB2dcb9384E5AB9111CD1a5DEA916B0f33c' as AddressType,
[CHAIN_ID.BASE_GOERLI]: '0x87cfd516c5ea86e50b950678CA970a8a28de27ac' as AddressType,
[CHAIN_ID.ZORA]: '0xA2c2A96A232113Dd4993E8b048EEbc3371AE8d85' as AddressType,
[CHAIN_ID.ZORA_GOERLI]: '0xeB29A4e5b84fef428c072debA2444e93c080CE87' as AddressType,
Expand Down
36 changes: 36 additions & 0 deletions apps/web/src/constants/defaultChains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,45 @@ export const zoraGoerli = {
testnet: true,
} as const

export const base = {
id: 8453,
network: 'base',
name: 'Base',
nativeCurrency: { name: 'Base', symbol: 'ETH', decimals: 18 },
rpcUrls: {
default: {
http: ['https://developer-access-mainnet.base.org'],
},
public: {
http: ['https://developer-access-mainnet.base.org'],
},
},
blockExplorers: {
blockscout: {
name: 'Basescout',
url: 'https://base.blockscout.com',
},
default: {
name: 'Basescan',
url: 'https://basescan.org',
},
etherscan: {
name: 'Basescan',
url: 'https://basescan.org',
},
},
contracts: {
multicall3: {
address: '0xca11bde05977b3631167028862be2a173976ca11',
blockCreated: 5022,
},
},
} as const

const MAINNET_CHAINS: Chain[] = [
{ ...mainnet, id: CHAIN_ID.ETHEREUM, slug: 'ethereum', icon: '/chains/ethereum.svg' },
{ ...zora, id: CHAIN_ID.ZORA, slug: 'zora', icon: '/chains/zora-mainnet.svg' },
{ ...base, id: CHAIN_ID.BASE, slug: 'base', icon: '/chains/base.svg' },
{
...optimism,
id: CHAIN_ID.OPTIMISM,
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/constants/etherscan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const ETHERSCAN_BASE_URL = {
[CHAIN_ID.OPTIMISM]: 'https://optimistic.etherscan.io',
[CHAIN_ID.GOERLI]: 'https://goerli.etherscan.io',
[CHAIN_ID.OPTIMISM_GOERLI]: 'https://goerli-optimism.etherscan.io/',
[CHAIN_ID.BASE]: 'https://basescan.org/',
[CHAIN_ID.BASE_GOERLI]: 'https://goerli.basescan.org/',
[CHAIN_ID.ZORA]: 'https://explorer.zora.energy/',
[CHAIN_ID.ZORA_GOERLI]: 'https://testnet.explorer.zora.energy/',
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/constants/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const RPC_URL = {
[CHAIN_ID.OPTIMISM]: `https://opt-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`,
[CHAIN_ID.GOERLI]: `https://eth-goerli.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`,
[CHAIN_ID.OPTIMISM_GOERLI]: `https://opt-goerli.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_ID}`,
[CHAIN_ID.BASE]: 'https://mainnet.base.org',
[CHAIN_ID.BASE_GOERLI]: 'https://goerli.base.org',
[CHAIN_ID.ZORA]: 'https://rpc.zora.energy',
[CHAIN_ID.ZORA_GOERLI]: 'https://testnet.rpc.zora.energy',
Expand Down
2 changes: 2 additions & 0 deletions apps/web/src/constants/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const PUBLIC_SUBGRAPH_URL = {
'https://api.thegraph.com/subgraphs/name/neokry/nouns-builder-goerli',
[CHAIN_ID.OPTIMISM_GOERLI]:
'https://api.thegraph.com/subgraphs/name/neokry/nouns-builder-optimism-goerli',
[CHAIN_ID.BASE]:
'https://api.goldsky.com/api/public/project_clkk1ucdyf6ak38svcatie9tf/subgraphs/nouns-builder-base-mainnet/stable/gn',
[CHAIN_ID.BASE_GOERLI]:
'https://api.studio.thegraph.com/query/49279/nouns-builder-base-goerli/version/latest',
[CHAIN_ID.ZORA]:
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/data/contract/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { baseGoerli, goerli, mainnet, optimism, optimismGoerli } from 'wagmi/cha
import { alchemyProvider } from 'wagmi/providers/alchemy'
import { jsonRpcProvider } from 'wagmi/providers/jsonRpc'

import { PUBLIC_IS_TESTNET, zora, zoraGoerli } from 'src/constants/defaultChains'
import { PUBLIC_IS_TESTNET, base, zora, zoraGoerli } from 'src/constants/defaultChains'
import { RPC_URL } from 'src/constants/rpc'
import { CHAIN_ID } from 'src/typings'

const MAINNET_CHAINS = [mainnet, zora, optimism]
const MAINNET_CHAINS = [mainnet, zora, base, optimism]
// Mainnet is required here due to hooks like useEnsData that only pull data from mainnet
const TESTNET_CHAINS = [mainnet, goerli, optimismGoerli, baseGoerli, zoraGoerli]

Expand Down
1 change: 1 addition & 0 deletions apps/web/src/services/abiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const CHAIN_API_LOOKUP: Record<CHAIN_ID, string> = {
[CHAIN_ID.OPTIMISM]: 'api-optimistic.etherscan.io',
[CHAIN_ID.GOERLI]: 'api-goerli.etherscan.io',
[CHAIN_ID.OPTIMISM_GOERLI]: 'api-goerli-optimistic.etherscan.io',
[CHAIN_ID.BASE]: 'api.basescan.org',
[CHAIN_ID.BASE_GOERLI]: 'api-goerli.basescan.org',
[CHAIN_ID.ZORA]: 'explorer.zora.energy',
[CHAIN_ID.ZORA_GOERLI]: 'testnet.explorer.zora.energy',
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/typings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const enum CHAIN_ID {
GOERLI = 5,
OPTIMISM = 10,
OPTIMISM_GOERLI = 420,
BASE = 8453,
BASE_GOERLI = 84531,
ZORA = 7777777,
ZORA_GOERLI = 999,
Expand Down

2 comments on commit ab1b57c

@vercel
Copy link

@vercel vercel bot commented on ab1b57c Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

testnet-nouns-builder – ./apps/web

testnet-nouns-builder-git-main-nouns-builder.vercel.app
testnet-nouns-builder-nouns-builder.vercel.app
testnet.nouns.build

@vercel
Copy link

@vercel vercel bot commented on ab1b57c Aug 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.