From e6784a8bacfe454800d0befb3aab6c9b315c56fa Mon Sep 17 00:00:00 2001 From: dappsar Date: Thu, 21 Sep 2023 01:35:12 -0300 Subject: [PATCH 1/5] updated deployment documentation --- README.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/README.md b/README.md index e0a204a..28bdbb6 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ INFURA_ID={your infura project id} ALCHEMY_ID={your infura api key} PUBLIC_ADDRESS={your wallet address} PRIVATE_KEY={your private key to deploy SCs} +DEPLOYED_GIGACOUNTS_CONTRACT_ADDRESS={the address where contract ERC20 is deploy, just to use in scripts/interact.ts} ``` > Note: You can find more info about the other required `.env` variables inside the `example_env` file. @@ -80,16 +81,3 @@ solhint 'contracts/**/*.sol' # Solidity Static Analysis [https://github.com/crytic/slither] slither . ``` - -## Deployment - -When deploying the handler contract: - -- Update the 'env' variables in both the frontend and backend with new SC address. -- Update the ABI code of the handler to both the frontend and backend. -- Add the user scheduler's wallet as an owner. -- Add the user admin's wallet as an owner. -- Call the 'addSupportedToken' function with the address of the GIGA ERC20 Token. -- Increase the allowance in the ERC20 Token contract for the handler's address. - - From a05930de869316bddd5a2e098d789fc13eece028 Mon Sep 17 00:00:00 2001 From: dappsar Date: Thu, 21 Sep 2023 01:35:50 -0300 Subject: [PATCH 2/5] updated scripts in package --- package.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 98cc068..52f30a1 100644 --- a/package.json +++ b/package.json @@ -20,13 +20,8 @@ "scripts": { "compile": "hardhat compile", "test": "hardhat test", - "deploy-all-mock-local": "npx hardhat run scripts/deployAllWithMock.ts --network localhost", - "deploy-all-local": "yarn deploy-token-local && yarn deploy-handler-local && yarn deploy-handler-proxy-local", - "deploy-token-local": "npx hardhat run scripts/deployToken.ts --network localhost", - "deploy-handler-local": "npx hardhat run scripts/deployHandler.ts --network localhost", - "deploy-handler-proxy-local": "npx hardhat run scripts/deployHandlerWithProxy.ts --network localhost", - "interact-token": "npx hardhat run scripts/interact-token.ts", - "interact-handler": "npx hardhat run scripts/interact-handler.ts", + "deploy-local": "npx hardhat run scripts/deploy.ts --network localhost", + "deploy-mumbai": "npx hardhat run scripts/deploy.ts --network mumbai", "lint": "npm run lint:js & npm run lint:sol", "lint:fix": "npm run lint:js:fix & npm run lint:sol:fix", "lint:js": "npx prettier --log-level warn --ignore-path .gitignore \"{contracts,test}/**/*.{js,ts}\" --check & npx eslint --ignore-path .gitignore .", From a3509d28ce1e41ad6d3add06c6ec0009931a5342 Mon Sep 17 00:00:00 2001 From: dappsar Date: Thu, 21 Sep 2023 01:44:26 -0300 Subject: [PATCH 3/5] updated scripts in package --- package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 52f30a1..98cc068 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,13 @@ "scripts": { "compile": "hardhat compile", "test": "hardhat test", - "deploy-local": "npx hardhat run scripts/deploy.ts --network localhost", - "deploy-mumbai": "npx hardhat run scripts/deploy.ts --network mumbai", + "deploy-all-mock-local": "npx hardhat run scripts/deployAllWithMock.ts --network localhost", + "deploy-all-local": "yarn deploy-token-local && yarn deploy-handler-local && yarn deploy-handler-proxy-local", + "deploy-token-local": "npx hardhat run scripts/deployToken.ts --network localhost", + "deploy-handler-local": "npx hardhat run scripts/deployHandler.ts --network localhost", + "deploy-handler-proxy-local": "npx hardhat run scripts/deployHandlerWithProxy.ts --network localhost", + "interact-token": "npx hardhat run scripts/interact-token.ts", + "interact-handler": "npx hardhat run scripts/interact-handler.ts", "lint": "npm run lint:js & npm run lint:sol", "lint:fix": "npm run lint:js:fix & npm run lint:sol:fix", "lint:js": "npx prettier --log-level warn --ignore-path .gitignore \"{contracts,test}/**/*.{js,ts}\" --check & npx eslint --ignore-path .gitignore .", From dcf25cb17a113c7bd2d47f579ee5787b936218a2 Mon Sep 17 00:00:00 2001 From: dappsar Date: Thu, 21 Sep 2023 01:45:01 -0300 Subject: [PATCH 4/5] updated scripts in github actions --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 3a04357..0b047de 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,6 +18,6 @@ jobs: - name: Compile contracts run: npx hardhat compile - name: Test deploy harhat - run: npx hardhat node & npx hardhat run --network hardhat scripts/deploy.ts + run: npx hardhat node & npx hardhat run --network hardhat scripts/deployAllWithMock.ts - name: Run tests run: npx hardhat test From 299966aa04db5de5e92f70aeceedd7eec66688c8 Mon Sep 17 00:00:00 2001 From: dappsar Date: Thu, 21 Sep 2023 01:45:31 -0300 Subject: [PATCH 5/5] updated documentation about deployment in readme --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28bdbb6..e0a204a 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,6 @@ INFURA_ID={your infura project id} ALCHEMY_ID={your infura api key} PUBLIC_ADDRESS={your wallet address} PRIVATE_KEY={your private key to deploy SCs} -DEPLOYED_GIGACOUNTS_CONTRACT_ADDRESS={the address where contract ERC20 is deploy, just to use in scripts/interact.ts} ``` > Note: You can find more info about the other required `.env` variables inside the `example_env` file. @@ -81,3 +80,16 @@ solhint 'contracts/**/*.sol' # Solidity Static Analysis [https://github.com/crytic/slither] slither . ``` + +## Deployment + +When deploying the handler contract: + +- Update the 'env' variables in both the frontend and backend with new SC address. +- Update the ABI code of the handler to both the frontend and backend. +- Add the user scheduler's wallet as an owner. +- Add the user admin's wallet as an owner. +- Call the 'addSupportedToken' function with the address of the GIGA ERC20 Token. +- Increase the allowance in the ERC20 Token contract for the handler's address. + +