@@ -104,17 +104,17 @@ task('task:deployTFHEExecutor')
104
104
105
105
task ( 'task:deployKMSVerifier' )
106
106
. addParam ( 'privateKey' , 'The deployer private key' )
107
+ . addParam ( 'decryptionManagerAddress' , 'The decryption manager contract address from the Gateway chain' )
107
108
. setAction ( async function ( taskArguments : TaskArguments , { ethers, upgrades } ) {
108
109
const deployer = new ethers . Wallet ( taskArguments . privateKey ) . connect ( ethers . provider ) ;
109
110
const currentImplementation = await ethers . getContractFactory ( 'EmptyUUPSProxy' , deployer ) ;
110
111
const newImplem = await ethers . getContractFactory ( 'KMSVerifier' , deployer ) ;
111
112
const parsedEnv = dotenv . parse ( fs . readFileSync ( 'addresses/.env.kmsverifier' ) ) ;
112
113
const proxyAddress = parsedEnv . KMS_VERIFIER_CONTRACT_ADDRESS ;
113
114
const proxy = await upgrades . forceImport ( proxyAddress , currentImplementation ) ;
114
- const parsedEnv2 = dotenv . parse ( fs . readFileSync ( 'addressesL2/.env.decryptionmanager' ) ) ;
115
- const verifyingContractSource = parsedEnv2 . DECRYPTION_MANAGER_ADDRESS ;
116
- const parsedEnv3 = dotenv . parse ( fs . readFileSync ( '.env' ) ) ;
117
- const chainIDSource = + parsedEnv3 . CHAIN_ID_GATEWAY ;
115
+ const verifyingContractSource = taskArguments . decryptionManagerAddress ;
116
+ const parsedEnv2 = dotenv . parse ( fs . readFileSync ( '.env' ) ) ;
117
+ const chainIDSource = + parsedEnv2 . CHAIN_ID_GATEWAY ;
118
118
await upgrades . upgradeProxy ( proxy , newImplem , {
119
119
call : { fn : 'reinitialize' , args : [ verifyingContractSource , chainIDSource ] } ,
120
120
} ) ;
@@ -123,17 +123,17 @@ task('task:deployKMSVerifier')
123
123
124
124
task ( 'task:deployInputVerifier' )
125
125
. addParam ( 'privateKey' , 'The deployer private key' )
126
+ . addParam ( 'zkpokManagerAddress' , 'The ZKPOK manager contract address from the Gateway chain' )
126
127
. setAction ( async function ( taskArguments : TaskArguments , { ethers, upgrades } ) {
127
128
const deployer = new ethers . Wallet ( taskArguments . privateKey ) . connect ( ethers . provider ) ;
128
129
const currentImplementation = await ethers . getContractFactory ( 'EmptyUUPSProxy' , deployer ) ;
129
130
const newImplem = await ethers . getContractFactory ( './contracts/InputVerifier.sol:InputVerifier' , deployer ) ;
130
131
const parsedEnv = dotenv . parse ( fs . readFileSync ( 'addresses/.env.inputverifier' ) ) ;
131
132
const proxyAddress = parsedEnv . INPUT_VERIFIER_CONTRACT_ADDRESS ;
132
133
const proxy = await upgrades . forceImport ( proxyAddress , currentImplementation ) ;
133
- const parsedEnv2 = dotenv . parse ( fs . readFileSync ( 'addressesL2/.env.zkpokmanager' ) ) ;
134
- const verifyingContractSource = parsedEnv2 . ZKPOK_MANAGER_ADDRESS ;
135
- const parsedEnv3 = dotenv . parse ( fs . readFileSync ( '.env' ) ) ;
136
- const chainIDSource = + parsedEnv3 . CHAIN_ID_GATEWAY ;
134
+ const verifyingContractSource = taskArguments . zkpokManagerAddress ;
135
+ const parsedEnv2 = dotenv . parse ( fs . readFileSync ( '.env' ) ) ;
136
+ const chainIDSource = + parsedEnv2 . CHAIN_ID_GATEWAY ;
137
137
await upgrades . upgradeProxy ( proxy , newImplem , {
138
138
call : { fn : 'reinitialize' , args : [ verifyingContractSource , chainIDSource ] } ,
139
139
} ) ;
0 commit comments