@simplenft/api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/blueprint.config.ts +13 -0
- package/contracts/buyer_profile.tact +73 -0
- package/contracts/imports/stdlib.fc +625 -0
- package/contracts/jetton_eq.tact +79 -0
- package/contracts/message.tact +189 -0
- package/contracts/nft_item.tact +98 -0
- package/contracts/nft_item_free.tact +98 -0
- package/contracts/packages/math/float.fc +95 -0
- package/contracts/packages/misc/distributor_messages.tact +154 -0
- package/contracts/packages/nap/errcodes.tact +5 -0
- package/contracts/packages/nap/messages.tact +34 -0
- package/contracts/packages/token/jetton/JettonMaster.tact +127 -0
- package/contracts/packages/token/jetton/JettonWallet.tact +248 -0
- package/contracts/packages/token/nft/AuctionErrorCode.tact +55 -0
- package/contracts/packages/token/nft/NFTAuction.tact +226 -0
- package/contracts/packages/token/nft/NFTAuctionMarket.tact +302 -0
- package/contracts/packages/token/nft/NFTCollection.tact +69 -0
- package/contracts/packages/token/nft/NFTItem.tact +190 -0
- package/contracts/packages/token/nft/extensions/NFTEditable.tact +3 -0
- package/contracts/packages/token/nft/extensions/NFTRoyalty.tact +63 -0
- package/contracts/packages/traits/taxable.tact +31 -0
- package/contracts/packages/utils/Estimatable.tact +11 -0
- package/contracts/packages/utils/Lockable.tact +23 -0
- package/contracts/sbt_item.tact +70 -0
- package/contracts/simple_nft_collection.tact +177 -0
- package/contracts/simple_nft_collection_v2.tact +304 -0
- package/contracts/simple_nft_master.tact +102 -0
- package/dist/api.d.ts +10 -0
- package/dist/api.js +58 -0
- package/dist/backend-service.d.ts +13 -0
- package/dist/backend-service.js +29 -0
- package/dist/backend-types.d.ts +60 -0
- package/dist/backend-types.js +2 -0
- package/dist/content.d.ts +3 -0
- package/dist/content.js +30 -0
- package/dist/contracts/tact_NftItem.d.ts +619 -0
- package/dist/contracts/tact_NftItem.js +2312 -0
- package/dist/contracts/tact_SimpleNftCollectionV2.d.ts +658 -0
- package/dist/contracts/tact_SimpleNftCollectionV2.js +2427 -0
- package/dist/contracts/tact_SimpleNftMaster.d.ts +624 -0
- package/dist/contracts/tact_SimpleNftMaster.js +2350 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.js +254 -0
- package/dist/types.d.ts +53 -0
- package/dist/types.js +2 -0
- package/package.json +56 -0
- package/src/api.ts +62 -0
- package/src/backend-service.ts +40 -0
- package/src/backend-types.ts +72 -0
- package/src/content.ts +36 -0
- package/src/contracts/tact_NftItem.ts +2718 -0
- package/src/contracts/tact_SimpleNftCollectionV2.ts +2843 -0
- package/src/contracts/tact_SimpleNftMaster.ts +2759 -0
- package/src/index.ts +361 -0
- package/src/types.ts +62 -0
|
@@ -0,0 +1,2843 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Cell,
|
|
3
|
+
Slice,
|
|
4
|
+
Address,
|
|
5
|
+
Builder,
|
|
6
|
+
beginCell,
|
|
7
|
+
ComputeError,
|
|
8
|
+
TupleItem,
|
|
9
|
+
TupleReader,
|
|
10
|
+
Dictionary,
|
|
11
|
+
contractAddress,
|
|
12
|
+
ContractProvider,
|
|
13
|
+
Sender,
|
|
14
|
+
Contract,
|
|
15
|
+
ContractABI,
|
|
16
|
+
ABIType,
|
|
17
|
+
ABIGetter,
|
|
18
|
+
ABIReceiver,
|
|
19
|
+
TupleBuilder,
|
|
20
|
+
DictionaryValue
|
|
21
|
+
} from '@ton/core';
|
|
22
|
+
|
|
23
|
+
export type StateInit = {
|
|
24
|
+
$$type: 'StateInit';
|
|
25
|
+
code: Cell;
|
|
26
|
+
data: Cell;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function storeStateInit(src: StateInit) {
|
|
30
|
+
return (builder: Builder) => {
|
|
31
|
+
let b_0 = builder;
|
|
32
|
+
b_0.storeRef(src.code);
|
|
33
|
+
b_0.storeRef(src.data);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function loadStateInit(slice: Slice) {
|
|
38
|
+
let sc_0 = slice;
|
|
39
|
+
let _code = sc_0.loadRef();
|
|
40
|
+
let _data = sc_0.loadRef();
|
|
41
|
+
return { $$type: 'StateInit' as const, code: _code, data: _data };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function loadTupleStateInit(source: TupleReader) {
|
|
45
|
+
let _code = source.readCell();
|
|
46
|
+
let _data = source.readCell();
|
|
47
|
+
return { $$type: 'StateInit' as const, code: _code, data: _data };
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function loadGetterTupleStateInit(source: TupleReader) {
|
|
51
|
+
let _code = source.readCell();
|
|
52
|
+
let _data = source.readCell();
|
|
53
|
+
return { $$type: 'StateInit' as const, code: _code, data: _data };
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function storeTupleStateInit(source: StateInit) {
|
|
57
|
+
let builder = new TupleBuilder();
|
|
58
|
+
builder.writeCell(source.code);
|
|
59
|
+
builder.writeCell(source.data);
|
|
60
|
+
return builder.build();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function dictValueParserStateInit(): DictionaryValue<StateInit> {
|
|
64
|
+
return {
|
|
65
|
+
serialize: (src, builder) => {
|
|
66
|
+
builder.storeRef(beginCell().store(storeStateInit(src)).endCell());
|
|
67
|
+
},
|
|
68
|
+
parse: (src) => {
|
|
69
|
+
return loadStateInit(src.loadRef().beginParse());
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export type Context = {
|
|
75
|
+
$$type: 'Context';
|
|
76
|
+
bounced: boolean;
|
|
77
|
+
sender: Address;
|
|
78
|
+
value: bigint;
|
|
79
|
+
raw: Slice;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function storeContext(src: Context) {
|
|
83
|
+
return (builder: Builder) => {
|
|
84
|
+
let b_0 = builder;
|
|
85
|
+
b_0.storeBit(src.bounced);
|
|
86
|
+
b_0.storeAddress(src.sender);
|
|
87
|
+
b_0.storeInt(src.value, 257);
|
|
88
|
+
b_0.storeRef(src.raw.asCell());
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function loadContext(slice: Slice) {
|
|
93
|
+
let sc_0 = slice;
|
|
94
|
+
let _bounced = sc_0.loadBit();
|
|
95
|
+
let _sender = sc_0.loadAddress();
|
|
96
|
+
let _value = sc_0.loadIntBig(257);
|
|
97
|
+
let _raw = sc_0.loadRef().asSlice();
|
|
98
|
+
return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function loadTupleContext(source: TupleReader) {
|
|
102
|
+
let _bounced = source.readBoolean();
|
|
103
|
+
let _sender = source.readAddress();
|
|
104
|
+
let _value = source.readBigNumber();
|
|
105
|
+
let _raw = source.readCell().asSlice();
|
|
106
|
+
return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw };
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function loadGetterTupleContext(source: TupleReader) {
|
|
110
|
+
let _bounced = source.readBoolean();
|
|
111
|
+
let _sender = source.readAddress();
|
|
112
|
+
let _value = source.readBigNumber();
|
|
113
|
+
let _raw = source.readCell().asSlice();
|
|
114
|
+
return { $$type: 'Context' as const, bounced: _bounced, sender: _sender, value: _value, raw: _raw };
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function storeTupleContext(source: Context) {
|
|
118
|
+
let builder = new TupleBuilder();
|
|
119
|
+
builder.writeBoolean(source.bounced);
|
|
120
|
+
builder.writeAddress(source.sender);
|
|
121
|
+
builder.writeNumber(source.value);
|
|
122
|
+
builder.writeSlice(source.raw.asCell());
|
|
123
|
+
return builder.build();
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function dictValueParserContext(): DictionaryValue<Context> {
|
|
127
|
+
return {
|
|
128
|
+
serialize: (src, builder) => {
|
|
129
|
+
builder.storeRef(beginCell().store(storeContext(src)).endCell());
|
|
130
|
+
},
|
|
131
|
+
parse: (src) => {
|
|
132
|
+
return loadContext(src.loadRef().beginParse());
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export type SendParameters = {
|
|
138
|
+
$$type: 'SendParameters';
|
|
139
|
+
bounce: boolean;
|
|
140
|
+
to: Address;
|
|
141
|
+
value: bigint;
|
|
142
|
+
mode: bigint;
|
|
143
|
+
body: Cell | null;
|
|
144
|
+
code: Cell | null;
|
|
145
|
+
data: Cell | null;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export function storeSendParameters(src: SendParameters) {
|
|
149
|
+
return (builder: Builder) => {
|
|
150
|
+
let b_0 = builder;
|
|
151
|
+
b_0.storeBit(src.bounce);
|
|
152
|
+
b_0.storeAddress(src.to);
|
|
153
|
+
b_0.storeInt(src.value, 257);
|
|
154
|
+
b_0.storeInt(src.mode, 257);
|
|
155
|
+
if (src.body !== null && src.body !== undefined) { b_0.storeBit(true).storeRef(src.body); } else { b_0.storeBit(false); }
|
|
156
|
+
if (src.code !== null && src.code !== undefined) { b_0.storeBit(true).storeRef(src.code); } else { b_0.storeBit(false); }
|
|
157
|
+
if (src.data !== null && src.data !== undefined) { b_0.storeBit(true).storeRef(src.data); } else { b_0.storeBit(false); }
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function loadSendParameters(slice: Slice) {
|
|
162
|
+
let sc_0 = slice;
|
|
163
|
+
let _bounce = sc_0.loadBit();
|
|
164
|
+
let _to = sc_0.loadAddress();
|
|
165
|
+
let _value = sc_0.loadIntBig(257);
|
|
166
|
+
let _mode = sc_0.loadIntBig(257);
|
|
167
|
+
let _body = sc_0.loadBit() ? sc_0.loadRef() : null;
|
|
168
|
+
let _code = sc_0.loadBit() ? sc_0.loadRef() : null;
|
|
169
|
+
let _data = sc_0.loadBit() ? sc_0.loadRef() : null;
|
|
170
|
+
return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data };
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function loadTupleSendParameters(source: TupleReader) {
|
|
174
|
+
let _bounce = source.readBoolean();
|
|
175
|
+
let _to = source.readAddress();
|
|
176
|
+
let _value = source.readBigNumber();
|
|
177
|
+
let _mode = source.readBigNumber();
|
|
178
|
+
let _body = source.readCellOpt();
|
|
179
|
+
let _code = source.readCellOpt();
|
|
180
|
+
let _data = source.readCellOpt();
|
|
181
|
+
return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data };
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function loadGetterTupleSendParameters(source: TupleReader) {
|
|
185
|
+
let _bounce = source.readBoolean();
|
|
186
|
+
let _to = source.readAddress();
|
|
187
|
+
let _value = source.readBigNumber();
|
|
188
|
+
let _mode = source.readBigNumber();
|
|
189
|
+
let _body = source.readCellOpt();
|
|
190
|
+
let _code = source.readCellOpt();
|
|
191
|
+
let _data = source.readCellOpt();
|
|
192
|
+
return { $$type: 'SendParameters' as const, bounce: _bounce, to: _to, value: _value, mode: _mode, body: _body, code: _code, data: _data };
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function storeTupleSendParameters(source: SendParameters) {
|
|
196
|
+
let builder = new TupleBuilder();
|
|
197
|
+
builder.writeBoolean(source.bounce);
|
|
198
|
+
builder.writeAddress(source.to);
|
|
199
|
+
builder.writeNumber(source.value);
|
|
200
|
+
builder.writeNumber(source.mode);
|
|
201
|
+
builder.writeCell(source.body);
|
|
202
|
+
builder.writeCell(source.code);
|
|
203
|
+
builder.writeCell(source.data);
|
|
204
|
+
return builder.build();
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function dictValueParserSendParameters(): DictionaryValue<SendParameters> {
|
|
208
|
+
return {
|
|
209
|
+
serialize: (src, builder) => {
|
|
210
|
+
builder.storeRef(beginCell().store(storeSendParameters(src)).endCell());
|
|
211
|
+
},
|
|
212
|
+
parse: (src) => {
|
|
213
|
+
return loadSendParameters(src.loadRef().beginParse());
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type Deploy = {
|
|
219
|
+
$$type: 'Deploy';
|
|
220
|
+
queryId: bigint;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export function storeDeploy(src: Deploy) {
|
|
224
|
+
return (builder: Builder) => {
|
|
225
|
+
let b_0 = builder;
|
|
226
|
+
b_0.storeUint(2490013878, 32);
|
|
227
|
+
b_0.storeUint(src.queryId, 64);
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function loadDeploy(slice: Slice) {
|
|
232
|
+
let sc_0 = slice;
|
|
233
|
+
if (sc_0.loadUint(32) !== 2490013878) { throw Error('Invalid prefix'); }
|
|
234
|
+
let _queryId = sc_0.loadUintBig(64);
|
|
235
|
+
return { $$type: 'Deploy' as const, queryId: _queryId };
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function loadTupleDeploy(source: TupleReader) {
|
|
239
|
+
let _queryId = source.readBigNumber();
|
|
240
|
+
return { $$type: 'Deploy' as const, queryId: _queryId };
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function loadGetterTupleDeploy(source: TupleReader) {
|
|
244
|
+
let _queryId = source.readBigNumber();
|
|
245
|
+
return { $$type: 'Deploy' as const, queryId: _queryId };
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function storeTupleDeploy(source: Deploy) {
|
|
249
|
+
let builder = new TupleBuilder();
|
|
250
|
+
builder.writeNumber(source.queryId);
|
|
251
|
+
return builder.build();
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function dictValueParserDeploy(): DictionaryValue<Deploy> {
|
|
255
|
+
return {
|
|
256
|
+
serialize: (src, builder) => {
|
|
257
|
+
builder.storeRef(beginCell().store(storeDeploy(src)).endCell());
|
|
258
|
+
},
|
|
259
|
+
parse: (src) => {
|
|
260
|
+
return loadDeploy(src.loadRef().beginParse());
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type DeployOk = {
|
|
266
|
+
$$type: 'DeployOk';
|
|
267
|
+
queryId: bigint;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
export function storeDeployOk(src: DeployOk) {
|
|
271
|
+
return (builder: Builder) => {
|
|
272
|
+
let b_0 = builder;
|
|
273
|
+
b_0.storeUint(2952335191, 32);
|
|
274
|
+
b_0.storeUint(src.queryId, 64);
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function loadDeployOk(slice: Slice) {
|
|
279
|
+
let sc_0 = slice;
|
|
280
|
+
if (sc_0.loadUint(32) !== 2952335191) { throw Error('Invalid prefix'); }
|
|
281
|
+
let _queryId = sc_0.loadUintBig(64);
|
|
282
|
+
return { $$type: 'DeployOk' as const, queryId: _queryId };
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
function loadTupleDeployOk(source: TupleReader) {
|
|
286
|
+
let _queryId = source.readBigNumber();
|
|
287
|
+
return { $$type: 'DeployOk' as const, queryId: _queryId };
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
function loadGetterTupleDeployOk(source: TupleReader) {
|
|
291
|
+
let _queryId = source.readBigNumber();
|
|
292
|
+
return { $$type: 'DeployOk' as const, queryId: _queryId };
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function storeTupleDeployOk(source: DeployOk) {
|
|
296
|
+
let builder = new TupleBuilder();
|
|
297
|
+
builder.writeNumber(source.queryId);
|
|
298
|
+
return builder.build();
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function dictValueParserDeployOk(): DictionaryValue<DeployOk> {
|
|
302
|
+
return {
|
|
303
|
+
serialize: (src, builder) => {
|
|
304
|
+
builder.storeRef(beginCell().store(storeDeployOk(src)).endCell());
|
|
305
|
+
},
|
|
306
|
+
parse: (src) => {
|
|
307
|
+
return loadDeployOk(src.loadRef().beginParse());
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export type FactoryDeploy = {
|
|
313
|
+
$$type: 'FactoryDeploy';
|
|
314
|
+
queryId: bigint;
|
|
315
|
+
cashback: Address;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export function storeFactoryDeploy(src: FactoryDeploy) {
|
|
319
|
+
return (builder: Builder) => {
|
|
320
|
+
let b_0 = builder;
|
|
321
|
+
b_0.storeUint(1829761339, 32);
|
|
322
|
+
b_0.storeUint(src.queryId, 64);
|
|
323
|
+
b_0.storeAddress(src.cashback);
|
|
324
|
+
};
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export function loadFactoryDeploy(slice: Slice) {
|
|
328
|
+
let sc_0 = slice;
|
|
329
|
+
if (sc_0.loadUint(32) !== 1829761339) { throw Error('Invalid prefix'); }
|
|
330
|
+
let _queryId = sc_0.loadUintBig(64);
|
|
331
|
+
let _cashback = sc_0.loadAddress();
|
|
332
|
+
return { $$type: 'FactoryDeploy' as const, queryId: _queryId, cashback: _cashback };
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
function loadTupleFactoryDeploy(source: TupleReader) {
|
|
336
|
+
let _queryId = source.readBigNumber();
|
|
337
|
+
let _cashback = source.readAddress();
|
|
338
|
+
return { $$type: 'FactoryDeploy' as const, queryId: _queryId, cashback: _cashback };
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
function loadGetterTupleFactoryDeploy(source: TupleReader) {
|
|
342
|
+
let _queryId = source.readBigNumber();
|
|
343
|
+
let _cashback = source.readAddress();
|
|
344
|
+
return { $$type: 'FactoryDeploy' as const, queryId: _queryId, cashback: _cashback };
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
function storeTupleFactoryDeploy(source: FactoryDeploy) {
|
|
348
|
+
let builder = new TupleBuilder();
|
|
349
|
+
builder.writeNumber(source.queryId);
|
|
350
|
+
builder.writeAddress(source.cashback);
|
|
351
|
+
return builder.build();
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
function dictValueParserFactoryDeploy(): DictionaryValue<FactoryDeploy> {
|
|
355
|
+
return {
|
|
356
|
+
serialize: (src, builder) => {
|
|
357
|
+
builder.storeRef(beginCell().store(storeFactoryDeploy(src)).endCell());
|
|
358
|
+
},
|
|
359
|
+
parse: (src) => {
|
|
360
|
+
return loadFactoryDeploy(src.loadRef().beginParse());
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
export type SimpleNftCollectionV2$Data = {
|
|
366
|
+
$$type: 'SimpleNftCollectionV2$Data';
|
|
367
|
+
next_item_index: bigint;
|
|
368
|
+
collection_index: bigint;
|
|
369
|
+
owner_address: Address | null;
|
|
370
|
+
master_address: Address;
|
|
371
|
+
royalty_params: RoyaltyParams | null;
|
|
372
|
+
collection_content: Cell | null;
|
|
373
|
+
individual_content_url: Cell | null;
|
|
374
|
+
mint_limit: bigint;
|
|
375
|
+
price: bigint;
|
|
376
|
+
is_setup: boolean;
|
|
377
|
+
is_sbt: bigint;
|
|
378
|
+
mint_time_limit: bigint;
|
|
379
|
+
enable_profile: boolean;
|
|
380
|
+
user_item_limit: bigint;
|
|
381
|
+
enable_whitelist: boolean;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
export function storeSimpleNftCollectionV2$Data(src: SimpleNftCollectionV2$Data) {
|
|
385
|
+
return (builder: Builder) => {
|
|
386
|
+
let b_0 = builder;
|
|
387
|
+
b_0.storeUint(src.next_item_index, 32);
|
|
388
|
+
b_0.storeUint(src.collection_index, 32);
|
|
389
|
+
b_0.storeAddress(src.owner_address);
|
|
390
|
+
b_0.storeAddress(src.master_address);
|
|
391
|
+
let b_1 = new Builder();
|
|
392
|
+
if (src.royalty_params !== null && src.royalty_params !== undefined) { b_1.storeBit(true); b_1.store(storeRoyaltyParams(src.royalty_params)); } else { b_1.storeBit(false); }
|
|
393
|
+
if (src.collection_content !== null && src.collection_content !== undefined) { b_1.storeBit(true).storeRef(src.collection_content); } else { b_1.storeBit(false); }
|
|
394
|
+
if (src.individual_content_url !== null && src.individual_content_url !== undefined) { b_1.storeBit(true).storeRef(src.individual_content_url); } else { b_1.storeBit(false); }
|
|
395
|
+
b_1.storeUint(src.mint_limit, 32);
|
|
396
|
+
let b_2 = new Builder();
|
|
397
|
+
b_2.storeInt(src.price, 257);
|
|
398
|
+
b_2.storeBit(src.is_setup);
|
|
399
|
+
b_2.storeInt(src.is_sbt, 257);
|
|
400
|
+
b_2.storeUint(src.mint_time_limit, 32);
|
|
401
|
+
b_2.storeBit(src.enable_profile);
|
|
402
|
+
b_2.storeUint(src.user_item_limit, 8);
|
|
403
|
+
b_2.storeBit(src.enable_whitelist);
|
|
404
|
+
b_1.storeRef(b_2.endCell());
|
|
405
|
+
b_0.storeRef(b_1.endCell());
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export function loadSimpleNftCollectionV2$Data(slice: Slice) {
|
|
410
|
+
let sc_0 = slice;
|
|
411
|
+
let _next_item_index = sc_0.loadUintBig(32);
|
|
412
|
+
let _collection_index = sc_0.loadUintBig(32);
|
|
413
|
+
let _owner_address = sc_0.loadMaybeAddress();
|
|
414
|
+
let _master_address = sc_0.loadAddress();
|
|
415
|
+
let sc_1 = sc_0.loadRef().beginParse();
|
|
416
|
+
let _royalty_params = sc_1.loadBit() ? loadRoyaltyParams(sc_1) : null;
|
|
417
|
+
let _collection_content = sc_1.loadBit() ? sc_1.loadRef() : null;
|
|
418
|
+
let _individual_content_url = sc_1.loadBit() ? sc_1.loadRef() : null;
|
|
419
|
+
let _mint_limit = sc_1.loadUintBig(32);
|
|
420
|
+
let sc_2 = sc_1.loadRef().beginParse();
|
|
421
|
+
let _price = sc_2.loadIntBig(257);
|
|
422
|
+
let _is_setup = sc_2.loadBit();
|
|
423
|
+
let _is_sbt = sc_2.loadIntBig(257);
|
|
424
|
+
let _mint_time_limit = sc_2.loadUintBig(32);
|
|
425
|
+
let _enable_profile = sc_2.loadBit();
|
|
426
|
+
let _user_item_limit = sc_2.loadUintBig(8);
|
|
427
|
+
let _enable_whitelist = sc_2.loadBit();
|
|
428
|
+
return { $$type: 'SimpleNftCollectionV2$Data' as const, next_item_index: _next_item_index, collection_index: _collection_index, owner_address: _owner_address, master_address: _master_address, royalty_params: _royalty_params, collection_content: _collection_content, individual_content_url: _individual_content_url, mint_limit: _mint_limit, price: _price, is_setup: _is_setup, is_sbt: _is_sbt, mint_time_limit: _mint_time_limit, enable_profile: _enable_profile, user_item_limit: _user_item_limit, enable_whitelist: _enable_whitelist };
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function loadTupleSimpleNftCollectionV2$Data(source: TupleReader) {
|
|
432
|
+
let _next_item_index = source.readBigNumber();
|
|
433
|
+
let _collection_index = source.readBigNumber();
|
|
434
|
+
let _owner_address = source.readAddressOpt();
|
|
435
|
+
let _master_address = source.readAddress();
|
|
436
|
+
const _royalty_params_p = source.readTupleOpt();
|
|
437
|
+
const _royalty_params = _royalty_params_p ? loadTupleRoyaltyParams(_royalty_params_p) : null;
|
|
438
|
+
let _collection_content = source.readCellOpt();
|
|
439
|
+
let _individual_content_url = source.readCellOpt();
|
|
440
|
+
let _mint_limit = source.readBigNumber();
|
|
441
|
+
let _price = source.readBigNumber();
|
|
442
|
+
let _is_setup = source.readBoolean();
|
|
443
|
+
let _is_sbt = source.readBigNumber();
|
|
444
|
+
let _mint_time_limit = source.readBigNumber();
|
|
445
|
+
let _enable_profile = source.readBoolean();
|
|
446
|
+
let _user_item_limit = source.readBigNumber();
|
|
447
|
+
let _enable_whitelist = source.readBoolean();
|
|
448
|
+
return { $$type: 'SimpleNftCollectionV2$Data' as const, next_item_index: _next_item_index, collection_index: _collection_index, owner_address: _owner_address, master_address: _master_address, royalty_params: _royalty_params, collection_content: _collection_content, individual_content_url: _individual_content_url, mint_limit: _mint_limit, price: _price, is_setup: _is_setup, is_sbt: _is_sbt, mint_time_limit: _mint_time_limit, enable_profile: _enable_profile, user_item_limit: _user_item_limit, enable_whitelist: _enable_whitelist };
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
function loadGetterTupleSimpleNftCollectionV2$Data(source: TupleReader) {
|
|
452
|
+
let _next_item_index = source.readBigNumber();
|
|
453
|
+
let _collection_index = source.readBigNumber();
|
|
454
|
+
let _owner_address = source.readAddressOpt();
|
|
455
|
+
let _master_address = source.readAddress();
|
|
456
|
+
const _royalty_params_p = source.readTupleOpt();
|
|
457
|
+
const _royalty_params = _royalty_params_p ? loadTupleRoyaltyParams(_royalty_params_p) : null;
|
|
458
|
+
let _collection_content = source.readCellOpt();
|
|
459
|
+
let _individual_content_url = source.readCellOpt();
|
|
460
|
+
let _mint_limit = source.readBigNumber();
|
|
461
|
+
let _price = source.readBigNumber();
|
|
462
|
+
let _is_setup = source.readBoolean();
|
|
463
|
+
let _is_sbt = source.readBigNumber();
|
|
464
|
+
let _mint_time_limit = source.readBigNumber();
|
|
465
|
+
let _enable_profile = source.readBoolean();
|
|
466
|
+
let _user_item_limit = source.readBigNumber();
|
|
467
|
+
let _enable_whitelist = source.readBoolean();
|
|
468
|
+
return { $$type: 'SimpleNftCollectionV2$Data' as const, next_item_index: _next_item_index, collection_index: _collection_index, owner_address: _owner_address, master_address: _master_address, royalty_params: _royalty_params, collection_content: _collection_content, individual_content_url: _individual_content_url, mint_limit: _mint_limit, price: _price, is_setup: _is_setup, is_sbt: _is_sbt, mint_time_limit: _mint_time_limit, enable_profile: _enable_profile, user_item_limit: _user_item_limit, enable_whitelist: _enable_whitelist };
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function storeTupleSimpleNftCollectionV2$Data(source: SimpleNftCollectionV2$Data) {
|
|
472
|
+
let builder = new TupleBuilder();
|
|
473
|
+
builder.writeNumber(source.next_item_index);
|
|
474
|
+
builder.writeNumber(source.collection_index);
|
|
475
|
+
builder.writeAddress(source.owner_address);
|
|
476
|
+
builder.writeAddress(source.master_address);
|
|
477
|
+
if (source.royalty_params !== null && source.royalty_params !== undefined) {
|
|
478
|
+
builder.writeTuple(storeTupleRoyaltyParams(source.royalty_params));
|
|
479
|
+
} else {
|
|
480
|
+
builder.writeTuple(null);
|
|
481
|
+
}
|
|
482
|
+
builder.writeCell(source.collection_content);
|
|
483
|
+
builder.writeCell(source.individual_content_url);
|
|
484
|
+
builder.writeNumber(source.mint_limit);
|
|
485
|
+
builder.writeNumber(source.price);
|
|
486
|
+
builder.writeBoolean(source.is_setup);
|
|
487
|
+
builder.writeNumber(source.is_sbt);
|
|
488
|
+
builder.writeNumber(source.mint_time_limit);
|
|
489
|
+
builder.writeBoolean(source.enable_profile);
|
|
490
|
+
builder.writeNumber(source.user_item_limit);
|
|
491
|
+
builder.writeBoolean(source.enable_whitelist);
|
|
492
|
+
return builder.build();
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function dictValueParserSimpleNftCollectionV2$Data(): DictionaryValue<SimpleNftCollectionV2$Data> {
|
|
496
|
+
return {
|
|
497
|
+
serialize: (src, builder) => {
|
|
498
|
+
builder.storeRef(beginCell().store(storeSimpleNftCollectionV2$Data(src)).endCell());
|
|
499
|
+
},
|
|
500
|
+
parse: (src) => {
|
|
501
|
+
return loadSimpleNftCollectionV2$Data(src.loadRef().beginParse());
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
export type LogEventMintRecord = {
|
|
507
|
+
$$type: 'LogEventMintRecord';
|
|
508
|
+
minter: Address;
|
|
509
|
+
item_id: bigint;
|
|
510
|
+
generate_number: bigint;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export function storeLogEventMintRecord(src: LogEventMintRecord) {
|
|
514
|
+
return (builder: Builder) => {
|
|
515
|
+
let b_0 = builder;
|
|
516
|
+
b_0.storeUint(2743565669, 32);
|
|
517
|
+
b_0.storeAddress(src.minter);
|
|
518
|
+
b_0.storeInt(src.item_id, 257);
|
|
519
|
+
b_0.storeInt(src.generate_number, 257);
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
export function loadLogEventMintRecord(slice: Slice) {
|
|
524
|
+
let sc_0 = slice;
|
|
525
|
+
if (sc_0.loadUint(32) !== 2743565669) { throw Error('Invalid prefix'); }
|
|
526
|
+
let _minter = sc_0.loadAddress();
|
|
527
|
+
let _item_id = sc_0.loadIntBig(257);
|
|
528
|
+
let _generate_number = sc_0.loadIntBig(257);
|
|
529
|
+
return { $$type: 'LogEventMintRecord' as const, minter: _minter, item_id: _item_id, generate_number: _generate_number };
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
function loadTupleLogEventMintRecord(source: TupleReader) {
|
|
533
|
+
let _minter = source.readAddress();
|
|
534
|
+
let _item_id = source.readBigNumber();
|
|
535
|
+
let _generate_number = source.readBigNumber();
|
|
536
|
+
return { $$type: 'LogEventMintRecord' as const, minter: _minter, item_id: _item_id, generate_number: _generate_number };
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
function loadGetterTupleLogEventMintRecord(source: TupleReader) {
|
|
540
|
+
let _minter = source.readAddress();
|
|
541
|
+
let _item_id = source.readBigNumber();
|
|
542
|
+
let _generate_number = source.readBigNumber();
|
|
543
|
+
return { $$type: 'LogEventMintRecord' as const, minter: _minter, item_id: _item_id, generate_number: _generate_number };
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
function storeTupleLogEventMintRecord(source: LogEventMintRecord) {
|
|
547
|
+
let builder = new TupleBuilder();
|
|
548
|
+
builder.writeAddress(source.minter);
|
|
549
|
+
builder.writeNumber(source.item_id);
|
|
550
|
+
builder.writeNumber(source.generate_number);
|
|
551
|
+
return builder.build();
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function dictValueParserLogEventMintRecord(): DictionaryValue<LogEventMintRecord> {
|
|
555
|
+
return {
|
|
556
|
+
serialize: (src, builder) => {
|
|
557
|
+
builder.storeRef(beginCell().store(storeLogEventMintRecord(src)).endCell());
|
|
558
|
+
},
|
|
559
|
+
parse: (src) => {
|
|
560
|
+
return loadLogEventMintRecord(src.loadRef().beginParse());
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
export type GetRoyaltyParams = {
|
|
566
|
+
$$type: 'GetRoyaltyParams';
|
|
567
|
+
query_id: bigint;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
export function storeGetRoyaltyParams(src: GetRoyaltyParams) {
|
|
571
|
+
return (builder: Builder) => {
|
|
572
|
+
let b_0 = builder;
|
|
573
|
+
b_0.storeUint(1765620048, 32);
|
|
574
|
+
b_0.storeUint(src.query_id, 64);
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
export function loadGetRoyaltyParams(slice: Slice) {
|
|
579
|
+
let sc_0 = slice;
|
|
580
|
+
if (sc_0.loadUint(32) !== 1765620048) { throw Error('Invalid prefix'); }
|
|
581
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
582
|
+
return { $$type: 'GetRoyaltyParams' as const, query_id: _query_id };
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
function loadTupleGetRoyaltyParams(source: TupleReader) {
|
|
586
|
+
let _query_id = source.readBigNumber();
|
|
587
|
+
return { $$type: 'GetRoyaltyParams' as const, query_id: _query_id };
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
function loadGetterTupleGetRoyaltyParams(source: TupleReader) {
|
|
591
|
+
let _query_id = source.readBigNumber();
|
|
592
|
+
return { $$type: 'GetRoyaltyParams' as const, query_id: _query_id };
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
function storeTupleGetRoyaltyParams(source: GetRoyaltyParams) {
|
|
596
|
+
let builder = new TupleBuilder();
|
|
597
|
+
builder.writeNumber(source.query_id);
|
|
598
|
+
return builder.build();
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
function dictValueParserGetRoyaltyParams(): DictionaryValue<GetRoyaltyParams> {
|
|
602
|
+
return {
|
|
603
|
+
serialize: (src, builder) => {
|
|
604
|
+
builder.storeRef(beginCell().store(storeGetRoyaltyParams(src)).endCell());
|
|
605
|
+
},
|
|
606
|
+
parse: (src) => {
|
|
607
|
+
return loadGetRoyaltyParams(src.loadRef().beginParse());
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
export type GetProfile = {
|
|
613
|
+
$$type: 'GetProfile';
|
|
614
|
+
query_id: bigint;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
export function storeGetProfile(src: GetProfile) {
|
|
618
|
+
return (builder: Builder) => {
|
|
619
|
+
let b_0 = builder;
|
|
620
|
+
b_0.storeUint(3300596689, 32);
|
|
621
|
+
b_0.storeUint(src.query_id, 64);
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
export function loadGetProfile(slice: Slice) {
|
|
626
|
+
let sc_0 = slice;
|
|
627
|
+
if (sc_0.loadUint(32) !== 3300596689) { throw Error('Invalid prefix'); }
|
|
628
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
629
|
+
return { $$type: 'GetProfile' as const, query_id: _query_id };
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
function loadTupleGetProfile(source: TupleReader) {
|
|
633
|
+
let _query_id = source.readBigNumber();
|
|
634
|
+
return { $$type: 'GetProfile' as const, query_id: _query_id };
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
function loadGetterTupleGetProfile(source: TupleReader) {
|
|
638
|
+
let _query_id = source.readBigNumber();
|
|
639
|
+
return { $$type: 'GetProfile' as const, query_id: _query_id };
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
function storeTupleGetProfile(source: GetProfile) {
|
|
643
|
+
let builder = new TupleBuilder();
|
|
644
|
+
builder.writeNumber(source.query_id);
|
|
645
|
+
return builder.build();
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
function dictValueParserGetProfile(): DictionaryValue<GetProfile> {
|
|
649
|
+
return {
|
|
650
|
+
serialize: (src, builder) => {
|
|
651
|
+
builder.storeRef(beginCell().store(storeGetProfile(src)).endCell());
|
|
652
|
+
},
|
|
653
|
+
parse: (src) => {
|
|
654
|
+
return loadGetProfile(src.loadRef().beginParse());
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
export type ReportRoyaltyParams = {
|
|
660
|
+
$$type: 'ReportRoyaltyParams';
|
|
661
|
+
query_id: bigint;
|
|
662
|
+
numerator: bigint;
|
|
663
|
+
denominator: bigint;
|
|
664
|
+
destination: Address;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
export function storeReportRoyaltyParams(src: ReportRoyaltyParams) {
|
|
668
|
+
return (builder: Builder) => {
|
|
669
|
+
let b_0 = builder;
|
|
670
|
+
b_0.storeUint(2831876269, 32);
|
|
671
|
+
b_0.storeUint(src.query_id, 64);
|
|
672
|
+
b_0.storeUint(src.numerator, 16);
|
|
673
|
+
b_0.storeUint(src.denominator, 16);
|
|
674
|
+
b_0.storeAddress(src.destination);
|
|
675
|
+
};
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
export function loadReportRoyaltyParams(slice: Slice) {
|
|
679
|
+
let sc_0 = slice;
|
|
680
|
+
if (sc_0.loadUint(32) !== 2831876269) { throw Error('Invalid prefix'); }
|
|
681
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
682
|
+
let _numerator = sc_0.loadUintBig(16);
|
|
683
|
+
let _denominator = sc_0.loadUintBig(16);
|
|
684
|
+
let _destination = sc_0.loadAddress();
|
|
685
|
+
return { $$type: 'ReportRoyaltyParams' as const, query_id: _query_id, numerator: _numerator, denominator: _denominator, destination: _destination };
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
function loadTupleReportRoyaltyParams(source: TupleReader) {
|
|
689
|
+
let _query_id = source.readBigNumber();
|
|
690
|
+
let _numerator = source.readBigNumber();
|
|
691
|
+
let _denominator = source.readBigNumber();
|
|
692
|
+
let _destination = source.readAddress();
|
|
693
|
+
return { $$type: 'ReportRoyaltyParams' as const, query_id: _query_id, numerator: _numerator, denominator: _denominator, destination: _destination };
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
function loadGetterTupleReportRoyaltyParams(source: TupleReader) {
|
|
697
|
+
let _query_id = source.readBigNumber();
|
|
698
|
+
let _numerator = source.readBigNumber();
|
|
699
|
+
let _denominator = source.readBigNumber();
|
|
700
|
+
let _destination = source.readAddress();
|
|
701
|
+
return { $$type: 'ReportRoyaltyParams' as const, query_id: _query_id, numerator: _numerator, denominator: _denominator, destination: _destination };
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
function storeTupleReportRoyaltyParams(source: ReportRoyaltyParams) {
|
|
705
|
+
let builder = new TupleBuilder();
|
|
706
|
+
builder.writeNumber(source.query_id);
|
|
707
|
+
builder.writeNumber(source.numerator);
|
|
708
|
+
builder.writeNumber(source.denominator);
|
|
709
|
+
builder.writeAddress(source.destination);
|
|
710
|
+
return builder.build();
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function dictValueParserReportRoyaltyParams(): DictionaryValue<ReportRoyaltyParams> {
|
|
714
|
+
return {
|
|
715
|
+
serialize: (src, builder) => {
|
|
716
|
+
builder.storeRef(beginCell().store(storeReportRoyaltyParams(src)).endCell());
|
|
717
|
+
},
|
|
718
|
+
parse: (src) => {
|
|
719
|
+
return loadReportRoyaltyParams(src.loadRef().beginParse());
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
export type CollectionData = {
|
|
725
|
+
$$type: 'CollectionData';
|
|
726
|
+
next_item_index: bigint;
|
|
727
|
+
collection_content: Cell;
|
|
728
|
+
owner_address: Address;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
export function storeCollectionData(src: CollectionData) {
|
|
732
|
+
return (builder: Builder) => {
|
|
733
|
+
let b_0 = builder;
|
|
734
|
+
b_0.storeInt(src.next_item_index, 257);
|
|
735
|
+
b_0.storeRef(src.collection_content);
|
|
736
|
+
b_0.storeAddress(src.owner_address);
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
export function loadCollectionData(slice: Slice) {
|
|
741
|
+
let sc_0 = slice;
|
|
742
|
+
let _next_item_index = sc_0.loadIntBig(257);
|
|
743
|
+
let _collection_content = sc_0.loadRef();
|
|
744
|
+
let _owner_address = sc_0.loadAddress();
|
|
745
|
+
return { $$type: 'CollectionData' as const, next_item_index: _next_item_index, collection_content: _collection_content, owner_address: _owner_address };
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
function loadTupleCollectionData(source: TupleReader) {
|
|
749
|
+
let _next_item_index = source.readBigNumber();
|
|
750
|
+
let _collection_content = source.readCell();
|
|
751
|
+
let _owner_address = source.readAddress();
|
|
752
|
+
return { $$type: 'CollectionData' as const, next_item_index: _next_item_index, collection_content: _collection_content, owner_address: _owner_address };
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
function loadGetterTupleCollectionData(source: TupleReader) {
|
|
756
|
+
let _next_item_index = source.readBigNumber();
|
|
757
|
+
let _collection_content = source.readCell();
|
|
758
|
+
let _owner_address = source.readAddress();
|
|
759
|
+
return { $$type: 'CollectionData' as const, next_item_index: _next_item_index, collection_content: _collection_content, owner_address: _owner_address };
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
function storeTupleCollectionData(source: CollectionData) {
|
|
763
|
+
let builder = new TupleBuilder();
|
|
764
|
+
builder.writeNumber(source.next_item_index);
|
|
765
|
+
builder.writeCell(source.collection_content);
|
|
766
|
+
builder.writeAddress(source.owner_address);
|
|
767
|
+
return builder.build();
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
function dictValueParserCollectionData(): DictionaryValue<CollectionData> {
|
|
771
|
+
return {
|
|
772
|
+
serialize: (src, builder) => {
|
|
773
|
+
builder.storeRef(beginCell().store(storeCollectionData(src)).endCell());
|
|
774
|
+
},
|
|
775
|
+
parse: (src) => {
|
|
776
|
+
return loadCollectionData(src.loadRef().beginParse());
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export type RoyaltyParams = {
|
|
782
|
+
$$type: 'RoyaltyParams';
|
|
783
|
+
numerator: bigint;
|
|
784
|
+
denominator: bigint;
|
|
785
|
+
destination: Address;
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
export function storeRoyaltyParams(src: RoyaltyParams) {
|
|
789
|
+
return (builder: Builder) => {
|
|
790
|
+
let b_0 = builder;
|
|
791
|
+
b_0.storeInt(src.numerator, 257);
|
|
792
|
+
b_0.storeInt(src.denominator, 257);
|
|
793
|
+
b_0.storeAddress(src.destination);
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
|
|
797
|
+
export function loadRoyaltyParams(slice: Slice) {
|
|
798
|
+
let sc_0 = slice;
|
|
799
|
+
let _numerator = sc_0.loadIntBig(257);
|
|
800
|
+
let _denominator = sc_0.loadIntBig(257);
|
|
801
|
+
let _destination = sc_0.loadAddress();
|
|
802
|
+
return { $$type: 'RoyaltyParams' as const, numerator: _numerator, denominator: _denominator, destination: _destination };
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
function loadTupleRoyaltyParams(source: TupleReader) {
|
|
806
|
+
let _numerator = source.readBigNumber();
|
|
807
|
+
let _denominator = source.readBigNumber();
|
|
808
|
+
let _destination = source.readAddress();
|
|
809
|
+
return { $$type: 'RoyaltyParams' as const, numerator: _numerator, denominator: _denominator, destination: _destination };
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
function loadGetterTupleRoyaltyParams(source: TupleReader) {
|
|
813
|
+
let _numerator = source.readBigNumber();
|
|
814
|
+
let _denominator = source.readBigNumber();
|
|
815
|
+
let _destination = source.readAddress();
|
|
816
|
+
return { $$type: 'RoyaltyParams' as const, numerator: _numerator, denominator: _denominator, destination: _destination };
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
function storeTupleRoyaltyParams(source: RoyaltyParams) {
|
|
820
|
+
let builder = new TupleBuilder();
|
|
821
|
+
builder.writeNumber(source.numerator);
|
|
822
|
+
builder.writeNumber(source.denominator);
|
|
823
|
+
builder.writeAddress(source.destination);
|
|
824
|
+
return builder.build();
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
function dictValueParserRoyaltyParams(): DictionaryValue<RoyaltyParams> {
|
|
828
|
+
return {
|
|
829
|
+
serialize: (src, builder) => {
|
|
830
|
+
builder.storeRef(beginCell().store(storeRoyaltyParams(src)).endCell());
|
|
831
|
+
},
|
|
832
|
+
parse: (src) => {
|
|
833
|
+
return loadRoyaltyParams(src.loadRef().beginParse());
|
|
834
|
+
}
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
export type CollectionSetupParams = {
|
|
839
|
+
$$type: 'CollectionSetupParams';
|
|
840
|
+
owner_address: Address;
|
|
841
|
+
master_address: Address;
|
|
842
|
+
collection_content: Cell;
|
|
843
|
+
nft_individual_content_url: Cell;
|
|
844
|
+
royalty_params: RoyaltyParams;
|
|
845
|
+
mint_limit: bigint;
|
|
846
|
+
nft_price: bigint;
|
|
847
|
+
mint_time_limit: bigint;
|
|
848
|
+
is_sbt: bigint;
|
|
849
|
+
enable_profile: boolean;
|
|
850
|
+
enable_whitelist: boolean;
|
|
851
|
+
user_item_limit: bigint;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
export function storeCollectionSetupParams(src: CollectionSetupParams) {
|
|
855
|
+
return (builder: Builder) => {
|
|
856
|
+
let b_0 = builder;
|
|
857
|
+
b_0.storeUint(3320246811, 32);
|
|
858
|
+
b_0.storeAddress(src.owner_address);
|
|
859
|
+
b_0.storeAddress(src.master_address);
|
|
860
|
+
b_0.storeRef(src.collection_content);
|
|
861
|
+
b_0.storeRef(src.nft_individual_content_url);
|
|
862
|
+
let b_1 = new Builder();
|
|
863
|
+
b_1.store(storeRoyaltyParams(src.royalty_params));
|
|
864
|
+
let b_2 = new Builder();
|
|
865
|
+
b_2.storeInt(src.mint_limit, 257);
|
|
866
|
+
b_2.storeInt(src.nft_price, 257);
|
|
867
|
+
b_2.storeInt(src.mint_time_limit, 257);
|
|
868
|
+
let b_3 = new Builder();
|
|
869
|
+
b_3.storeInt(src.is_sbt, 257);
|
|
870
|
+
b_3.storeBit(src.enable_profile);
|
|
871
|
+
b_3.storeBit(src.enable_whitelist);
|
|
872
|
+
b_3.storeInt(src.user_item_limit, 257);
|
|
873
|
+
b_2.storeRef(b_3.endCell());
|
|
874
|
+
b_1.storeRef(b_2.endCell());
|
|
875
|
+
b_0.storeRef(b_1.endCell());
|
|
876
|
+
};
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
export function loadCollectionSetupParams(slice: Slice) {
|
|
880
|
+
let sc_0 = slice;
|
|
881
|
+
if (sc_0.loadUint(32) !== 3320246811) { throw Error('Invalid prefix'); }
|
|
882
|
+
let _owner_address = sc_0.loadAddress();
|
|
883
|
+
let _master_address = sc_0.loadAddress();
|
|
884
|
+
let _collection_content = sc_0.loadRef();
|
|
885
|
+
let _nft_individual_content_url = sc_0.loadRef();
|
|
886
|
+
let sc_1 = sc_0.loadRef().beginParse();
|
|
887
|
+
let _royalty_params = loadRoyaltyParams(sc_1);
|
|
888
|
+
let sc_2 = sc_1.loadRef().beginParse();
|
|
889
|
+
let _mint_limit = sc_2.loadIntBig(257);
|
|
890
|
+
let _nft_price = sc_2.loadIntBig(257);
|
|
891
|
+
let _mint_time_limit = sc_2.loadIntBig(257);
|
|
892
|
+
let sc_3 = sc_2.loadRef().beginParse();
|
|
893
|
+
let _is_sbt = sc_3.loadIntBig(257);
|
|
894
|
+
let _enable_profile = sc_3.loadBit();
|
|
895
|
+
let _enable_whitelist = sc_3.loadBit();
|
|
896
|
+
let _user_item_limit = sc_3.loadIntBig(257);
|
|
897
|
+
return { $$type: 'CollectionSetupParams' as const, owner_address: _owner_address, master_address: _master_address, collection_content: _collection_content, nft_individual_content_url: _nft_individual_content_url, royalty_params: _royalty_params, mint_limit: _mint_limit, nft_price: _nft_price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, enable_profile: _enable_profile, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
function loadTupleCollectionSetupParams(source: TupleReader) {
|
|
901
|
+
let _owner_address = source.readAddress();
|
|
902
|
+
let _master_address = source.readAddress();
|
|
903
|
+
let _collection_content = source.readCell();
|
|
904
|
+
let _nft_individual_content_url = source.readCell();
|
|
905
|
+
const _royalty_params = loadTupleRoyaltyParams(source);
|
|
906
|
+
let _mint_limit = source.readBigNumber();
|
|
907
|
+
let _nft_price = source.readBigNumber();
|
|
908
|
+
let _mint_time_limit = source.readBigNumber();
|
|
909
|
+
let _is_sbt = source.readBigNumber();
|
|
910
|
+
let _enable_profile = source.readBoolean();
|
|
911
|
+
let _enable_whitelist = source.readBoolean();
|
|
912
|
+
let _user_item_limit = source.readBigNumber();
|
|
913
|
+
return { $$type: 'CollectionSetupParams' as const, owner_address: _owner_address, master_address: _master_address, collection_content: _collection_content, nft_individual_content_url: _nft_individual_content_url, royalty_params: _royalty_params, mint_limit: _mint_limit, nft_price: _nft_price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, enable_profile: _enable_profile, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
function loadGetterTupleCollectionSetupParams(source: TupleReader) {
|
|
917
|
+
let _owner_address = source.readAddress();
|
|
918
|
+
let _master_address = source.readAddress();
|
|
919
|
+
let _collection_content = source.readCell();
|
|
920
|
+
let _nft_individual_content_url = source.readCell();
|
|
921
|
+
const _royalty_params = loadGetterTupleRoyaltyParams(source);
|
|
922
|
+
let _mint_limit = source.readBigNumber();
|
|
923
|
+
let _nft_price = source.readBigNumber();
|
|
924
|
+
let _mint_time_limit = source.readBigNumber();
|
|
925
|
+
let _is_sbt = source.readBigNumber();
|
|
926
|
+
let _enable_profile = source.readBoolean();
|
|
927
|
+
let _enable_whitelist = source.readBoolean();
|
|
928
|
+
let _user_item_limit = source.readBigNumber();
|
|
929
|
+
return { $$type: 'CollectionSetupParams' as const, owner_address: _owner_address, master_address: _master_address, collection_content: _collection_content, nft_individual_content_url: _nft_individual_content_url, royalty_params: _royalty_params, mint_limit: _mint_limit, nft_price: _nft_price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, enable_profile: _enable_profile, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
function storeTupleCollectionSetupParams(source: CollectionSetupParams) {
|
|
933
|
+
let builder = new TupleBuilder();
|
|
934
|
+
builder.writeAddress(source.owner_address);
|
|
935
|
+
builder.writeAddress(source.master_address);
|
|
936
|
+
builder.writeCell(source.collection_content);
|
|
937
|
+
builder.writeCell(source.nft_individual_content_url);
|
|
938
|
+
builder.writeTuple(storeTupleRoyaltyParams(source.royalty_params));
|
|
939
|
+
builder.writeNumber(source.mint_limit);
|
|
940
|
+
builder.writeNumber(source.nft_price);
|
|
941
|
+
builder.writeNumber(source.mint_time_limit);
|
|
942
|
+
builder.writeNumber(source.is_sbt);
|
|
943
|
+
builder.writeBoolean(source.enable_profile);
|
|
944
|
+
builder.writeBoolean(source.enable_whitelist);
|
|
945
|
+
builder.writeNumber(source.user_item_limit);
|
|
946
|
+
return builder.build();
|
|
947
|
+
}
|
|
948
|
+
|
|
949
|
+
function dictValueParserCollectionSetupParams(): DictionaryValue<CollectionSetupParams> {
|
|
950
|
+
return {
|
|
951
|
+
serialize: (src, builder) => {
|
|
952
|
+
builder.storeRef(beginCell().store(storeCollectionSetupParams(src)).endCell());
|
|
953
|
+
},
|
|
954
|
+
parse: (src) => {
|
|
955
|
+
return loadCollectionSetupParams(src.loadRef().beginParse());
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
export type UpdateWhiteList = {
|
|
961
|
+
$$type: 'UpdateWhiteList';
|
|
962
|
+
user: Address;
|
|
963
|
+
whitelist: boolean;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
export function storeUpdateWhiteList(src: UpdateWhiteList) {
|
|
967
|
+
return (builder: Builder) => {
|
|
968
|
+
let b_0 = builder;
|
|
969
|
+
b_0.storeUint(2983121044, 32);
|
|
970
|
+
b_0.storeAddress(src.user);
|
|
971
|
+
b_0.storeBit(src.whitelist);
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
export function loadUpdateWhiteList(slice: Slice) {
|
|
976
|
+
let sc_0 = slice;
|
|
977
|
+
if (sc_0.loadUint(32) !== 2983121044) { throw Error('Invalid prefix'); }
|
|
978
|
+
let _user = sc_0.loadAddress();
|
|
979
|
+
let _whitelist = sc_0.loadBit();
|
|
980
|
+
return { $$type: 'UpdateWhiteList' as const, user: _user, whitelist: _whitelist };
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
function loadTupleUpdateWhiteList(source: TupleReader) {
|
|
984
|
+
let _user = source.readAddress();
|
|
985
|
+
let _whitelist = source.readBoolean();
|
|
986
|
+
return { $$type: 'UpdateWhiteList' as const, user: _user, whitelist: _whitelist };
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
function loadGetterTupleUpdateWhiteList(source: TupleReader) {
|
|
990
|
+
let _user = source.readAddress();
|
|
991
|
+
let _whitelist = source.readBoolean();
|
|
992
|
+
return { $$type: 'UpdateWhiteList' as const, user: _user, whitelist: _whitelist };
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
function storeTupleUpdateWhiteList(source: UpdateWhiteList) {
|
|
996
|
+
let builder = new TupleBuilder();
|
|
997
|
+
builder.writeAddress(source.user);
|
|
998
|
+
builder.writeBoolean(source.whitelist);
|
|
999
|
+
return builder.build();
|
|
1000
|
+
}
|
|
1001
|
+
|
|
1002
|
+
function dictValueParserUpdateWhiteList(): DictionaryValue<UpdateWhiteList> {
|
|
1003
|
+
return {
|
|
1004
|
+
serialize: (src, builder) => {
|
|
1005
|
+
builder.storeRef(beginCell().store(storeUpdateWhiteList(src)).endCell());
|
|
1006
|
+
},
|
|
1007
|
+
parse: (src) => {
|
|
1008
|
+
return loadUpdateWhiteList(src.loadRef().beginParse());
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
export type AddToWhiteList = {
|
|
1014
|
+
$$type: 'AddToWhiteList';
|
|
1015
|
+
add: boolean;
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
export function storeAddToWhiteList(src: AddToWhiteList) {
|
|
1019
|
+
return (builder: Builder) => {
|
|
1020
|
+
let b_0 = builder;
|
|
1021
|
+
b_0.storeUint(2854654268, 32);
|
|
1022
|
+
b_0.storeBit(src.add);
|
|
1023
|
+
};
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
export function loadAddToWhiteList(slice: Slice) {
|
|
1027
|
+
let sc_0 = slice;
|
|
1028
|
+
if (sc_0.loadUint(32) !== 2854654268) { throw Error('Invalid prefix'); }
|
|
1029
|
+
let _add = sc_0.loadBit();
|
|
1030
|
+
return { $$type: 'AddToWhiteList' as const, add: _add };
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
function loadTupleAddToWhiteList(source: TupleReader) {
|
|
1034
|
+
let _add = source.readBoolean();
|
|
1035
|
+
return { $$type: 'AddToWhiteList' as const, add: _add };
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
function loadGetterTupleAddToWhiteList(source: TupleReader) {
|
|
1039
|
+
let _add = source.readBoolean();
|
|
1040
|
+
return { $$type: 'AddToWhiteList' as const, add: _add };
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
function storeTupleAddToWhiteList(source: AddToWhiteList) {
|
|
1044
|
+
let builder = new TupleBuilder();
|
|
1045
|
+
builder.writeBoolean(source.add);
|
|
1046
|
+
return builder.build();
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
function dictValueParserAddToWhiteList(): DictionaryValue<AddToWhiteList> {
|
|
1050
|
+
return {
|
|
1051
|
+
serialize: (src, builder) => {
|
|
1052
|
+
builder.storeRef(beginCell().store(storeAddToWhiteList(src)).endCell());
|
|
1053
|
+
},
|
|
1054
|
+
parse: (src) => {
|
|
1055
|
+
return loadAddToWhiteList(src.loadRef().beginParse());
|
|
1056
|
+
}
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
export type CollectionMintParams = {
|
|
1061
|
+
$$type: 'CollectionMintParams';
|
|
1062
|
+
queryId: bigint;
|
|
1063
|
+
owner_address: Address;
|
|
1064
|
+
collection_content: Cell;
|
|
1065
|
+
nft_individual_content_url: Cell;
|
|
1066
|
+
royalty_params: RoyaltyParams;
|
|
1067
|
+
mint_limit: bigint;
|
|
1068
|
+
mint_time_limit: bigint;
|
|
1069
|
+
is_sbt: bigint;
|
|
1070
|
+
nft_price: bigint;
|
|
1071
|
+
enable_profile: boolean;
|
|
1072
|
+
enable_whitelist: boolean;
|
|
1073
|
+
user_item_limit: bigint;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
export function storeCollectionMintParams(src: CollectionMintParams) {
|
|
1077
|
+
return (builder: Builder) => {
|
|
1078
|
+
let b_0 = builder;
|
|
1079
|
+
b_0.storeUint(3164622941, 32);
|
|
1080
|
+
b_0.storeInt(src.queryId, 257);
|
|
1081
|
+
b_0.storeAddress(src.owner_address);
|
|
1082
|
+
b_0.storeRef(src.collection_content);
|
|
1083
|
+
b_0.storeRef(src.nft_individual_content_url);
|
|
1084
|
+
let b_1 = new Builder();
|
|
1085
|
+
b_1.store(storeRoyaltyParams(src.royalty_params));
|
|
1086
|
+
let b_2 = new Builder();
|
|
1087
|
+
b_2.storeInt(src.mint_limit, 257);
|
|
1088
|
+
b_2.storeInt(src.mint_time_limit, 257);
|
|
1089
|
+
b_2.storeInt(src.is_sbt, 257);
|
|
1090
|
+
let b_3 = new Builder();
|
|
1091
|
+
b_3.storeInt(src.nft_price, 257);
|
|
1092
|
+
b_3.storeBit(src.enable_profile);
|
|
1093
|
+
b_3.storeBit(src.enable_whitelist);
|
|
1094
|
+
b_3.storeInt(src.user_item_limit, 257);
|
|
1095
|
+
b_2.storeRef(b_3.endCell());
|
|
1096
|
+
b_1.storeRef(b_2.endCell());
|
|
1097
|
+
b_0.storeRef(b_1.endCell());
|
|
1098
|
+
};
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
export function loadCollectionMintParams(slice: Slice) {
|
|
1102
|
+
let sc_0 = slice;
|
|
1103
|
+
if (sc_0.loadUint(32) !== 3164622941) { throw Error('Invalid prefix'); }
|
|
1104
|
+
let _queryId = sc_0.loadIntBig(257);
|
|
1105
|
+
let _owner_address = sc_0.loadAddress();
|
|
1106
|
+
let _collection_content = sc_0.loadRef();
|
|
1107
|
+
let _nft_individual_content_url = sc_0.loadRef();
|
|
1108
|
+
let sc_1 = sc_0.loadRef().beginParse();
|
|
1109
|
+
let _royalty_params = loadRoyaltyParams(sc_1);
|
|
1110
|
+
let sc_2 = sc_1.loadRef().beginParse();
|
|
1111
|
+
let _mint_limit = sc_2.loadIntBig(257);
|
|
1112
|
+
let _mint_time_limit = sc_2.loadIntBig(257);
|
|
1113
|
+
let _is_sbt = sc_2.loadIntBig(257);
|
|
1114
|
+
let sc_3 = sc_2.loadRef().beginParse();
|
|
1115
|
+
let _nft_price = sc_3.loadIntBig(257);
|
|
1116
|
+
let _enable_profile = sc_3.loadBit();
|
|
1117
|
+
let _enable_whitelist = sc_3.loadBit();
|
|
1118
|
+
let _user_item_limit = sc_3.loadIntBig(257);
|
|
1119
|
+
return { $$type: 'CollectionMintParams' as const, queryId: _queryId, owner_address: _owner_address, collection_content: _collection_content, nft_individual_content_url: _nft_individual_content_url, royalty_params: _royalty_params, mint_limit: _mint_limit, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, nft_price: _nft_price, enable_profile: _enable_profile, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
function loadTupleCollectionMintParams(source: TupleReader) {
|
|
1123
|
+
let _queryId = source.readBigNumber();
|
|
1124
|
+
let _owner_address = source.readAddress();
|
|
1125
|
+
let _collection_content = source.readCell();
|
|
1126
|
+
let _nft_individual_content_url = source.readCell();
|
|
1127
|
+
const _royalty_params = loadTupleRoyaltyParams(source);
|
|
1128
|
+
let _mint_limit = source.readBigNumber();
|
|
1129
|
+
let _mint_time_limit = source.readBigNumber();
|
|
1130
|
+
let _is_sbt = source.readBigNumber();
|
|
1131
|
+
let _nft_price = source.readBigNumber();
|
|
1132
|
+
let _enable_profile = source.readBoolean();
|
|
1133
|
+
let _enable_whitelist = source.readBoolean();
|
|
1134
|
+
let _user_item_limit = source.readBigNumber();
|
|
1135
|
+
return { $$type: 'CollectionMintParams' as const, queryId: _queryId, owner_address: _owner_address, collection_content: _collection_content, nft_individual_content_url: _nft_individual_content_url, royalty_params: _royalty_params, mint_limit: _mint_limit, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, nft_price: _nft_price, enable_profile: _enable_profile, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
function loadGetterTupleCollectionMintParams(source: TupleReader) {
|
|
1139
|
+
let _queryId = source.readBigNumber();
|
|
1140
|
+
let _owner_address = source.readAddress();
|
|
1141
|
+
let _collection_content = source.readCell();
|
|
1142
|
+
let _nft_individual_content_url = source.readCell();
|
|
1143
|
+
const _royalty_params = loadGetterTupleRoyaltyParams(source);
|
|
1144
|
+
let _mint_limit = source.readBigNumber();
|
|
1145
|
+
let _mint_time_limit = source.readBigNumber();
|
|
1146
|
+
let _is_sbt = source.readBigNumber();
|
|
1147
|
+
let _nft_price = source.readBigNumber();
|
|
1148
|
+
let _enable_profile = source.readBoolean();
|
|
1149
|
+
let _enable_whitelist = source.readBoolean();
|
|
1150
|
+
let _user_item_limit = source.readBigNumber();
|
|
1151
|
+
return { $$type: 'CollectionMintParams' as const, queryId: _queryId, owner_address: _owner_address, collection_content: _collection_content, nft_individual_content_url: _nft_individual_content_url, royalty_params: _royalty_params, mint_limit: _mint_limit, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, nft_price: _nft_price, enable_profile: _enable_profile, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
1152
|
+
}
|
|
1153
|
+
|
|
1154
|
+
function storeTupleCollectionMintParams(source: CollectionMintParams) {
|
|
1155
|
+
let builder = new TupleBuilder();
|
|
1156
|
+
builder.writeNumber(source.queryId);
|
|
1157
|
+
builder.writeAddress(source.owner_address);
|
|
1158
|
+
builder.writeCell(source.collection_content);
|
|
1159
|
+
builder.writeCell(source.nft_individual_content_url);
|
|
1160
|
+
builder.writeTuple(storeTupleRoyaltyParams(source.royalty_params));
|
|
1161
|
+
builder.writeNumber(source.mint_limit);
|
|
1162
|
+
builder.writeNumber(source.mint_time_limit);
|
|
1163
|
+
builder.writeNumber(source.is_sbt);
|
|
1164
|
+
builder.writeNumber(source.nft_price);
|
|
1165
|
+
builder.writeBoolean(source.enable_profile);
|
|
1166
|
+
builder.writeBoolean(source.enable_whitelist);
|
|
1167
|
+
builder.writeNumber(source.user_item_limit);
|
|
1168
|
+
return builder.build();
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
function dictValueParserCollectionMintParams(): DictionaryValue<CollectionMintParams> {
|
|
1172
|
+
return {
|
|
1173
|
+
serialize: (src, builder) => {
|
|
1174
|
+
builder.storeRef(beginCell().store(storeCollectionMintParams(src)).endCell());
|
|
1175
|
+
},
|
|
1176
|
+
parse: (src) => {
|
|
1177
|
+
return loadCollectionMintParams(src.loadRef().beginParse());
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
export type ProfileData = {
|
|
1183
|
+
$$type: 'ProfileData';
|
|
1184
|
+
query_id: bigint;
|
|
1185
|
+
user: Address;
|
|
1186
|
+
is_whitelisted: boolean;
|
|
1187
|
+
is_blacklisted: boolean;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export function storeProfileData(src: ProfileData) {
|
|
1191
|
+
return (builder: Builder) => {
|
|
1192
|
+
let b_0 = builder;
|
|
1193
|
+
b_0.storeUint(1499272752, 32);
|
|
1194
|
+
b_0.storeUint(src.query_id, 64);
|
|
1195
|
+
b_0.storeAddress(src.user);
|
|
1196
|
+
b_0.storeBit(src.is_whitelisted);
|
|
1197
|
+
b_0.storeBit(src.is_blacklisted);
|
|
1198
|
+
};
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
export function loadProfileData(slice: Slice) {
|
|
1202
|
+
let sc_0 = slice;
|
|
1203
|
+
if (sc_0.loadUint(32) !== 1499272752) { throw Error('Invalid prefix'); }
|
|
1204
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
1205
|
+
let _user = sc_0.loadAddress();
|
|
1206
|
+
let _is_whitelisted = sc_0.loadBit();
|
|
1207
|
+
let _is_blacklisted = sc_0.loadBit();
|
|
1208
|
+
return { $$type: 'ProfileData' as const, query_id: _query_id, user: _user, is_whitelisted: _is_whitelisted, is_blacklisted: _is_blacklisted };
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
function loadTupleProfileData(source: TupleReader) {
|
|
1212
|
+
let _query_id = source.readBigNumber();
|
|
1213
|
+
let _user = source.readAddress();
|
|
1214
|
+
let _is_whitelisted = source.readBoolean();
|
|
1215
|
+
let _is_blacklisted = source.readBoolean();
|
|
1216
|
+
return { $$type: 'ProfileData' as const, query_id: _query_id, user: _user, is_whitelisted: _is_whitelisted, is_blacklisted: _is_blacklisted };
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
function loadGetterTupleProfileData(source: TupleReader) {
|
|
1220
|
+
let _query_id = source.readBigNumber();
|
|
1221
|
+
let _user = source.readAddress();
|
|
1222
|
+
let _is_whitelisted = source.readBoolean();
|
|
1223
|
+
let _is_blacklisted = source.readBoolean();
|
|
1224
|
+
return { $$type: 'ProfileData' as const, query_id: _query_id, user: _user, is_whitelisted: _is_whitelisted, is_blacklisted: _is_blacklisted };
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
function storeTupleProfileData(source: ProfileData) {
|
|
1228
|
+
let builder = new TupleBuilder();
|
|
1229
|
+
builder.writeNumber(source.query_id);
|
|
1230
|
+
builder.writeAddress(source.user);
|
|
1231
|
+
builder.writeBoolean(source.is_whitelisted);
|
|
1232
|
+
builder.writeBoolean(source.is_blacklisted);
|
|
1233
|
+
return builder.build();
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
function dictValueParserProfileData(): DictionaryValue<ProfileData> {
|
|
1237
|
+
return {
|
|
1238
|
+
serialize: (src, builder) => {
|
|
1239
|
+
builder.storeRef(beginCell().store(storeProfileData(src)).endCell());
|
|
1240
|
+
},
|
|
1241
|
+
parse: (src) => {
|
|
1242
|
+
return loadProfileData(src.loadRef().beginParse());
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export type Transfer = {
|
|
1248
|
+
$$type: 'Transfer';
|
|
1249
|
+
query_id: bigint;
|
|
1250
|
+
new_owner: Address;
|
|
1251
|
+
response_destination: Address | null;
|
|
1252
|
+
custom_payload: Cell | null;
|
|
1253
|
+
forward_amount: bigint;
|
|
1254
|
+
forward_payload: Slice;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
export function storeTransfer(src: Transfer) {
|
|
1258
|
+
return (builder: Builder) => {
|
|
1259
|
+
let b_0 = builder;
|
|
1260
|
+
b_0.storeUint(1607220500, 32);
|
|
1261
|
+
b_0.storeUint(src.query_id, 64);
|
|
1262
|
+
b_0.storeAddress(src.new_owner);
|
|
1263
|
+
b_0.storeAddress(src.response_destination);
|
|
1264
|
+
if (src.custom_payload !== null && src.custom_payload !== undefined) { b_0.storeBit(true).storeRef(src.custom_payload); } else { b_0.storeBit(false); }
|
|
1265
|
+
b_0.storeCoins(src.forward_amount);
|
|
1266
|
+
b_0.storeBuilder(src.forward_payload.asBuilder());
|
|
1267
|
+
};
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
export function loadTransfer(slice: Slice) {
|
|
1271
|
+
let sc_0 = slice;
|
|
1272
|
+
if (sc_0.loadUint(32) !== 1607220500) { throw Error('Invalid prefix'); }
|
|
1273
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
1274
|
+
let _new_owner = sc_0.loadAddress();
|
|
1275
|
+
let _response_destination = sc_0.loadMaybeAddress();
|
|
1276
|
+
let _custom_payload = sc_0.loadBit() ? sc_0.loadRef() : null;
|
|
1277
|
+
let _forward_amount = sc_0.loadCoins();
|
|
1278
|
+
let _forward_payload = sc_0;
|
|
1279
|
+
return { $$type: 'Transfer' as const, query_id: _query_id, new_owner: _new_owner, response_destination: _response_destination, custom_payload: _custom_payload, forward_amount: _forward_amount, forward_payload: _forward_payload };
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
function loadTupleTransfer(source: TupleReader) {
|
|
1283
|
+
let _query_id = source.readBigNumber();
|
|
1284
|
+
let _new_owner = source.readAddress();
|
|
1285
|
+
let _response_destination = source.readAddressOpt();
|
|
1286
|
+
let _custom_payload = source.readCellOpt();
|
|
1287
|
+
let _forward_amount = source.readBigNumber();
|
|
1288
|
+
let _forward_payload = source.readCell().asSlice();
|
|
1289
|
+
return { $$type: 'Transfer' as const, query_id: _query_id, new_owner: _new_owner, response_destination: _response_destination, custom_payload: _custom_payload, forward_amount: _forward_amount, forward_payload: _forward_payload };
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
function loadGetterTupleTransfer(source: TupleReader) {
|
|
1293
|
+
let _query_id = source.readBigNumber();
|
|
1294
|
+
let _new_owner = source.readAddress();
|
|
1295
|
+
let _response_destination = source.readAddressOpt();
|
|
1296
|
+
let _custom_payload = source.readCellOpt();
|
|
1297
|
+
let _forward_amount = source.readBigNumber();
|
|
1298
|
+
let _forward_payload = source.readCell().asSlice();
|
|
1299
|
+
return { $$type: 'Transfer' as const, query_id: _query_id, new_owner: _new_owner, response_destination: _response_destination, custom_payload: _custom_payload, forward_amount: _forward_amount, forward_payload: _forward_payload };
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
function storeTupleTransfer(source: Transfer) {
|
|
1303
|
+
let builder = new TupleBuilder();
|
|
1304
|
+
builder.writeNumber(source.query_id);
|
|
1305
|
+
builder.writeAddress(source.new_owner);
|
|
1306
|
+
builder.writeAddress(source.response_destination);
|
|
1307
|
+
builder.writeCell(source.custom_payload);
|
|
1308
|
+
builder.writeNumber(source.forward_amount);
|
|
1309
|
+
builder.writeSlice(source.forward_payload.asCell());
|
|
1310
|
+
return builder.build();
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
function dictValueParserTransfer(): DictionaryValue<Transfer> {
|
|
1314
|
+
return {
|
|
1315
|
+
serialize: (src, builder) => {
|
|
1316
|
+
builder.storeRef(beginCell().store(storeTransfer(src)).endCell());
|
|
1317
|
+
},
|
|
1318
|
+
parse: (src) => {
|
|
1319
|
+
return loadTransfer(src.loadRef().beginParse());
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
export type OwnershipAssigned = {
|
|
1325
|
+
$$type: 'OwnershipAssigned';
|
|
1326
|
+
query_id: bigint;
|
|
1327
|
+
prev_owner: Address;
|
|
1328
|
+
forward_payload: Slice;
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
export function storeOwnershipAssigned(src: OwnershipAssigned) {
|
|
1332
|
+
return (builder: Builder) => {
|
|
1333
|
+
let b_0 = builder;
|
|
1334
|
+
b_0.storeUint(85167505, 32);
|
|
1335
|
+
b_0.storeUint(src.query_id, 64);
|
|
1336
|
+
b_0.storeAddress(src.prev_owner);
|
|
1337
|
+
b_0.storeBuilder(src.forward_payload.asBuilder());
|
|
1338
|
+
};
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
export function loadOwnershipAssigned(slice: Slice) {
|
|
1342
|
+
let sc_0 = slice;
|
|
1343
|
+
if (sc_0.loadUint(32) !== 85167505) { throw Error('Invalid prefix'); }
|
|
1344
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
1345
|
+
let _prev_owner = sc_0.loadAddress();
|
|
1346
|
+
let _forward_payload = sc_0;
|
|
1347
|
+
return { $$type: 'OwnershipAssigned' as const, query_id: _query_id, prev_owner: _prev_owner, forward_payload: _forward_payload };
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1350
|
+
function loadTupleOwnershipAssigned(source: TupleReader) {
|
|
1351
|
+
let _query_id = source.readBigNumber();
|
|
1352
|
+
let _prev_owner = source.readAddress();
|
|
1353
|
+
let _forward_payload = source.readCell().asSlice();
|
|
1354
|
+
return { $$type: 'OwnershipAssigned' as const, query_id: _query_id, prev_owner: _prev_owner, forward_payload: _forward_payload };
|
|
1355
|
+
}
|
|
1356
|
+
|
|
1357
|
+
function loadGetterTupleOwnershipAssigned(source: TupleReader) {
|
|
1358
|
+
let _query_id = source.readBigNumber();
|
|
1359
|
+
let _prev_owner = source.readAddress();
|
|
1360
|
+
let _forward_payload = source.readCell().asSlice();
|
|
1361
|
+
return { $$type: 'OwnershipAssigned' as const, query_id: _query_id, prev_owner: _prev_owner, forward_payload: _forward_payload };
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
function storeTupleOwnershipAssigned(source: OwnershipAssigned) {
|
|
1365
|
+
let builder = new TupleBuilder();
|
|
1366
|
+
builder.writeNumber(source.query_id);
|
|
1367
|
+
builder.writeAddress(source.prev_owner);
|
|
1368
|
+
builder.writeSlice(source.forward_payload.asCell());
|
|
1369
|
+
return builder.build();
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
function dictValueParserOwnershipAssigned(): DictionaryValue<OwnershipAssigned> {
|
|
1373
|
+
return {
|
|
1374
|
+
serialize: (src, builder) => {
|
|
1375
|
+
builder.storeRef(beginCell().store(storeOwnershipAssigned(src)).endCell());
|
|
1376
|
+
},
|
|
1377
|
+
parse: (src) => {
|
|
1378
|
+
return loadOwnershipAssigned(src.loadRef().beginParse());
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
export type Excesses = {
|
|
1384
|
+
$$type: 'Excesses';
|
|
1385
|
+
query_id: bigint;
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
export function storeExcesses(src: Excesses) {
|
|
1389
|
+
return (builder: Builder) => {
|
|
1390
|
+
let b_0 = builder;
|
|
1391
|
+
b_0.storeUint(3576854235, 32);
|
|
1392
|
+
b_0.storeUint(src.query_id, 64);
|
|
1393
|
+
};
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
export function loadExcesses(slice: Slice) {
|
|
1397
|
+
let sc_0 = slice;
|
|
1398
|
+
if (sc_0.loadUint(32) !== 3576854235) { throw Error('Invalid prefix'); }
|
|
1399
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
1400
|
+
return { $$type: 'Excesses' as const, query_id: _query_id };
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
function loadTupleExcesses(source: TupleReader) {
|
|
1404
|
+
let _query_id = source.readBigNumber();
|
|
1405
|
+
return { $$type: 'Excesses' as const, query_id: _query_id };
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
function loadGetterTupleExcesses(source: TupleReader) {
|
|
1409
|
+
let _query_id = source.readBigNumber();
|
|
1410
|
+
return { $$type: 'Excesses' as const, query_id: _query_id };
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
function storeTupleExcesses(source: Excesses) {
|
|
1414
|
+
let builder = new TupleBuilder();
|
|
1415
|
+
builder.writeNumber(source.query_id);
|
|
1416
|
+
return builder.build();
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
function dictValueParserExcesses(): DictionaryValue<Excesses> {
|
|
1420
|
+
return {
|
|
1421
|
+
serialize: (src, builder) => {
|
|
1422
|
+
builder.storeRef(beginCell().store(storeExcesses(src)).endCell());
|
|
1423
|
+
},
|
|
1424
|
+
parse: (src) => {
|
|
1425
|
+
return loadExcesses(src.loadRef().beginParse());
|
|
1426
|
+
}
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
export type GetStaticData = {
|
|
1431
|
+
$$type: 'GetStaticData';
|
|
1432
|
+
query_id: bigint;
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
export function storeGetStaticData(src: GetStaticData) {
|
|
1436
|
+
return (builder: Builder) => {
|
|
1437
|
+
let b_0 = builder;
|
|
1438
|
+
b_0.storeUint(801842850, 32);
|
|
1439
|
+
b_0.storeUint(src.query_id, 64);
|
|
1440
|
+
};
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
export function loadGetStaticData(slice: Slice) {
|
|
1444
|
+
let sc_0 = slice;
|
|
1445
|
+
if (sc_0.loadUint(32) !== 801842850) { throw Error('Invalid prefix'); }
|
|
1446
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
1447
|
+
return { $$type: 'GetStaticData' as const, query_id: _query_id };
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
function loadTupleGetStaticData(source: TupleReader) {
|
|
1451
|
+
let _query_id = source.readBigNumber();
|
|
1452
|
+
return { $$type: 'GetStaticData' as const, query_id: _query_id };
|
|
1453
|
+
}
|
|
1454
|
+
|
|
1455
|
+
function loadGetterTupleGetStaticData(source: TupleReader) {
|
|
1456
|
+
let _query_id = source.readBigNumber();
|
|
1457
|
+
return { $$type: 'GetStaticData' as const, query_id: _query_id };
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
function storeTupleGetStaticData(source: GetStaticData) {
|
|
1461
|
+
let builder = new TupleBuilder();
|
|
1462
|
+
builder.writeNumber(source.query_id);
|
|
1463
|
+
return builder.build();
|
|
1464
|
+
}
|
|
1465
|
+
|
|
1466
|
+
function dictValueParserGetStaticData(): DictionaryValue<GetStaticData> {
|
|
1467
|
+
return {
|
|
1468
|
+
serialize: (src, builder) => {
|
|
1469
|
+
builder.storeRef(beginCell().store(storeGetStaticData(src)).endCell());
|
|
1470
|
+
},
|
|
1471
|
+
parse: (src) => {
|
|
1472
|
+
return loadGetStaticData(src.loadRef().beginParse());
|
|
1473
|
+
}
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
export type ReportStaticData = {
|
|
1478
|
+
$$type: 'ReportStaticData';
|
|
1479
|
+
query_id: bigint;
|
|
1480
|
+
index_id: bigint;
|
|
1481
|
+
collection: Address;
|
|
1482
|
+
}
|
|
1483
|
+
|
|
1484
|
+
export function storeReportStaticData(src: ReportStaticData) {
|
|
1485
|
+
return (builder: Builder) => {
|
|
1486
|
+
let b_0 = builder;
|
|
1487
|
+
b_0.storeUint(2339837749, 32);
|
|
1488
|
+
b_0.storeUint(src.query_id, 64);
|
|
1489
|
+
b_0.storeInt(src.index_id, 257);
|
|
1490
|
+
b_0.storeAddress(src.collection);
|
|
1491
|
+
};
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
export function loadReportStaticData(slice: Slice) {
|
|
1495
|
+
let sc_0 = slice;
|
|
1496
|
+
if (sc_0.loadUint(32) !== 2339837749) { throw Error('Invalid prefix'); }
|
|
1497
|
+
let _query_id = sc_0.loadUintBig(64);
|
|
1498
|
+
let _index_id = sc_0.loadIntBig(257);
|
|
1499
|
+
let _collection = sc_0.loadAddress();
|
|
1500
|
+
return { $$type: 'ReportStaticData' as const, query_id: _query_id, index_id: _index_id, collection: _collection };
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
function loadTupleReportStaticData(source: TupleReader) {
|
|
1504
|
+
let _query_id = source.readBigNumber();
|
|
1505
|
+
let _index_id = source.readBigNumber();
|
|
1506
|
+
let _collection = source.readAddress();
|
|
1507
|
+
return { $$type: 'ReportStaticData' as const, query_id: _query_id, index_id: _index_id, collection: _collection };
|
|
1508
|
+
}
|
|
1509
|
+
|
|
1510
|
+
function loadGetterTupleReportStaticData(source: TupleReader) {
|
|
1511
|
+
let _query_id = source.readBigNumber();
|
|
1512
|
+
let _index_id = source.readBigNumber();
|
|
1513
|
+
let _collection = source.readAddress();
|
|
1514
|
+
return { $$type: 'ReportStaticData' as const, query_id: _query_id, index_id: _index_id, collection: _collection };
|
|
1515
|
+
}
|
|
1516
|
+
|
|
1517
|
+
function storeTupleReportStaticData(source: ReportStaticData) {
|
|
1518
|
+
let builder = new TupleBuilder();
|
|
1519
|
+
builder.writeNumber(source.query_id);
|
|
1520
|
+
builder.writeNumber(source.index_id);
|
|
1521
|
+
builder.writeAddress(source.collection);
|
|
1522
|
+
return builder.build();
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
function dictValueParserReportStaticData(): DictionaryValue<ReportStaticData> {
|
|
1526
|
+
return {
|
|
1527
|
+
serialize: (src, builder) => {
|
|
1528
|
+
builder.storeRef(beginCell().store(storeReportStaticData(src)).endCell());
|
|
1529
|
+
},
|
|
1530
|
+
parse: (src) => {
|
|
1531
|
+
return loadReportStaticData(src.loadRef().beginParse());
|
|
1532
|
+
}
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
|
|
1536
|
+
export type GetNftData = {
|
|
1537
|
+
$$type: 'GetNftData';
|
|
1538
|
+
is_initialized: boolean;
|
|
1539
|
+
index: bigint;
|
|
1540
|
+
collection_address: Address;
|
|
1541
|
+
owner_address: Address;
|
|
1542
|
+
individual_content: Cell;
|
|
1543
|
+
}
|
|
1544
|
+
|
|
1545
|
+
export function storeGetNftData(src: GetNftData) {
|
|
1546
|
+
return (builder: Builder) => {
|
|
1547
|
+
let b_0 = builder;
|
|
1548
|
+
b_0.storeBit(src.is_initialized);
|
|
1549
|
+
b_0.storeInt(src.index, 257);
|
|
1550
|
+
b_0.storeAddress(src.collection_address);
|
|
1551
|
+
b_0.storeAddress(src.owner_address);
|
|
1552
|
+
b_0.storeRef(src.individual_content);
|
|
1553
|
+
};
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
export function loadGetNftData(slice: Slice) {
|
|
1557
|
+
let sc_0 = slice;
|
|
1558
|
+
let _is_initialized = sc_0.loadBit();
|
|
1559
|
+
let _index = sc_0.loadIntBig(257);
|
|
1560
|
+
let _collection_address = sc_0.loadAddress();
|
|
1561
|
+
let _owner_address = sc_0.loadAddress();
|
|
1562
|
+
let _individual_content = sc_0.loadRef();
|
|
1563
|
+
return { $$type: 'GetNftData' as const, is_initialized: _is_initialized, index: _index, collection_address: _collection_address, owner_address: _owner_address, individual_content: _individual_content };
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
function loadTupleGetNftData(source: TupleReader) {
|
|
1567
|
+
let _is_initialized = source.readBoolean();
|
|
1568
|
+
let _index = source.readBigNumber();
|
|
1569
|
+
let _collection_address = source.readAddress();
|
|
1570
|
+
let _owner_address = source.readAddress();
|
|
1571
|
+
let _individual_content = source.readCell();
|
|
1572
|
+
return { $$type: 'GetNftData' as const, is_initialized: _is_initialized, index: _index, collection_address: _collection_address, owner_address: _owner_address, individual_content: _individual_content };
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
function loadGetterTupleGetNftData(source: TupleReader) {
|
|
1576
|
+
let _is_initialized = source.readBoolean();
|
|
1577
|
+
let _index = source.readBigNumber();
|
|
1578
|
+
let _collection_address = source.readAddress();
|
|
1579
|
+
let _owner_address = source.readAddress();
|
|
1580
|
+
let _individual_content = source.readCell();
|
|
1581
|
+
return { $$type: 'GetNftData' as const, is_initialized: _is_initialized, index: _index, collection_address: _collection_address, owner_address: _owner_address, individual_content: _individual_content };
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
function storeTupleGetNftData(source: GetNftData) {
|
|
1585
|
+
let builder = new TupleBuilder();
|
|
1586
|
+
builder.writeBoolean(source.is_initialized);
|
|
1587
|
+
builder.writeNumber(source.index);
|
|
1588
|
+
builder.writeAddress(source.collection_address);
|
|
1589
|
+
builder.writeAddress(source.owner_address);
|
|
1590
|
+
builder.writeCell(source.individual_content);
|
|
1591
|
+
return builder.build();
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
function dictValueParserGetNftData(): DictionaryValue<GetNftData> {
|
|
1595
|
+
return {
|
|
1596
|
+
serialize: (src, builder) => {
|
|
1597
|
+
builder.storeRef(beginCell().store(storeGetNftData(src)).endCell());
|
|
1598
|
+
},
|
|
1599
|
+
parse: (src) => {
|
|
1600
|
+
return loadGetNftData(src.loadRef().beginParse());
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
export type CollectionMasterData = {
|
|
1606
|
+
$$type: 'CollectionMasterData';
|
|
1607
|
+
master: Address;
|
|
1608
|
+
mint_limit: bigint;
|
|
1609
|
+
price: bigint;
|
|
1610
|
+
mint_time_limit: bigint;
|
|
1611
|
+
is_sbt: bigint;
|
|
1612
|
+
index_in_collection: bigint;
|
|
1613
|
+
}
|
|
1614
|
+
|
|
1615
|
+
export function storeCollectionMasterData(src: CollectionMasterData) {
|
|
1616
|
+
return (builder: Builder) => {
|
|
1617
|
+
let b_0 = builder;
|
|
1618
|
+
b_0.storeAddress(src.master);
|
|
1619
|
+
b_0.storeInt(src.mint_limit, 257);
|
|
1620
|
+
b_0.storeInt(src.price, 257);
|
|
1621
|
+
let b_1 = new Builder();
|
|
1622
|
+
b_1.storeInt(src.mint_time_limit, 257);
|
|
1623
|
+
b_1.storeInt(src.is_sbt, 257);
|
|
1624
|
+
b_1.storeInt(src.index_in_collection, 257);
|
|
1625
|
+
b_0.storeRef(b_1.endCell());
|
|
1626
|
+
};
|
|
1627
|
+
}
|
|
1628
|
+
|
|
1629
|
+
export function loadCollectionMasterData(slice: Slice) {
|
|
1630
|
+
let sc_0 = slice;
|
|
1631
|
+
let _master = sc_0.loadAddress();
|
|
1632
|
+
let _mint_limit = sc_0.loadIntBig(257);
|
|
1633
|
+
let _price = sc_0.loadIntBig(257);
|
|
1634
|
+
let sc_1 = sc_0.loadRef().beginParse();
|
|
1635
|
+
let _mint_time_limit = sc_1.loadIntBig(257);
|
|
1636
|
+
let _is_sbt = sc_1.loadIntBig(257);
|
|
1637
|
+
let _index_in_collection = sc_1.loadIntBig(257);
|
|
1638
|
+
return { $$type: 'CollectionMasterData' as const, master: _master, mint_limit: _mint_limit, price: _price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, index_in_collection: _index_in_collection };
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
function loadTupleCollectionMasterData(source: TupleReader) {
|
|
1642
|
+
let _master = source.readAddress();
|
|
1643
|
+
let _mint_limit = source.readBigNumber();
|
|
1644
|
+
let _price = source.readBigNumber();
|
|
1645
|
+
let _mint_time_limit = source.readBigNumber();
|
|
1646
|
+
let _is_sbt = source.readBigNumber();
|
|
1647
|
+
let _index_in_collection = source.readBigNumber();
|
|
1648
|
+
return { $$type: 'CollectionMasterData' as const, master: _master, mint_limit: _mint_limit, price: _price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, index_in_collection: _index_in_collection };
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
function loadGetterTupleCollectionMasterData(source: TupleReader) {
|
|
1652
|
+
let _master = source.readAddress();
|
|
1653
|
+
let _mint_limit = source.readBigNumber();
|
|
1654
|
+
let _price = source.readBigNumber();
|
|
1655
|
+
let _mint_time_limit = source.readBigNumber();
|
|
1656
|
+
let _is_sbt = source.readBigNumber();
|
|
1657
|
+
let _index_in_collection = source.readBigNumber();
|
|
1658
|
+
return { $$type: 'CollectionMasterData' as const, master: _master, mint_limit: _mint_limit, price: _price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, index_in_collection: _index_in_collection };
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
function storeTupleCollectionMasterData(source: CollectionMasterData) {
|
|
1662
|
+
let builder = new TupleBuilder();
|
|
1663
|
+
builder.writeAddress(source.master);
|
|
1664
|
+
builder.writeNumber(source.mint_limit);
|
|
1665
|
+
builder.writeNumber(source.price);
|
|
1666
|
+
builder.writeNumber(source.mint_time_limit);
|
|
1667
|
+
builder.writeNumber(source.is_sbt);
|
|
1668
|
+
builder.writeNumber(source.index_in_collection);
|
|
1669
|
+
return builder.build();
|
|
1670
|
+
}
|
|
1671
|
+
|
|
1672
|
+
function dictValueParserCollectionMasterData(): DictionaryValue<CollectionMasterData> {
|
|
1673
|
+
return {
|
|
1674
|
+
serialize: (src, builder) => {
|
|
1675
|
+
builder.storeRef(beginCell().store(storeCollectionMasterData(src)).endCell());
|
|
1676
|
+
},
|
|
1677
|
+
parse: (src) => {
|
|
1678
|
+
return loadCollectionMasterData(src.loadRef().beginParse());
|
|
1679
|
+
}
|
|
1680
|
+
}
|
|
1681
|
+
}
|
|
1682
|
+
|
|
1683
|
+
export type CollectionMasterDataV2 = {
|
|
1684
|
+
$$type: 'CollectionMasterDataV2';
|
|
1685
|
+
master: Address;
|
|
1686
|
+
mint_limit: bigint;
|
|
1687
|
+
price: bigint;
|
|
1688
|
+
mint_time_limit: bigint;
|
|
1689
|
+
is_sbt: bigint;
|
|
1690
|
+
index_in_collection: bigint;
|
|
1691
|
+
enable_whitelist: boolean;
|
|
1692
|
+
user_item_limit: bigint;
|
|
1693
|
+
}
|
|
1694
|
+
|
|
1695
|
+
export function storeCollectionMasterDataV2(src: CollectionMasterDataV2) {
|
|
1696
|
+
return (builder: Builder) => {
|
|
1697
|
+
let b_0 = builder;
|
|
1698
|
+
b_0.storeAddress(src.master);
|
|
1699
|
+
b_0.storeInt(src.mint_limit, 257);
|
|
1700
|
+
b_0.storeInt(src.price, 257);
|
|
1701
|
+
let b_1 = new Builder();
|
|
1702
|
+
b_1.storeInt(src.mint_time_limit, 257);
|
|
1703
|
+
b_1.storeInt(src.is_sbt, 257);
|
|
1704
|
+
b_1.storeInt(src.index_in_collection, 257);
|
|
1705
|
+
b_1.storeBit(src.enable_whitelist);
|
|
1706
|
+
let b_2 = new Builder();
|
|
1707
|
+
b_2.storeInt(src.user_item_limit, 257);
|
|
1708
|
+
b_1.storeRef(b_2.endCell());
|
|
1709
|
+
b_0.storeRef(b_1.endCell());
|
|
1710
|
+
};
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
export function loadCollectionMasterDataV2(slice: Slice) {
|
|
1714
|
+
let sc_0 = slice;
|
|
1715
|
+
let _master = sc_0.loadAddress();
|
|
1716
|
+
let _mint_limit = sc_0.loadIntBig(257);
|
|
1717
|
+
let _price = sc_0.loadIntBig(257);
|
|
1718
|
+
let sc_1 = sc_0.loadRef().beginParse();
|
|
1719
|
+
let _mint_time_limit = sc_1.loadIntBig(257);
|
|
1720
|
+
let _is_sbt = sc_1.loadIntBig(257);
|
|
1721
|
+
let _index_in_collection = sc_1.loadIntBig(257);
|
|
1722
|
+
let _enable_whitelist = sc_1.loadBit();
|
|
1723
|
+
let sc_2 = sc_1.loadRef().beginParse();
|
|
1724
|
+
let _user_item_limit = sc_2.loadIntBig(257);
|
|
1725
|
+
return { $$type: 'CollectionMasterDataV2' as const, master: _master, mint_limit: _mint_limit, price: _price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, index_in_collection: _index_in_collection, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
function loadTupleCollectionMasterDataV2(source: TupleReader) {
|
|
1729
|
+
let _master = source.readAddress();
|
|
1730
|
+
let _mint_limit = source.readBigNumber();
|
|
1731
|
+
let _price = source.readBigNumber();
|
|
1732
|
+
let _mint_time_limit = source.readBigNumber();
|
|
1733
|
+
let _is_sbt = source.readBigNumber();
|
|
1734
|
+
let _index_in_collection = source.readBigNumber();
|
|
1735
|
+
let _enable_whitelist = source.readBoolean();
|
|
1736
|
+
let _user_item_limit = source.readBigNumber();
|
|
1737
|
+
return { $$type: 'CollectionMasterDataV2' as const, master: _master, mint_limit: _mint_limit, price: _price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, index_in_collection: _index_in_collection, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
function loadGetterTupleCollectionMasterDataV2(source: TupleReader) {
|
|
1741
|
+
let _master = source.readAddress();
|
|
1742
|
+
let _mint_limit = source.readBigNumber();
|
|
1743
|
+
let _price = source.readBigNumber();
|
|
1744
|
+
let _mint_time_limit = source.readBigNumber();
|
|
1745
|
+
let _is_sbt = source.readBigNumber();
|
|
1746
|
+
let _index_in_collection = source.readBigNumber();
|
|
1747
|
+
let _enable_whitelist = source.readBoolean();
|
|
1748
|
+
let _user_item_limit = source.readBigNumber();
|
|
1749
|
+
return { $$type: 'CollectionMasterDataV2' as const, master: _master, mint_limit: _mint_limit, price: _price, mint_time_limit: _mint_time_limit, is_sbt: _is_sbt, index_in_collection: _index_in_collection, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit };
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
function storeTupleCollectionMasterDataV2(source: CollectionMasterDataV2) {
|
|
1753
|
+
let builder = new TupleBuilder();
|
|
1754
|
+
builder.writeAddress(source.master);
|
|
1755
|
+
builder.writeNumber(source.mint_limit);
|
|
1756
|
+
builder.writeNumber(source.price);
|
|
1757
|
+
builder.writeNumber(source.mint_time_limit);
|
|
1758
|
+
builder.writeNumber(source.is_sbt);
|
|
1759
|
+
builder.writeNumber(source.index_in_collection);
|
|
1760
|
+
builder.writeBoolean(source.enable_whitelist);
|
|
1761
|
+
builder.writeNumber(source.user_item_limit);
|
|
1762
|
+
return builder.build();
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1765
|
+
function dictValueParserCollectionMasterDataV2(): DictionaryValue<CollectionMasterDataV2> {
|
|
1766
|
+
return {
|
|
1767
|
+
serialize: (src, builder) => {
|
|
1768
|
+
builder.storeRef(beginCell().store(storeCollectionMasterDataV2(src)).endCell());
|
|
1769
|
+
},
|
|
1770
|
+
parse: (src) => {
|
|
1771
|
+
return loadCollectionMasterDataV2(src.loadRef().beginParse());
|
|
1772
|
+
}
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
export type MintTo = {
|
|
1777
|
+
$$type: 'MintTo';
|
|
1778
|
+
owner: Address;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
export function storeMintTo(src: MintTo) {
|
|
1782
|
+
return (builder: Builder) => {
|
|
1783
|
+
let b_0 = builder;
|
|
1784
|
+
b_0.storeUint(340819044, 32);
|
|
1785
|
+
b_0.storeAddress(src.owner);
|
|
1786
|
+
};
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
export function loadMintTo(slice: Slice) {
|
|
1790
|
+
let sc_0 = slice;
|
|
1791
|
+
if (sc_0.loadUint(32) !== 340819044) { throw Error('Invalid prefix'); }
|
|
1792
|
+
let _owner = sc_0.loadAddress();
|
|
1793
|
+
return { $$type: 'MintTo' as const, owner: _owner };
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
function loadTupleMintTo(source: TupleReader) {
|
|
1797
|
+
let _owner = source.readAddress();
|
|
1798
|
+
return { $$type: 'MintTo' as const, owner: _owner };
|
|
1799
|
+
}
|
|
1800
|
+
|
|
1801
|
+
function loadGetterTupleMintTo(source: TupleReader) {
|
|
1802
|
+
let _owner = source.readAddress();
|
|
1803
|
+
return { $$type: 'MintTo' as const, owner: _owner };
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
function storeTupleMintTo(source: MintTo) {
|
|
1807
|
+
let builder = new TupleBuilder();
|
|
1808
|
+
builder.writeAddress(source.owner);
|
|
1809
|
+
return builder.build();
|
|
1810
|
+
}
|
|
1811
|
+
|
|
1812
|
+
function dictValueParserMintTo(): DictionaryValue<MintTo> {
|
|
1813
|
+
return {
|
|
1814
|
+
serialize: (src, builder) => {
|
|
1815
|
+
builder.storeRef(beginCell().store(storeMintTo(src)).endCell());
|
|
1816
|
+
},
|
|
1817
|
+
parse: (src) => {
|
|
1818
|
+
return loadMintTo(src.loadRef().beginParse());
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
export type MassUpdateWhiteList = {
|
|
1824
|
+
$$type: 'MassUpdateWhiteList';
|
|
1825
|
+
addresses: Cell;
|
|
1826
|
+
add: boolean;
|
|
1827
|
+
spendPerAddress: bigint;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
export function storeMassUpdateWhiteList(src: MassUpdateWhiteList) {
|
|
1831
|
+
return (builder: Builder) => {
|
|
1832
|
+
let b_0 = builder;
|
|
1833
|
+
b_0.storeUint(1197680529, 32);
|
|
1834
|
+
b_0.storeRef(src.addresses);
|
|
1835
|
+
b_0.storeBit(src.add);
|
|
1836
|
+
b_0.storeUint(src.spendPerAddress, 64);
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
|
|
1840
|
+
export function loadMassUpdateWhiteList(slice: Slice) {
|
|
1841
|
+
let sc_0 = slice;
|
|
1842
|
+
if (sc_0.loadUint(32) !== 1197680529) { throw Error('Invalid prefix'); }
|
|
1843
|
+
let _addresses = sc_0.loadRef();
|
|
1844
|
+
let _add = sc_0.loadBit();
|
|
1845
|
+
let _spendPerAddress = sc_0.loadUintBig(64);
|
|
1846
|
+
return { $$type: 'MassUpdateWhiteList' as const, addresses: _addresses, add: _add, spendPerAddress: _spendPerAddress };
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
function loadTupleMassUpdateWhiteList(source: TupleReader) {
|
|
1850
|
+
let _addresses = source.readCell();
|
|
1851
|
+
let _add = source.readBoolean();
|
|
1852
|
+
let _spendPerAddress = source.readBigNumber();
|
|
1853
|
+
return { $$type: 'MassUpdateWhiteList' as const, addresses: _addresses, add: _add, spendPerAddress: _spendPerAddress };
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
function loadGetterTupleMassUpdateWhiteList(source: TupleReader) {
|
|
1857
|
+
let _addresses = source.readCell();
|
|
1858
|
+
let _add = source.readBoolean();
|
|
1859
|
+
let _spendPerAddress = source.readBigNumber();
|
|
1860
|
+
return { $$type: 'MassUpdateWhiteList' as const, addresses: _addresses, add: _add, spendPerAddress: _spendPerAddress };
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
function storeTupleMassUpdateWhiteList(source: MassUpdateWhiteList) {
|
|
1864
|
+
let builder = new TupleBuilder();
|
|
1865
|
+
builder.writeCell(source.addresses);
|
|
1866
|
+
builder.writeBoolean(source.add);
|
|
1867
|
+
builder.writeNumber(source.spendPerAddress);
|
|
1868
|
+
return builder.build();
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
function dictValueParserMassUpdateWhiteList(): DictionaryValue<MassUpdateWhiteList> {
|
|
1872
|
+
return {
|
|
1873
|
+
serialize: (src, builder) => {
|
|
1874
|
+
builder.storeRef(beginCell().store(storeMassUpdateWhiteList(src)).endCell());
|
|
1875
|
+
},
|
|
1876
|
+
parse: (src) => {
|
|
1877
|
+
return loadMassUpdateWhiteList(src.loadRef().beginParse());
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
export type SetupCollectionData = {
|
|
1883
|
+
$$type: 'SetupCollectionData';
|
|
1884
|
+
collection_owner: Address | null;
|
|
1885
|
+
collection_item_price: bigint;
|
|
1886
|
+
user_item_limit: bigint;
|
|
1887
|
+
enable_whitelist: boolean;
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
export function storeSetupCollectionData(src: SetupCollectionData) {
|
|
1891
|
+
return (builder: Builder) => {
|
|
1892
|
+
let b_0 = builder;
|
|
1893
|
+
b_0.storeUint(562350832, 32);
|
|
1894
|
+
b_0.storeAddress(src.collection_owner);
|
|
1895
|
+
b_0.storeInt(src.collection_item_price, 257);
|
|
1896
|
+
b_0.storeInt(src.user_item_limit, 257);
|
|
1897
|
+
b_0.storeBit(src.enable_whitelist);
|
|
1898
|
+
};
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
export function loadSetupCollectionData(slice: Slice) {
|
|
1902
|
+
let sc_0 = slice;
|
|
1903
|
+
if (sc_0.loadUint(32) !== 562350832) { throw Error('Invalid prefix'); }
|
|
1904
|
+
let _collection_owner = sc_0.loadMaybeAddress();
|
|
1905
|
+
let _collection_item_price = sc_0.loadIntBig(257);
|
|
1906
|
+
let _user_item_limit = sc_0.loadIntBig(257);
|
|
1907
|
+
let _enable_whitelist = sc_0.loadBit();
|
|
1908
|
+
return { $$type: 'SetupCollectionData' as const, collection_owner: _collection_owner, collection_item_price: _collection_item_price, user_item_limit: _user_item_limit, enable_whitelist: _enable_whitelist };
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
function loadTupleSetupCollectionData(source: TupleReader) {
|
|
1912
|
+
let _collection_owner = source.readAddressOpt();
|
|
1913
|
+
let _collection_item_price = source.readBigNumber();
|
|
1914
|
+
let _user_item_limit = source.readBigNumber();
|
|
1915
|
+
let _enable_whitelist = source.readBoolean();
|
|
1916
|
+
return { $$type: 'SetupCollectionData' as const, collection_owner: _collection_owner, collection_item_price: _collection_item_price, user_item_limit: _user_item_limit, enable_whitelist: _enable_whitelist };
|
|
1917
|
+
}
|
|
1918
|
+
|
|
1919
|
+
function loadGetterTupleSetupCollectionData(source: TupleReader) {
|
|
1920
|
+
let _collection_owner = source.readAddressOpt();
|
|
1921
|
+
let _collection_item_price = source.readBigNumber();
|
|
1922
|
+
let _user_item_limit = source.readBigNumber();
|
|
1923
|
+
let _enable_whitelist = source.readBoolean();
|
|
1924
|
+
return { $$type: 'SetupCollectionData' as const, collection_owner: _collection_owner, collection_item_price: _collection_item_price, user_item_limit: _user_item_limit, enable_whitelist: _enable_whitelist };
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
function storeTupleSetupCollectionData(source: SetupCollectionData) {
|
|
1928
|
+
let builder = new TupleBuilder();
|
|
1929
|
+
builder.writeAddress(source.collection_owner);
|
|
1930
|
+
builder.writeNumber(source.collection_item_price);
|
|
1931
|
+
builder.writeNumber(source.user_item_limit);
|
|
1932
|
+
builder.writeBoolean(source.enable_whitelist);
|
|
1933
|
+
return builder.build();
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
function dictValueParserSetupCollectionData(): DictionaryValue<SetupCollectionData> {
|
|
1937
|
+
return {
|
|
1938
|
+
serialize: (src, builder) => {
|
|
1939
|
+
builder.storeRef(beginCell().store(storeSetupCollectionData(src)).endCell());
|
|
1940
|
+
},
|
|
1941
|
+
parse: (src) => {
|
|
1942
|
+
return loadSetupCollectionData(src.loadRef().beginParse());
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
export type CompleteTodo = {
|
|
1948
|
+
$$type: 'CompleteTodo';
|
|
1949
|
+
seqno: bigint;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
export function storeCompleteTodo(src: CompleteTodo) {
|
|
1953
|
+
return (builder: Builder) => {
|
|
1954
|
+
let b_0 = builder;
|
|
1955
|
+
b_0.storeUint(2587315870, 32);
|
|
1956
|
+
b_0.storeUint(src.seqno, 256);
|
|
1957
|
+
};
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
export function loadCompleteTodo(slice: Slice) {
|
|
1961
|
+
let sc_0 = slice;
|
|
1962
|
+
if (sc_0.loadUint(32) !== 2587315870) { throw Error('Invalid prefix'); }
|
|
1963
|
+
let _seqno = sc_0.loadUintBig(256);
|
|
1964
|
+
return { $$type: 'CompleteTodo' as const, seqno: _seqno };
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
function loadTupleCompleteTodo(source: TupleReader) {
|
|
1968
|
+
let _seqno = source.readBigNumber();
|
|
1969
|
+
return { $$type: 'CompleteTodo' as const, seqno: _seqno };
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
function loadGetterTupleCompleteTodo(source: TupleReader) {
|
|
1973
|
+
let _seqno = source.readBigNumber();
|
|
1974
|
+
return { $$type: 'CompleteTodo' as const, seqno: _seqno };
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
function storeTupleCompleteTodo(source: CompleteTodo) {
|
|
1978
|
+
let builder = new TupleBuilder();
|
|
1979
|
+
builder.writeNumber(source.seqno);
|
|
1980
|
+
return builder.build();
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
function dictValueParserCompleteTodo(): DictionaryValue<CompleteTodo> {
|
|
1984
|
+
return {
|
|
1985
|
+
serialize: (src, builder) => {
|
|
1986
|
+
builder.storeRef(beginCell().store(storeCompleteTodo(src)).endCell());
|
|
1987
|
+
},
|
|
1988
|
+
parse: (src) => {
|
|
1989
|
+
return loadCompleteTodo(src.loadRef().beginParse());
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
export type InternalComplete = {
|
|
1995
|
+
$$type: 'InternalComplete';
|
|
1996
|
+
excess: Address;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
export function storeInternalComplete(src: InternalComplete) {
|
|
2000
|
+
return (builder: Builder) => {
|
|
2001
|
+
let b_0 = builder;
|
|
2002
|
+
b_0.storeUint(3472919628, 32);
|
|
2003
|
+
b_0.storeAddress(src.excess);
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
|
|
2007
|
+
export function loadInternalComplete(slice: Slice) {
|
|
2008
|
+
let sc_0 = slice;
|
|
2009
|
+
if (sc_0.loadUint(32) !== 3472919628) { throw Error('Invalid prefix'); }
|
|
2010
|
+
let _excess = sc_0.loadAddress();
|
|
2011
|
+
return { $$type: 'InternalComplete' as const, excess: _excess };
|
|
2012
|
+
}
|
|
2013
|
+
|
|
2014
|
+
function loadTupleInternalComplete(source: TupleReader) {
|
|
2015
|
+
let _excess = source.readAddress();
|
|
2016
|
+
return { $$type: 'InternalComplete' as const, excess: _excess };
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
function loadGetterTupleInternalComplete(source: TupleReader) {
|
|
2020
|
+
let _excess = source.readAddress();
|
|
2021
|
+
return { $$type: 'InternalComplete' as const, excess: _excess };
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
function storeTupleInternalComplete(source: InternalComplete) {
|
|
2025
|
+
let builder = new TupleBuilder();
|
|
2026
|
+
builder.writeAddress(source.excess);
|
|
2027
|
+
return builder.build();
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
function dictValueParserInternalComplete(): DictionaryValue<InternalComplete> {
|
|
2031
|
+
return {
|
|
2032
|
+
serialize: (src, builder) => {
|
|
2033
|
+
builder.storeRef(beginCell().store(storeInternalComplete(src)).endCell());
|
|
2034
|
+
},
|
|
2035
|
+
parse: (src) => {
|
|
2036
|
+
return loadInternalComplete(src.loadRef().beginParse());
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
export type InternalAdd = {
|
|
2042
|
+
$$type: 'InternalAdd';
|
|
2043
|
+
amount: bigint;
|
|
2044
|
+
origin: Address;
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
export function storeInternalAdd(src: InternalAdd) {
|
|
2048
|
+
return (builder: Builder) => {
|
|
2049
|
+
let b_0 = builder;
|
|
2050
|
+
b_0.storeUint(306259763, 32);
|
|
2051
|
+
b_0.storeCoins(src.amount);
|
|
2052
|
+
b_0.storeAddress(src.origin);
|
|
2053
|
+
};
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
export function loadInternalAdd(slice: Slice) {
|
|
2057
|
+
let sc_0 = slice;
|
|
2058
|
+
if (sc_0.loadUint(32) !== 306259763) { throw Error('Invalid prefix'); }
|
|
2059
|
+
let _amount = sc_0.loadCoins();
|
|
2060
|
+
let _origin = sc_0.loadAddress();
|
|
2061
|
+
return { $$type: 'InternalAdd' as const, amount: _amount, origin: _origin };
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
function loadTupleInternalAdd(source: TupleReader) {
|
|
2065
|
+
let _amount = source.readBigNumber();
|
|
2066
|
+
let _origin = source.readAddress();
|
|
2067
|
+
return { $$type: 'InternalAdd' as const, amount: _amount, origin: _origin };
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
function loadGetterTupleInternalAdd(source: TupleReader) {
|
|
2071
|
+
let _amount = source.readBigNumber();
|
|
2072
|
+
let _origin = source.readAddress();
|
|
2073
|
+
return { $$type: 'InternalAdd' as const, amount: _amount, origin: _origin };
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
function storeTupleInternalAdd(source: InternalAdd) {
|
|
2077
|
+
let builder = new TupleBuilder();
|
|
2078
|
+
builder.writeNumber(source.amount);
|
|
2079
|
+
builder.writeAddress(source.origin);
|
|
2080
|
+
return builder.build();
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
function dictValueParserInternalAdd(): DictionaryValue<InternalAdd> {
|
|
2084
|
+
return {
|
|
2085
|
+
serialize: (src, builder) => {
|
|
2086
|
+
builder.storeRef(beginCell().store(storeInternalAdd(src)).endCell());
|
|
2087
|
+
},
|
|
2088
|
+
parse: (src) => {
|
|
2089
|
+
return loadInternalAdd(src.loadRef().beginParse());
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
export type TransferOwner = {
|
|
2095
|
+
$$type: 'TransferOwner';
|
|
2096
|
+
new_owner: Address;
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
export function storeTransferOwner(src: TransferOwner) {
|
|
2100
|
+
return (builder: Builder) => {
|
|
2101
|
+
let b_0 = builder;
|
|
2102
|
+
b_0.storeUint(836118768, 32);
|
|
2103
|
+
b_0.storeAddress(src.new_owner);
|
|
2104
|
+
};
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
export function loadTransferOwner(slice: Slice) {
|
|
2108
|
+
let sc_0 = slice;
|
|
2109
|
+
if (sc_0.loadUint(32) !== 836118768) { throw Error('Invalid prefix'); }
|
|
2110
|
+
let _new_owner = sc_0.loadAddress();
|
|
2111
|
+
return { $$type: 'TransferOwner' as const, new_owner: _new_owner };
|
|
2112
|
+
}
|
|
2113
|
+
|
|
2114
|
+
function loadTupleTransferOwner(source: TupleReader) {
|
|
2115
|
+
let _new_owner = source.readAddress();
|
|
2116
|
+
return { $$type: 'TransferOwner' as const, new_owner: _new_owner };
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
function loadGetterTupleTransferOwner(source: TupleReader) {
|
|
2120
|
+
let _new_owner = source.readAddress();
|
|
2121
|
+
return { $$type: 'TransferOwner' as const, new_owner: _new_owner };
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
function storeTupleTransferOwner(source: TransferOwner) {
|
|
2125
|
+
let builder = new TupleBuilder();
|
|
2126
|
+
builder.writeAddress(source.new_owner);
|
|
2127
|
+
return builder.build();
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
function dictValueParserTransferOwner(): DictionaryValue<TransferOwner> {
|
|
2131
|
+
return {
|
|
2132
|
+
serialize: (src, builder) => {
|
|
2133
|
+
builder.storeRef(beginCell().store(storeTransferOwner(src)).endCell());
|
|
2134
|
+
},
|
|
2135
|
+
parse: (src) => {
|
|
2136
|
+
return loadTransferOwner(src.loadRef().beginParse());
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
export type Withdraw = {
|
|
2142
|
+
$$type: 'Withdraw';
|
|
2143
|
+
to: Address;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
export function storeWithdraw(src: Withdraw) {
|
|
2147
|
+
return (builder: Builder) => {
|
|
2148
|
+
let b_0 = builder;
|
|
2149
|
+
b_0.storeUint(1318511648, 32);
|
|
2150
|
+
b_0.storeAddress(src.to);
|
|
2151
|
+
};
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
export function loadWithdraw(slice: Slice) {
|
|
2155
|
+
let sc_0 = slice;
|
|
2156
|
+
if (sc_0.loadUint(32) !== 1318511648) { throw Error('Invalid prefix'); }
|
|
2157
|
+
let _to = sc_0.loadAddress();
|
|
2158
|
+
return { $$type: 'Withdraw' as const, to: _to };
|
|
2159
|
+
}
|
|
2160
|
+
|
|
2161
|
+
function loadTupleWithdraw(source: TupleReader) {
|
|
2162
|
+
let _to = source.readAddress();
|
|
2163
|
+
return { $$type: 'Withdraw' as const, to: _to };
|
|
2164
|
+
}
|
|
2165
|
+
|
|
2166
|
+
function loadGetterTupleWithdraw(source: TupleReader) {
|
|
2167
|
+
let _to = source.readAddress();
|
|
2168
|
+
return { $$type: 'Withdraw' as const, to: _to };
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
function storeTupleWithdraw(source: Withdraw) {
|
|
2172
|
+
let builder = new TupleBuilder();
|
|
2173
|
+
builder.writeAddress(source.to);
|
|
2174
|
+
return builder.build();
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
function dictValueParserWithdraw(): DictionaryValue<Withdraw> {
|
|
2178
|
+
return {
|
|
2179
|
+
serialize: (src, builder) => {
|
|
2180
|
+
builder.storeRef(beginCell().store(storeWithdraw(src)).endCell());
|
|
2181
|
+
},
|
|
2182
|
+
parse: (src) => {
|
|
2183
|
+
return loadWithdraw(src.loadRef().beginParse());
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
export type MasterData = {
|
|
2189
|
+
$$type: 'MasterData';
|
|
2190
|
+
master: Address;
|
|
2191
|
+
next_collection_index: bigint;
|
|
2192
|
+
collection_creation_price: bigint;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
export function storeMasterData(src: MasterData) {
|
|
2196
|
+
return (builder: Builder) => {
|
|
2197
|
+
let b_0 = builder;
|
|
2198
|
+
b_0.storeAddress(src.master);
|
|
2199
|
+
b_0.storeInt(src.next_collection_index, 257);
|
|
2200
|
+
b_0.storeInt(src.collection_creation_price, 257);
|
|
2201
|
+
};
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
export function loadMasterData(slice: Slice) {
|
|
2205
|
+
let sc_0 = slice;
|
|
2206
|
+
let _master = sc_0.loadAddress();
|
|
2207
|
+
let _next_collection_index = sc_0.loadIntBig(257);
|
|
2208
|
+
let _collection_creation_price = sc_0.loadIntBig(257);
|
|
2209
|
+
return { $$type: 'MasterData' as const, master: _master, next_collection_index: _next_collection_index, collection_creation_price: _collection_creation_price };
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
function loadTupleMasterData(source: TupleReader) {
|
|
2213
|
+
let _master = source.readAddress();
|
|
2214
|
+
let _next_collection_index = source.readBigNumber();
|
|
2215
|
+
let _collection_creation_price = source.readBigNumber();
|
|
2216
|
+
return { $$type: 'MasterData' as const, master: _master, next_collection_index: _next_collection_index, collection_creation_price: _collection_creation_price };
|
|
2217
|
+
}
|
|
2218
|
+
|
|
2219
|
+
function loadGetterTupleMasterData(source: TupleReader) {
|
|
2220
|
+
let _master = source.readAddress();
|
|
2221
|
+
let _next_collection_index = source.readBigNumber();
|
|
2222
|
+
let _collection_creation_price = source.readBigNumber();
|
|
2223
|
+
return { $$type: 'MasterData' as const, master: _master, next_collection_index: _next_collection_index, collection_creation_price: _collection_creation_price };
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
function storeTupleMasterData(source: MasterData) {
|
|
2227
|
+
let builder = new TupleBuilder();
|
|
2228
|
+
builder.writeAddress(source.master);
|
|
2229
|
+
builder.writeNumber(source.next_collection_index);
|
|
2230
|
+
builder.writeNumber(source.collection_creation_price);
|
|
2231
|
+
return builder.build();
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
function dictValueParserMasterData(): DictionaryValue<MasterData> {
|
|
2235
|
+
return {
|
|
2236
|
+
serialize: (src, builder) => {
|
|
2237
|
+
builder.storeRef(beginCell().store(storeMasterData(src)).endCell());
|
|
2238
|
+
},
|
|
2239
|
+
parse: (src) => {
|
|
2240
|
+
return loadMasterData(src.loadRef().beginParse());
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
export type NftItem$Data = {
|
|
2246
|
+
$$type: 'NftItem$Data';
|
|
2247
|
+
collection_address: Address;
|
|
2248
|
+
item_index: bigint;
|
|
2249
|
+
is_initialized: boolean;
|
|
2250
|
+
owner: Address | null;
|
|
2251
|
+
individual_content: Cell | null;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
export function storeNftItem$Data(src: NftItem$Data) {
|
|
2255
|
+
return (builder: Builder) => {
|
|
2256
|
+
let b_0 = builder;
|
|
2257
|
+
b_0.storeAddress(src.collection_address);
|
|
2258
|
+
b_0.storeUint(src.item_index, 32);
|
|
2259
|
+
b_0.storeBit(src.is_initialized);
|
|
2260
|
+
b_0.storeAddress(src.owner);
|
|
2261
|
+
if (src.individual_content !== null && src.individual_content !== undefined) { b_0.storeBit(true).storeRef(src.individual_content); } else { b_0.storeBit(false); }
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
export function loadNftItem$Data(slice: Slice) {
|
|
2266
|
+
let sc_0 = slice;
|
|
2267
|
+
let _collection_address = sc_0.loadAddress();
|
|
2268
|
+
let _item_index = sc_0.loadUintBig(32);
|
|
2269
|
+
let _is_initialized = sc_0.loadBit();
|
|
2270
|
+
let _owner = sc_0.loadMaybeAddress();
|
|
2271
|
+
let _individual_content = sc_0.loadBit() ? sc_0.loadRef() : null;
|
|
2272
|
+
return { $$type: 'NftItem$Data' as const, collection_address: _collection_address, item_index: _item_index, is_initialized: _is_initialized, owner: _owner, individual_content: _individual_content };
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
function loadTupleNftItem$Data(source: TupleReader) {
|
|
2276
|
+
let _collection_address = source.readAddress();
|
|
2277
|
+
let _item_index = source.readBigNumber();
|
|
2278
|
+
let _is_initialized = source.readBoolean();
|
|
2279
|
+
let _owner = source.readAddressOpt();
|
|
2280
|
+
let _individual_content = source.readCellOpt();
|
|
2281
|
+
return { $$type: 'NftItem$Data' as const, collection_address: _collection_address, item_index: _item_index, is_initialized: _is_initialized, owner: _owner, individual_content: _individual_content };
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
function loadGetterTupleNftItem$Data(source: TupleReader) {
|
|
2285
|
+
let _collection_address = source.readAddress();
|
|
2286
|
+
let _item_index = source.readBigNumber();
|
|
2287
|
+
let _is_initialized = source.readBoolean();
|
|
2288
|
+
let _owner = source.readAddressOpt();
|
|
2289
|
+
let _individual_content = source.readCellOpt();
|
|
2290
|
+
return { $$type: 'NftItem$Data' as const, collection_address: _collection_address, item_index: _item_index, is_initialized: _is_initialized, owner: _owner, individual_content: _individual_content };
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
function storeTupleNftItem$Data(source: NftItem$Data) {
|
|
2294
|
+
let builder = new TupleBuilder();
|
|
2295
|
+
builder.writeAddress(source.collection_address);
|
|
2296
|
+
builder.writeNumber(source.item_index);
|
|
2297
|
+
builder.writeBoolean(source.is_initialized);
|
|
2298
|
+
builder.writeAddress(source.owner);
|
|
2299
|
+
builder.writeCell(source.individual_content);
|
|
2300
|
+
return builder.build();
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
function dictValueParserNftItem$Data(): DictionaryValue<NftItem$Data> {
|
|
2304
|
+
return {
|
|
2305
|
+
serialize: (src, builder) => {
|
|
2306
|
+
builder.storeRef(beginCell().store(storeNftItem$Data(src)).endCell());
|
|
2307
|
+
},
|
|
2308
|
+
parse: (src) => {
|
|
2309
|
+
return loadNftItem$Data(src.loadRef().beginParse());
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
|
|
2314
|
+
export type SbtItem$Data = {
|
|
2315
|
+
$$type: 'SbtItem$Data';
|
|
2316
|
+
collection_address: Address;
|
|
2317
|
+
item_index: bigint;
|
|
2318
|
+
is_initialized: boolean;
|
|
2319
|
+
owner: Address | null;
|
|
2320
|
+
individual_content: Cell | null;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
export function storeSbtItem$Data(src: SbtItem$Data) {
|
|
2324
|
+
return (builder: Builder) => {
|
|
2325
|
+
let b_0 = builder;
|
|
2326
|
+
b_0.storeAddress(src.collection_address);
|
|
2327
|
+
b_0.storeUint(src.item_index, 32);
|
|
2328
|
+
b_0.storeBit(src.is_initialized);
|
|
2329
|
+
b_0.storeAddress(src.owner);
|
|
2330
|
+
if (src.individual_content !== null && src.individual_content !== undefined) { b_0.storeBit(true).storeRef(src.individual_content); } else { b_0.storeBit(false); }
|
|
2331
|
+
};
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
export function loadSbtItem$Data(slice: Slice) {
|
|
2335
|
+
let sc_0 = slice;
|
|
2336
|
+
let _collection_address = sc_0.loadAddress();
|
|
2337
|
+
let _item_index = sc_0.loadUintBig(32);
|
|
2338
|
+
let _is_initialized = sc_0.loadBit();
|
|
2339
|
+
let _owner = sc_0.loadMaybeAddress();
|
|
2340
|
+
let _individual_content = sc_0.loadBit() ? sc_0.loadRef() : null;
|
|
2341
|
+
return { $$type: 'SbtItem$Data' as const, collection_address: _collection_address, item_index: _item_index, is_initialized: _is_initialized, owner: _owner, individual_content: _individual_content };
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
function loadTupleSbtItem$Data(source: TupleReader) {
|
|
2345
|
+
let _collection_address = source.readAddress();
|
|
2346
|
+
let _item_index = source.readBigNumber();
|
|
2347
|
+
let _is_initialized = source.readBoolean();
|
|
2348
|
+
let _owner = source.readAddressOpt();
|
|
2349
|
+
let _individual_content = source.readCellOpt();
|
|
2350
|
+
return { $$type: 'SbtItem$Data' as const, collection_address: _collection_address, item_index: _item_index, is_initialized: _is_initialized, owner: _owner, individual_content: _individual_content };
|
|
2351
|
+
}
|
|
2352
|
+
|
|
2353
|
+
function loadGetterTupleSbtItem$Data(source: TupleReader) {
|
|
2354
|
+
let _collection_address = source.readAddress();
|
|
2355
|
+
let _item_index = source.readBigNumber();
|
|
2356
|
+
let _is_initialized = source.readBoolean();
|
|
2357
|
+
let _owner = source.readAddressOpt();
|
|
2358
|
+
let _individual_content = source.readCellOpt();
|
|
2359
|
+
return { $$type: 'SbtItem$Data' as const, collection_address: _collection_address, item_index: _item_index, is_initialized: _is_initialized, owner: _owner, individual_content: _individual_content };
|
|
2360
|
+
}
|
|
2361
|
+
|
|
2362
|
+
function storeTupleSbtItem$Data(source: SbtItem$Data) {
|
|
2363
|
+
let builder = new TupleBuilder();
|
|
2364
|
+
builder.writeAddress(source.collection_address);
|
|
2365
|
+
builder.writeNumber(source.item_index);
|
|
2366
|
+
builder.writeBoolean(source.is_initialized);
|
|
2367
|
+
builder.writeAddress(source.owner);
|
|
2368
|
+
builder.writeCell(source.individual_content);
|
|
2369
|
+
return builder.build();
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
function dictValueParserSbtItem$Data(): DictionaryValue<SbtItem$Data> {
|
|
2373
|
+
return {
|
|
2374
|
+
serialize: (src, builder) => {
|
|
2375
|
+
builder.storeRef(beginCell().store(storeSbtItem$Data(src)).endCell());
|
|
2376
|
+
},
|
|
2377
|
+
parse: (src) => {
|
|
2378
|
+
return loadSbtItem$Data(src.loadRef().beginParse());
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
export type BuyerProfile$Data = {
|
|
2384
|
+
$$type: 'BuyerProfile$Data';
|
|
2385
|
+
collection_address: Address;
|
|
2386
|
+
collection_owner: Address | null;
|
|
2387
|
+
collection_item_price: bigint;
|
|
2388
|
+
owner: Address;
|
|
2389
|
+
is_initialized: boolean;
|
|
2390
|
+
is_whitelisted: boolean;
|
|
2391
|
+
enable_whitelist: boolean;
|
|
2392
|
+
user_item_limit: bigint;
|
|
2393
|
+
user_item_count: bigint;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
export function storeBuyerProfile$Data(src: BuyerProfile$Data) {
|
|
2397
|
+
return (builder: Builder) => {
|
|
2398
|
+
let b_0 = builder;
|
|
2399
|
+
b_0.storeAddress(src.collection_address);
|
|
2400
|
+
b_0.storeAddress(src.collection_owner);
|
|
2401
|
+
b_0.storeUint(src.collection_item_price, 32);
|
|
2402
|
+
b_0.storeAddress(src.owner);
|
|
2403
|
+
b_0.storeBit(src.is_initialized);
|
|
2404
|
+
b_0.storeBit(src.is_whitelisted);
|
|
2405
|
+
b_0.storeBit(src.enable_whitelist);
|
|
2406
|
+
b_0.storeUint(src.user_item_limit, 8);
|
|
2407
|
+
b_0.storeUint(src.user_item_count, 8);
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
export function loadBuyerProfile$Data(slice: Slice) {
|
|
2412
|
+
let sc_0 = slice;
|
|
2413
|
+
let _collection_address = sc_0.loadAddress();
|
|
2414
|
+
let _collection_owner = sc_0.loadMaybeAddress();
|
|
2415
|
+
let _collection_item_price = sc_0.loadUintBig(32);
|
|
2416
|
+
let _owner = sc_0.loadAddress();
|
|
2417
|
+
let _is_initialized = sc_0.loadBit();
|
|
2418
|
+
let _is_whitelisted = sc_0.loadBit();
|
|
2419
|
+
let _enable_whitelist = sc_0.loadBit();
|
|
2420
|
+
let _user_item_limit = sc_0.loadUintBig(8);
|
|
2421
|
+
let _user_item_count = sc_0.loadUintBig(8);
|
|
2422
|
+
return { $$type: 'BuyerProfile$Data' as const, collection_address: _collection_address, collection_owner: _collection_owner, collection_item_price: _collection_item_price, owner: _owner, is_initialized: _is_initialized, is_whitelisted: _is_whitelisted, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit, user_item_count: _user_item_count };
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
function loadTupleBuyerProfile$Data(source: TupleReader) {
|
|
2426
|
+
let _collection_address = source.readAddress();
|
|
2427
|
+
let _collection_owner = source.readAddressOpt();
|
|
2428
|
+
let _collection_item_price = source.readBigNumber();
|
|
2429
|
+
let _owner = source.readAddress();
|
|
2430
|
+
let _is_initialized = source.readBoolean();
|
|
2431
|
+
let _is_whitelisted = source.readBoolean();
|
|
2432
|
+
let _enable_whitelist = source.readBoolean();
|
|
2433
|
+
let _user_item_limit = source.readBigNumber();
|
|
2434
|
+
let _user_item_count = source.readBigNumber();
|
|
2435
|
+
return { $$type: 'BuyerProfile$Data' as const, collection_address: _collection_address, collection_owner: _collection_owner, collection_item_price: _collection_item_price, owner: _owner, is_initialized: _is_initialized, is_whitelisted: _is_whitelisted, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit, user_item_count: _user_item_count };
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
function loadGetterTupleBuyerProfile$Data(source: TupleReader) {
|
|
2439
|
+
let _collection_address = source.readAddress();
|
|
2440
|
+
let _collection_owner = source.readAddressOpt();
|
|
2441
|
+
let _collection_item_price = source.readBigNumber();
|
|
2442
|
+
let _owner = source.readAddress();
|
|
2443
|
+
let _is_initialized = source.readBoolean();
|
|
2444
|
+
let _is_whitelisted = source.readBoolean();
|
|
2445
|
+
let _enable_whitelist = source.readBoolean();
|
|
2446
|
+
let _user_item_limit = source.readBigNumber();
|
|
2447
|
+
let _user_item_count = source.readBigNumber();
|
|
2448
|
+
return { $$type: 'BuyerProfile$Data' as const, collection_address: _collection_address, collection_owner: _collection_owner, collection_item_price: _collection_item_price, owner: _owner, is_initialized: _is_initialized, is_whitelisted: _is_whitelisted, enable_whitelist: _enable_whitelist, user_item_limit: _user_item_limit, user_item_count: _user_item_count };
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
function storeTupleBuyerProfile$Data(source: BuyerProfile$Data) {
|
|
2452
|
+
let builder = new TupleBuilder();
|
|
2453
|
+
builder.writeAddress(source.collection_address);
|
|
2454
|
+
builder.writeAddress(source.collection_owner);
|
|
2455
|
+
builder.writeNumber(source.collection_item_price);
|
|
2456
|
+
builder.writeAddress(source.owner);
|
|
2457
|
+
builder.writeBoolean(source.is_initialized);
|
|
2458
|
+
builder.writeBoolean(source.is_whitelisted);
|
|
2459
|
+
builder.writeBoolean(source.enable_whitelist);
|
|
2460
|
+
builder.writeNumber(source.user_item_limit);
|
|
2461
|
+
builder.writeNumber(source.user_item_count);
|
|
2462
|
+
return builder.build();
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
function dictValueParserBuyerProfile$Data(): DictionaryValue<BuyerProfile$Data> {
|
|
2466
|
+
return {
|
|
2467
|
+
serialize: (src, builder) => {
|
|
2468
|
+
builder.storeRef(beginCell().store(storeBuyerProfile$Data(src)).endCell());
|
|
2469
|
+
},
|
|
2470
|
+
parse: (src) => {
|
|
2471
|
+
return loadBuyerProfile$Data(src.loadRef().beginParse());
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
export type SimpleNftMaster$Data = {
|
|
2477
|
+
$$type: 'SimpleNftMaster$Data';
|
|
2478
|
+
owner: Address;
|
|
2479
|
+
next_collection_index: bigint;
|
|
2480
|
+
collection_creation_price: bigint;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
export function storeSimpleNftMaster$Data(src: SimpleNftMaster$Data) {
|
|
2484
|
+
return (builder: Builder) => {
|
|
2485
|
+
let b_0 = builder;
|
|
2486
|
+
b_0.storeAddress(src.owner);
|
|
2487
|
+
b_0.storeInt(src.next_collection_index, 257);
|
|
2488
|
+
b_0.storeUint(src.collection_creation_price, 32);
|
|
2489
|
+
};
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
export function loadSimpleNftMaster$Data(slice: Slice) {
|
|
2493
|
+
let sc_0 = slice;
|
|
2494
|
+
let _owner = sc_0.loadAddress();
|
|
2495
|
+
let _next_collection_index = sc_0.loadIntBig(257);
|
|
2496
|
+
let _collection_creation_price = sc_0.loadUintBig(32);
|
|
2497
|
+
return { $$type: 'SimpleNftMaster$Data' as const, owner: _owner, next_collection_index: _next_collection_index, collection_creation_price: _collection_creation_price };
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
function loadTupleSimpleNftMaster$Data(source: TupleReader) {
|
|
2501
|
+
let _owner = source.readAddress();
|
|
2502
|
+
let _next_collection_index = source.readBigNumber();
|
|
2503
|
+
let _collection_creation_price = source.readBigNumber();
|
|
2504
|
+
return { $$type: 'SimpleNftMaster$Data' as const, owner: _owner, next_collection_index: _next_collection_index, collection_creation_price: _collection_creation_price };
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
function loadGetterTupleSimpleNftMaster$Data(source: TupleReader) {
|
|
2508
|
+
let _owner = source.readAddress();
|
|
2509
|
+
let _next_collection_index = source.readBigNumber();
|
|
2510
|
+
let _collection_creation_price = source.readBigNumber();
|
|
2511
|
+
return { $$type: 'SimpleNftMaster$Data' as const, owner: _owner, next_collection_index: _next_collection_index, collection_creation_price: _collection_creation_price };
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
function storeTupleSimpleNftMaster$Data(source: SimpleNftMaster$Data) {
|
|
2515
|
+
let builder = new TupleBuilder();
|
|
2516
|
+
builder.writeAddress(source.owner);
|
|
2517
|
+
builder.writeNumber(source.next_collection_index);
|
|
2518
|
+
builder.writeNumber(source.collection_creation_price);
|
|
2519
|
+
return builder.build();
|
|
2520
|
+
}
|
|
2521
|
+
|
|
2522
|
+
function dictValueParserSimpleNftMaster$Data(): DictionaryValue<SimpleNftMaster$Data> {
|
|
2523
|
+
return {
|
|
2524
|
+
serialize: (src, builder) => {
|
|
2525
|
+
builder.storeRef(beginCell().store(storeSimpleNftMaster$Data(src)).endCell());
|
|
2526
|
+
},
|
|
2527
|
+
parse: (src) => {
|
|
2528
|
+
return loadSimpleNftMaster$Data(src.loadRef().beginParse());
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2533
|
+
type SimpleNftCollectionV2_init_args = {
|
|
2534
|
+
$$type: 'SimpleNftCollectionV2_init_args';
|
|
2535
|
+
master_address: Address;
|
|
2536
|
+
collection_index: bigint;
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2539
|
+
function initSimpleNftCollectionV2_init_args(src: SimpleNftCollectionV2_init_args) {
|
|
2540
|
+
return (builder: Builder) => {
|
|
2541
|
+
let b_0 = builder;
|
|
2542
|
+
b_0.storeAddress(src.master_address);
|
|
2543
|
+
b_0.storeInt(src.collection_index, 257);
|
|
2544
|
+
};
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
async function SimpleNftCollectionV2_init(master_address: Address, collection_index: bigint) {
|
|
2548
|
+
const __code = Cell.fromBase64('te6ccgECUAEAEKMAART/APSkE/S88sgLAQIBYgIDA6bQAdDTAwFxsKMB+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiFRQUwNvBPhhAvhi2zwOERAOEN9VHNs88uCCyPhDAcx/AcoAVeDbPMntVEgEBQIBICYnBOrtou37AZIwf+BwIddJwh+VMCDXCx/eIIIQxebyG7qOuDDbPGwePD09PT09Pj4+Pj4/gQoP+EJS8McF8vSCAJpbCMAAGPL0SphvAxBrCRBoBxBWEDV/RFV/4CCCEE6W5CC64wIgghAUUHxkuuMCIIIQaT05ULoGBwgJBPRQ78sfHMsfUAogbpUwcAHLAY4eINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8W4lAIINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WyCdus5Y3cFAHygDjDSVus5Z/AcoAFcyWNXBQBcoA4iNus+MPyx8ByA0ODxABpNMfAYIQxebyG7ry4IH6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIAfpAASDXSYEBC7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7ry4Igg1wsKIIEE/7ry0ImDCbry4IjPFskqWXJ/BEMTbW3bPKR3AcrIcQHKAVAHAcoAcAHKAlAFINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiM8WUAP6AnABymgjbrORf5MkbrPilzMzAXABygDjDSFus5x/AcoAASBu8tCAAcyVMXABygDiyQH7AHgAmH8BygDIcAHKAHABygAkbrOdfwHKAAQgbvLQgFAEzJY0A3ABygDiJG6znX8BygAEIG7y0IBQBMyWNANwAcoA4nABygACfwHKAALJWMwBFsj4QwHMfwHKAFWAegD2UJgg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIzxZQBiBulTBwAcsBjh4g10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIzxbiFMsfWCDXSYEBC7ry4Igg1wsKIIEE/7ry0ImDCbry4IjPFsoAygDKABLLB8sHye1UAgEgfIUCAWp9fwIRs2x2zzbPGyRggH4AAiMCEbLuts82zxskYICEAsLtRNDUAfhj0gABjoTbPGwZ4Pgo1wsKgwm68uCJ+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiAH6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIEgLRAds8gYMB9PpAASDXSYEBC7ry4Igg1wsKIIEE/7ry0ImDCbry4IgBINcLAcMAjh/6QAEg10mBAQu68uCIINcLCiCBBP+68tCJgwm68uCIlHLXIW3iAdMf+kABINdJgQELuvLgiCDXCwoggQT/uvLQiYMJuvLgiAHSANIA0gDTB9MHggAEVYAAGm1wcHBTIhBWEEVwVSAAAiAAEb4V92omhpAADAQmIgQ=');
|
|
2550
|
+
let builder = beginCell();
|
|
2551
|
+
builder.storeRef(__system);
|
|
2552
|
+
builder.storeUint(0, 1);
|
|
2553
|
+
initSimpleNftCollectionV2_init_args({ $$type: 'SimpleNftCollectionV2_init_args', master_address, collection_index })(builder);
|
|
2554
|
+
const __data = builder.endCell();
|
|
2555
|
+
return { code: __code, data: __data };
|
|
2556
|
+
}
|
|
2557
|
+
|
|
2558
|
+
const SimpleNftCollectionV2_errors: { [key: number]: { message: string } } = {
|
|
2559
|
+
2: { message: `Stack underflow` },
|
|
2560
|
+
3: { message: `Stack overflow` },
|
|
2561
|
+
4: { message: `Integer overflow` },
|
|
2562
|
+
5: { message: `Integer out of expected range` },
|
|
2563
|
+
6: { message: `Invalid opcode` },
|
|
2564
|
+
7: { message: `Type check error` },
|
|
2565
|
+
8: { message: `Cell overflow` },
|
|
2566
|
+
9: { message: `Cell underflow` },
|
|
2567
|
+
10: { message: `Dictionary error` },
|
|
2568
|
+
13: { message: `Out of gas error` },
|
|
2569
|
+
32: { message: `Method ID not found` },
|
|
2570
|
+
34: { message: `Action is invalid or not supported` },
|
|
2571
|
+
37: { message: `Not enough TON` },
|
|
2572
|
+
38: { message: `Not enough extra-currencies` },
|
|
2573
|
+
128: { message: `Null reference exception` },
|
|
2574
|
+
129: { message: `Invalid serialization prefix` },
|
|
2575
|
+
130: { message: `Invalid incoming message` },
|
|
2576
|
+
131: { message: `Constraints error` },
|
|
2577
|
+
132: { message: `Access denied` },
|
|
2578
|
+
133: { message: `Contract stopped` },
|
|
2579
|
+
134: { message: `Invalid argument` },
|
|
2580
|
+
135: { message: `Code of a contract was not found` },
|
|
2581
|
+
136: { message: `Invalid address` },
|
|
2582
|
+
137: { message: `Masterchain support is not enabled for this contract` },
|
|
2583
|
+
1040: { message: `Parent Only` },
|
|
2584
|
+
1139: { message: `NFT creation underpriced` },
|
|
2585
|
+
2575: { message: `Not from master` },
|
|
2586
|
+
4183: { message: `Mint time limit reached` },
|
|
2587
|
+
5887: { message: `Token price too low` },
|
|
2588
|
+
15074: { message: `Not from owner` },
|
|
2589
|
+
16095: { message: `non-sequential Collections` },
|
|
2590
|
+
18532: { message: `From profile only` },
|
|
2591
|
+
27071: { message: `White list required` },
|
|
2592
|
+
27499: { message: `initialized tx need from collection` },
|
|
2593
|
+
28288: { message: `Not a collection owner` },
|
|
2594
|
+
30203: { message: `Profile not nessesary for this collection` },
|
|
2595
|
+
31551: { message: `Creation underpriced` },
|
|
2596
|
+
34877: { message: `Collection settings is not setup` },
|
|
2597
|
+
39515: { message: `Collection settings is already setup` },
|
|
2598
|
+
48619: { message: `1` },
|
|
2599
|
+
48823: { message: `Profile owner only` },
|
|
2600
|
+
49280: { message: `not owner` },
|
|
2601
|
+
49469: { message: `not from collection` },
|
|
2602
|
+
51255: { message: `Another method for profiles` },
|
|
2603
|
+
53651: { message: `Sbt transfer for init only` },
|
|
2604
|
+
55378: { message: `Mint limit per user reached` },
|
|
2605
|
+
56768: { message: `Collection must have time to mint` },
|
|
2606
|
+
57324: { message: `Mint limit reached` },
|
|
2607
|
+
59318: { message: `Already setup` },
|
|
2608
|
+
62742: { message: `non-sequential NFTs` },
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
const SimpleNftCollectionV2_types: ABIType[] = [
|
|
2612
|
+
{"name":"StateInit","header":null,"fields":[{"name":"code","type":{"kind":"simple","type":"cell","optional":false}},{"name":"data","type":{"kind":"simple","type":"cell","optional":false}}]},
|
|
2613
|
+
{"name":"Context","header":null,"fields":[{"name":"bounced","type":{"kind":"simple","type":"bool","optional":false}},{"name":"sender","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"raw","type":{"kind":"simple","type":"slice","optional":false}}]},
|
|
2614
|
+
{"name":"SendParameters","header":null,"fields":[{"name":"bounce","type":{"kind":"simple","type":"bool","optional":false}},{"name":"to","type":{"kind":"simple","type":"address","optional":false}},{"name":"value","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mode","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"body","type":{"kind":"simple","type":"cell","optional":true}},{"name":"code","type":{"kind":"simple","type":"cell","optional":true}},{"name":"data","type":{"kind":"simple","type":"cell","optional":true}}]},
|
|
2615
|
+
{"name":"Deploy","header":2490013878,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2616
|
+
{"name":"DeployOk","header":2952335191,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2617
|
+
{"name":"FactoryDeploy","header":1829761339,"fields":[{"name":"queryId","type":{"kind":"simple","type":"uint","optional":false,"format":64}},{"name":"cashback","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2618
|
+
{"name":"SimpleNftCollectionV2$Data","header":null,"fields":[{"name":"next_item_index","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"collection_index","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"owner_address","type":{"kind":"simple","type":"address","optional":true}},{"name":"master_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"royalty_params","type":{"kind":"simple","type":"RoyaltyParams","optional":true}},{"name":"collection_content","type":{"kind":"simple","type":"cell","optional":true}},{"name":"individual_content_url","type":{"kind":"simple","type":"cell","optional":true}},{"name":"mint_limit","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"price","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"is_setup","type":{"kind":"simple","type":"bool","optional":false}},{"name":"is_sbt","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mint_time_limit","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"enable_profile","type":{"kind":"simple","type":"bool","optional":false}},{"name":"user_item_limit","type":{"kind":"simple","type":"uint","optional":false,"format":8}},{"name":"enable_whitelist","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2619
|
+
{"name":"LogEventMintRecord","header":2743565669,"fields":[{"name":"minter","type":{"kind":"simple","type":"address","optional":false}},{"name":"item_id","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"generate_number","type":{"kind":"simple","type":"int","optional":false,"format":257}}]},
|
|
2620
|
+
{"name":"GetRoyaltyParams","header":1765620048,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2621
|
+
{"name":"GetProfile","header":3300596689,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2622
|
+
{"name":"ReportRoyaltyParams","header":2831876269,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}},{"name":"numerator","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"denominator","type":{"kind":"simple","type":"uint","optional":false,"format":16}},{"name":"destination","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2623
|
+
{"name":"CollectionData","header":null,"fields":[{"name":"next_item_index","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"collection_content","type":{"kind":"simple","type":"cell","optional":false}},{"name":"owner_address","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2624
|
+
{"name":"RoyaltyParams","header":null,"fields":[{"name":"numerator","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"denominator","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"destination","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2625
|
+
{"name":"CollectionSetupParams","header":3320246811,"fields":[{"name":"owner_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"master_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"collection_content","type":{"kind":"simple","type":"cell","optional":false}},{"name":"nft_individual_content_url","type":{"kind":"simple","type":"cell","optional":false}},{"name":"royalty_params","type":{"kind":"simple","type":"RoyaltyParams","optional":false}},{"name":"mint_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"nft_price","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mint_time_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"is_sbt","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"enable_profile","type":{"kind":"simple","type":"bool","optional":false}},{"name":"enable_whitelist","type":{"kind":"simple","type":"bool","optional":false}},{"name":"user_item_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}}]},
|
|
2626
|
+
{"name":"UpdateWhiteList","header":2983121044,"fields":[{"name":"user","type":{"kind":"simple","type":"address","optional":false}},{"name":"whitelist","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2627
|
+
{"name":"AddToWhiteList","header":2854654268,"fields":[{"name":"add","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2628
|
+
{"name":"CollectionMintParams","header":3164622941,"fields":[{"name":"queryId","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"owner_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"collection_content","type":{"kind":"simple","type":"cell","optional":false}},{"name":"nft_individual_content_url","type":{"kind":"simple","type":"cell","optional":false}},{"name":"royalty_params","type":{"kind":"simple","type":"RoyaltyParams","optional":false}},{"name":"mint_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mint_time_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"is_sbt","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"nft_price","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"enable_profile","type":{"kind":"simple","type":"bool","optional":false}},{"name":"enable_whitelist","type":{"kind":"simple","type":"bool","optional":false}},{"name":"user_item_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}}]},
|
|
2629
|
+
{"name":"ProfileData","header":1499272752,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}},{"name":"user","type":{"kind":"simple","type":"address","optional":false}},{"name":"is_whitelisted","type":{"kind":"simple","type":"bool","optional":false}},{"name":"is_blacklisted","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2630
|
+
{"name":"Transfer","header":1607220500,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}},{"name":"new_owner","type":{"kind":"simple","type":"address","optional":false}},{"name":"response_destination","type":{"kind":"simple","type":"address","optional":true}},{"name":"custom_payload","type":{"kind":"simple","type":"cell","optional":true}},{"name":"forward_amount","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"forward_payload","type":{"kind":"simple","type":"slice","optional":false,"format":"remainder"}}]},
|
|
2631
|
+
{"name":"OwnershipAssigned","header":85167505,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}},{"name":"prev_owner","type":{"kind":"simple","type":"address","optional":false}},{"name":"forward_payload","type":{"kind":"simple","type":"slice","optional":false,"format":"remainder"}}]},
|
|
2632
|
+
{"name":"Excesses","header":3576854235,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2633
|
+
{"name":"GetStaticData","header":801842850,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2634
|
+
{"name":"ReportStaticData","header":2339837749,"fields":[{"name":"query_id","type":{"kind":"simple","type":"uint","optional":false,"format":64}},{"name":"index_id","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"collection","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2635
|
+
{"name":"GetNftData","header":null,"fields":[{"name":"is_initialized","type":{"kind":"simple","type":"bool","optional":false}},{"name":"index","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"collection_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"owner_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"individual_content","type":{"kind":"simple","type":"cell","optional":false}}]},
|
|
2636
|
+
{"name":"CollectionMasterData","header":null,"fields":[{"name":"master","type":{"kind":"simple","type":"address","optional":false}},{"name":"mint_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"price","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mint_time_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"is_sbt","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"index_in_collection","type":{"kind":"simple","type":"int","optional":false,"format":257}}]},
|
|
2637
|
+
{"name":"CollectionMasterDataV2","header":null,"fields":[{"name":"master","type":{"kind":"simple","type":"address","optional":false}},{"name":"mint_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"price","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"mint_time_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"is_sbt","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"index_in_collection","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"enable_whitelist","type":{"kind":"simple","type":"bool","optional":false}},{"name":"user_item_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}}]},
|
|
2638
|
+
{"name":"MintTo","header":340819044,"fields":[{"name":"owner","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2639
|
+
{"name":"MassUpdateWhiteList","header":1197680529,"fields":[{"name":"addresses","type":{"kind":"simple","type":"cell","optional":false}},{"name":"add","type":{"kind":"simple","type":"bool","optional":false}},{"name":"spendPerAddress","type":{"kind":"simple","type":"uint","optional":false,"format":64}}]},
|
|
2640
|
+
{"name":"SetupCollectionData","header":562350832,"fields":[{"name":"collection_owner","type":{"kind":"simple","type":"address","optional":true}},{"name":"collection_item_price","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"user_item_limit","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"enable_whitelist","type":{"kind":"simple","type":"bool","optional":false}}]},
|
|
2641
|
+
{"name":"CompleteTodo","header":2587315870,"fields":[{"name":"seqno","type":{"kind":"simple","type":"uint","optional":false,"format":256}}]},
|
|
2642
|
+
{"name":"InternalComplete","header":3472919628,"fields":[{"name":"excess","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2643
|
+
{"name":"InternalAdd","header":306259763,"fields":[{"name":"amount","type":{"kind":"simple","type":"uint","optional":false,"format":"coins"}},{"name":"origin","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2644
|
+
{"name":"TransferOwner","header":836118768,"fields":[{"name":"new_owner","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2645
|
+
{"name":"Withdraw","header":1318511648,"fields":[{"name":"to","type":{"kind":"simple","type":"address","optional":false}}]},
|
|
2646
|
+
{"name":"MasterData","header":null,"fields":[{"name":"master","type":{"kind":"simple","type":"address","optional":false}},{"name":"next_collection_index","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"collection_creation_price","type":{"kind":"simple","type":"int","optional":false,"format":257}}]},
|
|
2647
|
+
{"name":"NftItem$Data","header":null,"fields":[{"name":"collection_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"item_index","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"is_initialized","type":{"kind":"simple","type":"bool","optional":false}},{"name":"owner","type":{"kind":"simple","type":"address","optional":true}},{"name":"individual_content","type":{"kind":"simple","type":"cell","optional":true}}]},
|
|
2648
|
+
{"name":"SbtItem$Data","header":null,"fields":[{"name":"collection_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"item_index","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"is_initialized","type":{"kind":"simple","type":"bool","optional":false}},{"name":"owner","type":{"kind":"simple","type":"address","optional":true}},{"name":"individual_content","type":{"kind":"simple","type":"cell","optional":true}}]},
|
|
2649
|
+
{"name":"BuyerProfile$Data","header":null,"fields":[{"name":"collection_address","type":{"kind":"simple","type":"address","optional":false}},{"name":"collection_owner","type":{"kind":"simple","type":"address","optional":true}},{"name":"collection_item_price","type":{"kind":"simple","type":"uint","optional":false,"format":32}},{"name":"owner","type":{"kind":"simple","type":"address","optional":false}},{"name":"is_initialized","type":{"kind":"simple","type":"bool","optional":false}},{"name":"is_whitelisted","type":{"kind":"simple","type":"bool","optional":false}},{"name":"enable_whitelist","type":{"kind":"simple","type":"bool","optional":false}},{"name":"user_item_limit","type":{"kind":"simple","type":"uint","optional":false,"format":8}},{"name":"user_item_count","type":{"kind":"simple","type":"uint","optional":false,"format":8}}]},
|
|
2650
|
+
{"name":"SimpleNftMaster$Data","header":null,"fields":[{"name":"owner","type":{"kind":"simple","type":"address","optional":false}},{"name":"next_collection_index","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"collection_creation_price","type":{"kind":"simple","type":"uint","optional":false,"format":32}}]},
|
|
2651
|
+
]
|
|
2652
|
+
|
|
2653
|
+
const SimpleNftCollectionV2_getters: ABIGetter[] = [
|
|
2654
|
+
{"name":"buyer_profile_address","arguments":[{"name":"owner","type":{"kind":"simple","type":"address","optional":false}}],"returnType":{"kind":"simple","type":"address","optional":false}},
|
|
2655
|
+
{"name":"get_buyer_profile_address","arguments":[{"name":"address","type":{"kind":"simple","type":"address","optional":false}}],"returnType":{"kind":"simple","type":"address","optional":false}},
|
|
2656
|
+
{"name":"get_master_data_v2","arguments":[],"returnType":{"kind":"simple","type":"CollectionMasterDataV2","optional":false}},
|
|
2657
|
+
{"name":"get_master_data","arguments":[],"returnType":{"kind":"simple","type":"CollectionMasterData","optional":false}},
|
|
2658
|
+
{"name":"get_collection_data","arguments":[],"returnType":{"kind":"simple","type":"CollectionData","optional":false}},
|
|
2659
|
+
{"name":"get_nft_address_by_index","arguments":[{"name":"item_index","type":{"kind":"simple","type":"int","optional":false,"format":257}}],"returnType":{"kind":"simple","type":"address","optional":true}},
|
|
2660
|
+
{"name":"getNftItemInit","arguments":[{"name":"item_index","type":{"kind":"simple","type":"int","optional":false,"format":257}}],"returnType":{"kind":"simple","type":"StateInit","optional":false}},
|
|
2661
|
+
{"name":"get_user_profile_init","arguments":[{"name":"address","type":{"kind":"simple","type":"address","optional":false}}],"returnType":{"kind":"simple","type":"StateInit","optional":false}},
|
|
2662
|
+
{"name":"get_nft_content","arguments":[{"name":"index","type":{"kind":"simple","type":"int","optional":false,"format":257}},{"name":"individual_content","type":{"kind":"simple","type":"cell","optional":false}}],"returnType":{"kind":"simple","type":"cell","optional":false}},
|
|
2663
|
+
{"name":"get_sample_nft_content","arguments":[],"returnType":{"kind":"simple","type":"cell","optional":true}},
|
|
2664
|
+
{"name":"royalty_params","arguments":[],"returnType":{"kind":"simple","type":"RoyaltyParams","optional":false}},
|
|
2665
|
+
]
|
|
2666
|
+
|
|
2667
|
+
export const SimpleNftCollectionV2_getterMapping: { [key: string]: string } = {
|
|
2668
|
+
'buyer_profile_address': 'getBuyerProfileAddress',
|
|
2669
|
+
'get_buyer_profile_address': 'getGetBuyerProfileAddress',
|
|
2670
|
+
'get_master_data_v2': 'getGetMasterDataV2',
|
|
2671
|
+
'get_master_data': 'getGetMasterData',
|
|
2672
|
+
'get_collection_data': 'getGetCollectionData',
|
|
2673
|
+
'get_nft_address_by_index': 'getGetNftAddressByIndex',
|
|
2674
|
+
'getNftItemInit': 'getGetNftItemInit',
|
|
2675
|
+
'get_user_profile_init': 'getGetUserProfileInit',
|
|
2676
|
+
'get_nft_content': 'getGetNftContent',
|
|
2677
|
+
'get_sample_nft_content': 'getGetSampleNftContent',
|
|
2678
|
+
'royalty_params': 'getRoyaltyParams',
|
|
2679
|
+
}
|
|
2680
|
+
|
|
2681
|
+
const SimpleNftCollectionV2_receivers: ABIReceiver[] = [
|
|
2682
|
+
{"receiver":"internal","message":{"kind":"typed","type":"CollectionSetupParams"}},
|
|
2683
|
+
{"receiver":"internal","message":{"kind":"text","text":"RequestWhitelist"}},
|
|
2684
|
+
{"receiver":"internal","message":{"kind":"text","text":"Mint"}},
|
|
2685
|
+
{"receiver":"internal","message":{"kind":"typed","type":"Withdraw"}},
|
|
2686
|
+
{"receiver":"internal","message":{"kind":"typed","type":"MintTo"}},
|
|
2687
|
+
{"receiver":"internal","message":{"kind":"typed","type":"GetRoyaltyParams"}},
|
|
2688
|
+
{"receiver":"internal","message":{"kind":"typed","type":"UpdateWhiteList"}},
|
|
2689
|
+
{"receiver":"internal","message":{"kind":"typed","type":"MassUpdateWhiteList"}},
|
|
2690
|
+
{"receiver":"internal","message":{"kind":"typed","type":"Deploy"}},
|
|
2691
|
+
]
|
|
2692
|
+
|
|
2693
|
+
export class SimpleNftCollectionV2 implements Contract {
|
|
2694
|
+
|
|
2695
|
+
static async init(master_address: Address, collection_index: bigint) {
|
|
2696
|
+
return await SimpleNftCollectionV2_init(master_address, collection_index);
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
static async fromInit(master_address: Address, collection_index: bigint) {
|
|
2700
|
+
const init = await SimpleNftCollectionV2_init(master_address, collection_index);
|
|
2701
|
+
const address = contractAddress(0, init);
|
|
2702
|
+
return new SimpleNftCollectionV2(address, init);
|
|
2703
|
+
}
|
|
2704
|
+
|
|
2705
|
+
static fromAddress(address: Address) {
|
|
2706
|
+
return new SimpleNftCollectionV2(address);
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
readonly address: Address;
|
|
2710
|
+
readonly init?: { code: Cell, data: Cell };
|
|
2711
|
+
readonly abi: ContractABI = {
|
|
2712
|
+
types: SimpleNftCollectionV2_types,
|
|
2713
|
+
getters: SimpleNftCollectionV2_getters,
|
|
2714
|
+
receivers: SimpleNftCollectionV2_receivers,
|
|
2715
|
+
errors: SimpleNftCollectionV2_errors,
|
|
2716
|
+
};
|
|
2717
|
+
|
|
2718
|
+
private constructor(address: Address, init?: { code: Cell, data: Cell }) {
|
|
2719
|
+
this.address = address;
|
|
2720
|
+
this.init = init;
|
|
2721
|
+
}
|
|
2722
|
+
|
|
2723
|
+
async send(provider: ContractProvider, via: Sender, args: { value: bigint, bounce?: boolean| null | undefined }, message: CollectionSetupParams | 'RequestWhitelist' | 'Mint' | Withdraw | MintTo | GetRoyaltyParams | UpdateWhiteList | MassUpdateWhiteList | Deploy) {
|
|
2724
|
+
|
|
2725
|
+
let body: Cell | null = null;
|
|
2726
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'CollectionSetupParams') {
|
|
2727
|
+
body = beginCell().store(storeCollectionSetupParams(message)).endCell();
|
|
2728
|
+
}
|
|
2729
|
+
if (message === 'RequestWhitelist') {
|
|
2730
|
+
body = beginCell().storeUint(0, 32).storeStringTail(message).endCell();
|
|
2731
|
+
}
|
|
2732
|
+
if (message === 'Mint') {
|
|
2733
|
+
body = beginCell().storeUint(0, 32).storeStringTail(message).endCell();
|
|
2734
|
+
}
|
|
2735
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Withdraw') {
|
|
2736
|
+
body = beginCell().store(storeWithdraw(message)).endCell();
|
|
2737
|
+
}
|
|
2738
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'MintTo') {
|
|
2739
|
+
body = beginCell().store(storeMintTo(message)).endCell();
|
|
2740
|
+
}
|
|
2741
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'GetRoyaltyParams') {
|
|
2742
|
+
body = beginCell().store(storeGetRoyaltyParams(message)).endCell();
|
|
2743
|
+
}
|
|
2744
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'UpdateWhiteList') {
|
|
2745
|
+
body = beginCell().store(storeUpdateWhiteList(message)).endCell();
|
|
2746
|
+
}
|
|
2747
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'MassUpdateWhiteList') {
|
|
2748
|
+
body = beginCell().store(storeMassUpdateWhiteList(message)).endCell();
|
|
2749
|
+
}
|
|
2750
|
+
if (message && typeof message === 'object' && !(message instanceof Slice) && message.$$type === 'Deploy') {
|
|
2751
|
+
body = beginCell().store(storeDeploy(message)).endCell();
|
|
2752
|
+
}
|
|
2753
|
+
if (body === null) { throw new Error('Invalid message type'); }
|
|
2754
|
+
|
|
2755
|
+
await provider.internal(via, { ...args, body: body });
|
|
2756
|
+
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
async getBuyerProfileAddress(provider: ContractProvider, owner: Address) {
|
|
2760
|
+
let builder = new TupleBuilder();
|
|
2761
|
+
builder.writeAddress(owner);
|
|
2762
|
+
let source = (await provider.get('buyer_profile_address', builder.build())).stack;
|
|
2763
|
+
let result = source.readAddress();
|
|
2764
|
+
return result;
|
|
2765
|
+
}
|
|
2766
|
+
|
|
2767
|
+
async getGetBuyerProfileAddress(provider: ContractProvider, address: Address) {
|
|
2768
|
+
let builder = new TupleBuilder();
|
|
2769
|
+
builder.writeAddress(address);
|
|
2770
|
+
let source = (await provider.get('get_buyer_profile_address', builder.build())).stack;
|
|
2771
|
+
let result = source.readAddress();
|
|
2772
|
+
return result;
|
|
2773
|
+
}
|
|
2774
|
+
|
|
2775
|
+
async getGetMasterDataV2(provider: ContractProvider) {
|
|
2776
|
+
let builder = new TupleBuilder();
|
|
2777
|
+
let source = (await provider.get('get_master_data_v2', builder.build())).stack;
|
|
2778
|
+
const result = loadGetterTupleCollectionMasterDataV2(source);
|
|
2779
|
+
return result;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
async getGetMasterData(provider: ContractProvider) {
|
|
2783
|
+
let builder = new TupleBuilder();
|
|
2784
|
+
let source = (await provider.get('get_master_data', builder.build())).stack;
|
|
2785
|
+
const result = loadGetterTupleCollectionMasterData(source);
|
|
2786
|
+
return result;
|
|
2787
|
+
}
|
|
2788
|
+
|
|
2789
|
+
async getGetCollectionData(provider: ContractProvider) {
|
|
2790
|
+
let builder = new TupleBuilder();
|
|
2791
|
+
let source = (await provider.get('get_collection_data', builder.build())).stack;
|
|
2792
|
+
const result = loadGetterTupleCollectionData(source);
|
|
2793
|
+
return result;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
async getGetNftAddressByIndex(provider: ContractProvider, item_index: bigint) {
|
|
2797
|
+
let builder = new TupleBuilder();
|
|
2798
|
+
builder.writeNumber(item_index);
|
|
2799
|
+
let source = (await provider.get('get_nft_address_by_index', builder.build())).stack;
|
|
2800
|
+
let result = source.readAddressOpt();
|
|
2801
|
+
return result;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
async getGetNftItemInit(provider: ContractProvider, item_index: bigint) {
|
|
2805
|
+
let builder = new TupleBuilder();
|
|
2806
|
+
builder.writeNumber(item_index);
|
|
2807
|
+
let source = (await provider.get('getNftItemInit', builder.build())).stack;
|
|
2808
|
+
const result = loadGetterTupleStateInit(source);
|
|
2809
|
+
return result;
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2812
|
+
async getGetUserProfileInit(provider: ContractProvider, address: Address) {
|
|
2813
|
+
let builder = new TupleBuilder();
|
|
2814
|
+
builder.writeAddress(address);
|
|
2815
|
+
let source = (await provider.get('get_user_profile_init', builder.build())).stack;
|
|
2816
|
+
const result = loadGetterTupleStateInit(source);
|
|
2817
|
+
return result;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
async getGetNftContent(provider: ContractProvider, index: bigint, individual_content: Cell) {
|
|
2821
|
+
let builder = new TupleBuilder();
|
|
2822
|
+
builder.writeNumber(index);
|
|
2823
|
+
builder.writeCell(individual_content);
|
|
2824
|
+
let source = (await provider.get('get_nft_content', builder.build())).stack;
|
|
2825
|
+
let result = source.readCell();
|
|
2826
|
+
return result;
|
|
2827
|
+
}
|
|
2828
|
+
|
|
2829
|
+
async getGetSampleNftContent(provider: ContractProvider) {
|
|
2830
|
+
let builder = new TupleBuilder();
|
|
2831
|
+
let source = (await provider.get('get_sample_nft_content', builder.build())).stack;
|
|
2832
|
+
let result = source.readCellOpt();
|
|
2833
|
+
return result;
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
async getRoyaltyParams(provider: ContractProvider) {
|
|
2837
|
+
let builder = new TupleBuilder();
|
|
2838
|
+
let source = (await provider.get('royalty_params', builder.build())).stack;
|
|
2839
|
+
const result = loadGetterTupleRoyaltyParams(source);
|
|
2840
|
+
return result;
|
|
2841
|
+
}
|
|
2842
|
+
|
|
2843
|
+
}
|