Use HARDHAT_NETWORK env variable to deploy marketplace contract

This commit is contained in:
Arnaud 2025-05-22 17:38:13 +02:00
parent a11f756f1a
commit 28cf61f45e
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 15 additions and 2 deletions

View File

@ -25,6 +25,19 @@ To start a local Ethereum node with the contracts deployed, execute:
This will create a `deployment-localhost.json` file containing the addresses of
the deployed contracts.
To deploy the marketplace you can define `HARDHAT_NETWORK` and run the following command:
```bash
npm run deploy
# Example
# HARDHAT_NETWORK=localhost npm run deploy
```
Or you can you `npx` directly:
```bash
npx hardhat ignition deploy ignition/modules/marketplace.js --network localhost
```
Running the prover
------------------

View File

@ -4,12 +4,12 @@
"scripts": {
"test": "npm run lint && hardhat test",
"fuzz": "hardhat compile && fuzzing/fuzz.sh",
"start": "concurrently --names \"hardhat,deployment\" --prefix \"[{time} {name}]\" \"hardhat node\" \"sleep 2 && npm run deploy\"",
"start": "concurrently --names \"hardhat,deployment\" --prefix \"[{time} {name}]\" \"hardhat node\" \"sleep 2 && HARDHAT_NETWORK=localhost npm run deploy\"",
"compile": "hardhat compile",
"format": "prettier --write test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol ",
"format:check": "prettier --check test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol",
"lint": "solhint contracts/**.sol",
"deploy": "hardhat ignition deploy ignition/modules/marketplace.js --network localhost",
"deploy": "hardhat ignition deploy ignition/modules/marketplace.js --network $HARDHAT_NETWORK",
"predeploy": "hardhat run scripts/mine.js --network localhost",
"verify": "npm run verify:marketplace && npm run verify:state_changes",
"verify:marketplace": "certoraRun certora/confs/Marketplace.conf",