2023-02-17 11:56:13 +00:00
|
|
|
import QtQuick 2.15
|
2022-08-23 08:46:37 +00:00
|
|
|
|
2023-02-20 08:31:39 +00:00
|
|
|
|
2022-08-23 08:46:37 +00:00
|
|
|
QtObject {
|
2022-11-25 17:35:30 +00:00
|
|
|
id: root
|
|
|
|
|
2023-02-17 11:56:13 +00:00
|
|
|
property var mintingModuleInst: mintingModule ?? null
|
2023-01-09 12:51:31 +00:00
|
|
|
|
2023-02-17 11:56:13 +00:00
|
|
|
// Minting tokens:
|
2023-02-15 14:22:25 +00:00
|
|
|
function mintCollectible(communityId, address, name, symbol, description, supply,
|
|
|
|
infiniteSupply, transferable, selfDestruct, chainId, artworkSource)
|
2023-01-09 12:51:31 +00:00
|
|
|
{
|
2023-01-29 13:33:58 +00:00
|
|
|
mintingModuleInst.mintCollectible(communityId, address, name, symbol, description, supply,
|
2023-02-15 14:22:25 +00:00
|
|
|
infiniteSupply, transferable, selfDestruct, chainId, artworkSource)
|
2023-01-09 12:51:31 +00:00
|
|
|
}
|
2023-02-22 17:10:46 +00:00
|
|
|
|
|
|
|
// Network selection properties:
|
|
|
|
property var layer1Networks: networksModule.layer1
|
|
|
|
property var layer2Networks: networksModule.layer2
|
|
|
|
property var testNetworks: networksModule.test
|
|
|
|
property var enabledNetworks: networksModule.enabled
|
2023-03-07 11:32:45 +00:00
|
|
|
property var allNetworks: networksModule.all
|
|
|
|
|
|
|
|
function getChainName(chainId) {
|
2023-03-07 16:05:27 +00:00
|
|
|
return allNetworks.getNetworkFullName(chainId)
|
2023-03-07 11:32:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function getChainIcon(chainId) {
|
2023-03-07 16:05:27 +00:00
|
|
|
return allNetworks.getIconUrl(chainId)
|
2023-03-07 11:32:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Token holders model: MOCKED DATA -> TODO: Update with real data
|
|
|
|
readonly property var holdersModel: ListModel {
|
|
|
|
|
|
|
|
readonly property string image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAlklEQVR4nOzW0QmDQBAG4SSkl7SUQlJGCrElq9F3QdjjVhh/5nv3cFhY9vUIYQiNITSG0BhCExPynn1gWf9bx498P7/
|
|
|
|
nzPcxEzGExhBdJGYihtAYQlO+tUZvqrPbqeudo5iJGEJjCE15a3VtodH3q2ImYgiNITTlTdG1nUZ5a92VITQxITFiJmIIjSE0htAYQrMHAAD//+wwFVpz+yqXAAAAAElFTkSuQmCC"
|
|
|
|
|
|
|
|
Component.onCompleted:
|
|
|
|
append([
|
|
|
|
{
|
|
|
|
ensName: "carmen.eth",
|
|
|
|
walletAddress: "0xb794f5450ba39494ce839613fffba74279579268",
|
|
|
|
imageSource:image,
|
|
|
|
amount: 3
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ensName: "chris.eth",
|
|
|
|
walletAddress: "0xb794f5ea0ba39494ce839613fffba74279579268",
|
|
|
|
imageSource: image,
|
|
|
|
amount: 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ensName: "emily.eth",
|
|
|
|
walletAddress: "0xb794f5ea0ba39494ce839613fffba74279579268",
|
|
|
|
imageSource: image,
|
|
|
|
amount: 2
|
|
|
|
},
|
|
|
|
{
|
|
|
|
ensName: "",
|
|
|
|
walletAddress: "0xb794f5ea0ba39494ce839613fffba74279579268",
|
|
|
|
imageSource: "",
|
|
|
|
amount: 1
|
|
|
|
}
|
|
|
|
])
|
|
|
|
}
|
2022-08-23 08:46:37 +00:00
|
|
|
}
|