save compilation data

pull/698/head
LianaHus 4 years ago committed by yann300
parent 733a1eed34
commit 911946b39d
  1. 1
      apps/remix-ide/src/app/compiler/compiler-artefacts.js
  2. 2
      apps/remix-ide/src/app/panels/terminal.js
  3. 8
      apps/remix-ide/src/app/tabs/runTab/contractDropdown.js
  4. 9
      apps/remix-ide/src/app/ui/txLogger.js

@ -15,6 +15,7 @@ module.exports = class CompilerArtefacts extends Plugin {
super(profile) super(profile)
this.compilersArtefacts = {} this.compilersArtefacts = {}
this.compilersArtefactsPerFile = {} this.compilersArtefactsPerFile = {}
this.addressToCompilationResults = {}
} }
clear () { clear () {

@ -478,8 +478,8 @@ class Terminal extends Plugin {
self._components.txLogger.event.register('debuggingRequested', async (hash) => { self._components.txLogger.event.register('debuggingRequested', async (hash) => {
// TODO should probably be in the run module // TODO should probably be in the run module
if (!await self._opts.appManager.isActive('debugger')) await self._opts.appManager.activatePlugin('debugger') if (!await self._opts.appManager.isActive('debugger')) await self._opts.appManager.activatePlugin('debugger')
this.call('debugger', 'debug', hash)
this.call('menuicons', 'select', 'debugger') this.call('menuicons', 'select', 'debugger')
this.call('debugger', 'debug', hash)
}) })
return self._view.el return self._view.el

@ -26,11 +26,16 @@ class ContractDropdownUI {
listenToEvents () { listenToEvents () {
this.dropdownLogic.event.register('newlyCompiled', (success, data, source, compiler, compilerFullName, file) => { this.dropdownLogic.event.register('newlyCompiled', (success, data, source, compiler, compilerFullName, file) => {
if (!this.selectContractNames) return if (!this.selectContractNames) return
this.selectContractNames.innerHTML = '' this.selectContractNames.innerHTML = ''
if (success) { if (success) {
this.dropdownLogic.getCompiledContracts(compiler, compilerFullName).forEach((contract) => { this.dropdownLogic.getCompiledContracts(compiler, compilerFullName).forEach((contract) => {
console.log('file = ', file)
console.log('contrtact.file = ', contract.file)
this.selectContractNames.appendChild(yo`<option value="${contract.name}" compiler="${compilerFullName}">${contract.name} - ${contract.file}</option>`) this.selectContractNames.appendChild(yo`<option value="${contract.name}" compiler="${compilerFullName}">${contract.name} - ${contract.file}</option>`)
this.runView.compilersArtefacts.addressToCompilationResults[contract.name + '-' + contract.file] = data
console.log("runView.compilersArtefacts.addressToCompilationResults ", this.runView.compilersArtefacts.addressToCompilationResults)
}) })
} }
this.enableAtAddress(success) this.enableAtAddress(success)
@ -295,6 +300,9 @@ class ContractDropdownUI {
} }
this.event.trigger('newContractInstanceAdded', [contractObject, address, contractObject.name]) this.event.trigger('newContractInstanceAdded', [contractObject, address, contractObject.name])
this.runView.compilersArtefacts.addResolvedContract(address, this.runView.compilersArtefacts.addressToCompilationResults[contractObject.name + '-' + contractObject.file])
console.log("this.runView.compilersArtefacts.addressToCompilationResults[contractObject.name + '-' + contractObject.file]", this.runView.compilersArtefacts.addressToCompilationResults[contractObject.name + '-' + contractObject.file])
if (this.ipfsCheckedState) { if (this.ipfsCheckedState) {
publishToStorage('ipfs', this.runView.fileProvider, this.runView.fileManager, selectedContract) publishToStorage('ipfs', this.runView.fileProvider, this.runView.fileManager, selectedContract)
} }

@ -215,7 +215,14 @@ function renderKnownTransaction (self, data, blockchain) {
${checkTxStatus(data.receipt, txType)} ${checkTxStatus(data.receipt, txType)}
${context(self, { from, to, data }, blockchain)} ${context(self, { from, to, data }, blockchain)}
<div class=${css.buttons}> <div class=${css.buttons}>
<button class="${css.debug} btn btn-primary btn-sm" data-shared="txLoggerDebugButton" data-id="txLoggerDebugButton${data.tx.hash}" onclick=${(e) => debug(e, data, self)}>Debug</div> <button
class="${css.debug} btn btn-primary btn-sm"
data-shared="txLoggerDebugButton"
data-id="txLoggerDebugButton${data.tx.hash}"
onclick=${(e) => debug(e, data, self)}
>
Debug
</div>
</div> </div>
<i class="${css.arrow} fas fa-angle-down"></i> <i class="${css.arrow} fas fa-angle-down"></i>
</div> </div>

Loading…
Cancel
Save