Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update verify script to support proxy contract verification #3771

Merged
merged 7 commits into from
Jun 12, 2023

Conversation

Aniket-Engg
Copy link
Collaborator

@Aniket-Engg Aniket-Engg commented Jun 8, 2023

Related to #3750 (comment)

closes #3597

@netlify
Copy link

netlify bot commented Jun 8, 2023

Deploy Preview for remixproject ready!

Name Link
🔨 Latest commit 5b605a8
🔍 Latest deploy log https://app.netlify.com/sites/remixproject/deploys/6486d02e7bb8970008c97ceb
😎 Deploy Preview https://deploy-preview-3771--remixproject.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

* @returns {{ guid, status, message, succeed }} verification result
*/
export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string, chainRef: number | string) => {
export const verify = async (apikey: string, contractAddress: string, contractArguments: string, contractName: string, contractFile: string, chainRef: number | string, isProxyContract: boolean, expectedImplAddress: string) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these should be merked as optional parameters.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it is mentioned in comment that arguments are required in case of proxy contract

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)
return await remix.call('etherscan' as any, 'verify', apikey, contractAddress, contractArguments, contractName, compilationResultParam, chainRef, isProxyContract, expectedImplAddress)
Copy link
Contributor

@yann300 yann300 Jun 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does etherscan' as any, 'verify' as isProxyContract, expectedImplAddress? it doesn't look like

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for chainRef actually.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the receiptStatus call too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated in latest commits

@Aniket-Engg Aniket-Engg force-pushed the scriptUpdate2 branch 2 times, most recently from d53a140 to ff8033c Compare June 8, 2023 07:46
@Aniket-Engg Aniket-Engg added the ready-to-review PR ready to review label Jun 8, 2023
@yann300 yann300 merged commit c9356c3 into master Jun 12, 2023
@yann300 yann300 deleted the scriptUpdate2 branch June 12, 2023 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Etherscan Plugin Improvement and fixes
2 participants