Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: layout update #2922

Merged
merged 3 commits into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export default class FetchAndCompile extends Plugin {
name === 'main' ? 'mainnet' : name // source-verifier api expect "mainnet" and not "main"
let data
try {
data = await this.call('sourcify', 'fetchByNetwork', contractAddress, name.toLowerCase())
data = await this.call('source-verification', 'fetchByNetwork', contractAddress, name.toLowerCase())
} catch (e) {
setTimeout(_ => this.emit('notFound', contractAddress), 0) // plugin framework returns a time out error although it actually didn't find the source...
this.unresolvedAddresses.push(contractAddress)
Expand Down
2 changes: 1 addition & 1 deletion src/app/tabs/debugger-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DebuggerTab extends ViewPlugin {
}
)

this.call('manager', 'activatePlugin', 'sourcify')
this.call('manager', 'activatePlugin', 'source-verification')
// this.call('manager', 'activatePlugin', 'udapp')

return this.el
Expand Down
22 changes: 13 additions & 9 deletions src/app/tabs/debugger/debuggerUI/VmDebugger.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,8 @@ var FullStoragesChangesPanel = require('./vmDebugger/FullStoragesChanges')
var DropdownPanel = require('./vmDebugger/DropdownPanel')

var css = csjs`
.asmCode {
width: 100%;
}
.stepDetail {
width: 100%;
line-height: 20%;
}
.vmheadView {
margin-top:10px;
Expand Down Expand Up @@ -127,19 +124,29 @@ function VmDebugger (vmDebuggerLogic) {

this.vmDebuggerLogic.event.register('newCallTree', () => {
if (!self.view) return
self.functionPanel.basicPanel.show()
self.solidityLocals.basicPanel.show()
self.solidityState.basicPanel.show()
self.solidityPanel.hidden = false
})

this.vmDebuggerLogic.start()
}

VmDebugger.prototype.renderHead = function () {
this.solidityPanel = yo`
<div class="${css.solidityPanel} column w-100" hidden>
${this.functionPanel.render()}
${this.solidityLocals.render()}
${this.solidityState.render()}
</div>
`
const headView = yo`
<div id="vmheadView" class="${css.vmheadView} container">
<div class="row" >
<div class="${css.asmCode} column">${this.asmCode.render()}</div>
<div class="${css.stepDetail} column">${this.stepDetail.render()}</div>
${this.solidityPanel}
<div class="column w-100">${this.asmCode.render()}</div>
<div class="${css.stepDetail} column w-100">${this.stepDetail.render()}</div>
</div>
</div>
`
Expand All @@ -158,10 +165,7 @@ VmDebugger.prototype.render = function () {
const view = yo`
<div id="vmdebugger" class="pl-2">
<div>
${this.solidityLocals.render()}
${this.solidityState.render()}
${this.stackPanel.render()}
${this.functionPanel.render()}
${this.memoryPanel.render()}
${this.storagePanel.render()}
${this.callstackPanel.render()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var csjs = require('csjs-inject')
var css = csjs`
.instructions {
overflow-y: scroll;
max-height: 150px;
max-height: 100px;
}
`
function CodeListView () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var DropdownPanel = require('./DropdownPanel')
var yo = require('yo-yo')

function FunctionPanel () {
this.basicPanel = new DropdownPanel('Function', {json: true, displayContentOnly: false})
this.basicPanel = new DropdownPanel('Function Stack', {json: true, displayContentOnly: false})
}

FunctionPanel.prototype.update = function (calldata) {
Expand Down
4 changes: 2 additions & 2 deletions src/app/ui/landing-page/landing-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ export class LandingPage extends ViewPlugin {
}
const startSourceVerify = () => {
this.appManager.ensureActivated('solidity')
this.appManager.ensureActivated('sourcify')
this.verticalIcons.select('sourcify')
this.appManager.ensureActivated('source-verification')
this.verticalIcons.select('source-verification')
}
const startPluginManager = () => {
this.appManager.ensureActivated('pluginManager')
Expand Down