Skip to content

Commit

Permalink
general tooling upgrade (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka authored Nov 12, 2022
1 parent 6ddeceb commit c6d0973
Show file tree
Hide file tree
Showing 290 changed files with 24,228 additions and 45,667 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.eslintrc.js
node_modules
src/adapter
67 changes: 45 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

on: [push]

name: ci
Expand All @@ -11,16 +10,22 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
- run: yarn install --network-concurrency 1
if: ${{ steps.yarn-cache.outputs.cache-hit != 'true' }}
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
- run: pnpm install
if: ${{ steps.pnpm-cache.outputs.cache-hit != 'true' }}

lint-ts:
name: Typescript lint
Expand All @@ -30,15 +35,21 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
- run: yarn lint:ts
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
- run: pnpm lint:ts

lint-sol:
name: Solidity lint
Expand All @@ -48,15 +59,21 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
- run: yarn lint:sol
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
- run: pnpm lint:sol

test:
name: Test contracts
Expand All @@ -66,15 +83,21 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- uses: actions/cache@master
id: yarn-cache
id: pnpm-cache
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
- run: yarn test
key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
- run: pnpm test

# coverage:
# name: Coverage
Expand All @@ -84,15 +107,15 @@ jobs:
# - uses: actions/checkout@v1
# - uses: actions/setup-node@v1
# with:
# node-version: 12
# node-version: 18
# - uses: actions/cache@master
# id: yarn-cache
# id: pnpm-cache
# with:
# path: |
# node_modules
# */*/node_modules
# key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/yarn.lock') }}
# - run: yarn coverage || true
# key: ${{ runner.os }}-lerna-${{ hashFiles('**/package.json', '**/pnpm-lock.yaml') }}
# - run: pnpm coverage || true
# - name: Coveralls
# uses: coverallsapp/github-action@master
# with:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ERC-1155: Semi Fungible Token Standard implementation
=============================================
=====================================================

This repository maintains a secure, efficient and standards-compliant implementation of the ERC-1155 token standard for Ethereum. The implementation was created during Horizon Blockchain Games' participation in the coauthoring of the [ERC-1155](https://github.com/ethereum/EIPs/issues/1155) and is used by [Skyweaver](https://www.skyweaver.net), [Opensea](https://github.com/ProjectOpenSea/opensea-erc1155#erc1155-implementation), and many other projects since its release.

Expand Down Expand Up @@ -55,6 +55,7 @@ will publish the `@0xsequence/erc-1155` package in the "src/" folder, separate f
here is that application developers who consume `@0xsequence/erc-1155` aren't required to install any of the devDependencies
in their toolchains as our build and contract packages are separated.


## LICENSE

Copyright (c) 2017-present [Horizon Blockchain Games Inc](https://horizon.io).
Expand Down
80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
{
"name": "root",
"private": true,
"workspaces": ["src"],
"license": "Apache-2.0",
"scripts": {
"build": "yarn clean && yarn compile && yarn adapter",
"clean": "rimraf src/artifacts && rimraf src/gen && rimraf cache",
"build": "pnpm clean && pnpm compile && pnpm adapter",
"clean": "rimraf src/artifacts && rimraf src/adapter && rimraf src/cache",
"compile": "hardhat --max-memory 4096 compile",
"adapter": "yarn adapter:gen && yarn adapter:build",
"adapter:gen": "rimraf src/gen/typechain && typechain --target ethers-v5 --outDir src/gen/typechain './src/artifacts/!(build-info)/**/*[^dbg].json'",
"adapter:build": "rimraf src/gen/adapter && tsc ./src/gen/typechain/index.ts --outDir ./src/gen/adapter",
"test": "yarn build && yarn concurrently -k --success first 'yarn start:ganache' 'yarn test:ganache'",
"test:hardhat": "hardhat test",
"test:ganache": "hardhat --network ganache test",
"coverage": "hardhat coverage",
"test:gas-report": "REPORT_GAS=true yarn test",
"lint": "yarn lint:ts && yarn lint:sol",
"lint:fix": "yarn lint:ts:fix && yarn lint:sol:fix",
"adapter": "pnpm adapter:gen && pnpm adapter:build",
"adapter:gen": "rimraf src/cache/typechain && typechain --target ethers-v5 --out-dir src/cache/typechain './src/artifacts/contracts/**/*[^dbg].json'",
"adapter:build": "rimraf src/adapter && tsc -p ./src/tsconfig.adapter.json",
"test": "pnpm build && hardhat test",
"test:quick": "hardhat test",
"precoverage": "pnpm build",
"coverage": "COVERAGE=true NET_ID=1 hardhat coverage --network coverage",
"benchmark": "BENCHMARK=true pnpm test",
"lint": "pnpm lint:ts && pnpm lint:sol",
"lint:fix": "pnpm lint:ts:fix && pnpm lint:sol:fix",
"lint:sol": "solhint './src/contracts/**/*.sol'",
"lint:sol:fix": "solhint './src/contracts/**/*.sol' --fix",
"lint:ts": "eslint -c .eslintrc.js './**/*.ts'",
"lint:ts:fix": "eslint -c .eslintrc.js --fix './**/*.ts'",
"format": "prettier --write ./**/*.ts",
"start:ganache": "ganache-cli --chainId ${npm_package_config_ganacheChainID} --networkId ${npm_package_config_ganacheChainID} --port ${npm_package_config_ganachePort} --gasLimit ${npm_package_config_ganacheGasLimit} --gasPrice ${npm_package_config_ganacheGasPrice} --defaultBalanceEther ${npm_package_config_etherBalance} --deterministic --mnemonic \"${npm_package_config_mnemonic}\" ${npm_package_config_extra}",
"start:ganache:verbose": "yarn run start:ganache --verbose",
"stop:start:ganache": "ps aux | grep ganache-cli | grep -v grep | awk '{print $2}' | xargs kill -9",
"release": "yarn publish src"
"start:ganache": "ganache --chain.chainId ${npm_package_config_ganacheChainID} --chain.networkId ${npm_package_config_ganacheChainID} --server.port ${npm_package_config_ganachePort} --miner.blockGasLimit ${npm_package_config_ganacheGasLimit} --miner.defaultGasPrice ${npm_package_config_ganacheGasPrice} --wallet.defaultBalance ${npm_package_config_etherBalance} --wallet.mnemonic \"${npm_package_config_mnemonic}\" ${npm_package_config_extra}",
"start:ganache:verbose": "pnpm run start:ganache --verbose",
"stop:ganache": "ps aux | grep ganache | grep -v grep | awk '{print $2}' | xargs kill -9",
"release": "pnpm publish src"
},
"husky": {
"hooks": {
"pre-commit": "yarn lint"
}
},
"devDependencies": {
"@nomiclabs/hardhat-ethers": "^2.0.0",
"@ethersproject/abi": "^5.7.0",
"@ethersproject/networks": "^5.7.1",
"@ethersproject/providers": "^5.7.2",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-truffle5": "^2.0.0",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@typechain/ethers-v5": "^6.0.0",
"@types/chai": "^4.2.15",
"@types/chai-as-promised": "^7.1.3",
"@types/chai-string": "^1.4.2",
"@types/mocha": "^8.2.1",
"@types/node": "^14.14.35",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"@typechain/ethers-v5": "^10.1.1",
"@types/chai-as-promised": "^7.1.0",
"@types/chai-string": "^1.4.1",
"@types/mocha": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"chai": "^4.3.4",
"chai-as-promised": "^7.1.1",
"chai-bignumber": "^3.0.0",
"chai-string": "^1.5.0",
"concurrently": "^6.0.0",
"dotenv": "^8.2.0",
"eslint": "^7.22.0",
"concurrently": "^7.5.0",
"dotenv": "^16.0.3",
"eslint": "^8.27.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-prettier": "^3.3.1",
"ethers": "^5.0.32",
"ganache-cli": "6.12.2",
"hardhat": "2.1.1",
"hardhat-gas-reporter": "1.0.4",
"husky": "^4.3.8",
"eslint-plugin-prettier": "^4.2.1",
"ethers": "^5.7.2",
"ganache": "^7.5.0",
"hardhat": "2.12.2",
"hardhat-gas-reporter": "1.0.9",
"husky": "^8.0.1",
"rimraf": "^3.0.2",
"solhint": "^3.3.2",
"solidity-coverage": "^0.7.16",
"ts-node": "^9.1.1",
"typechain": "^4.0.1",
"typescript": "^4.1.3"
"solhint": "^3.3.4",
"solidity-coverage": "^0.8.2",
"ts-node": "^10.9.1",
"typechain": "^8.1.1",
"typescript": "^4.8.4"
},
"config": {
"mnemonic": "test test test test test test test test test test test junk",
Expand Down
Loading

0 comments on commit c6d0973

Please sign in to comment.