-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add deploy and verify contract #6394
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for reliable-cocada-166884 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
contractName: contractName, | ||
abiEncodedConstructorArgs: constructorArgs, | ||
date: new Date().toISOString(), | ||
receipts: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have receipts for submittedContract and store it in local storage, such that it also shows up in the plugin's UI. See the VerifyView
for reference.
I also thought of refactoring the VerifyView
once, since a lot of the logic from there could actually be reused for this feature.
Anyway, very nice that you tackled this feature!
_paq.push(['trackEvent', 'udapp', 'DeployAndVerify', plugin.REACT_API.networkName]) | ||
|
||
try { | ||
await publishToStorage('ipfs', selectedContract) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we keeping this in order to make sure sourcify verifies it? If we can use the sourcify api to verify it that would be better, we won't have to rely on a IPFS endpoint.
_paq.push(['trackEvent', 'udapp', 'DeployAndPublish', plugin.REACT_API.networkName]) | ||
publishToStorage('ipfs', selectedContract) | ||
|
||
if (isVerifyChecked) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the UI, that should be checked by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But probably the setting should be remenbered when the page is loaded.
If the network isn't supported we shouldn't log anything and best to disable the checkbox or maybe that's best to just display the checkbox only if the network is actually supported. |
Changes
https://chainid.network/chains.json
.localStorage
. This allows the feature to share state with the Contract Verification plugin and display the results in its Receipts tab.How to Test
Settings
tab and add an Etherscan API key.Deploy & Run Transactions
tab.Contract Verification
plugin and click on the Receipts tab. Confirm that the new auto-verification record appears at the top of the list.Related Issues