@@ -63,25 +63,26 @@ task('task:verifyAllProtocolStakingContracts').setAction(async function (_, hre)
6363// Example usage:
6464// npx hardhat task:verifyOperatorStaking --network testnet
6565task ( 'task:verifyOperatorStaking' ) . setAction ( async function ( _ , hre ) {
66- const { run } = hre ;
66+ const { run, upgrades } = hre ;
6767
68- // Get the first operator staking address
68+ // Get the first operator staking proxy address
6969 // Since all operator staking contracts share the same implementation, we only have to
7070 // verify one of them
71- const operatorStakingAddress = ( await getAllOperatorStakingAddresses ( hre ) ) [ 0 ] ;
71+ const operatorStakingProxyAddress = ( await getAllOperatorStakingAddresses ( hre ) ) [ 0 ] ;
7272
73- // Get the constructor arguments for the first KMS operator staking contract
74- const kmsTokenName = getRequiredEnvVar ( `OPERATOR_STAKING_KMS_TOKEN_NAME_0` ) ;
75- const kmsTokenSymbol = getRequiredEnvVar ( `OPERATOR_STAKING_KMS_TOKEN_SYMBOL_0` ) ;
76- const kmsOwnerAddress = getRequiredEnvVar ( `OPERATOR_STAKING_KMS_OWNER_ADDRESS_0` ) ;
73+ // Get the implementation address
74+ const implementationAddress = await upgrades . erc1967 . getImplementationAddress ( operatorStakingProxyAddress ) ;
7775
78- // Get the protocol staking KMS proxy address
79- const protocolStakingKMSProxyAddress = await getProtocolStakingKMSProxyAddress ( hre ) ;
76+ console . log ( `Verifying operator staking proxy contract at ${ operatorStakingProxyAddress } ...\n` ) ;
77+ await run ( 'verify:verify' , {
78+ address : operatorStakingProxyAddress ,
79+ constructorArguments : [ ] ,
80+ } ) ;
8081
81- console . log ( `Verifying operator staking contract at ${ operatorStakingAddress } ...\n` ) ;
82+ console . log ( `Verifying operator staking implementation contract at ${ implementationAddress } ...\n` ) ;
8283 await run ( 'verify:verify' , {
83- address : operatorStakingAddress ,
84- constructorArguments : [ kmsTokenName , kmsTokenSymbol , protocolStakingKMSProxyAddress , kmsOwnerAddress ] ,
84+ address : implementationAddress ,
85+ constructorArguments : [ ] ,
8586 } ) ;
8687} ) ;
8788
0 commit comments