Merge branch 'master' into refactoring-static-analyser

pull/1104/head
David Zagi 4 years ago committed by GitHub
commit 304c674f96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
  2. 11
      apps/remix-ide/src/app/tabs/runTab/model/dropdownlogic.js
  3. 2
      apps/remix-ide/src/app/udapp/run-tab.js
  4. 3
      apps/remix-ide/src/app/ui/universal-dapp-ui.js

@ -9,6 +9,7 @@ const confirmDialog = require('../../ui/confirmDialog')
const modalDialog = require('../../ui/modaldialog')
const MultiParamManager = require('../../ui/multiParamManager')
const helper = require('../../../lib/helper')
const _paq = window._paq = window._paq || []
class ContractDropdownUI {
constructor (blockchain, dropdownLogic, logCallback, runView) {
@ -300,13 +301,15 @@ class ContractDropdownUI {
if (error) {
return this.logCallback(error)
}
self.event.trigger('newContractInstanceAdded', [contractObject, address, contractObject.name])
const data = self.runView.compilersArtefacts.getCompilerAbstract(contractObject.contract.file)
self.runView.compilersArtefacts.addResolvedContract(helper.addressToString(address), data)
if (self.ipfsCheckedState) {
_paq.push(['trackEvent', 'udapp', `DeployAndPublish_${this.networkName}`])
publishToStorage('ipfs', self.runView.fileProvider, self.runView.fileManager, selectedContract)
} else {
_paq.push(['trackEvent', 'udapp', `DeployOnly_${this.networkName}`])
}
}
@ -340,6 +343,7 @@ class ContractDropdownUI {
}
deployContract (selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb) {
_paq.push(['trackEvent', 'udapp', 'DeployContractTo', this.networkName])
const { statusCb } = callbacks
if (!contractMetadata || (contractMetadata && contractMetadata.autoDeployLib)) {
return this.blockchain.deployContractAndLibraries(selectedContract, args, contractMetadata, compilerContracts, callbacks, confirmationCb)

@ -1,7 +1,8 @@
var remixLib = require('@remix-project/remix-lib')
var txHelper = remixLib.execution.txHelper
var CompilerAbstract = require('../../../compiler/compiler-abstract')
var EventManager = remixLib.EventManager
const remixLib = require('@remix-project/remix-lib')
const txHelper = remixLib.execution.txHelper
const CompilerAbstract = require('../../../compiler/compiler-abstract')
const EventManager = remixLib.EventManager
const _paq = window._paq = window._paq || []
class DropdownLogic {
constructor (compilersArtefacts, config, editor, runView) {
@ -50,9 +51,11 @@ class DropdownLogic {
} catch (e) {
return cb('Failed to parse the current file as JSON ABI.')
}
_paq.push(['trackEvent', 'udapp', 'AtAddressLoadWithABI'])
cb(null, 'abi', abi)
})
} else {
_paq.push(['trackEvent', 'udapp', 'AtAddressLoadWithInstance'])
cb(null, 'instance')
}
}

@ -15,6 +15,7 @@ const RecorderUI = require('../tabs/runTab/recorder.js')
const DropdownLogic = require('../tabs/runTab/model/dropdownlogic.js')
const ContractDropdownUI = require('../tabs/runTab/contractDropdown.js')
const toaster = require('../ui/tooltip')
const _paq = window._paq = window._paq || []
const UniversalDAppUI = require('../ui/universal-dapp-ui')
@ -91,6 +92,7 @@ export class RunTab extends ViewPlugin {
}
sendTransaction (tx) {
_paq.push(['trackEvent', 'udapp', 'sendTx'])
return this.blockchain.sendTransaction(tx)
}

@ -14,6 +14,7 @@ var txFormat = remixLib.execution.txFormat
const txHelper = remixLib.execution.txHelper
var TreeView = require('./TreeView')
var txCallBacks = require('./sendTxCallbacks')
const _paq = window._paq = window._paq || []
function UniversalDAppUI (blockchain, logCallback) {
this.blockchain = blockchain
@ -243,6 +244,8 @@ UniversalDAppUI.prototype.runTransaction = function (lookupOnly, args, valArr, i
outputOverride.appendChild(decoded)
}
}
const info = `${lookupOnly ? 'call' : args.funABI.type !== 'fallback' ? 'lowLevelInteracions' : 'transact'}_${this.blockchain.executionContext.executionContext}`
_paq.push(['trackEvent', 'udapp', info])
const params = args.funABI.type !== 'fallback' ? inputsValues : ''
this.blockchain.runOrCallContractMethod(
args.contractName,

Loading…
Cancel
Save