Skip to content

Commit

Permalink
build: Clean build file (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xShisui committed Mar 17, 2023
1 parent e44d884 commit 2abb68e
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 19 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"node": true,
"mocha": true
},
"parser": "@typescript-eslint/parser",
"extends": ["plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"plugins": ["@typescript-eslint"],
"rules": {
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

@0xShisui
@0xShisui @0xhiroshi
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
19 changes: 19 additions & 0 deletions .github/ISSUE_TEMPLATE/change_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: Change request
about: Suggest a change
title: ""
labels: ""
assignees: ""
---

**Please describe your problem**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
13 changes: 13 additions & 0 deletions .github/ISSUE_TEMPLATE/technical_question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
name: Technical question
about: Technical question about the SDK, how does it work, how to implement, etc...
title: ""
labels: ""
assignees: ""
---

**If you couldn't find your answer in the doc**

- Explain your problem as clearly a possible
- Explain what you tried to do to solve it
- Share your code
1 change: 1 addition & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"extends": "@istanbuljs/nyc-config-typescript",
"all": true,
"include": ["src/**"],
"exclude": ["src/__tests__/**", "src/constants/**", "src/index.ts", "src/typechain/**"],
"reporter": ["html", "text"]
}
4 changes: 2 additions & 2 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ const config: HardhatUserConfig = {
except: ["contracts/tests/*", "@rari-capital"],
},
typechain: {
outDir: "typechain",
outDir: "src/typechain",
target: "ethers-v5",
},
paths: {
tests: "src/__tests__",
artifacts: "artifacts",
artifacts: "src/artifacts",
sources: "src/contracts",
},
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.11",
"main": "dist/index.cjs.js",
"module": "dist/index.esm.js",
"types": "dist/src/index.d.ts",
"types": "dist/index.d.ts",
"files": [
"dist"
],
Expand All @@ -14,7 +14,7 @@
},
"scripts": {
"doc": "typedoc --plugin typedoc-plugin-markdown",
"prebuild": "rm -rf ./dist && rm -rf artifacts && rm -rf typechain",
"prebuild": "rm -rf ./dist && rm -rf src/artifacts && rm -rf src/typechain",
"build:ts": "rollup -c && tsc -d",
"build:sc": "hardhat compile",
"build": "yarn build:sc && yarn build:ts",
Expand Down
20 changes: 10 additions & 10 deletions src/__tests__/helpers/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ import chai from "chai";
import chaiAsPromised from "chai-as-promised";
import { ethers } from "hardhat";
import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers";
import type { LooksRareAggregator } from "../../../typechain/@looksrare/contracts-aggregator/contracts/LooksRareAggregator";
import type { ERC20EnabledLooksRareAggregator } from "../../../typechain/@looksrare/contracts-aggregator/contracts/ERC20EnabledLooksRareAggregator";
import type { LooksRareProxy } from "../../../typechain/@looksrare/contracts-aggregator/contracts/proxies/LooksRareProxy";
import type { LooksRareV2Proxy } from "../../../typechain/@looksrare/contracts-aggregator/contracts/proxies/LooksRareV2Proxy";
import type { SeaportProxy } from "../../../typechain/@looksrare/contracts-aggregator/contracts/proxies/SeaportProxy";
import type { MockERC721 } from "../../../typechain/src/contracts/tests/MockERC721";
import type { MockERC1155 } from "../../../typechain/src/contracts/tests/MockERC1155";
import type { MockERC20 } from "../../../typechain/src/contracts/tests/MockERC20";
import type { LooksRareAggregator } from "../../typechain/@looksrare/contracts-aggregator/contracts/LooksRareAggregator";
import type { ERC20EnabledLooksRareAggregator } from "../../typechain/@looksrare/contracts-aggregator/contracts/ERC20EnabledLooksRareAggregator";
import type { LooksRareProxy } from "../../typechain/@looksrare/contracts-aggregator/contracts/proxies/LooksRareProxy";
import type { LooksRareV2Proxy } from "../../typechain/@looksrare/contracts-aggregator/contracts/proxies/LooksRareV2Proxy";
import type { SeaportProxy } from "../../typechain/@looksrare/contracts-aggregator/contracts/proxies/SeaportProxy";
import type { MockERC721 } from "../../typechain/src/contracts/tests/MockERC721";
import type { MockERC1155 } from "../../typechain/src/contracts/tests/MockERC1155";
import type { MockERC20 } from "../../typechain/src/contracts/tests/MockERC20";
import { PROXY_EXECUTE_SELECTOR } from "../../constants/selectors";
import { CROSS_CHAIN_SEAPORT_ADDRESS } from "@opensea/seaport-js/lib/constants";
import { addressesByNetwork, SupportedChainId } from "@looksrare/sdk";
import { TransferManager } from "../../../typechain/@looksrare/contracts-exchange-v2/contracts/TransferManager";
import { LooksRareProtocol } from "../../../typechain/@looksrare/contracts-exchange-v2/contracts/LooksRareProtocol";
import { TransferManager } from "../../typechain/@looksrare/contracts-exchange-v2/contracts/TransferManager";
import { LooksRareProtocol } from "../../typechain/@looksrare/contracts-exchange-v2/contracts/LooksRareProtocol";
import { Addresses } from "../../constants/addresses";

chai.use(chaiAsPromised);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/calls/aggregator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber, Contract, PayableOverrides, Signer } from "ethers";
import { TradeData } from "../../types";
import abiLooksRareAggregator from "../../abis/LooksRareAggregator.json";
import { LooksRareAggregator } from "../../../typechain";
import { LooksRareAggregator } from "../../typechain";

export const executeETHOrders = async (
signer: Signer,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/calls/erc20.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BigNumberish, Contract, ethers, Overrides, Signer } from "ethers";
import abiIERC20 from "../../abis/IERC20.json";
import { IERC20 } from "../../../typechain";
import { IERC20 } from "../../typechain";

const allowance = (
signerOrProvider: ethers.providers.Provider | Signer,
Expand Down
2 changes: 1 addition & 1 deletion src/utils/calls/erc20EnabledAggregator.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BigNumber, Contract, PayableOverrides, Signer } from "ethers";
import { TokenTransfer, TradeData } from "../../types";
import abiERC20EnabledLooksRareAggregator from "../../abis/ERC20EnabledLooksRareAggregator.json";
import { ERC20EnabledLooksRareAggregator } from "../../../typechain";
import { ERC20EnabledLooksRareAggregator } from "../../typechain";

export const executeERC20Orders = async (
signer: Signer,
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,7 @@
/* Completeness */
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
"skipLibCheck": true /* Skip type checking all .d.ts files. */
}
},
"include": ["src/**/*"],
"exclude": ["src/__tests__/**/*", "src/contracts/**/*", "src/artifacts/**/*"]
}

0 comments on commit 2abb68e

Please sign in to comment.