mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-07 15:53:07 +00:00
Remove HARDHAT_NETWORK and update documentation
This commit is contained in:
parent
b40b111636
commit
a6786413e4
42
Readme.md
42
Readme.md
@ -22,40 +22,13 @@ To start a local Ethereum node with the contracts deployed, execute:
|
|||||||
|
|
||||||
npm start
|
npm start
|
||||||
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
||||||
To reuse a previously deployed `Token` contract, define the environment variable `TOKEN_ADDRESS`.
|
|
||||||
The deployment script will use `contractAt` from Hardhat Ignition to retrieve the existing contract
|
|
||||||
instead of deploying a new one.
|
|
||||||
|
|
||||||
Deployment
|
Deployment
|
||||||
----------
|
----------
|
||||||
|
|
||||||
To deploy the marketplace you need to define `HARDHAT_NETWORK`:
|
To deploy the marketplace, you need to specify the network using `--network MY_NETWORK`:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
HARDHAT_NETWORK=localhost npm run deploy
|
npm run deploy -- --network localhost
|
||||||
```
|
|
||||||
|
|
||||||
Or you can you `npx` directly:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx hardhat ignition deploy ignition/modules/marketplace.js --network localhost
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Hardhat uses [reconciliation](https://hardhat.org/ignition/docs/advanced/reconciliation) to recover
|
Hardhat uses [reconciliation](https://hardhat.org/ignition/docs/advanced/reconciliation) to recover
|
||||||
@ -64,21 +37,14 @@ In our case, we will likely redeploy a new contract every time, so we will need
|
|||||||
[clear the previous deployment](https://hardhat.org/ignition/docs/guides/modifications#clearing-an-existing-deployment-with-reset):
|
[clear the previous deployment](https://hardhat.org/ignition/docs/guides/modifications#clearing-an-existing-deployment-with-reset):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
HARDHAT_NETWORK=localhost npm run deploy:reset
|
npm run deploy -- --network testnet --reset
|
||||||
```
|
|
||||||
|
|
||||||
Or you can you `npx` directly:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx hardhat ignition deploy ignition/modules/marketplace.js --network localhost --reset
|
|
||||||
```
|
```
|
||||||
|
|
||||||
To reuse a previously deployed `Token` contract, define the environment variable `TOKEN_ADDRESS`.
|
To reuse a previously deployed `Token` contract, define the environment variable `TOKEN_ADDRESS`.
|
||||||
The deployment script will use `contractAt` from Hardhat Ignition to retrieve the existing contract
|
The deployment script will use `contractAt` from Hardhat Ignition to retrieve the existing contract
|
||||||
instead of deploying a new one.
|
instead of deploying a new one.
|
||||||
|
|
||||||
The deployment files are kept under version control [as recommended by Hardhat](https://hardhat.org/ignition/docs/advanced/versioning),
|
The deployment files are kept under version control [as recommended by Hardhat](https://hardhat.org/ignition/docs/advanced/versioning), except the build files, which are 18 MB.
|
||||||
except the build files, which are 18 MB.
|
|
||||||
|
|
||||||
Running the prover
|
Running the prover
|
||||||
------------------
|
------------------
|
||||||
|
|||||||
@ -4,13 +4,12 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "npm run lint && hardhat test",
|
"test": "npm run lint && hardhat test",
|
||||||
"fuzz": "hardhat compile && fuzzing/fuzz.sh",
|
"fuzz": "hardhat compile && fuzzing/fuzz.sh",
|
||||||
"start": "concurrently --names \"hardhat,deployment\" --prefix \"[{time} {name}]\" \"hardhat node\" \"sleep 2 && npm run mine && HARDHAT_NETWORK=localhost npm run deploy\"",
|
"start": "concurrently --names \"hardhat,deployment\" --prefix \"[{time} {name}]\" \"hardhat node\" \"sleep 2 && npm run mine && npm run deploy -- --network localhost\"",
|
||||||
"compile": "hardhat compile",
|
"compile": "hardhat compile",
|
||||||
"format": "prettier --write test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol ",
|
"format": "prettier --write test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol ",
|
||||||
"format:check": "prettier --check test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol",
|
"format:check": "prettier --check test/**/*.js --plugin=prettier-plugin-solidity contracts/**/*.sol",
|
||||||
"lint": "solhint contracts/**.sol",
|
"lint": "solhint contracts/**.sol",
|
||||||
"deploy": "hardhat ignition deploy ignition/modules/marketplace.js --network $HARDHAT_NETWORK",
|
"deploy": "hardhat ignition deploy ignition/modules/marketplace.js",
|
||||||
"deploy:reset": "hardhat ignition deploy ignition/modules/marketplace.js --network $HARDHAT_NETWORK --reset",
|
|
||||||
"mine": "hardhat run scripts/mine.js --network localhost",
|
"mine": "hardhat run scripts/mine.js --network localhost",
|
||||||
"verify": "npm run verify:marketplace && npm run verify:state_changes",
|
"verify": "npm run verify:marketplace && npm run verify:state_changes",
|
||||||
"verify:marketplace": "certoraRun certora/confs/Marketplace.conf",
|
"verify:marketplace": "certoraRun certora/confs/Marketplace.conf",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user