Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit 87417d2

Browse files
authored
refactor: updates lib (#717)
1 parent ac920ff commit 87417d2

97 files changed

Lines changed: 29792 additions & 62222 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.example

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
export MNEMONIC="adapt mosquito move limb mobile illegal tree voyage juice mosquito burger raise father hope layer"
2-
export PRIVATE_KEY_FHEVM_DEPLOYER="0c66d8cde71d2faa29d0cb6e3a567d31279b6eace67b0a9d9ba869c119843a5e"
3-
export PRIVATE_KEY_DECRYPTION_ORACLE_RELAYER="7ec931411ad75a7c201469a385d6f18a325d4923f9f213bd882bbea87e160b67"
4-
export NUM_KMS_SIGNERS="1"
5-
export PRIVATE_KEY_KMS_SIGNER_0="388b7680e4e1afa06efbfd45cdd1fe39f3c6af381df6555a19661f283b97de91"
6-
export PRIVATE_KEY_KMS_SIGNER_1="bbaed91514fa4b7c86aa4f73becbabcf4bce0ae130240f0d6ac3f87e06812440"
7-
export PRIVATE_KEY_KMS_SIGNER_2="1bfa3e2233b0103ad67954a728b246c528916791f7fab4894ff361e3937b47e1"
8-
export PRIVATE_KEY_KMS_SIGNER_3="7a604eed8cf4a43277d192aa0c7894d368577a4021e52bf45420f256e34c7dd7"
9-
export PRIVATE_KEY_COPROCESSOR_ACCOUNT="7ec8ada6642fc4ccfb7729bc29c17cf8d21b61abd5642d1db992c0b8672ab901"
10-
export IS_COPROCESSOR="true"
11-
12-
export SEPOLIA_RPC_URL="https://sepolia.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
13-
export ETHERSCAN_API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
1+
MNEMONIC="adapt mosquito move limb mobile illegal tree voyage juice mosquito burger raise father hope layer"
2+
CHAIN_ID_GATEWAY="654321"
3+
DEPLOYER_PRIVATE_KEY="7697c90f7863e6057fbe25674464e14b57f2c670b1a8ee0f60fb87eb9b615c4d" # account[5]
4+
DECRYPTION_MANAGER_ADDRESS="0x5ffdaAB0373E62E2ea2944776209aEf29E631A64"
5+
ZKPOK_MANAGER_ADDRESS="0x812b06e1CDCE800494b79fFE4f925A504a9A9810"
6+
NUM_KMS_NODES="1"
7+
KMS_THRESHOLD="1"
8+
KMS_SIGNER_ADDRESS_0="0x9FE8958A2920985AC7ab8d320fDFaB310135a05B" # account[7] (account[6] is the relayer)
9+
KMS_SIGNER_ADDRESS_1="0x466f26442DD182C9A1b018Cd06671F9791DdE8Ef" # account[8]
10+
KMS_SIGNER_ADDRESS_2="0xc45994e4098271c3140117ebD5c74C70dd56D9cd" # account[9]
11+
KMS_SIGNER_ADDRESS_3="0xDb216ECeC4cEd51CdfD9609b6Ce7653aB04f6cAd" # account[10]
12+
NUM_COPROCESSORS="1"
13+
COPROCESSOR_SIGNER_ADDRESS_0="0x6518D50aDc9036Df37119eA465a8159E34417E2E" # account[11]
14+
COPROCESSOR_SIGNER_ADDRESS_1="0xa5eE8292dA52d8234248709F3E217ffEBA5E8312" # account[12]
15+
COPROCESSOR_SIGNER_ADDRESS_2="0xCFbF539CB91c92ace0343c5B0487149Ad0b82078" # account[13]
16+
COPROCESSOR_SIGNER_ADDRESS_3="0xA951F315d5FD35Cac111dFB5250DF231FB8eF905" # account[14]
17+
ETHERSCAN_API_KEY="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
18+
RPC_URL="http://anvil-node:8545"
19+
HARDHAT_NETWORK="staging"

.github/workflows/publish.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,10 @@ jobs:
1414
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1515
with:
1616
node-version: 20.x
17-
- run: cp .env.example .env
1817
- run: npm ci --include=optional
19-
- run: mkdir node_modules/fhevm-core-contracts/addresses
20-
- run: source .env && npx hardhat task:computeGatewayAddress --private-key "$PRIVATE_KEY_GATEWAY_DEPLOYER"
21-
- run: source .env && npx hardhat task:computeACLAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
22-
- run: source .env && npx hardhat task:computeTFHEExecutorAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
23-
- run: source .env && npx hardhat task:computeKMSVerifierAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
24-
- run: source .env && npx hardhat task:computeInputVerifierAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER" --use-address false
25-
- run: source .env && npx hardhat task:computeFHEGasLimitAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
2618
- run: npm run compile
2719
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
2820
with:
2921
token: ${{ secrets.NPM_TOKEN }}
3022
provenance: true
23+
access: public

.github/workflows/publishprerelease.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,11 @@ jobs:
1414
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
1515
with:
1616
node-version: 20.x
17-
- run: cp .env.example .env
1817
- run: npm ci --include=optional
19-
- run: mkdir node_modules/fhevm-core-contracts/addresses
20-
- run: source .env && npx hardhat task:computeGatewayAddress --private-key "$PRIVATE_KEY_GATEWAY_DEPLOYER"
21-
- run: source .env && npx hardhat task:computeACLAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
22-
- run: source .env && npx hardhat task:computeTFHEExecutorAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
23-
- run: source .env && npx hardhat task:computeKMSVerifierAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
24-
- run: source .env && npx hardhat task:computeInputVerifierAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER" --use-address false
25-
- run: source .env && npx hardhat task:computeFHEGasLimitAddress --private-key "$PRIVATE_KEY_FHEVM_DEPLOYER"
2618
- run: npm run compile
2719
- uses: JS-DevTools/npm-publish@19c28f1ef146469e409470805ea4279d47c3d35c # v3.1.1
2820
with:
2921
tag: prerelease
3022
token: ${{ secrets.NPM_TOKEN }}
3123
provenance: true
24+
access: public

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ typechain
137137
typechain-types
138138
.openzeppelin/unknown*
139139
.openzeppelin/sepolia.json
140-
fhevmTemp/
140+
httpzTemp/

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
*
22
!lib/**
3-
!decryption/**
43
!config/**
54
!package.json
65
!README.md

CustomProvider.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@ class CustomProvider extends ProviderWrapper {
2626
const blockNumberHex = await this._wrappedProvider.request({ method: 'eth_blockNumber' });
2727
this.lastBlockSnapshot = parseInt(blockNumberHex);
2828
this.lastBlockSnapshotForDecrypt = parseInt(blockNumberHex);
29-
const parsedEnvCoprocessor = dotenv.parse(
30-
fs.readFileSync('node_modules/fhevm-core-contracts/addresses/.env.exec'),
31-
);
32-
const coprocAdd = parsedEnvCoprocessor.TFHE_EXECUTOR_CONTRACT_ADDRESS;
29+
const coprocAdd = dotenv.parse(
30+
fs.readFileSync(require.resolve('./httpzTemp/addresses/.env.exec')),
31+
).TFHE_EXECUTOR_CONTRACT_ADDRESS;
3332
this.lastCounterRand = await this._wrappedProvider.request({
3433
method: 'eth_getStorageAt',
3534
params: [coprocAdd, '0xa436a06f0efce5ea38c956a21e24202a59b3b746d48a23fb52b4a5bc33fe3e00', 'latest'],

0 commit comments

Comments
 (0)