From 30d98500f7b7975fead7f16daefc4d9471c97d2d Mon Sep 17 00:00:00 2001
From: Amaury <1293565+amaury1093@users.noreply.github.com>
Date: Fri, 5 Apr 2024 10:29:49 +0200
Subject: [PATCH] docs: Remove local node mentions
---
README.md | 118 ++++++---------------------------------------------
package.json | 10 +----
2 files changed, 15 insertions(+), 113 deletions(-)
diff --git a/README.md b/README.md
index a73abd0..34966c9 100644
--- a/README.md
+++ b/README.md
@@ -66,34 +66,20 @@ You can edit the CI script in [.github/workflows/ci.yml](./.github/workflows/ci.
### Pre Requisites
-Install [docker](https://docs.docker.com/engine/install/)
-
Install [pnpm](https://pnpm.io/installation)
Before being able to run any command, you need to create a `.env` file and set a BIP-39 compatible mnemonic as an
-environment variable. You can follow the example in `.env.example`. If you don't already have a mnemonic, you can use
-this [website](https://iancoleman.io/bip39/) to generate one.
-
-Then, proceed with installing dependencies:
+environment variable. If you don't already have a mnemonic, you can use this [website](https://iancoleman.io/bip39/) to
+generate one. You can run the following command to use the example .env:
```sh
-pnpm install
+cp .env.example .env
```
-### Start fhevm
-
-Start a local fhevm docker container that inlcudes everything needed to deploy FHE encrypted smart contracts
-
-```sh
-# In one terminal, keep it opened
-# The node logs are printed
-pnpm fhevm:start
-```
-
-To stop:
+Then, proceed with installing dependencies:
```sh
-pnpm fhevm:stop
+pnpm install
```
### Compile
@@ -101,7 +87,7 @@ pnpm fhevm:stop
Compile the smart contracts with Hardhat:
```sh
-pnpm compile
+npx hardhat compile --network inco
```
### TypeChain
@@ -112,78 +98,31 @@ Compile the smart contracts and generate TypeChain bindings:
pnpm typechain
```
-### List accounts
-
-From the mnemonic in .env file, list all the derived Ethereum adresses:
-
-```sh
-pnpm task:accounts
-```
-
-### Get some native coins
-
-In order to interact with the blockchain, one need some coins. This command will give coins to the first address derived
-from the mnemonic in .env file.
-
-```sh
-pnpm fhevm:faucet
-```
-
-
-
- To get the first derived address from mnemonic
-
-
-```sh
-pnpm task:getEthereumAddress
-```
-
-
-
-
### Deploy
-Deploy the ERC20 to local network:
+Deploy the ERC20 to Inco Gentry Testnet Network:
```sh
-pnpm deploy:contracts
+npx hardhat deploy --network inco
```
-Notes:
-
-
-Error: cannot get the transaction for EncryptedERC20's previous deployment
-
-One can delete the local folder in deployments:
-
-```bash
-rm -r deployments/local/
-```
-
-
-
-
-Info: by default, the local network is used
-
-One can change the network, check [hardhat config file](./hardhat.config.ts).
-
-
-
-
#### Mint
-Run the `mint` task on the local network:
+Run the `mint` task on the Inco Gentry Testnet Network:
```sh
-pnpm task:mint --network local --mint 1000 --account alice
+npx hardhat task:mint --mint [AMOUNT] --account [alice|bob|carol|dave] --network inco
```
+(For more control over the deployment process, you can rewrite the deployment script (deploy.ts) and use the command
+`npx hardhat run scripts/deploy.ts --network inco` to deploy your contracts.)
+
### Test
Run the tests with Hardhat:
```sh
-pnpm test
+npx hardhat test --network inco
```
### Lint Solidity
@@ -238,31 +177,6 @@ pnpm task:deployERC20
## Tips
-### Increase gas limit
-
-If you are running several fhe operations and need to have more gas per block, here is a way to customize your local
-node setup.
-
-1. Copy docker setup.sh file
-
-```bash
-docker cp fhevm:/config/setup.sh .
-```
-
-2. Increase the gas limit from 10M to 100M for example in setup.sh
-
-```bash
-cat $HOME_EVMOSD/config/genesis.json | jq '.consensus_params["block"]["max_gas"]="10000000"' > $HOME_EVMOSD/config/tmp_genesis.json && mv $HOME_EVMOSD/config/tmp_genesis.json $HOME_EVMOSD/config/genesis.json
-```
-
-3. Run the dev image with the custom setup.sh file
-
-```bash
-docker run -i -v $PWD/setup.sh:/config/setup.sh -p 8545:8545 --rm --name fhevm docker.io/inconetwork/inco-chain:0.1.9.1-hardhat-template
-```
-
-Note: one can also replace fhevm:start in package.json with the above command
-
### Syntax Highlighting
If you use VSCode, you can get Solidity syntax highlighting with the
@@ -275,10 +189,6 @@ If you use VSCode, you can get Solidity syntax highlighting with the
To view the coverage report generated by `pnpm coverage`, just click `Go Live` from the status bar to turn the server
on/off.
-## Local development with Docker
-
-Please check Evmos repository to be able to build FhEVM from sources.
-
## License
This project is licensed under MIT.
diff --git a/package.json b/package.json
index 7513e6d..8a93435 100644
--- a/package.json
+++ b/package.json
@@ -80,15 +80,7 @@
"task:getEthereumAddress": "hardhat task:getEthereumAddress",
"task:mint": "hardhat task:mint",
"task:deployERC20": "hardhat task:deployERC20",
- "task:accounts": "hardhat task:accounts",
- "fhevm:start": "docker run -i -p 8545:8545 --rm --name fhevm docker.io/inconetwork/inco-chain:0.1.9.1-hardhat-template",
- "fhevm:stop": "docker rm -f fhevm",
- "fhevm:restart": "fhevm:stop && fhevm:start",
- "fhevm:faucet": "npm run fhevm:faucet:alice && sleep 5 && npm run fhevm:faucet:bob && sleep 5 && npm run fhevm:faucet:carol && sleep 5 && npm run fhevm:faucet:dave",
- "fhevm:faucet:alice": "docker exec -i fhevm go run /go/src/github.com/evmos/evmos/faucet.go $(npx hardhat task:getEthereumAddressAlice)",
- "fhevm:faucet:bob": "docker exec -i fhevm go run /go/src/github.com/evmos/evmos/faucet.go $(npx hardhat task:getEthereumAddressBob)",
- "fhevm:faucet:carol": "docker exec -i fhevm go run /go/src/github.com/evmos/evmos/faucet.go $(npx hardhat task:getEthereumAddressCarol)",
- "fhevm:faucet:dave": "docker exec -i fhevm go run /go/src/github.com/evmos/evmos/faucet.go $(npx hardhat task:getEthereumAddressDave)"
+ "task:accounts": "hardhat task:accounts"
},
"dependencies": {
"@openzeppelin/contracts": "^4.9.2"