|
@ -30,6 +30,15 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
if (worker.accounts.length > 0) |
|
|
if (worker.accounts.length > 0) |
|
|
worker.currentAccount = worker.accounts[0].id |
|
|
worker.currentAccount = worker.accounts[0].id |
|
|
|
|
|
|
|
|
|
|
|
if (projectModel.deployBlockNumber) |
|
|
|
|
|
{ |
|
|
|
|
|
worker.blockNumber(function (bn) |
|
|
|
|
|
{ |
|
|
|
|
|
verificationLabel.text = bn - projectModel.deployBlockNumber |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
deployedAddresses.refresh() |
|
|
deployedAddresses.refresh() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -58,7 +67,8 @@ Rectangle { |
|
|
textRole: "title" |
|
|
textRole: "title" |
|
|
onCurrentIndexChanged: |
|
|
onCurrentIndexChanged: |
|
|
{ |
|
|
{ |
|
|
change() |
|
|
if (root.visible) |
|
|
|
|
|
change() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
function change() |
|
|
function change() |
|
@ -188,6 +198,7 @@ Rectangle { |
|
|
Layout.preferredWidth: parent.width * 0.60 |
|
|
Layout.preferredWidth: parent.width * 0.60 |
|
|
Layout.fillHeight: true |
|
|
Layout.fillHeight: true |
|
|
id: deploymentOption |
|
|
id: deploymentOption |
|
|
|
|
|
spacing: 8 |
|
|
|
|
|
|
|
|
Label |
|
|
Label |
|
|
{ |
|
|
{ |
|
@ -343,7 +354,7 @@ Rectangle { |
|
|
Label |
|
|
Label |
|
|
{ |
|
|
{ |
|
|
id: labelAddresses |
|
|
id: labelAddresses |
|
|
text: qsTr("Deployed Addresses") |
|
|
text: qsTr("Deployed Contracts") |
|
|
anchors.right: parent.right |
|
|
anchors.right: parent.right |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
} |
|
|
} |
|
@ -351,7 +362,8 @@ Rectangle { |
|
|
|
|
|
|
|
|
ColumnLayout |
|
|
ColumnLayout |
|
|
{ |
|
|
{ |
|
|
|
|
|
anchors.top: parent.top |
|
|
|
|
|
anchors.topMargin: 1 |
|
|
ListModel |
|
|
ListModel |
|
|
{ |
|
|
{ |
|
|
id: deployedAddrModel |
|
|
id: deployedAddrModel |
|
@ -380,13 +392,15 @@ Rectangle { |
|
|
Label |
|
|
Label |
|
|
{ |
|
|
{ |
|
|
id: labelContract |
|
|
id: labelContract |
|
|
width: 110 |
|
|
width: 112 |
|
|
elide: Text.ElideRight |
|
|
elide: Text.ElideRight |
|
|
text: index > -1 ? deployedAddrModel.get(index).id : "" |
|
|
text: index > -1 ? deployedAddrModel.get(index).id : "" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
TextField |
|
|
TextField |
|
|
{ |
|
|
{ |
|
|
|
|
|
width: 123 |
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
anchors.left: labelContract.right |
|
|
anchors.left: labelContract.right |
|
|
text: index > - 1 ? deployedAddrModel.get(index).value : "" |
|
|
text: index > - 1 ? deployedAddrModel.get(index).value : "" |
|
|
} |
|
|
} |
|
@ -394,6 +408,28 @@ Rectangle { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RowLayout |
|
|
|
|
|
{ |
|
|
|
|
|
id: verificationRow |
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
visible: Object.keys(projectModel.deploymentAddresses).length > 0 |
|
|
|
|
|
Rectangle |
|
|
|
|
|
{ |
|
|
|
|
|
width: labelWidth |
|
|
|
|
|
Label |
|
|
|
|
|
{ |
|
|
|
|
|
text: qsTr("Verifications") |
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Label |
|
|
|
|
|
{ |
|
|
|
|
|
id: verificationLabel |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Rectangle |
|
|
Rectangle |
|
@ -409,6 +445,12 @@ Rectangle { |
|
|
projectModel.deployedScenarioIndex = contractList.currentIndex |
|
|
projectModel.deployedScenarioIndex = contractList.currentIndex |
|
|
NetworkDeploymentCode.deployContracts(root.gas, function(addresses) |
|
|
NetworkDeploymentCode.deployContracts(root.gas, function(addresses) |
|
|
{ |
|
|
{ |
|
|
|
|
|
worker.blockNumber(function (nb) |
|
|
|
|
|
{ |
|
|
|
|
|
projectModel.deployBlockNumber = nb |
|
|
|
|
|
verificationLabel.text = "0" |
|
|
|
|
|
projectModel.saveProject() |
|
|
|
|
|
}) |
|
|
projectModel.deploymentAddresses = addresses |
|
|
projectModel.deploymentAddresses = addresses |
|
|
projectModel.saveProject() |
|
|
projectModel.saveProject() |
|
|
deployedAddresses.refresh() |
|
|
deployedAddresses.refresh() |
|
|