added comment

pull/3744/head
Aniket-Engg 2 years ago committed by Aniket
parent 1d53eb8887
commit 27985ebba1
  1. 13
      apps/etherscan/src/app/utils/scripts.ts

@ -1,23 +1,24 @@
export const verifyScript = `
/**
* @param {string} apikey - etherscan api key.
* @param {string} contractAddress - Address of the contract to verify.
* @param {string} contractArguments - Parameters used in the contract constructor during the initial deployment. It should be the hex encoded value.
* @param {string} apikey - etherscan api key
* @param {string} contractAddress - Address of the contract to verify
* @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} chainRef - Network chain id or API URL
* @param {number | string} chainRef - Network chain id or API URL
* @returns {{ guid, status, message, succeed }} verification result
*/
export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string, chainRef: number | string) => {
const compilationResultParam = await remix.call('compilerArtefacts' as any, 'getCompilerAbstract', contractFile)
console.log('verifying.. ' + contractName)
// update apiKey and chainRef to verify contract on multiple networks
return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam, chainRef)
}`
export const receiptGuidScript = `
/**
* @param {string} apikey - etherscan api key.
* @param {string} guid - receipt id.
* @param {string} apikey - etherscan api key
* @param {string} guid - receipt id
* @returns {{ status, message, succeed }} receiptStatus
*/
export const receiptStatus = async (apikey: string, guid: string) => {

Loading…
Cancel
Save