From 83681b4fdc10cdfcca91a4f4bfc65fa22e48c753 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Thu, 18 May 2023 13:04:16 +0530 Subject: [PATCH] update script --- apps/etherscan/src/app/utils/scripts.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/etherscan/src/app/utils/scripts.ts b/apps/etherscan/src/app/utils/scripts.ts index 1e7765c272..11998291d6 100644 --- a/apps/etherscan/src/app/utils/scripts.ts +++ b/apps/etherscan/src/app/utils/scripts.ts @@ -5,12 +5,13 @@ export const verifyScript = ` * @param {string} contractArguments - Parameters used in the contract constructor during the initial deployment. It should be the hex encoded value. * @param {string} contractName - Name of the contract * @param {string} contractFile - File where the contract is located +* @param {number | string} chainId - Network chain id * @returns {{ guid, status, message, succeed }} verification result */ -export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string) => { +export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string, chainId: number | string) => { const compilationResultParam = await remix.call('compilerArtefacts' as any, 'getCompilerAbstract', contractFile) console.log('verifying.. ' + contractName) - return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam) + return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam, chainId) }` export const receiptGuidScript = `