mirror of https://github.com/status-im/op-geth.git
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
This commit is contained in:
commit
6b644c17a7
|
@ -85,9 +85,34 @@ Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: rowContract
|
||||||
|
ExclusiveGroup { id: contractTypeGroup }
|
||||||
|
RadioButton {
|
||||||
|
id: createContractRadio
|
||||||
|
text: "Create contract"
|
||||||
|
checked: true
|
||||||
|
exclusiveGroup: contractTypeGroup
|
||||||
|
onClicked: {
|
||||||
|
txFuelRecipient.visible = false
|
||||||
|
txDataLabel.text = "Contract code"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RadioButton {
|
||||||
|
id: runContractRadio
|
||||||
|
text: "Run contract"
|
||||||
|
exclusiveGroup: contractTypeGroup
|
||||||
|
onClicked: {
|
||||||
|
txFuelRecipient.visible = true
|
||||||
|
txDataLabel.text = "Contract arguments"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: txDataLabel
|
id: txDataLabel
|
||||||
text: "Transaction data"
|
text: "Contract code"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextArea {
|
TextArea {
|
||||||
|
@ -100,6 +125,14 @@ Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TextField {
|
||||||
|
id: txFuelRecipient
|
||||||
|
placeholderText: "Contract address"
|
||||||
|
validator: RegExpValidator { regExp: /[a-f0-9]{40}/ }
|
||||||
|
visible: false
|
||||||
|
width: 530
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
id: txButton
|
id: txButton
|
||||||
states: [
|
states: [
|
||||||
|
@ -116,14 +149,14 @@ Component {
|
||||||
enabled: false
|
enabled: false
|
||||||
onClicked: {
|
onClicked: {
|
||||||
//this.enabled = false
|
//this.enabled = false
|
||||||
var res = eth.createTx("", txValue.text, txGas.text, txGasPrice.text, codeView.text)
|
var res = eth.createTx(txFuelRecipient.text, txValue.text, txGas.text, txGasPrice.text, codeView.text)
|
||||||
if(res[1]) {
|
if(res[1]) {
|
||||||
txResult.text = "Your contract <b>could not</b> be send over the network:\n<b>"
|
txResult.text = "Your contract <b>could not</b> be send over the network:\n<b>"
|
||||||
txResult.text += res[1].error()
|
txResult.text += res[1].error()
|
||||||
txResult.text += "</b>"
|
txResult.text += "</b>"
|
||||||
mainContractColumn.state = "ERROR"
|
mainContractColumn.state = "ERROR"
|
||||||
} else {
|
} else {
|
||||||
txResult.text = "Your contract has been submitted:\n"
|
txResult.text = "Your transaction has been submitted:\n"
|
||||||
txOutput.text = res[0]
|
txOutput.text = res[0]
|
||||||
mainContractColumn.state = "DONE"
|
mainContractColumn.state = "DONE"
|
||||||
}
|
}
|
||||||
|
|
|
@ -167,7 +167,7 @@ ApplicationWindow {
|
||||||
var newContract = component.createObject("newContract")
|
var newContract = component.createObject("newContract")
|
||||||
|
|
||||||
addTab("Simple send", newTransaction)
|
addTab("Simple send", newTransaction)
|
||||||
addTab("Create contract", newContract)
|
addTab("Contracts", newContract)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -412,6 +412,15 @@ ApplicationWindow {
|
||||||
model: memModel
|
model: memModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SplitView {
|
||||||
|
orientation: Qt.Horizontal
|
||||||
|
TableView {
|
||||||
|
property var debuggerLog: ListModel {
|
||||||
|
id: debuggerLog
|
||||||
|
}
|
||||||
|
TableViewColumn{ role: "value"; title: "Debug messages" }
|
||||||
|
model: debuggerLog
|
||||||
|
}
|
||||||
TableView {
|
TableView {
|
||||||
property var stackModel: ListModel {
|
property var stackModel: ListModel {
|
||||||
id: stackModel
|
id: stackModel
|
||||||
|
@ -425,6 +434,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function setAsm(asm) {
|
function setAsm(asm) {
|
||||||
asmModel.append({asm: asm})
|
asmModel.append({asm: asm})
|
||||||
|
@ -449,6 +459,10 @@ ApplicationWindow {
|
||||||
function setStack(stack) {
|
function setStack(stack) {
|
||||||
stackModel.append({value: stack})
|
stackModel.append({value: stack})
|
||||||
}
|
}
|
||||||
|
function addDebugMessage(message){
|
||||||
|
console.log("WOOP:")
|
||||||
|
debuggerLog.append({value: message})
|
||||||
|
}
|
||||||
|
|
||||||
function clearStack() {
|
function clearStack() {
|
||||||
stackModel.clear()
|
stackModel.clear()
|
||||||
|
|
|
@ -102,6 +102,9 @@ func (ui *UiLib) DebugTx(recipient, valueStr, gasStr, gasPriceStr, data string)
|
||||||
asm, err := mutan.Compile(strings.NewReader(mainInput), false)
|
asm, err := mutan.Compile(strings.NewReader(mainInput), false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
for _, e := range err {
|
||||||
|
ui.win.Root().Call("addDebugMessage", e.Error())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
callerScript := ethutil.Assemble(asm...)
|
callerScript := ethutil.Assemble(asm...)
|
||||||
|
|
Loading…
Reference in New Issue