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 BASE chain #191

Merged
merged 1 commit into from
Jan 22, 2024
Merged
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
26 changes: 26 additions & 0 deletions src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,30 @@ const arbitrumMainnetAddresses: Addresses = {
AGGREGATOR_UNISWAP_V3: "",
};

const baseMainnetAddresses: Addresses = {
LOOKS: "",
EXCHANGE_V2: "",
TRANSFER_MANAGER_V2: "",
WETH: "",
ORDER_VALIDATOR_V2: "",
REVERSE_RECORDS: "",
LOOKS_LP_V3: "",
STAKING_POOL_FOR_LOOKS_LP: "",
AGGREGATOR_UNISWAP_V3: "",
};

const baseSepoliaAddresses: Addresses = {
LOOKS: "",
EXCHANGE_V2: "",
TRANSFER_MANAGER_V2: "",
WETH: "",
ORDER_VALIDATOR_V2: "",
REVERSE_RECORDS: "",
LOOKS_LP_V3: "",
STAKING_POOL_FOR_LOOKS_LP: "",
AGGREGATOR_UNISWAP_V3: "",
};

/**
* List of useful contract addresses
*/
Expand All @@ -70,4 +94,6 @@ export const addressesByNetwork: { [chainId in ChainId]: Addresses } = {
[ChainId.SEPOLIA]: sepoliaAddresses,
[ChainId.ARB_SEPOLIA]: arbitrumSepoliaAddresses,
[ChainId.ARB_MAINNET]: arbitrumMainnetAddresses,
[ChainId.BASE_MAINNET]: baseMainnetAddresses,
[ChainId.BASE_SEPOLIA]: baseSepoliaAddresses,
};
24 changes: 24 additions & 0 deletions src/constants/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,30 @@ export const chainInfo: { [chainId in ChainId]: ChainInfo } = {
cloudinaryUrl: "https://looksrare.mo.cloudinary.net/sepolia",
wsUrl: "wss://ws-sepolia.looksrare.org/ws",
},
[ChainId.BASE_MAINNET]: {
label: "Base Mainnet",
appUrl: "https://looksrare.org",
explorer: "https://basescan.org",
rpcUrl: "https://base-mainnet.g.alchemy.com/v2",
baseApiUrl: "https://graphql.looksrare.org",
osApiUrl: "https://api.opensea.io",
cdnUrl: "https://static.looksnice.org",
rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/looksrare/looks-distribution",
cloudinaryUrl: "https://looksrare.mo.cloudinary.net",
wsUrl: "wss://ws.looksrare.org/ws",
},
[ChainId.BASE_SEPOLIA]: {
label: "Base Sepolia",
appUrl: "https://sepolia.looksrare.org",
explorer: "https://sepolia-explorer.base.org",
rpcUrl: "https://base-sepolia.g.alchemy.com/v2",
baseApiUrl: "https://graphql-sepolia.looksrare.org",
osApiUrl: "https://testnets-api.opensea.io",
cdnUrl: "https://static-sepolia.looksnice.org",
rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
cloudinaryUrl: "https://looksrare.mo.cloudinary.net/sepolia",
wsUrl: "wss://ws-sepolia.looksrare.org/ws",
},
[ChainId.HARDHAT]: {
label: "Hardhat",
appUrl: "http://localhost:3000",
Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export enum ChainId {
HARDHAT = 31337,
ARB_MAINNET = 42161,
ARB_SEPOLIA = 421614,
BASE_MAINNET = 8453,
BASE_SEPOLIA = 84532,
}

/** ChainInfo data used to interact with LooksRare ecosystem */
Expand Down
Loading