Skip to content

Commit

Permalink
Add hardhat scripts (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
DefiCake authored Aug 27, 2024
1 parent 6738d62 commit dc50ce3
Show file tree
Hide file tree
Showing 26 changed files with 868 additions and 566 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-queens-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fuel-bridge/solidity-contracts': minor
---

Added hardhat scripts
4 changes: 2 additions & 2 deletions docker/l1-chain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ RUN pnpm install

# Take advantage of cache by putting a placeholder and downloading the compiler
ADD ./docker/l1-chain/Placeholder.sol /l1chain/fuel-v2-contracts/contracts/Placeholder.sol
COPY ./packages/solidity-contracts/hardhat.config.ts .
ADD ./packages/solidity-contracts/hardhat.config.ts .
ADD ./packages/solidity-contracts/scripts /l1chain/fuel-v2-contracts/scripts
RUN pnpm compile

# replace the fuel chain consts values and change contract code
ADD ./docker/l1-chain/.fuelChainConsts.env /l1chain/fuel-v2-contracts/.fuelChainConsts.env
ADD ./packages/solidity-contracts/contracts /l1chain/fuel-v2-contracts/contracts
ADD ./packages/solidity-contracts/deploy /l1chain/fuel-v2-contracts/deploy
ADD ./packages/solidity-contracts/scripts /l1chain/fuel-v2-contracts/scripts
ADD ./packages/solidity-contracts/protocol /l1chain/fuel-v2-contracts/protocol


Expand Down
1 change: 1 addition & 0 deletions packages/solidity-contracts/hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import '@typechain/hardhat';
import '@openzeppelin/hardhat-upgrades';
import 'hardhat-deploy';
import 'solidity-coverage';
import './scripts/hardhat';

dotEnvConfig();

Expand Down
10 changes: 3 additions & 7 deletions packages/solidity-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,7 @@
"coverage": "pnpm run build && pnpm hardhat coverage --temp artifacts --network hardhat",
"check": "pnpm solhint \"contracts/**/*.sol\"",
"node": "pnpm hardhat node --network hardhat",
"node-deploy": "QUICK_DEPLOY=true pnpm hardhat run --network localhost scripts/deployAll.ts",
"start-mining": "pnpm hardhat run --no-compile --network localhost scripts/startAutoMining.ts",
"script-deploy": "pnpm hardhat run scripts/deployAll.ts",
"script-deploy-impl": "pnpm hardhat run scripts/deployImplementation.ts",
"script-upgrade": "pnpm hardhat run scripts/upgradeAll.ts",
"script-verify-source": "pnpm hardhat run scripts/verifySource.ts",
"script-verify-address": "pnpm hardhat run scripts/verifyAddress.ts",
"script-grant-role": "pnpm hardhat run scripts/grantComitterRole.ts",
"serve-deployments": "pnpm ts-node scripts/serveDeployments.ts",
"test": "pnpm hardhat test",
"test-no-compile": "pnpm hardhat test --no-compile",
Expand All @@ -38,6 +31,7 @@
},
"devDependencies": {
"@fuel-ts/merkle": "^0.21.2",
"@inquirer/prompts": "^5.3.8",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.4",
"@nomicfoundation/hardhat-ethers": "^3.0.5",
"@nomicfoundation/hardhat-network-helpers": "^1.0.10",
Expand All @@ -60,8 +54,10 @@
"dotenv": "^16.0.3",
"ethers": "6.13.1",
"express": "^4.18.2",
"fuels": "0.94.0",
"hardhat": "^2.20.1",
"hardhat-deploy": "^0.11.44",
"inquirer": "^10.1.8",
"lodash": "^4.17.21",
"markdownlint": "^0.26.2",
"markdownlint-cli": "^0.32.2",
Expand Down
109 changes: 0 additions & 109 deletions packages/solidity-contracts/scripts/deployAll.ts

This file was deleted.

129 changes: 0 additions & 129 deletions packages/solidity-contracts/scripts/deployImplementation.ts

This file was deleted.

56 changes: 0 additions & 56 deletions packages/solidity-contracts/scripts/grantComitterRole.ts

This file was deleted.

Loading

0 comments on commit dc50ce3

Please sign in to comment.