2023-06-22 21:24:30 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
import QtQuick.Layouts 1.15
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-23 06:17:04 +00:00
|
|
|
import AppLayouts.Communities.views 1.0
|
|
|
|
import AppLayouts.Communities.helpers 1.0
|
2023-03-06 12:18:25 +00:00
|
|
|
|
|
|
|
import Storybook 1.0
|
|
|
|
import Models 1.0
|
|
|
|
|
2023-05-17 10:00:52 +00:00
|
|
|
import utils 1.0
|
|
|
|
|
2023-03-06 12:18:25 +00:00
|
|
|
SplitView {
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
TokenObject {
|
|
|
|
id: tokenObject
|
|
|
|
|
|
|
|
type: tokenTypeButtonGroup.checkedButton.type
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
artworkSource: artworkButtonGroup.checkedButton.source
|
|
|
|
burnState: burnDestructStateBox.checked
|
|
|
|
? Constants.ContractTransactionStatus.InProgress
|
|
|
|
: Constants.ContractTransactionStatus.Completed
|
2023-03-06 12:18:25 +00:00
|
|
|
name: nameText.text
|
2023-06-22 21:24:30 +00:00
|
|
|
deployState: mintingStateButtonGroup.checkedButton.mintingState
|
2023-03-06 12:18:25 +00:00
|
|
|
symbol: symbolText.text
|
|
|
|
description: descriptionText.text
|
2023-06-01 10:38:56 +00:00
|
|
|
supply: parseInt(supplyText.text)
|
2023-03-06 12:18:25 +00:00
|
|
|
infiniteSupply: unlimitedSupplyChecker.checked
|
2023-05-16 14:50:43 +00:00
|
|
|
remainingTokens: parseInt(remainingText.text)
|
2023-06-22 21:24:30 +00:00
|
|
|
chainId: networksGroup.checkedButton.chainId
|
|
|
|
chainName: networksGroup.checkedButton.text
|
|
|
|
chainIcon: networksGroup.checkedButton.chainIcon
|
2023-03-17 15:09:27 +00:00
|
|
|
accountName: "helloworld"
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
// collectible-specific properties
|
|
|
|
remotelyDestructState: remotelyDestructStateBox.checked
|
|
|
|
? Constants.ContractTransactionStatus.InProgress
|
|
|
|
: Constants.ContractTransactionStatus.Completed
|
|
|
|
transferable: transferibleChecker.checked
|
|
|
|
remotelyDestruct: selfdestructChecker.checked
|
2023-06-01 21:23:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
// asset-specific properties
|
2023-06-01 10:38:56 +00:00
|
|
|
decimals: parseInt(decimalText.text)
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
2023-06-01 10:38:56 +00:00
|
|
|
|
|
|
|
CommunityTokenView {
|
|
|
|
id: view
|
|
|
|
|
|
|
|
anchors.fill: parent
|
|
|
|
anchors.margins: 50
|
|
|
|
preview: previewBox.checked
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
token: tokenObject
|
2023-06-01 10:38:56 +00:00
|
|
|
tokenOwnersModel: TokenHoldersModel {}
|
|
|
|
|
|
|
|
onMintClicked: logs.logEvent("CommunityTokenView::onMintClicked")
|
2023-06-22 21:24:30 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
|
|
|
SplitView.preferredHeight: 150
|
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
SplitView.minimumWidth: 300
|
|
|
|
SplitView.preferredWidth: 300
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ScrollView {
|
2023-05-25 10:31:32 +00:00
|
|
|
width: parent.width
|
|
|
|
height: parent.height
|
2023-06-22 21:24:30 +00:00
|
|
|
contentHeight: column.implicitHeight
|
|
|
|
contentWidth: width
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-05-17 10:00:52 +00:00
|
|
|
ColumnLayout {
|
2023-06-22 21:24:30 +00:00
|
|
|
id: column
|
2023-05-25 10:31:32 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
width: parent.width
|
2023-05-17 10:00:52 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
2023-05-17 10:00:52 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
title: "Token type"
|
2023-05-25 10:31:32 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: tokenTypeButtonGroup
|
|
|
|
|
|
|
|
buttons: tokenTypeColumn.children
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: tokenTypeColumn
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
id: isAssetRadioButton
|
|
|
|
|
|
|
|
readonly property int type:
|
|
|
|
TokenObject.Type.Asset
|
|
|
|
|
|
|
|
text: "Asset"
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
RadioButton {
|
|
|
|
readonly property int type:
|
|
|
|
TokenObject.Type.Collectible
|
|
|
|
|
|
|
|
checked: true
|
|
|
|
text: "Collectible"
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-05-17 10:00:52 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
CheckBox {
|
|
|
|
id: previewBox
|
|
|
|
text: "Preview"
|
|
|
|
checked: true
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-05-16 14:50:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-05-16 14:50:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
title: "Minting state"
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: mintingStateButtonGroup
|
|
|
|
|
|
|
|
buttons: mintingStateColumn.children
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
id: mintingStateColumn
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property int mintingState:
|
|
|
|
Constants.ContractTransactionStatus.InProgress
|
|
|
|
|
|
|
|
text: "In progress"
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property int mintingState:
|
|
|
|
Constants.ContractTransactionStatus.Failed
|
|
|
|
|
|
|
|
text: "Failed"
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property int mintingState:
|
|
|
|
Constants.ContractTransactionStatus.Completed
|
|
|
|
|
|
|
|
text: "Completed"
|
|
|
|
checked: true
|
|
|
|
}
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: remotelyDestructStateBox
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
visible: !isAssetRadioButton.checked
|
|
|
|
text: "Remotely destruct in progress"
|
|
|
|
checked: false
|
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
CheckBox {
|
|
|
|
id: burnDestructStateBox
|
|
|
|
|
|
|
|
text: "Burn in progress"
|
|
|
|
checked: false
|
|
|
|
}
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
title: "Artwork"
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ButtonGroup {
|
|
|
|
id: artworkButtonGroup
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
buttons: artworkColumn.children
|
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
id: artworkColumn
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
RadioButton {
|
|
|
|
readonly property string source:
|
|
|
|
ModelsData.icons.superRare
|
|
|
|
|
|
|
|
text: "Small"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property string source:
|
|
|
|
ModelsData.collectibles.kitty2Big
|
|
|
|
|
|
|
|
text: "Medium"
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
readonly property string source:
|
|
|
|
ModelsData.banners.superRare
|
|
|
|
|
|
|
|
text: "Large"
|
|
|
|
}
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-05-16 14:50:43 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
width: parent.width
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
Label {
|
|
|
|
text: "Name"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: nameText
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: "Art work"
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Description"
|
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
TextField {
|
|
|
|
id: descriptionText
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: ModelsData.descriptions.medium
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Symbol"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: symbolText
|
|
|
|
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
text: "ABC"
|
|
|
|
}
|
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
2023-05-25 10:31:32 +00:00
|
|
|
Layout.fillWidth: true
|
2023-03-06 12:18:25 +00:00
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
ColumnLayout {
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: unlimitedSupplyChecker
|
|
|
|
|
|
|
|
text: "Unlimited supply"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
visible: !unlimitedSupplyChecker.checked
|
|
|
|
text: "Supply"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: supplyText
|
|
|
|
|
|
|
|
visible: !unlimitedSupplyChecker.checked
|
|
|
|
text: "123"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: remainingText
|
|
|
|
|
|
|
|
visible: !unlimitedSupplyChecker.checked
|
|
|
|
text: "123"
|
|
|
|
}
|
|
|
|
|
|
|
|
Label {
|
|
|
|
visible: isAssetRadioButton.checked
|
|
|
|
text: "Decimal"
|
|
|
|
}
|
|
|
|
|
|
|
|
TextField {
|
|
|
|
id: decimalText
|
|
|
|
|
|
|
|
visible: isAssetRadioButton.checked
|
|
|
|
text: "2"
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
visible: !isAssetRadioButton.checked
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: transferibleChecker
|
|
|
|
|
|
|
|
text: "Tranferible"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: selfdestructChecker
|
|
|
|
|
|
|
|
text: "Remote self-desctruct"
|
|
|
|
checked: true
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
GroupBox {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
|
|
|
|
title: "Network"
|
|
|
|
|
|
|
|
ButtonGroup {
|
|
|
|
id: networksGroup
|
|
|
|
|
|
|
|
buttons: networksColumn.children
|
|
|
|
}
|
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
id: networksColumn
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: "Ethereum Mainnet"
|
|
|
|
checked: true
|
|
|
|
|
|
|
|
readonly property string chainIcon:
|
|
|
|
ModelsData.networks.ethereum
|
|
|
|
readonly property int chainId: 1
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: "Optimism"
|
|
|
|
|
|
|
|
readonly property string chainIcon:
|
|
|
|
ModelsData.networks.optimism
|
|
|
|
readonly property int chainId: 2
|
|
|
|
}
|
|
|
|
|
|
|
|
RadioButton {
|
|
|
|
text: "Arbitrum"
|
|
|
|
|
|
|
|
readonly property string chainIcon:
|
|
|
|
ModelsData.networks.arbitrum
|
|
|
|
readonly property int chainId: 3
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|
2023-05-25 10:31:32 +00:00
|
|
|
}
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
2023-06-22 21:24:30 +00:00
|
|
|
|
|
|
|
Component.onCompleted: spacing *= 2
|
2023-03-06 12:18:25 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|