|
|
|
@ -119,7 +119,7 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
errors.contractAddress = "Required" |
|
|
|
|
} |
|
|
|
|
if (values.contractAddress.trim() === "" || !values.contractAddress.startsWith('0x')
|
|
|
|
|
|| values.contractAddress.length !== 42) { |
|
|
|
|
|| values.contractAddress.length !== 42) { |
|
|
|
|
errors.contractAddress = "Please enter a valid contract address" |
|
|
|
|
} |
|
|
|
|
return errors |
|
|
|
@ -144,7 +144,6 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
/> |
|
|
|
|
</CustomTooltip>
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className="form-group"> |
|
|
|
|
<label htmlFor="contractName">Contract Name</label>
|
|
|
|
|
<Field |
|
|
|
@ -176,7 +175,6 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
component="div" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className={ showConstructorArgs ? 'form-group d-block': 'form-group d-none' } > |
|
|
|
|
<label>Constructor Arguments</label> |
|
|
|
|
{constructorInputs.map((item, index) => { |
|
|
|
@ -208,7 +206,6 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
)} |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className="form-group"> |
|
|
|
|
<label htmlFor="contractAddress">Contract Address</label> |
|
|
|
|
<Field |
|
|
|
@ -236,12 +233,11 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
handleChange(e) |
|
|
|
|
if (e.target.checked) setIsProxyContract(true) |
|
|
|
|
else setIsProxyContract(false) |
|
|
|
|
}} |
|
|
|
|
}} |
|
|
|
|
/> |
|
|
|
|
<label className="form-check-label custom-control-label" htmlFor="isProxy">It's a proxy contract address</label> |
|
|
|
|
</div> |
|
|
|
|
<label className="form-check-label custom-control-label" htmlFor="isProxy">It's a proxy contract address</label> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div className={ isProxyContract ? 'form-group d-block': 'form-group d-none' }> |
|
|
|
|
<label htmlFor="expectedImplAddress">Expected Implementation Address</label> |
|
|
|
|
<CustomTooltip |
|
|
|
@ -259,7 +255,6 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
<i style={{ fontSize: 'x-small' }} className={'ml-1 fal fa-info-circle align-self-center'} aria-hidden="true"></i> |
|
|
|
|
<label> Make sure contract is already verified on Etherscan</label> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<SubmitButton dataId="verify-contract" text="Verify"
|
|
|
|
|
isSubmitting={isSubmitting}
|
|
|
|
|
disable={ !contracts.length ||
|
|
|
|
@ -287,19 +282,15 @@ export const VerifyView: React.FC<Props> = ({ |
|
|
|
|
Generate Verification Scripts |
|
|
|
|
</button> |
|
|
|
|
</CustomTooltip> |
|
|
|
|
</form> |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</form>) |
|
|
|
|
}} |
|
|
|
|
</Formik> |
|
|
|
|
|
|
|
|
|
<div |
|
|
|
|
data-id="verify-result" |
|
|
|
|
className={verificationResult.current['succeed'] ? "text-success mt-4 text-center" : "text-danger mt-4 text-center"} |
|
|
|
|
style={{fontSize: "0.8em"}} |
|
|
|
|
dangerouslySetInnerHTML={{ __html: results }} |
|
|
|
|
/> |
|
|
|
|
|
|
|
|
|
{/* <div style={{ display: "block", textAlign: "center", marginTop: "1em" }}> |
|
|
|
|
<Link to="/receipts">View Receipts</Link> |
|
|
|
|
</div> */} |
|
|
|
|