-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRootTokenContractNF.hpp
81 lines (55 loc) · 2.13 KB
/
RootTokenContractNF.hpp
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#pragma once
#include "TONTokenWalletNF.hpp"
namespace tvm { namespace schema {
// ===== Root Token Contract (Non-fungible) ===== //
__interface IRootTokenContract {
// expected offchain constructor execution
__attribute__((internal, external, dyn_chain_parse))
void constructor(bytes name, bytes symbol, uint8 decimals, uint256 root_public_key, cell wallet_code) = 11;
__attribute__((external, noaccept, dyn_chain_parse))
lazy<MsgAddressInt> deployWallet(int8 workchain_id, uint256 pubkey, TokenId tokenId, WalletGramsType grams, lazy<MsgAddressInt> nonce) = 12;
__attribute__((internal, noaccept, dyn_chain_parse, answer_id))
lazy<MsgAddressInt> deployWallet_response(int8 workchain_id, uint256 pubkey, WalletGramsType grams, lazy<MsgAddressInt> nonce) = 13;
__attribute__((external, noaccept, dyn_chain_parse))
void grant(lazy<MsgAddressInt> dest, TokenId tokenId, WalletGramsType grams) = 14;
__attribute__((external, noaccept, dyn_chain_parse))
TokenId mint(TokenId tokenId, bytes name, bytes jsonMeta,lazy<MsgAddressInt> data) = 15;
__attribute__((getter))
bytes getName() = 16;
__attribute__((getter))
bytes getSymbol() = 17;
__attribute__((getter))
uint8 getDecimals() = 19;
__attribute__((getter))
uint256 getRootKey() = 20;
__attribute__((getter))
TokensType getTotalSupply() = 21;
__attribute__((getter))
TokensType getTotalGranted() = 22;
__attribute__((getter))
cell getWalletCode() = 23;
__attribute__((getter))
TokenId getLastMintedToken() = 24;
__attribute__((getter))
lazy<MsgAddressInt> getWalletAddress(int8 workchain_id, uint256 pubkey, lazy<MsgAddressInt> nonce) = 25;
__attribute__((getter))
bytes getJson(TokenId tokenId) = 26;
__attribute__((getter))
t_file getInfoToken(TokenId tokenId) = 28;
};
struct DRootTokenContract {
bytes name_;
bytes symbol_;
uint8 decimals_;
uint256 root_public_key_;
TokensType total_supply_;
TokensType total_granted_;
cell wallet_code_;
dict_set<TokenId> tokens_;
dict_map<uint128,t_file> files_;
// t_file files_;
//dict_array<File> files_;
};
struct ERootTokenContract {
};
}} // namespace tvm::schema