@hypercerts-org/marketplace-sdk 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  var ethers = require('ethers');
4
4
  var merkletreejs = require('merkletreejs');
5
+ var contracts = require('@hypercerts-org/contracts');
5
6
  var jsSha3 = require('js-sha3');
6
7
 
7
8
  var abiIERC721 = [
@@ -4012,26 +4013,16 @@ var signMakerOrders = /*#__PURE__*/Object.freeze({
4012
4013
  });
4013
4014
 
4014
4015
  const goerliAddresses = {
4015
- LOOKS: "0x20A5A36ded0E4101C3688CBC405bBAAE58fE9eeC",
4016
- EXCHANGE_V2: "0x35C2215F2FFe8917B06454eEEaba189877F200cf",
4017
- TRANSFER_MANAGER_V2: "0xC20E0CeAD98abBBEb626B77efb8Dc1E5D781f90c",
4016
+ EXCHANGE_V2: contracts.deployments[5].HypercertExchange,
4017
+ TRANSFER_MANAGER_V2: contracts.deployments[5].TransferManager,
4018
4018
  WETH: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
4019
4019
  ORDER_VALIDATOR_V2: "0x7454Cc9AEB024bcE6A2CDC49ad4733B4D8215fb8",
4020
- REVERSE_RECORDS: "0x333Fc8f550043f239a2CF79aEd5e9cF4A20Eb41e",
4021
- LOOKS_LP_V3: "0x87C81267796Cd65347130e789CADdCdAf7bD2231",
4022
- STAKING_POOL_FOR_LOOKS_LP: "",
4023
- AGGREGATOR_UNISWAP_V3: "0x63c38B3BE3eF075a00a5edaeC36F499088c7334C",
4024
4020
  };
4025
4021
  const sepoliaAddresses = {
4026
- LOOKS: "0xa68c2CaA3D45fa6EBB95aA706c70f49D3356824E",
4027
- EXCHANGE_V2: "0x34098cc15a8a48Da9d3f31CC0F63F01f9aa3D9F3",
4028
- TRANSFER_MANAGER_V2: "0xb46f116ecBa8451E661189F4b2B63aC60a618092",
4022
+ EXCHANGE_V2: contracts.deployments[11155111].HypercertExchange,
4023
+ TRANSFER_MANAGER_V2: contracts.deployments[11155111].TransferManager,
4029
4024
  WETH: "",
4030
4025
  ORDER_VALIDATOR_V2: "0x0bc129E4c1f8D7b5583eAbAeb1F7468935B6ec0C",
4031
- REVERSE_RECORDS: "",
4032
- LOOKS_LP_V3: "",
4033
- STAKING_POOL_FOR_LOOKS_LP: "",
4034
- AGGREGATOR_UNISWAP_V3: "",
4035
4026
  };
4036
4027
  /**
4037
4028
  * List of useful contract addresses
@@ -4050,10 +4041,6 @@ const chainInfo = {
4050
4041
  rpcUrl: "https://eth-goerli.g.alchemy.com/v2",
4051
4042
  baseApiUrl: "https://graphql-goerli.looksrare.org",
4052
4043
  osApiUrl: "https://testnets-api.opensea.io",
4053
- cdnUrl: "https://static-goerli.looksnice.org",
4054
- rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
4055
- cloudinaryUrl: "https://looksrare.mo.cloudinary.net/goerli",
4056
- wsUrl: "wss://ws-goerli.looksrare.org/ws",
4057
4044
  },
4058
4045
  [exports.ChainId.SEPOLIA]: {
4059
4046
  label: "Sepolia",
@@ -4062,10 +4049,6 @@ const chainInfo = {
4062
4049
  rpcUrl: "https://eth-sepolia.g.alchemy.com/v2",
4063
4050
  baseApiUrl: "https://graphql-sepolia.looksrare.org",
4064
4051
  osApiUrl: "https://testnets-api.opensea.io",
4065
- cdnUrl: "https://static-sepolia.looksnice.org",
4066
- rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
4067
- cloudinaryUrl: "https://looksrare.mo.cloudinary.net/sepolia",
4068
- wsUrl: "wss://ws-sepolia.looksrare.org/ws",
4069
4052
  },
4070
4053
  [exports.ChainId.HARDHAT]: {
4071
4054
  label: "Hardhat",
@@ -4074,10 +4057,6 @@ const chainInfo = {
4074
4057
  rpcUrl: "http://127.0.0.1:8545",
4075
4058
  baseApiUrl: "http://localhost:4000",
4076
4059
  osApiUrl: "https://testnets-api.opensea.io",
4077
- cdnUrl: "https://via.placeholder.com",
4078
- rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
4079
- cloudinaryUrl: "",
4080
- wsUrl: "ws://localhost:5001/ws",
4081
4060
  },
4082
4061
  };
4083
4062
 
package/dist/index.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import { Contract, ZeroAddress, AbiCoder, TypedDataEncoder, keccak256, solidityPackedKeccak256, ethers, ZeroHash, MaxUint256 } from 'ethers';
2
2
  import { MerkleTree } from 'merkletreejs';
3
+ import { deployments } from '@hypercerts-org/contracts';
3
4
  import { keccak256 as keccak256$1 } from 'js-sha3';
4
5
 
5
6
  var abiIERC721 = [
@@ -4010,26 +4011,16 @@ var signMakerOrders = /*#__PURE__*/Object.freeze({
4010
4011
  });
4011
4012
 
4012
4013
  const goerliAddresses = {
4013
- LOOKS: "0x20A5A36ded0E4101C3688CBC405bBAAE58fE9eeC",
4014
- EXCHANGE_V2: "0x35C2215F2FFe8917B06454eEEaba189877F200cf",
4015
- TRANSFER_MANAGER_V2: "0xC20E0CeAD98abBBEb626B77efb8Dc1E5D781f90c",
4014
+ EXCHANGE_V2: deployments[5].HypercertExchange,
4015
+ TRANSFER_MANAGER_V2: deployments[5].TransferManager,
4016
4016
  WETH: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6",
4017
4017
  ORDER_VALIDATOR_V2: "0x7454Cc9AEB024bcE6A2CDC49ad4733B4D8215fb8",
4018
- REVERSE_RECORDS: "0x333Fc8f550043f239a2CF79aEd5e9cF4A20Eb41e",
4019
- LOOKS_LP_V3: "0x87C81267796Cd65347130e789CADdCdAf7bD2231",
4020
- STAKING_POOL_FOR_LOOKS_LP: "",
4021
- AGGREGATOR_UNISWAP_V3: "0x63c38B3BE3eF075a00a5edaeC36F499088c7334C",
4022
4018
  };
4023
4019
  const sepoliaAddresses = {
4024
- LOOKS: "0xa68c2CaA3D45fa6EBB95aA706c70f49D3356824E",
4025
- EXCHANGE_V2: "0x34098cc15a8a48Da9d3f31CC0F63F01f9aa3D9F3",
4026
- TRANSFER_MANAGER_V2: "0xb46f116ecBa8451E661189F4b2B63aC60a618092",
4020
+ EXCHANGE_V2: deployments[11155111].HypercertExchange,
4021
+ TRANSFER_MANAGER_V2: deployments[11155111].TransferManager,
4027
4022
  WETH: "",
4028
4023
  ORDER_VALIDATOR_V2: "0x0bc129E4c1f8D7b5583eAbAeb1F7468935B6ec0C",
4029
- REVERSE_RECORDS: "",
4030
- LOOKS_LP_V3: "",
4031
- STAKING_POOL_FOR_LOOKS_LP: "",
4032
- AGGREGATOR_UNISWAP_V3: "",
4033
4024
  };
4034
4025
  /**
4035
4026
  * List of useful contract addresses
@@ -4048,10 +4039,6 @@ const chainInfo = {
4048
4039
  rpcUrl: "https://eth-goerli.g.alchemy.com/v2",
4049
4040
  baseApiUrl: "https://graphql-goerli.looksrare.org",
4050
4041
  osApiUrl: "https://testnets-api.opensea.io",
4051
- cdnUrl: "https://static-goerli.looksnice.org",
4052
- rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
4053
- cloudinaryUrl: "https://looksrare.mo.cloudinary.net/goerli",
4054
- wsUrl: "wss://ws-goerli.looksrare.org/ws",
4055
4042
  },
4056
4043
  [ChainId.SEPOLIA]: {
4057
4044
  label: "Sepolia",
@@ -4060,10 +4047,6 @@ const chainInfo = {
4060
4047
  rpcUrl: "https://eth-sepolia.g.alchemy.com/v2",
4061
4048
  baseApiUrl: "https://graphql-sepolia.looksrare.org",
4062
4049
  osApiUrl: "https://testnets-api.opensea.io",
4063
- cdnUrl: "https://static-sepolia.looksnice.org",
4064
- rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
4065
- cloudinaryUrl: "https://looksrare.mo.cloudinary.net/sepolia",
4066
- wsUrl: "wss://ws-sepolia.looksrare.org/ws",
4067
4050
  },
4068
4051
  [ChainId.HARDHAT]: {
4069
4052
  label: "Hardhat",
@@ -4072,10 +4055,6 @@ const chainInfo = {
4072
4055
  rpcUrl: "http://127.0.0.1:8545",
4073
4056
  baseApiUrl: "http://localhost:4000",
4074
4057
  osApiUrl: "https://testnets-api.opensea.io",
4075
- cdnUrl: "https://via.placeholder.com",
4076
- rewardsSubgraphUrl: "https://api.thegraph.com/subgraphs/name/0xjurassicpunk/looks-distribution",
4077
- cloudinaryUrl: "",
4078
- wsUrl: "ws://localhost:5001/ws",
4079
4058
  },
4080
4059
  };
4081
4060
 
package/dist/types.d.ts CHANGED
@@ -2,15 +2,10 @@ import { BigNumberish, BytesLike, Overrides, TypedDataField, ContractTransaction
2
2
  import { Eip712MakerMerkleTree } from "./utils/Eip712MakerMerkleTree";
3
3
  /** Addresses used to create a LooksRare instance */
4
4
  export interface Addresses {
5
- LOOKS: string;
6
5
  EXCHANGE_V2: string;
7
6
  TRANSFER_MANAGER_V2: string;
8
7
  WETH: string;
9
8
  ORDER_VALIDATOR_V2: string;
10
- REVERSE_RECORDS: string;
11
- LOOKS_LP_V3: string;
12
- STAKING_POOL_FOR_LOOKS_LP: string;
13
- AGGREGATOR_UNISWAP_V3: string;
14
9
  }
15
10
  /** List of supported chains */
16
11
  export declare enum ChainId {
@@ -26,10 +21,6 @@ export interface ChainInfo {
26
21
  explorer: string;
27
22
  baseApiUrl: string;
28
23
  osApiUrl: string;
29
- cdnUrl: string;
30
- rewardsSubgraphUrl: string;
31
- cloudinaryUrl: string;
32
- wsUrl: string;
33
24
  }
34
25
  /** List of collection types supported by the protocol */
35
26
  export declare enum CollectionType {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypercerts-org/marketplace-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -47,6 +47,7 @@
47
47
  "devDependencies": {
48
48
  "@commitlint/cli": "^17.0.2",
49
49
  "@commitlint/config-conventional": "^17.0.2",
50
+ "@hypercerts-org/contracts": "^0.10.0",
50
51
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
51
52
  "@looksrare/contracts-exchange-v1": "^1.2.0",
52
53
  "@looksrare/contracts-exchange-v2": "^0.1.2",