Skip to content

Commit

Permalink
chore: bump 1.0.11
Browse files Browse the repository at this point in the history
  • Loading branch information
nzhl committed Oct 26, 2022
1 parent ef755b7 commit 8ac3746
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 1,451 deletions.
94 changes: 43 additions & 51 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@paraspace/seaport-js",
"version": "1.0.10",
"version": "1.0.11",
"description": "[Seaport](https://github.com/ProjectOpenSea/seaport) is a new marketplace protocol for safely and efficiently buying and selling NFTs. This is a JavaScript library intended to make interfacing with the contract reasonable and easy.",
"license": "MIT",
"author": "OpenSea Developers",
Expand Down Expand Up @@ -44,7 +44,6 @@
"normalize-url": ">=4.5.1",
"async": ">=2.6.4",
"node-fetch": ">=2.6.7",
"lodash": ">=4.17.21",
"got": ">=11.8.5",
"cross-fetch": ">=2.2.6",
"ws": ">=5.2.3",
Expand All @@ -55,7 +54,6 @@
"dependencies": {
"@0xsequence/multicall": "^0.39.0",
"ethers": "^5.6.7",
"lodash": "^4.17.21",
"merkletreejs": "^0.2.31"
},
"devDependencies": {
Expand All @@ -66,7 +64,6 @@
"@typechain/hardhat": "^5.0.0",
"@types/chai": "^4.3.0",
"@types/chai-as-promised": "^7.1.5",
"@types/lodash": "^4.14.186",
"@types/mocha": "^9.1.1",
"@types/node": "^12.20.47",
"@typescript-eslint/eslint-plugin": "^5.27.1",
Expand Down
36 changes: 2 additions & 34 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,7 @@
import { BigNumber } from "ethers";
import { mapKeys, mapValues, pickBy } from "lodash";

import DEPLOYED_CONTRACTS from "./deployed-contracts.json";

export type ContractName = keyof typeof DEPLOYED_CONTRACTS;

type ContractAddress = string;
export type ContractMap = Record<ContractName, ContractAddress>;

// map 'UniswapV3' in DEPLOYED_CONTRACTS to 'UNI-V3-POS'
const NORMALIZED_DEPLOYED_CONTRACTS = mapKeys(DEPLOYED_CONTRACTS, (_v, k) =>
k === "UniswapV3" ? "UNI-V3-POS" : k
);

const extractContractMapFromDeployedContracts = (network: "goerli") => {
const rawContractMap = mapValues(NORMALIZED_DEPLOYED_CONTRACTS, (it) =>
network in it ? it[network].address : null
);
// ignore invalid(length is not 42) contract address
return pickBy(
rawContractMap,
(v, k) => v?.length === 42 || k === "ConduitKey"
) as ContractMap;
};

export const CONTRACT_MAP: ContractMap = {
...extractContractMapFromDeployedContracts("goerli"),
};

export const SEAPORT_CONTRACT_NAME = "ParaSpace";
export const SEAPORT_CONTRACT_VERSION = "1.1";
export const OPENSEA_CONDUIT_KEY = CONTRACT_MAP.ConduitKey;
export const OPENSEA_CONDUIT_ADDRESS = CONTRACT_MAP.Conduit;
export const EIP_712_ORDER_TYPE = {
OrderComponents: [
{ name: "offerer", type: "address" },
Expand Down Expand Up @@ -107,11 +77,9 @@ export const NO_CONDUIT =
"0x0000000000000000000000000000000000000000000000000000000000000000";

// Supply here any known conduit keys as well as their conduits
export const KNOWN_CONDUIT_KEYS_TO_CONDUIT = {
[OPENSEA_CONDUIT_KEY]: OPENSEA_CONDUIT_ADDRESS,
};
export const KNOWN_CONDUIT_KEYS_TO_CONDUIT = {};

export const CROSS_CHAIN_SEAPORT_ADDRESS = CONTRACT_MAP.Seaport;
export const CROSS_CHAIN_SEAPORT_ADDRESS = "";

export const DOMAIN_REGISTRY_ADDRESS =
"0x000000000DaD0DE04D2B2D4a5A74581EBA94124A";
Loading

0 comments on commit 8ac3746

Please sign in to comment.