diff --git a/apps/contract-verification/src/app/components/ContractDropdown.tsx b/apps/contract-verification/src/app/components/ContractDropdown.tsx index 99a1363cf1..b307aad1e4 100644 --- a/apps/contract-verification/src/app/components/ContractDropdown.tsx +++ b/apps/contract-verification/src/app/components/ContractDropdown.tsx @@ -43,7 +43,12 @@ export const ContractDropdown: React.FC = ({ label, id, s return (
- {hasContracts ? ( Object.keys(compilationOutput).map((compilationTriggerFileName) => ( diff --git a/apps/contract-verification/src/app/components/NavMenu.tsx b/apps/contract-verification/src/app/components/NavMenu.tsx index 73e40d4bff..8cc9099ca9 100644 --- a/apps/contract-verification/src/app/components/NavMenu.tsx +++ b/apps/contract-verification/src/app/components/NavMenu.tsx @@ -23,12 +23,11 @@ const NavItem: React.FC = ({ to, icon, title }) => { export const NavMenu = () => { return ( -
) diff --git a/apps/contract-verification/src/app/views/VerifyView.tsx b/apps/contract-verification/src/app/views/VerifyView.tsx index ff76b31a5b..20a0022d47 100644 --- a/apps/contract-verification/src/app/views/VerifyView.tsx +++ b/apps/contract-verification/src/app/views/VerifyView.tsx @@ -13,7 +13,7 @@ import { VerifyFormContext } from '../VerifyFormContext' import { useSourcifySupported } from '../hooks/useSourcifySupported' export const VerifyView = () => { - const { compilationOutput, setSubmittedContracts, settings } = useContext(AppContext) + const { compilationOutput, setSubmittedContracts, settings, clientInstance } = useContext(AppContext) const { selectedChain, setSelectedChain, contractAddress, setContractAddress, contractAddressError, setContractAddressError, selectedContract, setSelectedContract, proxyAddress, setProxyAddress, proxyAddressError, setProxyAddressError, abiEncodedConstructorArgs, setAbiEncodedConstructorArgs, abiEncodingError, setAbiEncodingError } = useContext(VerifyFormContext) const [enabledVerifiers, setEnabledVerifiers] = useState>>({}) const [hasProxy, setHasProxy] = useState(!!proxyAddress) @@ -41,9 +41,14 @@ export const VerifyView = () => { setEnabledVerifiers({ ...enabledVerifiers, [verifierId]: checked }) } + + const sendToMatomo = async (eventAction: string, eventName: string) => { + await clientInstance.call("matomo" as any, 'track', ['trackEvent', 'ContractVerification', eventAction, eventName]); + } + const handleVerify = async (e) => { e.preventDefault() - + const { triggerFilePath, filePath, contractName } = selectedContract const compilerAbstract = compilationOutput[triggerFilePath] if (!compilerAbstract) { @@ -63,6 +68,9 @@ export const VerifyView = () => { name: verifierId as VerifierIdentifier, } receipts.push({ verifierInfo, status: 'pending', contractId, isProxyReceipt: false, failedChecks: 0 }) + if (enabledVerifiers.Blockscout) await sendToMatomo('verify', "verifyWith: Blockscout On: " + selectedChain + " IsProxy: " + (hasProxy && !proxyAddress)) + if (enabledVerifiers.Etherscan) await sendToMatomo('verify', "verifyWithEtherscan On: " + selectedChain + " IsProxy: " + (hasProxy && !proxyAddress)) + if (enabledVerifiers.Sourcify) await sendToMatomo('verify', "verifyWithSourcify On: " + selectedChain + " IsProxy: " + (hasProxy && !proxyAddress)) } const newSubmittedContract: SubmittedContract = { @@ -173,13 +181,24 @@ export const VerifyView = () => { return (
- - - - - - {selectedContract && } - + + + + + {selectedContract && }
setHasProxy(e.target.checked)} /> @@ -187,7 +206,14 @@ export const VerifyView = () => { The deployed contract is behind a proxy
- {hasProxy && } + {hasProxy && }
@@ -198,9 +224,19 @@ export const VerifyView = () => { return (
- handleVerifierCheckboxClick(verifierId, e.target.checked)} disabled={disabledVerifier} /> - -
@@ -227,10 +263,17 @@ export const VerifyView = () => { ) })}
- - + + + ) } diff --git a/apps/contract-verification/src/profile.json b/apps/contract-verification/src/profile.json index 6ac25db04a..f56f684c71 100644 --- a/apps/contract-verification/src/profile.json +++ b/apps/contract-verification/src/profile.json @@ -13,4 +13,4 @@ "documentation": "https://remix-ide.readthedocs.io/en/latest/contract_verification.html", "maintainedBy": "Remix", "authorContact": "remix@ethereum.org" -} \ No newline at end of file +} diff --git a/apps/remix-ide/src/app/plugins/matomo.ts b/apps/remix-ide/src/app/plugins/matomo.ts index 8aa8f61f70..e6af25655c 100644 --- a/apps/remix-ide/src/app/plugins/matomo.ts +++ b/apps/remix-ide/src/app/plugins/matomo.ts @@ -11,7 +11,7 @@ const profile = { version: '1.0.0' } -const allowedPlugins = ['LearnEth', 'etherscan', 'vyper', 'circuit-compiler', 'doc-gen', 'doc-viewer', 'solhint', 'walletconnect', 'scriptRunner', 'dgit'] +const allowedPlugins = ['LearnEth', 'etherscan', 'vyper', 'circuit-compiler', 'doc-gen', 'doc-viewer', 'solhint', 'walletconnect', 'scriptRunner', 'dgit', 'contract-verification'] export class Matomo extends Plugin {