Skip to content

Commit

Permalink
feat: As a developer, I want to import the Verax contracts via NPM in…
Browse files Browse the repository at this point in the history
… my project
  • Loading branch information
alainncls committed Apr 22, 2024
1 parent 2b104ff commit c7f952b
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ node_modules
lcov.info
coverage

# Contarcts
# Contracts
cache_hardhat
cache_forge
artifacts
Expand Down
24 changes: 17 additions & 7 deletions contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,54 @@
{
"name": "linea-attestation-registry-contracts",
"version": "0.0.1",
"name": "@verax-attestation-registry/verax-contracts",
"version": "0.0.4",
"description": "Verax Attestation Registry core smart contracts",
"keywords": [
"linea-attestation-registry",
"verax",
"blockchain",
"attestation",
"ethereum",
"foundry",
"hardhat",
"smart-contracts",
"solidity"
],
"repository": "github.com/Consensys/linea-attestation-registry",
"license": "MIT",
"author": "Consensys",
"files": [
"src"
"contracts/**/*.sol",
"build/*.json",
"!contracts/examples/**/*"
],
"scripts": {
"build": "forge build",
"check:implementations": "npx hardhat run script/upgrade/checkImplementations.ts",
"check:upgradeability": "npx hardhat run script/upgrade/checkUpgradeability.ts --network",
"clean": "rm -rf lcov.info coverage artifacts cache_hardhat cache out typechain-types",
"clean": "rm -rf lcov.info coverage artifacts cache_forge cache_hardhat cache out typechain-types build contracts",
"deploy": "npx hardhat run script/deploy/deployEverything.ts --network",
"deploy:issuers": "npx hardhat run script/deploy/deployIssuers.ts --network",
"deploy:post": "npx hardhat run script/deploy/postDeployment.ts --network",
"deploy:stdlib": "npx hardhat run script/deploy/deployStdLib.ts --network",
"lint": "pnpm solhint \"{script,src,test}/**/*.sol\" -c .solhint.json",
"postpack": "./postpack.sh",
"prepack": "./prepack.sh",
"prepublishOnly": "pnpm run clean && pnpm run lint && pnpm run build && pnpm run test",
"publish:dry-run": "pnpm publish --dry-run --no-git-checks",
"publish:public": "pnpm publish --access public --no-git-checks",
"reimport": "npx hardhat run script/recreateNetworkFile.ts --network",
"test": "forge test",
"test:coverage": "forge coverage --report lcov && genhtml lcov.info -o coverage/html",
"upgrade": "npx hardhat run script/upgrade/upgradeEverything.ts --network",
"upgrade:force": "npx hardhat run script/upgrade/forceUpgradeEverything.ts --network"
},
"dependencies": {
"@openzeppelin/contracts": "4.9.6",
"@openzeppelin/contracts-upgradeable": "4.9.6"
},
"devDependencies": {
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-foundry": "^1.1.1",
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
"@openzeppelin/contracts": "4.9.6",
"@openzeppelin/contracts-upgradeable": "4.9.6",
"@openzeppelin/hardhat-upgrades": "^3.0.5",
"@types/node": "^18.16.0",
"dotenv": "^16.4.5",
Expand Down
17 changes: 17 additions & 0 deletions contracts/postpack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Check if 'contracts' directory exists and remove it
if [ -d "contracts" ]; then
rm -rf contracts
echo "contracts directory removed"
else
echo "contracts directory does not exist"
fi

# Check if 'build' directory exists and remove it
if [ -d "build" ]; then
rm -rf build
echo "build directory removed"
else
echo "build directory does not exist"
fi
13 changes: 13 additions & 0 deletions contracts/prepack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Create 'contracts' directory if it doesn't exist
mkdir -p contracts

# Copy the contents of 'src' into 'contracts'
cp -R src/* contracts/

# Create 'build' directory if it doesn't exist
mkdir -p build

# copy all JSON files from 'out' (including subdirectories) into 'build'
find out -name '*.json' -exec cp {} build \;
17 changes: 9 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7f952b

Please sign in to comment.