Skip to content

Commit 99466ef

Browse files
Define npm package structure
The package will have the following structure: artifacts/ # copy of deployments/<network>/ build/contracts/ # build artifacts contracts/ # source code deploy/ # deployment scripts export.json # single-file deployment export `artifacts/` - is a directory containing deployed contracts artifacts for the network the package is being created. It is assumed that a package is published for each supported network separately, so we don't need to create seperate directories per network. `build/contracts/` - is a directory containing compiled contracts artifacts in the Hardhat format. `contracts/` - is a directory containing contracts source code. `deploy/` - deployment cripts (can be used in other projects using hardhat for local development) `export.json` - lightweight deployment data in a single file.
1 parent a80ed1f commit 99466ef

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/contracts.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ on:
88
workflow_dispatch:
99
inputs:
1010
environment:
11-
description: 'Environment for workflow execution'
11+
description: "Environment for workflow execution"
1212
required: false
13-
default: 'dev'
13+
default: "dev"
1414
upstream_builds:
1515
description: "Upstream builds"
1616
required: false
@@ -147,7 +147,7 @@ jobs:
147147
env:
148148
ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }}
149149
CHAIN_API_URL: ${{ secrets.KEEP_TEST_ETH_HOSTNAME_HTTP }}
150-
run: |
150+
run: |
151151
yarn run hardhat --network ${{ github.event.inputs.environment }} \
152152
etherscan-verify --license MIT
153153

package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
"name": "@t-network/solidity-contracts",
33
"version": "0.0.1",
44
"license": "GPL-3.0-or-later",
5+
"files": [
6+
"artifacts/",
7+
"build/contracts/",
8+
"contracts/",
9+
"!**/test/",
10+
"deploy/",
11+
"export.json"
12+
],
513
"scripts": {
614
"build": "hardhat compile",
715
"deploy": "hardhat deploy --export export.json",

0 commit comments

Comments
 (0)