feat: updates gateway contracts names (#753)

This commit is contained in:
jat
2025-04-22 18:05:10 +02:00
committed by GitHub
parent 05d3defdd4
commit d986744a22
7 changed files with 25 additions and 26 deletions

View File

@@ -1,8 +1,8 @@
MNEMONIC="adapt mosquito move limb mobile illegal tree voyage juice mosquito burger raise father hope layer"
CHAIN_ID_GATEWAY="654321"
DEPLOYER_PRIVATE_KEY="7697c90f7863e6057fbe25674464e14b57f2c670b1a8ee0f60fb87eb9b615c4d" # account[5]
DECRYPTION_MANAGER_ADDRESS="0x5ffdaAB0373E62E2ea2944776209aEf29E631A64"
ZKPOK_MANAGER_ADDRESS="0x812b06e1CDCE800494b79fFE4f925A504a9A9810"
DECRYPTION_ADDRESS="0x5ffdaAB0373E62E2ea2944776209aEf29E631A64"
INPUT_VERIFICATION_ADDRESS="0x812b06e1CDCE800494b79fFE4f925A504a9A9810"
NUM_KMS_NODES="1"
KMS_THRESHOLD="1"
KMS_SIGNER_ADDRESS_0="0x9FE8958A2920985AC7ab8d320fDFaB310135a05B" # account[7] (account[6] is the relayer)

21
package-lock.json generated
View File

@@ -12,8 +12,8 @@
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@commitlint/types": "^19.5.0",
"@fhevm/core-contracts": "^0.7.0-7",
"@fhevm/sdk": "^0.7.0-20",
"@fhevm/core-contracts": "^0.7.0-8",
"@fhevm/sdk": "^0.7.0-21",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-network-helpers": "^1.0.6",
@@ -1641,9 +1641,9 @@
}
},
"node_modules/@fhevm/core-contracts": {
"version": "0.7.0-7",
"resolved": "https://registry.npmjs.org/@fhevm/core-contracts/-/core-contracts-0.7.0-7.tgz",
"integrity": "sha512-OPTMpwqoYWmha7yh0przOnuJUHVAklFr9s6Ln2vOzo+6QKhkGX2YWHEMi0zyXfyy6CPTUlHAjTwtMIH0FPAmkQ==",
"version": "0.7.0-8",
"resolved": "https://registry.npmjs.org/@fhevm/core-contracts/-/core-contracts-0.7.0-8.tgz",
"integrity": "sha512-LOg3HoupOGob1RXDbw9V9R6Dph9NQNYSH3PU/5L8necDDii+9PjMgvrp8CxcvcaX9+TXWJJMXfJ4/oCe9+A71g==",
"dev": true,
"optionalDependencies": {
"solidity-comments-darwin-arm64": "0.1.1",
@@ -1651,19 +1651,18 @@
}
},
"node_modules/@fhevm/sdk": {
"version": "0.7.0-20",
"resolved": "https://registry.npmjs.org/@fhevm/sdk/-/sdk-0.7.0-20.tgz",
"integrity": "sha512-8SEjAIKiVKTBOrO2X65jv5Rf3MqfeMmHijE2D1xwxAufTasoEBwi/3YR+OX9muRADvfnPGu55rAYB0sCKov0jg==",
"version": "0.7.0-21",
"resolved": "https://registry.npmjs.org/@fhevm/sdk/-/sdk-0.7.0-21.tgz",
"integrity": "sha512-KHRAg0LuHcXzMXuS0obHIHWn9Ka3ZLjDziZWhut8UbV4LUOf7b8iwIujEt3hU1hecKBlJ/0qLwl+nh+wvnA93w==",
"dev": true,
"dependencies": {
"bigint-buffer": "^1.1.5",
"commander": "^11.0.0",
"ethers": "^6.13.4",
"fetch-retry": "^6.0.0",
"keccak": "^3.0.4",
"node-tfhe": "^1.0.0",
"node-tfhe": "^1.1.2",
"node-tkms": "0.11.0-rc6",
"tfhe": "^1.0.0",
"tfhe": "^1.1.2",
"tkms": "0.11.0-rc6",
"wasm-feature-detect": "^1.8.0"
},

View File

@@ -41,7 +41,7 @@
"@commitlint/cli": "^19.5.0",
"@commitlint/config-conventional": "^19.5.0",
"@commitlint/types": "^19.5.0",
"@fhevm/core-contracts": "^0.7.0-7",
"@fhevm/core-contracts": "^0.7.0-8",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.0",
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-network-helpers": "^1.0.6",
@@ -67,7 +67,7 @@
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"ethers": "^6.13.4",
"@fhevm/sdk": "^0.7.0-20",
"@fhevm/sdk": "^0.7.0-21",
"hardhat": "^2.22.10",
"hardhat-deploy": "^0.11.29",
"hardhat-gas-reporter": "^1.0.2",

View File

@@ -134,7 +134,7 @@ task('task:deployKMSVerifier').setAction(async function (taskArguments: TaskArgu
const proxyAddress = parsedEnv.KMS_VERIFIER_CONTRACT_ADDRESS;
const proxy = await upgrades.forceImport(proxyAddress, currentImplementation);
const verifyingContractSource = process.env.DECRYPTION_MANAGER_ADDRESS!;
const verifyingContractSource = process.env.DECRYPTION_ADDRESS!;
const chainIDSource = +process.env.CHAIN_ID_GATEWAY!;
const initialThreshold = +process.env.KMS_THRESHOLD!;
let initialSigners: string[] = [];
@@ -170,7 +170,7 @@ task('task:deployInputVerifier')
const proxyAddress = parsedEnv.INPUT_VERIFIER_CONTRACT_ADDRESS;
const proxy = await upgrades.forceImport(proxyAddress, currentImplementation);
const verifyingContractSource = process.env.ZKPOK_MANAGER_ADDRESS!;
const verifyingContractSource = process.env.INPUT_VERIFICATION_ADDRESS!;
const chainIDSource = +process.env.CHAIN_ID_GATEWAY!;
let initialSigners: string[] = [];

View File

@@ -210,14 +210,14 @@ async function computeDecryptSignatures(handlesList: string[], decryptedResult:
}
async function kmsSign(handlesList: string[], decryptedResult: string, kmsSigner: Wallet) {
const decManAdd = process.env.DECRYPTION_MANAGER_ADDRESS;
const decAdd = process.env.DECRYPTION_ADDRESS;
const chainId = process.env.CHAIN_ID_GATEWAY;
const domain = {
name: 'DecryptionManager',
name: 'Decryption',
version: '1',
chainId: chainId,
verifyingContract: decManAdd,
verifyingContract: decAdd,
};
const types = {

View File

@@ -164,10 +164,10 @@ export const userDecryptRequestMocked =
// Signature checking:
const domain = {
name: 'DecryptionManager',
name: 'Decryption',
version: '1',
chainId: process.env.CHAIN_ID_GATEWAY,
verifyingContract: process.env.DECRYPTION_MANAGER_ADDRESS,
verifyingContract: process.env.DECRYPTION_ADDRESS,
};
const types = {
UserDecryptRequestVerification: [
@@ -462,15 +462,15 @@ async function coprocSign(
contractAddress: string,
signer: Wallet,
): Promise<string> {
const zkpokManAdd = process.env.ZKPOK_MANAGER_ADDRESS;
const inputVerificationAdd = process.env.INPUT_VERIFICATION_ADDRESS;
const chainId = process.env.CHAIN_ID_GATEWAY;
const hostChainId = process.env.SOLIDITY_COVERAGE === 'true' ? 31337 : hre.network.config.chainId;
const domain = {
name: 'ZKPoKManager',
name: 'InputVerification',
version: '1',
chainId: chainId,
verifyingContract: zkpokManAdd,
verifyingContract: inputVerificationAdd,
};
const types = {

View File

@@ -27,7 +27,7 @@ const kmsAdd = dotenv.parse(fs.readFileSync('./fhevmTemp/addresses/.env.kmsverif
const aclAdd = dotenv.parse(fs.readFileSync('./fhevmTemp/addresses/.env.acl')).ACL_CONTRACT_ADDRESS;
const gatewayChainID = +process.env.CHAIN_ID_GATEWAY!;
const hostChainId = Number(network.config.chainId);
const verifyingContract = process.env.DECRYPTION_MANAGER_ADDRESS!;
const verifyingContract = process.env.DECRYPTION_ADDRESS!;
const getKMSSigners = async (): Promise<string[]> => {
const kmsContract = new ethers.Contract(kmsAdd, abiKmsVerifier, ethers.provider);