Merge pull request #2968 from ethereum/matomo_listen_framework

matomo: listen on framework
pull/2990/head
bunsenstraat 2 years ago committed by GitHub
commit 4b7ac36287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      libs/remix-ui/run-tab/src/lib/actions/events.ts
  2. 6
      libs/remix-ui/run-tab/src/lib/components/contractDropdownUI.tsx

@ -6,6 +6,7 @@ import { addDeployOption, clearAllInstances, clearRecorderCount, fetchContractLi
import { CompilerAbstract } from '@remix-project/remix-solidity'
import * as ethJSUtil from 'ethereumjs-util'
import Web3 from 'web3'
const _paq = window._paq = window._paq || []
export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
plugin.blockchain.events.on('newTransaction', (tx, receipt) => {
@ -99,6 +100,7 @@ export const setupEvents = (plugin: RunTab, dispatch: React.Dispatch<any>) => {
}
const broadcastCompilationResult = async (compilerName: string, plugin: RunTab, dispatch: React.Dispatch<any>, file, source, languageVersion, data, input?) => {
_paq.push(['trackEvent', 'udapp', 'broadcastCompilationResult', compilerName])
// TODO check whether the tab is configured
const compiler = new CompilerAbstract(languageVersion, data, source, input)
plugin.compilersArtefacts[languageVersion] = compiler

@ -6,6 +6,7 @@ import * as ethJSUtil from 'ethereumjs-util'
import { ContractGUI } from './contractGUI'
import { deployWithProxyMsg, upgradeWithProxyMsg } from '@remix-ui/helper'
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
const _paq = window._paq = window._paq || []
export function ContractDropdownUI (props: ContractDropdownProps) {
const [abiLabel, setAbiLabel] = useState<{
@ -248,7 +249,10 @@ export function ContractDropdownUI (props: ContractDropdownProps) {
<div>This action is enabled when Remix is connected to an external framework (hardhat, truffle, foundry) through remixd.</div>
</Tooltip>
}>
<button className="btn d-flex py-0" onClick={_ => props.syncContracts()}>
<button className="btn d-flex py-0" onClick={_ => {
props.syncContracts()
_paq.push(['trackEvent', 'udapp', 'syncContracts', compilationSource])
}}>
<i style={{ cursor: 'pointer' }} className="fa fa-refresh mr-2 mt-2" aria-hidden="true"></i>
</button>
</OverlayTrigger>

Loading…
Cancel
Save