Skip to content

Commit

Permalink
feat: Add BASE chain (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenLR authored Jan 22, 2024
1 parent f0464f8 commit 43616b9
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
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

0 comments on commit 43616b9

Please sign in to comment.