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/arbitrum #19

Merged
merged 3 commits into from
Mar 20, 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
7 changes: 3 additions & 4 deletions packages/config/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface Config {
* @example
* ERC721_SUBGRAPH: {
* [Network.Mainnet]: 'https://my-subgraph-url.com',
* [Network.Goerli]: ['https://try-me-first.com', 'https://try-me-second.com']
* [Network.Sepolia]: ['https://try-me-first.com', 'https://try-me-second.com']
* }
*/
subgraph: {
Expand Down Expand Up @@ -124,7 +124,6 @@ const defaultConfig: Config = {
},
contracts: {
ethPrice: {
[Network.Goerli]: '2500000000', // $2.5k
[Network.Sepolia]: '2000000000', // $2k
},
},
Expand All @@ -138,13 +137,13 @@ const defaultConfig: Config = {
source: 'api',
requiredBlockNumber: {
[Network.Mainnet]: 0,
[Network.Goerli]: 0,
[Network.Sepolia]: 0,
[Network.Arbitrum]: 0,
},
apiBlockNumber: {
[Network.Mainnet]: 0,
[Network.Goerli]: 0,
[Network.Sepolia]: 0,
[Network.Arbitrum]: 0,
},
blockBuffer: 10,
},
Expand Down
25 changes: 11 additions & 14 deletions packages/constants/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@ export const ARTBLOCK_COLLECTIONS = [
export const WETH_TOKEN = {
[Network.Mainnet]: a('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'),
[Network.Arbitrum]: a('0x82af49447d8a07e3bd95bd0d56f35241523fbab1'),
[Network.Goerli]: a('0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6'),
[Network.Sepolia]: a('0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14'),
};

/** The address for USDC across networks */
export const USDC = {
[Network.Mainnet]: a('0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'),
[Network.Arbitrum]: a('0xff970a61a04b1ca14834a43f5de4533ebddb5cc8'),
[Network.Goerli]: a('0x2f3a40a3db8a7e3d09b0adfefbce4f6f81927557'),
[Network.Sepolia]: a('0x2C032Aa43D119D7bf4Adc42583F1f94f3bf3023a'),
};

Expand All @@ -46,77 +44,76 @@ export const OPENSEA_COLLECTION = a(
/** Zap specifically for creating new vaults - CreateVaultZap */
export const CREATE_VAULT_ZAP = {
[Network.Mainnet]: a('0x56dab32697B4A313f353DA0CE42B5113eD8E6f74'),
[Network.Goerli]: a('0xc6464CC63bC20b64e1633A0293C2C9b202F4f1b6'),
[Network.Sepolia]: a('0xD80b916470F8e79FD8d09874cb159CbB8D13d8da'),
[Network.Arbitrum]: a('0xF9E891AB1ECa89B7A4B3cBD45aEBFDF3Ec38946F'),
};

/** Perform buy/sell/swaps - MarketplaceUniversalRouterZap */
export const MARKETPLACE_ZAP = {
[Network.Mainnet]: a('0x293A0c49c85F1D8851C665Ac3cE1f1DC2a79bE3d'),
[Network.Goerli]: a('0x0be2D766Eef4b6a72F1fAe2e49619F013d647B8A'),
[Network.Sepolia]: a('0xd88a3B9D0Fb2d39ec8394CfFD983aFBB2D4a6410'),
[Network.Arbitrum]: a('0xf56296B3010a59Ef7F0915569DD44E1302b9Ca40'),
};

/** Stake NFTs or vTokens for xNFTs - NFTXInventoryStakingV3Upgradable */
export const INVENTORY_STAKING = {
[Network.Mainnet]: a('0x889f313e2a3FDC1c9a45bC6020A8a18749CD6152'),
[Network.Goerli]: a('0xEf771a17e6970d8B4b208a76e94F175277554230'),
[Network.Sepolia]: a('0xfBFf0635f7c5327FD138E1EBa72BD9877A6a7C1C'),
[Network.Arbitrum]: a('0xe39a7E67d3E3b6eAF58BC02C4E80C3688847d155'),
};

/** AMM Router - nftxUniversalRouter */
export const NFTX_ROUTER = {
[Network.Mainnet]: a('0x250d62a67254A46c0De472d2c9215E1d890cC90f'),
[Network.Goerli]: a('0xF7c4FC5C2e30258e1E4d1197fc63aeDE371508f3'),
[Network.Sepolia]: a('0x12156cCA1958B6591CC49EaE03a5553458a4b424'),
[Network.Arbitrum]: a('0x4529ad73b2cc8d4db0b0deba90de165e35c4b628'),
};

/** Staking / Liquidity / Pools - NftxRouter */
export const POOL_ROUTER = {
[Network.Mainnet]: a('0x70A741A12262d4b5Ff45C0179c783a380EebE42a'),
[Network.Goerli]: a('0x8E16cdd0D9A15d2d0EFeA531660e8DbD0F6eE12D'),
[Network.Sepolia]: a('0x441b7DE4340AAa5aA86dB4DA43d9Badf7B2DAA66'),
[Network.Arbitrum]: a('0x52731751Dede22827ad47109f5e9697d75a3ef4d'),
};

/** NonfungiblePositionManager */
export const NONFUNGIBLE_POSITION_MANAGER = {
[Network.Mainnet]: a('0x26387fcA3692FCac1C1e8E4E2B22A6CF0d4b71bF'),
[Network.Goerli]: a('0xDa9411C5455a1bfDb527d0988c0A2764E2a104be'),
[Network.Sepolia]: a('0xA9bCC1e29d3460177875f68fDCC0264D22c40BF0'),
[Network.Arbitrum]: a('0x8AD238377531547838370B9C4aC346b9Ed5466Ea'),
};

/** The permit2 contract, needs an approval signature because the UniversalRouter only transfers tokens from user via Permit2 */
export const PERMIT2 = {
[Network.Mainnet]: a('0x000000000022d473030f116ddee9f6b43ac78ba3'),
[Network.Goerli]: a('0x000000000022d473030f116ddee9f6b43ac78ba3'),
[Network.Sepolia]: a('0x000000000022d473030f116ddee9f6b43ac78ba3'),
[Network.Arbitrum]: a('0x000000000022d473030f116ddee9f6b43ac78ba3'),
};

/** ENS Address */
export const ENS_REGISTRAR = {
[Network.Mainnet]: a('0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85'),
[Network.Arbitrum]: a('0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85'),
[Network.Goerli]: a('0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85'),
[Network.Sepolia]: a('0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85'),
};

/** UniswapV3FactoryUpgradeable */
export const AMM_FACTORY = {
[Network.Mainnet]: a('0xa70e10beB02fF9a44007D9D3695d4b96003db101'),
[Network.Goerli]: a('0xf25081B098c5929A26F562aa2502795fE89BC73f'),
[Network.Sepolia]: a('0xDD2dce9C403f93c10af1846543870D065419E70b'),
[Network.Arbitrum]: a('0xF4D0512FB47319B0CE9144EF582862e2921CaBF8'),
};

/** NFTXVaultFactoryUpgradableV2 */
/** NFTXVaultFactoryUpgradableV3 */
export const VAULT_FACTORY = {
[Network.Mainnet]: a('0xC255335bc5aBd6928063F5788a5E420554858f01'),
[Network.Goerli]: a('0x1d552A0e6c2f680872C4a88b1e7def05F1858dF0'),
[Network.Sepolia]: a('0x31C56CaF49125043e80B4d3C7f8734f949d8178C'),
[Network.Arbitrum]: a('0x4dEeb9D2Bff2e9C35ce1f013DcC4582F891cb711'),
};

/** NftxFeeDistributorV3 */
export const NFTX_FEE_DISTRIBUTOR = {
[Network.Mainnet]: a('0xF4d96C5094FCD9eC24E612585e723b58F89e21fe'),
[Network.Sepolia]: a('0x66EF5B4b6ee05639194844CE4867515665F14fED'),
[Network.Goerli]: a('0xA8076Ec5Dbb95165e14624Ff43dE2290e78A6905'),
[Network.Arbitrum]: a('0x0d50970C7848ebbE52661e70057D7D063B7de886'),
};
1 change: 0 additions & 1 deletion packages/constants/src/networks.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
export enum Network {
Mainnet = 1,
Arbitrum = 42_161,
Goerli = 5,
Sepolia = 11_155_111,
}
19 changes: 8 additions & 11 deletions packages/constants/src/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,38 +18,35 @@ export const NON_STANDARD_SUBGRAPH = {
export const ERC721_SUBGRAPH = {
[Network.Mainnet]:
'https://gateway-arbitrum.network.thegraph.com/api/49f332ad234c93d2f07d2c085f1ca6d6/subgraphs/id/CBf1FtUKFnipwKVm36mHyeMtkuhjmh4KHzY3uWNNq5ow',
[Network.Arbitrum]: `${SHARED_PROXY_ROOT}/quantumlyy/eip721-subgraph-arbitrum`,
[Network.Goerli]:
'https://api.thegraph.com/subgraphs/name/nftx-project/eip721-looksrare-goerli',
[Network.Arbitrum]:
'https://api.thegraph.com/subgraphs/name/nftx-project/721-arbitrum-data-nexus',
[Network.Sepolia]:
'https://api.thegraph.com/subgraphs/name/nftx-project/721-sepolia-data-nexus',
};

export const ERC1155_SUBGRAPH = {
[Network.Mainnet]:
'https://gateway-arbitrum.network.thegraph.com/api/49f332ad234c93d2f07d2c085f1ca6d6/subgraphs/id/5C6JRVzKcE9AVbT7S71EycV8eEGcfkJB9gGsyTbHMVmN',
[Network.Arbitrum]: `${SHARED_PROXY_ROOT}/quantumlyy/eip1155-subgraph-arbitrum`,
[Network.Goerli]:
'https://api.thegraph.com/subgraphs/name/nftx-project/eip1155-looksrare-goerli',
[Network.Arbitrum]:
'https://api.thegraph.com/subgraphs/name/nftx-project/1155-arbitrum-data-nexus',
[Network.Sepolia]:
'https://api.thegraph.com/subgraphs/name/nftx-project/1155-sepolia-data-nexus',
};

export const NFTX_SUBGRAPH = {
[Network.Mainnet]:
'https://graph-proxy.nftx.xyz/nftx-indexer/subgraphs/id/QmTzyQKcTsLq1jLXM4gcEyu9XkRLX7wbJJ5mY4SCHRXgii',
[Network.Arbitrum]: `${SHARED_ROOT}/nftx-project/nftx-v2-arbitrum`,
[Network.Goerli]:
'https://api.thegraph.com/subgraphs/name/nftx-project/nftx-v3-vaults-goerli',
[Network.Arbitrum]:
'https://api.thegraph.com/subgraphs/name/nftx-project/nftx-v3-vaults-arbitrum',
[Network.Sepolia]:
'https://api.thegraph.com/subgraphs/name/nftx-project/nftx-v3-vaults-sepolia',
};

export const NFTX_UNISWAP_SUBGRAPH = {
[Network.Mainnet]:
'https://graph-proxy.nftx.xyz/nftx-indexer/subgraphs/id/QmTqJsUzqsmSzkvDeSGDmGYCcVu8v3Tr3j3MqNsTZvVCMm',
[Network.Goerli]:
'https://api.thegraph.com/subgraphs/name/nftx-project/nftx-v3-amm-goerli',
[Network.Sepolia]:
'https://api.thegraph.com/subgraphs/name/nftx-project/nftx-v3-amm-sepolia',
[Network.Arbitrum]:
'https://api.thegraph.com/subgraphs/name/nftx-project/nftx-v3-amm-arbitrum',
};
8 changes: 4 additions & 4 deletions packages/constants/src/ticks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ import { Network } from './networks';
// 0.0001 ETH
export const RFBR_MIN_PRICE = {
[Network.Mainnet]: 100000000000000n,
[Network.Goerli]: 100000000000000n,
[Network.Sepolia]: 100000000000000n,
[Network.Arbitrum]: 100000000000000n,
};
// 10,000 ETH
export const RFBR_MAX_PRICE = {
[Network.Mainnet]: 10000000000000000000000n,
[Network.Goerli]: 10000000000000000000000n,
[Network.Sepolia]: 10000000000000000000000n,
[Network.Arbitrum]: 10000000000000000000000n,
};
export const RFBR_MIN_TICK = {
[Network.Mainnet]: -92160,
[Network.Goerli]: -92160,
[Network.Sepolia]: -92160,
[Network.Arbitrum]: -92160,
};
export const RFBR_MAX_TICK = {
[Network.Mainnet]: 92100,
[Network.Goerli]: 92100,
[Network.Sepolia]: 92100,
[Network.Arbitrum]: 92100,
};

// This is the "absolute" max/min ticks that can be used
Expand Down
4 changes: 1 addition & 3 deletions packages/constants/src/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@ import { Network } from './networks';

export const NFTX_ROUTER_URL = {
[Network.Mainnet]: 'https://api.nftx.xyz/v3/eth-mainnet/quote',
[Network.Goerli]: 'https://api.nftx.xyz/v3/eth-goerli/quote',
[Network.Sepolia]: 'https://api.nftx.xyz/v3/eth-sepolia/quote',
[Network.Arbitrum]: 'https://api.nftx.xyz/v3/arbitrum-one/quote',
};

export const NFTX_APR_URL = {
[Network.Mainnet]: 'https://data.nftx.xyz/vaultaprs',
[Network.Arbitrum]: 'https://data.nftx.xyz/vaultaprs',
[Network.Goerli]: 'https://data.nftx.xyz/vaultaprs',
};

export const NFTX_API_URL = 'https://api-v3.nftx.xyz';

export const RESERVOIR_URL = {
[Network.Mainnet]: 'https://api.reservoir.tools',
[Network.Goerli]: 'https://api-goerli.reservoir.tools',
[Network.Arbitrum]: 'https://api-arbitrum.reservoir.tools',
[Network.Sepolia]: 'https://api-sepolia.reservoir.tools',
};
4 changes: 2 additions & 2 deletions packages/constants/src/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export const MaxUint256 =

export const PREMIUM_DURATION = {
[Network.Mainnet]: 36000, // 10 hours
[Network.Goerli]: 36000, // 10 hours
[Network.Sepolia]: 3600, // 1 hour
[Network.Arbitrum]: 36000, // 10 hours
[Network.Sepolia]: 36000, // 1 hour
};
Loading
Loading