forked from neo-project/neo-devpack-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToken.cs
More file actions
39 lines (33 loc) · 1.17 KB
/
Copy pathToken.cs
File metadata and controls
39 lines (33 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright (C) 2015-2025 The Neo Project.
//
// Token.cs file belongs to the neo project and is free
// software distributed under the MIT software license, see the
// accompanying file LICENSE in the main directory of the
// repository or http://www.opensource.org/licenses/mit-license.php
// for more details.
//
// Redistribution and use in source and binary forms with or without
// modifications are permitted.
using Neo.SmartContract.Framework;
using Neo.SmartContract.Framework.Services;
using System.Numerics;
namespace NFT
{
public class TokenState : Nep11TokenState
{
public BigInteger TokenId;
public BigInteger Credential;
public static TokenState MintLoot(UInt160 owner, BigInteger tokenId, BigInteger credential) => new(owner, tokenId, credential);
private TokenState(UInt160 owner, BigInteger tokenId, BigInteger credential)
{
Owner = owner;
TokenId = tokenId;
Credential = credential;
Name = "N3 Secure Loot #" + TokenId;
}
public void OwnerOnly()
{
ExecutionEngine.Assert(Runtime.CheckWitness(Owner), "Authorization failed.");
}
}
}