aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorMaran <maran.hidskes@gmail.com>2014-04-15 01:46:59 +0800
committerMaran <maran.hidskes@gmail.com>2014-04-15 01:46:59 +0800
commit8a2698ad5e3d47db9175e838b0a16c3f59b6e071 (patch)
tree71722faa62b183d87bf34596e05b3bf4fc09b656 /ethereal
parentab8d96258ea11c828a149dde176fe8e2efce0294 (diff)
downloadgo-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.tar
go-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.tar.gz
go-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.tar.bz2
go-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.tar.lz
go-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.tar.xz
go-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.tar.zst
go-tangerine-8a2698ad5e3d47db9175e838b0a16c3f59b6e071.zip
Add send to contract
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/qml/newTransaction/_new_contract.qml39
-rw-r--r--ethereal/assets/qml/wallet.qml2
2 files changed, 37 insertions, 4 deletions
diff --git a/ethereal/assets/qml/newTransaction/_new_contract.qml b/ethereal/assets/qml/newTransaction/_new_contract.qml
index 8ce81a799..abaac1695 100644
--- a/ethereal/assets/qml/newTransaction/_new_contract.qml
+++ b/ethereal/assets/qml/newTransaction/_new_contract.qml
@@ -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 {
id: txDataLabel
- text: "Transaction data"
+ text: "Contract code"
}
TextArea {
@@ -100,6 +125,14 @@ Component {
}
}
+ TextField {
+ id: txFuelRecipient
+ placeholderText: "Contract address"
+ validator: RegExpValidator { regExp: /[a-f0-9]{40}/ }
+ visible: false
+ width: 530
+ }
+
Button {
id: txButton
states: [
@@ -116,14 +149,14 @@ Component {
enabled: false
onClicked: {
//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]) {
txResult.text = "Your contract <b>could not</b> be send over the network:\n<b>"
txResult.text += res[1].error()
txResult.text += "</b>"
mainContractColumn.state = "ERROR"
} else {
- txResult.text = "Your contract has been submitted:\n"
+ txResult.text = "Your transaction has been submitted:\n"
txOutput.text = res[0]
mainContractColumn.state = "DONE"
}
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 0c8c91e13..a4d5cb642 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -167,7 +167,7 @@ ApplicationWindow {
var newContract = component.createObject("newContract")
addTab("Simple send", newTransaction)
- addTab("Create contract", newContract)
+ addTab("Contracts", newContract)
}
}
}