Skip to content

Commit

Permalink
npm: update package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
amarinkovic committed Nov 14, 2023
1 parent 6bd47a1 commit f94003b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ jobs:
- name: Install Node dependencies
run: yarn

- name: Prepare build
run: make prep-build

- name: Build solidity contracts
run: make build

- name: Filter ABI
run: make folter-abi

- name: Publish to NPM
run: npm publish
env:
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -292,4 +292,9 @@ tf: ## Toggle forking of tests. true == fork a node, false == no fork
tu: ## Toggle upgrading the diamond in the forked tests. true == upgrade, false == no upgrade
@result=$$(grep -q 'TESTS_FORK_UPGRADE_DIAMOND=true' .env && echo "false" || echo "true"); \
sed -i '' -e "s/TESTS_FORK_UPGRADE_DIAMOND=.*/TESTS_FORK_UPGRADE_DIAMOND=$$result/" .env; \
echo "TESTS_FORK_UPGRADE_DIAMOND is now set to $$result"
echo "TESTS_FORK_UPGRADE_DIAMOND is now set to $$result"

filter-abi:
@jq '[.[] | select(.name !="facets")]' src/generated/abi.json | \
jq '[.[] | select(.name !="calculateUpgradeId")]' | \
jq '[.[] | select(.name !="diamondCut")]' > src/generated/nayms.json
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
Nayms: require("./forge-artifacts/INayms.sol/INayms.json"),
Nayms: require("src/generated/abi.json"),
ERC20: require("./forge-artifacts/IERC20.sol/IERC20.json"),
Constants: require("./forge-artifacts/LibConstants.sol/LibConstants.json"),
addresses: require("./deployedAddresses.json"),
targets: require("./gemforge.deployments.json"),
};
15 changes: 7 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nayms/contracts",
"version": "3.6.5",
"version": "3.7.0",
"main": "index.js",
"repository": "https://github.com/nayms/contracts-v3.git",
"author": "Kevin Park <[email protected]>",
Expand All @@ -9,12 +9,12 @@
"access": "public"
},
"files": [
"forge-artifacts/**",
"broadcast/**",
"deployedAddresses.json",
"gemforge.deployments.json",
"index.js",
"src/generated/IDiamondProxy.sol"
"gemforge.deployments.json",
"src/generated/abi.json",
"src/generated/nayms.json",
"forge-artifacts/LibConstants.sol/LibConstants.json",
"forge-artifacts/IERC20.sol/IERC20.json"
],
"scripts": {
"prettier": "yarn prettier:test && yarn prettier:src && yarn prettier:script",
Expand All @@ -29,8 +29,7 @@
"solhint:check": "solhint --config ./.solhint.json 'src/**/*.sol'",
"lint": "yarn prettier && yarn run solhint",
"lint:check": "yarn prettier:check && yarn run solhint:check",
"docgen": "rm -rf docs/facets/*Facet.md && node cli-tools/do gen.js",
"subgraph:abi": "node ./cli-tools/prep-subgraph-abi.js && prettier --write NaymsDiamond.json",
"docgen": "rm -rf docs/facets/*Facet.md && node cli-tools/docgen.js",
"anvil": "anvil --host 0.0.0.0 --chain-id 31337 --accounts 30 -m ./nayms_mnemonic.txt",
"build": "gemforge build",
"deploy": "./script/gemforge/deploy.js",
Expand Down

0 comments on commit f94003b

Please sign in to comment.