Skip to content

Commit b233ac5

Browse files
committed
Configure packages for publication
Here we configure packages for publication to NPM registry. This is consistent with configuration of @threshold-network/solidity-contracts project.
1 parent 2ff6a30 commit b233ac5

File tree

7 files changed

+53
-11
lines changed

7 files changed

+53
-11
lines changed

solidity/ecdsa/package.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
"version": "2.0.0-dev",
44
"description": "Keep ECDSA Wallet",
55
"license": "MIT",
6+
"files": [
7+
"artifacts/",
8+
"build/contracts/",
9+
"contracts/",
10+
"!contracts/hardhat-dependency-compiler",
11+
"!**/test/",
12+
"deploy/",
13+
"export/",
14+
"export.json"
15+
],
616
"scripts": {
717
"format": "npm run lint",
818
"format:fix": "npm run lint:fix",
@@ -18,7 +28,7 @@
1828
"build": "hardhat compile",
1929
"test": "hardhat test --deploy-fixture",
2030
"deploy": "hardhat deploy --export export.json",
21-
"prepack": "tsc -p tsconfig.json && hardhat export-artifacts export/artifacts"
31+
"prepack": "tsc -p tsconfig.export.json && hardhat export-artifacts export/artifacts"
2232
},
2333
"devDependencies": {
2434
"@defi-wonderland/smock": "^2.0.7",
@@ -52,7 +62,7 @@
5262
"typescript": "^4.5.4"
5363
},
5464
"dependencies": {
55-
"@keep-network/random-beacon": "../random-beacon",
65+
"@keep-network/random-beacon": ">2.0.0-dev <2.0.0-ropsten",
5666
"@keep-network/sortition-pools": "^2.0.0-dev.0",
5767
"@openzeppelin/contracts": "^4.4.1",
5868
"@threshold-network/solidity-contracts": ">1.1.0-dev <1.1.0-ropsten"

solidity/ecdsa/tsconfig.export.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": ["./test", "./typechain"],
4+
"compilerOptions": {
5+
"target": "es5",
6+
"esModuleInterop": true,
7+
"outDir": "export"
8+
}
9+
}

solidity/ecdsa/tsconfig.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
{
22
"files": ["./hardhat.config.ts"],
3-
"include": ["./deploy", "./tasks", "./test", "./typechain"],
4-
"compilerOptions": {
5-
"downlevelIteration": true,
6-
"esModuleInterop": true,
7-
"outDir": "export"
8-
}
3+
"include": ["./deploy", "./tasks", "./test", "./typechain"]
94
}

solidity/ecdsa/yarn.lock

+4-2
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,10 @@
612612
"@openzeppelin/upgrades" "^2.7.2"
613613
openzeppelin-solidity "2.4.0"
614614

615-
"@keep-network/random-beacon@../random-beacon":
616-
version "2.0.0-dev"
615+
"@keep-network/random-beacon@>2.0.0-dev <2.0.0-ropsten":
616+
version "2.0.0-dev.0"
617+
resolved "https://registry.yarnpkg.com/@keep-network/random-beacon/-/random-beacon-2.0.0-dev.0.tgz#ea5f450256ea42c842c22fce39611fdb77b0bb49"
618+
integrity sha512-8bjljuCp9ZpGAuWtdVOkYT/HslAbnoI3DZdNbhCfp9BGPtWQa32XvOHHu25oqY9xj4IgKURoNqGhSbgb4+m5ww==
617619
dependencies:
618620
"@keep-network/sortition-pools" "1.2.0-dev.24"
619621
"@openzeppelin/contracts" "^4.4.2"

solidity/random-beacon/.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Hardhat
2+
build/
3+
cache/
4+
export/
5+
hardhat-dependency-compiler/
6+
export.json

solidity/random-beacon/package.json

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22
"name": "@keep-network/random-beacon",
33
"version": "2.0.0-dev",
44
"description": "Keep Random Beacon",
5+
"files": [
6+
"artifacts/",
7+
"build/contracts/",
8+
"contracts/",
9+
"!contracts/hardhat-dependency-compiler",
10+
"!**/test/",
11+
"deploy/",
12+
"export/",
13+
"export.json"
14+
],
515
"scripts": {
616
"clean": "hardhat clean",
717
"build": "hardhat compile",
@@ -16,7 +26,8 @@
1626
"lint:sol": "solhint 'contracts/**/*.sol' && prettier --check '**/*.sol'",
1727
"lint:fix:sol": "solhint 'contracts/**/*.sol' --fix && prettier --write '**/*.sol'",
1828
"lint:config": "prettier --check '**/*.@(json|yaml)'",
19-
"lint:config:fix": "prettier --write '**/*.@(json|yaml)'"
29+
"lint:config:fix": "prettier --write '**/*.@(json|yaml)'",
30+
"prepack": "tsc -p tsconfig.export.json && hardhat export-artifacts export/artifacts"
2031
},
2132
"dependencies": {
2233
"@keep-network/sortition-pools": "1.2.0-dev.24",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": ["./test", "./typechain"],
4+
"compilerOptions": {
5+
"target": "es5",
6+
"esModuleInterop": true,
7+
"outDir": "export"
8+
}
9+
}

0 commit comments

Comments
 (0)