From 25bf4475d1774efac8b2db3e398914d4b59b1276 Mon Sep 17 00:00:00 2001 From: intro0000 Date: Sat, 30 Apr 2022 17:26:40 -0400 Subject: [PATCH 1/2] add joepeg subgraphs and contract addresses to sdk --- src/constants.ts | 82 ++++++++++++++++++++++++++++++++++++++++++++++++ src/index.ts | 15 ++++++++- src/subgraphs.ts | 12 +++++++ 3 files changed, 108 insertions(+), 1 deletion(-) diff --git a/src/constants.ts b/src/constants.ts index 72aac64..5ef7f38 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -237,3 +237,85 @@ export const MAXIMILLION_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.FUJI]: '0x0000000000000000000000000000000000000000', [ChainId.AVALANCHE]: '0xe5cDdAFd0f7Af3DEAf4bd213bBaee7A5927AB7E7' } + +/** + * Joepeg Marketplace SDK + */ + +export const CURRENCY_MANAGER: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x520Aa97ffC72d5310A3817C0d620c26ab055Df03', + [ChainId.AVALANCHE]: '0xf28b97020949Dd9aBcFa65fD6ff28C943b68A62b' +} + +export const EXECUTION_MANAGER: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0xA9114FF08D8a46ef68801408bA70f843F2fd5d06', + [ChainId.AVALANCHE]: '0xB0cCD8742efAe2A8af11771F9E9D195B9c93604f' +} + +export const JOEPEG_EXCHANGE: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x04e290BE5163Ad5c92109Eb4733C45A2dF110d44', + [ChainId.AVALANCHE]: '0xaE079eDA901F7727D0715aff8f82BA8295719977' +} + +export const PROTOCOL_FEE_MANAGER: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x0AC33c94Cf937a19548ff99139D7d495A0898794', + [ChainId.AVALANCHE]: '0x777bF9ac3529fD2CD1B6e2dd63dFAE8Fd44aEc96' +} + +export const ROYALTY_FEE_MANAGER: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0xd8870906B837e3C40bCaAc428D71FdE41Bf152Ba', + [ChainId.AVALANCHE]: '0x3f2855fb9651B87c89a08ec1fe0E2EBF41A597D8' +} + +export const ROYALTY_FEE_REGISTRY: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0xb031B73dC98fa9d1963a6BFd8682D09235fA71bD', + [ChainId.AVALANCHE]: '0x0BE2A64FC1390d6581f280C7587c5B657C4fDce3' +} + +export const ROYALTY_FEE_SETTER: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0xd4903b8689110F67EB050d500B6EFA433F249786', + [ChainId.AVALANCHE]: '0xA7418654637fFca103Cfa4149a594045294D20F5' +} + +export const STRATEGY_STANDARD_SALE_FOR_FIXED_PRICE: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0xB241C61Bf878083c675599256d15be4bd331423c', + [ChainId.AVALANCHE]: '0x24ab13f8B58be64a91a7291b5e0CF32fCDDcc62B' +} + +export const TRANSFER_MANAGER_ERC721: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x06f90fd024d0f21b02cB0e7e504e7653C24Ec434', + [ChainId.AVALANCHE]: '0x16736b117ab4842C825599db1f1F4B0fd32D3751' +} + +export const TRANSFER_MANAGER_ERC1155: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x06ce9F2B31b0dd59388D93b95B3b67aeBd5F4743', + [ChainId.AVALANCHE]: '0x85fF75F797b0B4132F0ce33E6f6Bf688d23E284F' +} + +export const TRANSFER_MANAGER_NON_COMPLIANT_ERC721: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x5a59bebbE7A95d851D9D5034458420Cb00d9263D', + [ChainId.AVALANCHE]: '0x3C111Ed8B7237a3343181A75026e0f822CFa52Ab' +} + +export const TRANSFER_SELECTOR_NFT: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0x9f6C0da935BE0D333784DAE9F02508Bf6220f5d8', + [ChainId.AVALANCHE]: '0x6817F284319DD8fED56A8577d9A29B5685EB6915' +} + +export const ERC721_TOKEN: { [chainId in ChainId]: string } = { + [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', + [ChainId.FUJI]: '0xfBF22D7c2ecED7115B752ec56234AC3fE1177f6b', + [ChainId.AVALANCHE]: '0x8e39F7D9B4A0E994A17929a6FA1AEF67622692D2' +} diff --git a/src/index.ts b/src/index.ts index 2567d8e..f51add9 100644 --- a/src/index.ts +++ b/src/index.ts @@ -38,7 +38,20 @@ export { MONEY_MAKER_ADDRESS, VEJOE_STAKING_ADDRESS, VEJOE_TOKEN_ADDRESS, - BOOSTED_MASTERCHEF_ADDRESS + BOOSTED_MASTERCHEF_ADDRESS, + CURRENCY_MANAGER, + EXECUTION_MANAGER, + JOEPEG_EXCHANGE, + PROTOCOL_FEE_MANAGER, + ROYALTY_FEE_MANAGER, + ROYALTY_FEE_REGISTRY, + ROYALTY_FEE_SETTER, + STRATEGY_STANDARD_SALE_FOR_FIXED_PRICE, + TRANSFER_MANAGER_ERC721, + TRANSFER_MANAGER_ERC1155, + TRANSFER_MANAGER_NON_COMPLIANT_ERC721, + TRANSFER_SELECTOR_NFT, + ERC721_TOKEN } from './constants' export * from './errors' diff --git a/src/subgraphs.ts b/src/subgraphs.ts index 4491a5b..9777935 100644 --- a/src/subgraphs.ts +++ b/src/subgraphs.ts @@ -67,3 +67,15 @@ export const BOOSTED_MASTERCHEF_SUBGRAPH: {[chainId in ChainId]: string } = { [ChainId.FUJI]: ZERO_ADDRESS, [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/boosted-master-chef' } + +export const NFT_CONTRACTS_SUBGRAPH: {[chainId in ChainId]: string } = { + [ChainId.RINKEBY]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/nft-contracts-rinkeby', + [ChainId.FUJI]: ZERO_ADDRESS, + [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/nft-contracts' +} + +export const JOEPEG_MARKETPLACE_SUBGRAPH: {[chainId in ChainId]: string } = { + [ChainId.RINKEBY]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/marketplace-rinkeby', + [ChainId.FUJI]: ZERO_ADDRESS, + [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/marketplace' +} From 7be8f6f05dc5393014a45183cf5ed25d546127c1 Mon Sep 17 00:00:00 2001 From: intro0000 Date: Sat, 30 Apr 2022 18:04:40 -0400 Subject: [PATCH 2/2] update names and subgraph --- src/constants.ts | 26 +++++++++++++------------- src/index.ts | 26 +++++++++++++------------- src/subgraphs.ts | 8 ++++---- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/constants.ts b/src/constants.ts index 5ef7f38..0badad3 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -242,79 +242,79 @@ export const MAXIMILLION_ADDRESS: { [chainId in ChainId]: string } = { * Joepeg Marketplace SDK */ -export const CURRENCY_MANAGER: { [chainId in ChainId]: string } = { +export const CURRENCY_MANAGER_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x520Aa97ffC72d5310A3817C0d620c26ab055Df03', [ChainId.AVALANCHE]: '0xf28b97020949Dd9aBcFa65fD6ff28C943b68A62b' } -export const EXECUTION_MANAGER: { [chainId in ChainId]: string } = { +export const EXECUTION_MANAGER_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0xA9114FF08D8a46ef68801408bA70f843F2fd5d06', [ChainId.AVALANCHE]: '0xB0cCD8742efAe2A8af11771F9E9D195B9c93604f' } -export const JOEPEG_EXCHANGE: { [chainId in ChainId]: string } = { +export const JOEPEG_EXCHANGE_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x04e290BE5163Ad5c92109Eb4733C45A2dF110d44', [ChainId.AVALANCHE]: '0xaE079eDA901F7727D0715aff8f82BA8295719977' } -export const PROTOCOL_FEE_MANAGER: { [chainId in ChainId]: string } = { +export const PROTOCOL_FEE_MANAGER_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x0AC33c94Cf937a19548ff99139D7d495A0898794', [ChainId.AVALANCHE]: '0x777bF9ac3529fD2CD1B6e2dd63dFAE8Fd44aEc96' } -export const ROYALTY_FEE_MANAGER: { [chainId in ChainId]: string } = { +export const ROYALTY_FEE_MANAGER_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0xd8870906B837e3C40bCaAc428D71FdE41Bf152Ba', [ChainId.AVALANCHE]: '0x3f2855fb9651B87c89a08ec1fe0E2EBF41A597D8' } -export const ROYALTY_FEE_REGISTRY: { [chainId in ChainId]: string } = { +export const ROYALTY_FEE_REGISTRY_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0xb031B73dC98fa9d1963a6BFd8682D09235fA71bD', [ChainId.AVALANCHE]: '0x0BE2A64FC1390d6581f280C7587c5B657C4fDce3' } -export const ROYALTY_FEE_SETTER: { [chainId in ChainId]: string } = { +export const ROYALTY_FEE_SETTER_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0xd4903b8689110F67EB050d500B6EFA433F249786', [ChainId.AVALANCHE]: '0xA7418654637fFca103Cfa4149a594045294D20F5' } -export const STRATEGY_STANDARD_SALE_FOR_FIXED_PRICE: { [chainId in ChainId]: string } = { +export const STRATEGY_STANDARD_SALE_FOR_FIXED_PRICE_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0xB241C61Bf878083c675599256d15be4bd331423c', [ChainId.AVALANCHE]: '0x24ab13f8B58be64a91a7291b5e0CF32fCDDcc62B' } -export const TRANSFER_MANAGER_ERC721: { [chainId in ChainId]: string } = { +export const TRANSFER_MANAGER_ERC721_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x06f90fd024d0f21b02cB0e7e504e7653C24Ec434', [ChainId.AVALANCHE]: '0x16736b117ab4842C825599db1f1F4B0fd32D3751' } -export const TRANSFER_MANAGER_ERC1155: { [chainId in ChainId]: string } = { +export const TRANSFER_MANAGER_ERC1155_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x06ce9F2B31b0dd59388D93b95B3b67aeBd5F4743', [ChainId.AVALANCHE]: '0x85fF75F797b0B4132F0ce33E6f6Bf688d23E284F' } -export const TRANSFER_MANAGER_NON_COMPLIANT_ERC721: { [chainId in ChainId]: string } = { +export const TRANSFER_MANAGER_NON_COMPLIANT_ERC721_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x5a59bebbE7A95d851D9D5034458420Cb00d9263D', [ChainId.AVALANCHE]: '0x3C111Ed8B7237a3343181A75026e0f822CFa52Ab' } -export const TRANSFER_SELECTOR_NFT: { [chainId in ChainId]: string } = { +export const TRANSFER_SELECTOR_NFT_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0x9f6C0da935BE0D333784DAE9F02508Bf6220f5d8', [ChainId.AVALANCHE]: '0x6817F284319DD8fED56A8577d9A29B5685EB6915' } -export const ERC721_TOKEN: { [chainId in ChainId]: string } = { +export const ERC721_TOKEN_ADDRESS: { [chainId in ChainId]: string } = { [ChainId.RINKEBY]: '0x0000000000000000000000000000000000000000', [ChainId.FUJI]: '0xfBF22D7c2ecED7115B752ec56234AC3fE1177f6b', [ChainId.AVALANCHE]: '0x8e39F7D9B4A0E994A17929a6FA1AEF67622692D2' diff --git a/src/index.ts b/src/index.ts index f51add9..31179e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,19 +39,19 @@ export { VEJOE_STAKING_ADDRESS, VEJOE_TOKEN_ADDRESS, BOOSTED_MASTERCHEF_ADDRESS, - CURRENCY_MANAGER, - EXECUTION_MANAGER, - JOEPEG_EXCHANGE, - PROTOCOL_FEE_MANAGER, - ROYALTY_FEE_MANAGER, - ROYALTY_FEE_REGISTRY, - ROYALTY_FEE_SETTER, - STRATEGY_STANDARD_SALE_FOR_FIXED_PRICE, - TRANSFER_MANAGER_ERC721, - TRANSFER_MANAGER_ERC1155, - TRANSFER_MANAGER_NON_COMPLIANT_ERC721, - TRANSFER_SELECTOR_NFT, - ERC721_TOKEN + CURRENCY_MANAGER_ADDRESS, + EXECUTION_MANAGER_ADDRESS, + JOEPEG_EXCHANGE_ADDRESS, + PROTOCOL_FEE_MANAGER_ADDRESS, + ROYALTY_FEE_MANAGER_ADDRESS, + ROYALTY_FEE_REGISTRY_ADDRESS, + ROYALTY_FEE_SETTER_ADDRESS, + STRATEGY_STANDARD_SALE_FOR_FIXED_PRICE_ADDRESS, + TRANSFER_MANAGER_ERC721_ADDRESS, + TRANSFER_MANAGER_ERC1155_ADDRESS, + TRANSFER_MANAGER_NON_COMPLIANT_ERC721_ADDRESS, + TRANSFER_SELECTOR_NFT_ADDRESS, + ERC721_TOKEN_ADDRESS } from './constants' export * from './errors' diff --git a/src/subgraphs.ts b/src/subgraphs.ts index 9777935..30dbe0c 100644 --- a/src/subgraphs.ts +++ b/src/subgraphs.ts @@ -69,13 +69,13 @@ export const BOOSTED_MASTERCHEF_SUBGRAPH: {[chainId in ChainId]: string } = { } export const NFT_CONTRACTS_SUBGRAPH: {[chainId in ChainId]: string } = { - [ChainId.RINKEBY]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/nft-contracts-rinkeby', - [ChainId.FUJI]: ZERO_ADDRESS, + [ChainId.RINKEBY]: ZERO_ADDRESS, + [ChainId.FUJI]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/nft-contract-fuji', [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/nft-contracts' } export const JOEPEG_MARKETPLACE_SUBGRAPH: {[chainId in ChainId]: string } = { - [ChainId.RINKEBY]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/marketplace-rinkeby', - [ChainId.FUJI]: ZERO_ADDRESS, + [ChainId.RINKEBY]: ZERO_ADDRESS, + [ChainId.FUJI]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/marketplace-fuji', [ChainId.AVALANCHE]: 'https://api.thegraph.com/subgraphs/name/traderjoe-xyz/marketplace' }