Skip to content

Commit

Permalink
Merge pull request #163 from zama-ai/contracts/cleanedWorkflow
Browse files Browse the repository at this point in the history
Contracts/cleaned workflow
  • Loading branch information
jatZama authored Dec 2, 2024
2 parents e08391e + 30a5d0b commit 6765a12
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 35 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/fhevm-core-contracts-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- run: cp .env.example .env
- run: cp .env.example.deployment .env
- run: npm ci --include=optional
- run: npm run compile
- run: npm run compile:gateway
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
package: ./contracts/package.json
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/fhevm-core-contracts-publishprerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ jobs:
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- run: cp .env.example .env
- run: cp .env.example.deployment .env
- run: npm ci --include=optional
- run: npm run compile
- run: npm run compile:gateway
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
with:
package: ./contracts/package.json
Expand Down
18 changes: 9 additions & 9 deletions contracts/.npmignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
*
!/artifacts/
!/artifacts/contracts/
!/artifacts/contracts/**/*.json
/artifacts/contracts/**/*.dbg.json
!/artifacts/gateway/
!/artifacts/contracts/ACL.sol/ACL.json
!/artifacts/contracts/FHEPayment.sol/FHEPayment.json
!/artifacts/contracts/InputVerifier.coprocessor.sol/InputVerifier.json
!/artifacts/contracts/InputVerifier.native.sol/InputVerifier.json
!/artifacts/contracts/KMSVerifier.sol/KMSVerifier.json
!/artifacts/contracts/TFHEExecutor.sol/TFHEExecutor.json
!/artifacts/contracts/TFHEExecutorWithEvents.sol/TFHEExecutorWithEvents.json
!/artifacts/gateway/GatewayContract.sol/GatewayContract.json
/artifacts/gateway/**/*.json
/artifacts/gateway/**/*.dbg.json
!addresses/**
!contracts/**
!gateway/**
!package.json
!LICENSE
!LICENSE
!README.md
18 changes: 9 additions & 9 deletions contracts/LICENSE.md → contracts/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.

3. Neither the name of ZAMA nor the names of its contributors may be used to endorse
or promote products derived from this software without specific prior written permission.
or promote products derived from this software without specific prior written permission.

NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE\*.
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE*.
THIS SOFTWARE IS PROVIDED BY THE ZAMA AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
Expand All @@ -27,7 +27,7 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCL
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

\*In addition to the rights carried by this license, ZAMA grants to the user a non-exclusive,
free and non-commercial license on all patents filed in its name relating to the open-source
code (the "Patents") for the sole purpose of evaluation, development, research, prototyping
and experimentation.
*In addition to the rights carried by this license, ZAMA grants to the user a non-exclusive,
free and non-commercial license on all patents filed in its name relating to the open-source
code (the "Patents") for the sole purpose of evaluation, development, research, prototyping
and experimentation.
2 changes: 1 addition & 1 deletion contracts/addresses/.env.acl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ACL_CONTRACT_ADDRESS=0x339EcE85B9E11a3A3AA557582784a15d7F82AAf2
ACL_CONTRACT_ADDRESS=0xFee8407e2f5e3Ee68ad77cAE98c434e637f516e5
2 changes: 1 addition & 1 deletion contracts/addresses/.env.exec
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TFHE_EXECUTOR_CONTRACT_ADDRESS=0x596E6682c72946AF006B27C131793F2b62527A4b
TFHE_EXECUTOR_CONTRACT_ADDRESS=0x687408aB54661ba0b4aeF3a44156c616c6955E07
2 changes: 1 addition & 1 deletion contracts/addresses/.env.fhepayment
Original file line number Diff line number Diff line change
@@ -1 +1 @@
FHE_PAYMENT_CONTRACT_ADDRESS=0x6d5A11aC509C707c00bc3A0a113ACcC26c532547
FHE_PAYMENT_CONTRACT_ADDRESS=0xFb03BE574d14C256D56F09a198B586bdfc0A9de2
2 changes: 1 addition & 1 deletion contracts/addresses/.env.inputverifier
Original file line number Diff line number Diff line change
@@ -1 +1 @@
INPUT_VERIFIER_CONTRACT_ADDRESS=0x69dE3158643e738a0724418b21a35FAA20CBb1c5
INPUT_VERIFIER_CONTRACT_ADDRESS=0x3a2DA6f1daE9eF988B48d9CF27523FA31a8eBE50
2 changes: 1 addition & 1 deletion contracts/addresses/.env.kmsverifier
Original file line number Diff line number Diff line change
@@ -1 +1 @@
KMS_VERIFIER_CONTRACT_ADDRESS=0x208De73316E44722e16f6dDFF40881A3e4F86104
KMS_VERIFIER_CONTRACT_ADDRESS=0x9D6891A6240D6130c54ae243d8005063D05fE14b
2 changes: 1 addition & 1 deletion contracts/addresses/ACLAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

pragma solidity ^0.8.24;

address constant aclAdd = 0x339EcE85B9E11a3A3AA557582784a15d7F82AAf2;
address constant aclAdd = 0xFee8407e2f5e3Ee68ad77cAE98c434e637f516e5;
2 changes: 1 addition & 1 deletion contracts/addresses/FHEPaymentAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

pragma solidity ^0.8.24;

address constant fhePaymentAdd = 0x6d5A11aC509C707c00bc3A0a113ACcC26c532547;
address constant fhePaymentAdd = 0xFb03BE574d14C256D56F09a198B586bdfc0A9de2;
2 changes: 1 addition & 1 deletion contracts/addresses/InputVerifierAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

pragma solidity ^0.8.24;

address constant inputVerifierAdd = 0x69dE3158643e738a0724418b21a35FAA20CBb1c5;
address constant inputVerifierAdd = 0x3a2DA6f1daE9eF988B48d9CF27523FA31a8eBE50;
2 changes: 1 addition & 1 deletion contracts/addresses/KMSVerifierAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

pragma solidity ^0.8.24;

address constant kmsVerifierAdd = 0x208De73316E44722e16f6dDFF40881A3e4F86104;
address constant kmsVerifierAdd = 0x9D6891A6240D6130c54ae243d8005063D05fE14b;
2 changes: 1 addition & 1 deletion contracts/addresses/TFHEExecutorAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

pragma solidity ^0.8.24;

address constant tfheExecutorAdd = 0x596E6682c72946AF006B27C131793F2b62527A4b;
address constant tfheExecutorAdd = 0x687408aB54661ba0b4aeF3a44156c616c6955E07;
2 changes: 1 addition & 1 deletion contracts/gateway/.env.gateway
Original file line number Diff line number Diff line change
@@ -1 +1 @@
GATEWAY_CONTRACT_PREDEPLOY_ADDRESS=0x096b4679d45fB675d4e2c1E4565009Cec99A12B1
GATEWAY_CONTRACT_PREDEPLOY_ADDRESS=0x33347831500F1e73f0ccCBb95c9f86B94d7b1123
2 changes: 1 addition & 1 deletion contracts/gateway/lib/GatewayContractAddress.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

pragma solidity ^0.8.24;

address constant GATEWAY_CONTRACT_PREDEPLOY_ADDRESS = 0x096b4679d45fB675d4e2c1E4565009Cec99A12B1;
address constant GATEWAY_CONTRACT_PREDEPLOY_ADDRESS = 0x33347831500F1e73f0ccCBb95c9f86B94d7b1123;
2 changes: 2 additions & 0 deletions contracts/launch-fhevm-sepolia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# This script should be launched after precomputing the addresses via `precompute-addresses.sh`, and preferably after setting up the different services - KMS, Geth node, Gateway
npx hardhat clean

mkdir -p addresses

PRIVATE_KEY_FHEVM_DEPLOYER=$(grep PRIVATE_KEY_FHEVM_DEPLOYER .env | cut -d '"' -f 2)
NUM_KMS_SIGNERS=$(grep NUM_KMS_SIGNERS .env | cut -d '"' -f 2)

Expand Down
4 changes: 2 additions & 2 deletions contracts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion contracts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhevm-core-contracts",
"version": "0.6.0-2",
"version": "0.6.0-3",
"description": "fhEVM contracts",
"repository": {
"type": "git",
Expand All @@ -9,6 +9,7 @@
"main": "index.js",
"scripts": {
"compile": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat compile",
"compile:gateway": "cross-env TS_NODE_TRANSPILE_ONLY=true hardhat compile:specific --contract gateway",
"lint": "npm run lint:sol && npm run lint:ts && npm run prettier:check",
"lint:ts": "eslint --ignore-path ./.eslintignore --ext .js,.ts .",
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\"",
Expand Down
2 changes: 2 additions & 0 deletions contracts/precompute-addresses.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
npx hardhat clean

mkdir -p addresses

PRIVATE_KEY_GATEWAY_DEPLOYER=$(grep PRIVATE_KEY_GATEWAY_DEPLOYER .env | cut -d '"' -f 2)
PRIVATE_KEY_FHEVM_DEPLOYER=$(grep PRIVATE_KEY_FHEVM_DEPLOYER .env | cut -d '"' -f 2)

Expand Down

0 comments on commit 6765a12

Please sign in to comment.