|
|
@ -23,7 +23,7 @@ export const verify = async ( |
|
|
|
compilationResultParam: CompilerAbstract, |
|
|
|
compilationResultParam: CompilerAbstract, |
|
|
|
chainRef: number | string, |
|
|
|
chainRef: number | string, |
|
|
|
isProxyContract: boolean, |
|
|
|
isProxyContract: boolean, |
|
|
|
expectedImplAddress: string,
|
|
|
|
expectedImplAddress: string, |
|
|
|
client: PluginClient, |
|
|
|
client: PluginClient, |
|
|
|
onVerifiedContract: (value: EtherScanReturn) => void, |
|
|
|
onVerifiedContract: (value: EtherScanReturn) => void, |
|
|
|
setResults: (value: string) => void |
|
|
|
setResults: (value: string) => void |
|
|
@ -47,7 +47,7 @@ export const verify = async ( |
|
|
|
etherscanApi = getEtherScanApi(networkChainId) |
|
|
|
etherscanApi = getEtherScanApi(networkChainId) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
const contractMetadata = getContractMetadata( |
|
|
|
const contractMetadata = getContractMetadata( |
|
|
|
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
|
|
|
|
// cast from the remix-plugin interface to the solidity one. Should be fixed when remix-plugin move to the remix-project repository
|
|
|
@ -61,7 +61,7 @@ export const verify = async ( |
|
|
|
message: "Please recompile contract" |
|
|
|
message: "Please recompile contract" |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const contractMetadataParsed = JSON.parse(contractMetadata) |
|
|
|
const contractMetadataParsed = JSON.parse(contractMetadata) |
|
|
|
|
|
|
|
|
|
|
|
const fileName = getContractFileName( |
|
|
|
const fileName = getContractFileName( |
|
|
@ -146,9 +146,9 @@ export const verify = async ( |
|
|
|
title: result, |
|
|
|
title: result, |
|
|
|
}) |
|
|
|
}) |
|
|
|
const returnValue = { |
|
|
|
const returnValue = { |
|
|
|
message: result, |
|
|
|
message: result, |
|
|
|
succeed: false, |
|
|
|
succeed: false, |
|
|
|
isProxyContract |
|
|
|
isProxyContract |
|
|
|
} |
|
|
|
} |
|
|
|
resetAfter10Seconds(client, setResults) |
|
|
|
resetAfter10Seconds(client, setResults) |
|
|
|
return returnValue |
|
|
|
return returnValue |
|
|
@ -184,7 +184,7 @@ export const getContractFileName = ( |
|
|
|
} |
|
|
|
} |
|
|
|
return fileName |
|
|
|
return fileName |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export const getContractMetadata = ( |
|
|
|
export const getContractMetadata = ( |
|
|
|
compilationResult: CompilationResult, |
|
|
|
compilationResult: CompilationResult, |
|
|
|
contractName: string |
|
|
|
contractName: string |
|
|
|