|
|
@ -5,13 +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} 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} contractName - Name of the contract |
|
|
|
* @param {string} contractFile - File where the contract is located |
|
|
|
* @param {string} contractFile - File where the contract is located |
|
|
|
* @param {number | string} chainId - Network chain id |
|
|
|
* @param {number | string} chainRef - Network chain id or API URL |
|
|
|
* @returns {{ guid, status, message, succeed }} verification result |
|
|
|
* @returns {{ guid, status, message, succeed }} verification result |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string, chainId: number | string) => { |
|
|
|
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) |
|
|
|
const compilationResultParam = await remix.call('compilerArtefacts' as any, 'getCompilerAbstract', contractFile) |
|
|
|
console.log('verifying.. ' + contractName) |
|
|
|
console.log('verifying.. ' + contractName) |
|
|
|
return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam, chainId) |
|
|
|
return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam, chainRef) |
|
|
|
}` |
|
|
|
}` |
|
|
|
|
|
|
|
|
|
|
|
export const receiptGuidScript = ` |
|
|
|
export const receiptGuidScript = ` |
|
|
|