2023-06-01 10:38:56 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
/*!
|
|
|
|
\qmltype TokenObject
|
|
|
|
\inherits QtObject
|
|
|
|
\brief Token object properties definition.
|
|
|
|
*/
|
|
|
|
QtObject {
|
2023-07-03 14:44:02 +00:00
|
|
|
property int type: Constants.TokenType.ERC20
|
2023-08-04 16:41:21 +00:00
|
|
|
property int privilegesLevel: Constants.TokenPrivilegesLevel.Community
|
|
|
|
readonly property bool isPrivilegedToken: (privilegesLevel === Constants.TokenPrivilegesLevel.Owner) ||
|
|
|
|
(privilegesLevel === Constants.TokenPrivilegesLevel.TMaster)
|
|
|
|
property color color // Owner and TMaster icon color
|
2023-07-18 12:39:38 +00:00
|
|
|
|
2023-06-01 10:38:56 +00:00
|
|
|
// Unique identifier:
|
|
|
|
property string key
|
|
|
|
|
|
|
|
// General descriptive properties:
|
|
|
|
property string name
|
|
|
|
property string symbol
|
|
|
|
property string description
|
|
|
|
property bool infiniteSupply: true
|
2023-08-10 12:23:59 +00:00
|
|
|
property string supply: "1"
|
|
|
|
property string remainingTokens: supply
|
|
|
|
property int multiplierIndex: 0
|
2023-06-01 10:38:56 +00:00
|
|
|
|
|
|
|
// Artwork related properties:
|
|
|
|
property url artworkSource
|
|
|
|
property rect artworkCropRect: Qt.rect(0, 0, 0, 0)
|
|
|
|
|
|
|
|
// Network related properties:
|
|
|
|
property int chainId
|
|
|
|
property string chainName
|
|
|
|
property string chainIcon
|
2023-11-24 08:48:50 +00:00
|
|
|
property string tokenAddress
|
2023-06-01 10:38:56 +00:00
|
|
|
|
|
|
|
// Account related properties (from where they will be / have been deployed):
|
|
|
|
property string accountAddress
|
|
|
|
property string accountName
|
|
|
|
|
|
|
|
// Contract transactions states:
|
|
|
|
property int deployState: Constants.ContractTransactionStatus.None
|
|
|
|
property int burnState: Constants.ContractTransactionStatus.None
|
|
|
|
|
2023-06-22 21:24:30 +00:00
|
|
|
// Collectible-specific properties:
|
|
|
|
property bool transferable: false
|
|
|
|
property bool remotelyDestruct: true
|
|
|
|
property int remotelyDestructState: Constants.ContractTransactionStatus.None
|
|
|
|
|
|
|
|
// Asset-specific properties:
|
2023-06-23 07:51:20 +00:00
|
|
|
property int decimals: 2
|
2024-09-19 20:32:38 +00:00
|
|
|
|
|
|
|
// Loading indicators
|
|
|
|
property bool tokenHoldersLoading: false
|
2023-06-01 10:38:56 +00:00
|
|
|
}
|