@sentio/sdk 1.26.2 → 1.26.4
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/lib/aptos/types.d.ts +2 -2
- package/lib/aptos/types.js +6 -6
- package/lib/aptos/types.js.map +1 -1
- package/lib/aptos-codegen/codegen.js +53 -15
- package/lib/aptos-codegen/codegen.js.map +1 -1
- package/lib/builtin/aptos/0x1.d.ts +260 -255
- package/lib/builtin/aptos/0x1.js +428 -422
- package/lib/builtin/aptos/0x1.js.map +1 -1
- package/lib/builtin/aptos/0x3.d.ts +39 -39
- package/lib/builtin/aptos/0x3.js +66 -66
- package/lib/builtin/aptos/0x3.js.map +1 -1
- package/lib/core/exporter.d.ts +4 -9
- package/lib/core/exporter.js +8 -8
- package/lib/core/exporter.js.map +1 -1
- package/lib/gen/processor/protos/processor.d.ts +2 -9
- package/lib/gen/processor/protos/processor.js +15 -54
- package/lib/gen/processor/protos/processor.js.map +1 -1
- package/lib/service.js +2 -3
- package/lib/service.js.map +1 -1
- package/lib/tests/erc20.js +1 -5
- package/lib/tests/erc20.js.map +1 -1
- package/lib/tests/types/aptos/souffle.d.ts +16 -16
- package/lib/tests/types/aptos/souffle.js +26 -26
- package/lib/tests/types/aptos/souffle.js.map +1 -1
- package/package.json +1 -1
- package/src/aptos/types.ts +6 -6
- package/src/aptos-codegen/codegen.ts +64 -17
- package/src/builtin/aptos/0x1.ts +472 -454
- package/src/builtin/aptos/0x3.ts +78 -78
- package/src/core/exporter.ts +9 -14
- package/src/gen/processor/protos/processor.ts +15 -59
- package/src/service.ts +2 -3
- package/src/tests/erc20.ts +1 -5
- package/src/tests/types/aptos/souffle.ts +26 -26
package/src/builtin/aptos/0x3.ts
CHANGED
|
@@ -139,15 +139,6 @@ export class token extends aptos.AptosBaseProcessor {
|
|
|
139
139
|
return this;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
onEventBurnTokenEvent(
|
|
143
|
-
func: (event: token.BurnTokenEventInstance, ctx: aptos.AptosContext) => void
|
|
144
|
-
): token {
|
|
145
|
-
this.onEvent(func, {
|
|
146
|
-
type: "token::BurnTokenEvent",
|
|
147
|
-
});
|
|
148
|
-
return this;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
142
|
onEventCreateCollectionEvent(
|
|
152
143
|
func: (
|
|
153
144
|
event: token.CreateCollectionEventInstance,
|
|
@@ -172,6 +163,15 @@ export class token extends aptos.AptosBaseProcessor {
|
|
|
172
163
|
return this;
|
|
173
164
|
}
|
|
174
165
|
|
|
166
|
+
onEventMintTokenEvent(
|
|
167
|
+
func: (event: token.MintTokenEventInstance, ctx: aptos.AptosContext) => void
|
|
168
|
+
): token {
|
|
169
|
+
this.onEvent(func, {
|
|
170
|
+
type: "token::MintTokenEvent",
|
|
171
|
+
});
|
|
172
|
+
return this;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
175
|
onEventDepositEvent(
|
|
176
176
|
func: (event: token.DepositEventInstance, ctx: aptos.AptosContext) => void
|
|
177
177
|
): token {
|
|
@@ -181,32 +181,32 @@ export class token extends aptos.AptosBaseProcessor {
|
|
|
181
181
|
return this;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
func: (event: token.
|
|
184
|
+
onEventWithdrawEvent(
|
|
185
|
+
func: (event: token.WithdrawEventInstance, ctx: aptos.AptosContext) => void
|
|
186
186
|
): token {
|
|
187
187
|
this.onEvent(func, {
|
|
188
|
-
type: "token::
|
|
188
|
+
type: "token::WithdrawEvent",
|
|
189
189
|
});
|
|
190
190
|
return this;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
func: (
|
|
195
|
-
event: token.MutateTokenPropertyMapEventInstance,
|
|
196
|
-
ctx: aptos.AptosContext
|
|
197
|
-
) => void
|
|
193
|
+
onEventBurnTokenEvent(
|
|
194
|
+
func: (event: token.BurnTokenEventInstance, ctx: aptos.AptosContext) => void
|
|
198
195
|
): token {
|
|
199
196
|
this.onEvent(func, {
|
|
200
|
-
type: "token::
|
|
197
|
+
type: "token::BurnTokenEvent",
|
|
201
198
|
});
|
|
202
199
|
return this;
|
|
203
200
|
}
|
|
204
201
|
|
|
205
|
-
|
|
206
|
-
func: (
|
|
202
|
+
onEventMutateTokenPropertyMapEvent(
|
|
203
|
+
func: (
|
|
204
|
+
event: token.MutateTokenPropertyMapEventInstance,
|
|
205
|
+
ctx: aptos.AptosContext
|
|
206
|
+
) => void
|
|
207
207
|
): token {
|
|
208
208
|
this.onEvent(func, {
|
|
209
|
-
type: "token::
|
|
209
|
+
type: "token::MutateTokenPropertyMapEvent",
|
|
210
210
|
});
|
|
211
211
|
return this;
|
|
212
212
|
}
|
|
@@ -218,7 +218,7 @@ export class token extends aptos.AptosBaseProcessor {
|
|
|
218
218
|
|
|
219
219
|
export namespace token {
|
|
220
220
|
export class BurnTokenEvent {
|
|
221
|
-
static
|
|
221
|
+
static TYPE_QNAME = "0x3::token::BurnTokenEvent";
|
|
222
222
|
id: token.TokenId;
|
|
223
223
|
amount: bigint;
|
|
224
224
|
}
|
|
@@ -230,7 +230,7 @@ export namespace token {
|
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
export class CollectionData {
|
|
233
|
-
static
|
|
233
|
+
static TYPE_QNAME = "0x3::token::CollectionData";
|
|
234
234
|
description: string;
|
|
235
235
|
name: string;
|
|
236
236
|
uri: string;
|
|
@@ -240,14 +240,14 @@ export namespace token {
|
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
export class CollectionMutabilityConfig {
|
|
243
|
-
static
|
|
243
|
+
static TYPE_QNAME = "0x3::token::CollectionMutabilityConfig";
|
|
244
244
|
description: Boolean;
|
|
245
245
|
uri: Boolean;
|
|
246
246
|
maximum: Boolean;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
export class Collections {
|
|
250
|
-
static
|
|
250
|
+
static TYPE_QNAME = "0x3::token::Collections";
|
|
251
251
|
collection_data: table.Table<string, token.CollectionData>;
|
|
252
252
|
token_data: table.Table<token.TokenDataId, token.TokenData>;
|
|
253
253
|
create_collection_events: event.EventHandle<token.CreateCollectionEvent>;
|
|
@@ -256,7 +256,7 @@ export namespace token {
|
|
|
256
256
|
}
|
|
257
257
|
|
|
258
258
|
export class CreateCollectionEvent {
|
|
259
|
-
static
|
|
259
|
+
static TYPE_QNAME = "0x3::token::CreateCollectionEvent";
|
|
260
260
|
creator: Address;
|
|
261
261
|
collection_name: string;
|
|
262
262
|
uri: string;
|
|
@@ -271,7 +271,7 @@ export namespace token {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
export class CreateTokenDataEvent {
|
|
274
|
-
static
|
|
274
|
+
static TYPE_QNAME = "0x3::token::CreateTokenDataEvent";
|
|
275
275
|
id: token.TokenDataId;
|
|
276
276
|
description: string;
|
|
277
277
|
maximum: bigint;
|
|
@@ -293,7 +293,7 @@ export namespace token {
|
|
|
293
293
|
}
|
|
294
294
|
|
|
295
295
|
export class DepositEvent {
|
|
296
|
-
static
|
|
296
|
+
static TYPE_QNAME = "0x3::token::DepositEvent";
|
|
297
297
|
id: token.TokenId;
|
|
298
298
|
amount: bigint;
|
|
299
299
|
}
|
|
@@ -305,7 +305,7 @@ export namespace token {
|
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
export class MintTokenEvent {
|
|
308
|
-
static
|
|
308
|
+
static TYPE_QNAME = "0x3::token::MintTokenEvent";
|
|
309
309
|
id: token.TokenDataId;
|
|
310
310
|
amount: bigint;
|
|
311
311
|
}
|
|
@@ -317,7 +317,7 @@ export namespace token {
|
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
export class MutateTokenPropertyMapEvent {
|
|
320
|
-
static
|
|
320
|
+
static TYPE_QNAME = "0x3::token::MutateTokenPropertyMapEvent";
|
|
321
321
|
old_id: token.TokenId;
|
|
322
322
|
new_id: token.TokenId;
|
|
323
323
|
keys: string[];
|
|
@@ -332,21 +332,21 @@ export namespace token {
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
export class Royalty {
|
|
335
|
-
static
|
|
335
|
+
static TYPE_QNAME = "0x3::token::Royalty";
|
|
336
336
|
royalty_points_numerator: bigint;
|
|
337
337
|
royalty_points_denominator: bigint;
|
|
338
338
|
payee_address: Address;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
export class Token {
|
|
342
|
-
static
|
|
342
|
+
static TYPE_QNAME = "0x3::token::Token";
|
|
343
343
|
id: token.TokenId;
|
|
344
344
|
amount: bigint;
|
|
345
345
|
token_properties: property_map.PropertyMap;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
export class TokenData {
|
|
349
|
-
static
|
|
349
|
+
static TYPE_QNAME = "0x3::token::TokenData";
|
|
350
350
|
maximum: bigint;
|
|
351
351
|
largest_property_version: bigint;
|
|
352
352
|
supply: bigint;
|
|
@@ -359,20 +359,20 @@ export namespace token {
|
|
|
359
359
|
}
|
|
360
360
|
|
|
361
361
|
export class TokenDataId {
|
|
362
|
-
static
|
|
362
|
+
static TYPE_QNAME = "0x3::token::TokenDataId";
|
|
363
363
|
creator: Address;
|
|
364
364
|
collection: string;
|
|
365
365
|
name: string;
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
export class TokenId {
|
|
369
|
-
static
|
|
369
|
+
static TYPE_QNAME = "0x3::token::TokenId";
|
|
370
370
|
token_data_id: token.TokenDataId;
|
|
371
371
|
property_version: bigint;
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
export class TokenMutabilityConfig {
|
|
375
|
-
static
|
|
375
|
+
static TYPE_QNAME = "0x3::token::TokenMutabilityConfig";
|
|
376
376
|
maximum: Boolean;
|
|
377
377
|
uri: Boolean;
|
|
378
378
|
royalty: Boolean;
|
|
@@ -381,7 +381,7 @@ export namespace token {
|
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
export class TokenStore {
|
|
384
|
-
static
|
|
384
|
+
static TYPE_QNAME = "0x3::token::TokenStore";
|
|
385
385
|
tokens: table.Table<token.TokenId, token.Token>;
|
|
386
386
|
direct_transfer: Boolean;
|
|
387
387
|
deposit_events: event.EventHandle<token.DepositEvent>;
|
|
@@ -391,7 +391,7 @@ export namespace token {
|
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
export class WithdrawCapability {
|
|
394
|
-
static
|
|
394
|
+
static TYPE_QNAME = "0x3::token::WithdrawCapability";
|
|
395
395
|
token_owner: Address;
|
|
396
396
|
token_id: token.TokenId;
|
|
397
397
|
amount: bigint;
|
|
@@ -399,7 +399,7 @@ export namespace token {
|
|
|
399
399
|
}
|
|
400
400
|
|
|
401
401
|
export class WithdrawEvent {
|
|
402
|
-
static
|
|
402
|
+
static TYPE_QNAME = "0x3::token::WithdrawEvent";
|
|
403
403
|
id: token.TokenId;
|
|
404
404
|
amount: bigint;
|
|
405
405
|
}
|
|
@@ -524,8 +524,8 @@ export namespace token {
|
|
|
524
524
|
type_arguments: [];
|
|
525
525
|
}
|
|
526
526
|
|
|
527
|
-
export function loadTypes(
|
|
528
|
-
loadAllTypes(
|
|
527
|
+
export function loadTypes(_r: aptos.TypeRegistry) {
|
|
528
|
+
loadAllTypes(_r);
|
|
529
529
|
}
|
|
530
530
|
export const ABI: MoveModule = JSON.parse(
|
|
531
531
|
'{"address":"0x3","name":"token","friends":[],"exposed_functions":[{"name":"balance_of","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenId"],"return":["u64"]},{"name":"burn","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"burn_by_creator","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"check_collection_exists","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String"],"return":["bool"]},{"name":"check_tokendata_exists","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String"],"return":["bool"]},{"name":"create_collection","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","vector<bool>"],"return":[]},{"name":"create_collection_mutability_config","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&vector<bool>"],"return":["0x3::token::CollectionMutabilityConfig"]},{"name":"create_collection_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","vector<bool>"],"return":[]},{"name":"create_token_data_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String"],"return":["0x3::token::TokenDataId"]},{"name":"create_token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::TokenDataId","u64"],"return":["0x3::token::TokenId"]},{"name":"create_token_id_raw","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String","0x1::string::String","u64"],"return":["0x3::token::TokenId"]},{"name":"create_token_mutability_config","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&vector<bool>"],"return":["0x3::token::TokenMutabilityConfig"]},{"name":"create_token_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","u64","0x1::string::String","address","u64","u64","vector<bool>","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"create_tokendata","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x1::string::String","0x1::string::String","0x1::string::String","u64","0x1::string::String","address","u64","u64","0x3::token::TokenMutabilityConfig","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::token::TokenDataId"]},{"name":"create_withdraw_capability","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64","u64"],"return":["0x3::token::WithdrawCapability"]},{"name":"deposit_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::Token"],"return":[]},{"name":"direct_deposit_with_opt_in","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::Token"],"return":[]},{"name":"direct_transfer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","&signer","0x3::token::TokenId","u64"],"return":[]},{"name":"direct_transfer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","&signer","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"get_collection_supply","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x1::string::String"],"return":["0x1::option::Option<u64>"]},{"name":"get_property_map","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenId"],"return":["0x3::property_map::PropertyMap"]},{"name":"get_royalty","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::TokenId"],"return":["0x3::token::Royalty"]},{"name":"get_royalty_denominator","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["u64"]},{"name":"get_royalty_numerator","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["u64"]},{"name":"get_royalty_payee","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Royalty"],"return":["address"]},{"name":"get_token_amount","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["u64"]},{"name":"get_token_data_id_fields","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::TokenDataId"],"return":["address","0x1::string::String","0x1::string::String"]},{"name":"get_token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["0x3::token::TokenId"]},{"name":"get_token_id_fields","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::TokenId"],"return":["address","0x1::string::String","0x1::string::String","u64"]},{"name":"get_token_supply","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["0x1::option::Option<u64>"]},{"name":"get_tokendata_largest_property_version","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["u64"]},{"name":"get_tokendata_uri","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address","0x3::token::TokenDataId"],"return":["0x1::string::String"]},{"name":"has_token_store","visibility":"public","is_entry":false,"generic_type_params":[],"params":["address"],"return":["bool"]},{"name":"initialize_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId"],"return":[]},{"name":"initialize_token_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer"],"return":[]},{"name":"initialize_token_store","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer"],"return":[]},{"name":"merge","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::token::Token","0x3::token::Token"],"return":[]},{"name":"mint_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"mint_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","u64"],"return":["0x3::token::TokenId"]},{"name":"mint_token_to","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenDataId","u64"],"return":[]},{"name":"mutate_one_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::token::TokenId"]},{"name":"mutate_token_properties","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","address","address","0x1::string::String","0x1::string::String","u64","u64","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"mutate_tokendata_property","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"mutate_tokendata_uri","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenDataId","0x1::string::String"],"return":[]},{"name":"opt_in_direct_transfer","visibility":"public","is_entry":true,"generic_type_params":[],"params":["&signer","bool"],"return":[]},{"name":"split","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::token::Token","u64"],"return":["0x3::token::Token"]},{"name":"token_id","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::token::Token"],"return":["&0x3::token::TokenId"]},{"name":"transfer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","address","u64"],"return":[]},{"name":"withdraw_token","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64"],"return":["0x3::token::Token"]},{"name":"withdraw_with_capability","visibility":"public","is_entry":false,"generic_type_params":[],"params":["0x3::token::WithdrawCapability"],"return":["0x3::token::Token"]}],"structs":[{"name":"BurnTokenEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"CollectionData","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"description","type":"0x1::string::String"},{"name":"name","type":"0x1::string::String"},{"name":"uri","type":"0x1::string::String"},{"name":"supply","type":"u64"},{"name":"maximum","type":"u64"},{"name":"mutability_config","type":"0x3::token::CollectionMutabilityConfig"}]},{"name":"CollectionMutabilityConfig","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"description","type":"bool"},{"name":"uri","type":"bool"},{"name":"maximum","type":"bool"}]},{"name":"Collections","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"collection_data","type":"0x1::table::Table<0x1::string::String, 0x3::token::CollectionData>"},{"name":"token_data","type":"0x1::table::Table<0x3::token::TokenDataId, 0x3::token::TokenData>"},{"name":"create_collection_events","type":"0x1::event::EventHandle<0x3::token::CreateCollectionEvent>"},{"name":"create_token_data_events","type":"0x1::event::EventHandle<0x3::token::CreateTokenDataEvent>"},{"name":"mint_token_events","type":"0x1::event::EventHandle<0x3::token::MintTokenEvent>"}]},{"name":"CreateCollectionEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"creator","type":"address"},{"name":"collection_name","type":"0x1::string::String"},{"name":"uri","type":"0x1::string::String"},{"name":"description","type":"0x1::string::String"},{"name":"maximum","type":"u64"}]},{"name":"CreateTokenDataEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenDataId"},{"name":"description","type":"0x1::string::String"},{"name":"maximum","type":"u64"},{"name":"uri","type":"0x1::string::String"},{"name":"royalty_payee_address","type":"address"},{"name":"royalty_points_denominator","type":"u64"},{"name":"royalty_points_numerator","type":"u64"},{"name":"name","type":"0x1::string::String"},{"name":"mutability_config","type":"0x3::token::TokenMutabilityConfig"},{"name":"property_keys","type":"vector<0x1::string::String>"},{"name":"property_values","type":"vector<vector<u8>>"},{"name":"property_types","type":"vector<0x1::string::String>"}]},{"name":"DepositEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"MintTokenEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenDataId"},{"name":"amount","type":"u64"}]},{"name":"MutateTokenPropertyMapEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"old_id","type":"0x3::token::TokenId"},{"name":"new_id","type":"0x3::token::TokenId"},{"name":"keys","type":"vector<0x1::string::String>"},{"name":"values","type":"vector<vector<u8>>"},{"name":"types","type":"vector<0x1::string::String>"}]},{"name":"Royalty","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"royalty_points_numerator","type":"u64"},{"name":"royalty_points_denominator","type":"u64"},{"name":"payee_address","type":"address"}]},{"name":"Token","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"token_properties","type":"0x3::property_map::PropertyMap"}]},{"name":"TokenData","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"maximum","type":"u64"},{"name":"largest_property_version","type":"u64"},{"name":"supply","type":"u64"},{"name":"uri","type":"0x1::string::String"},{"name":"royalty","type":"0x3::token::Royalty"},{"name":"name","type":"0x1::string::String"},{"name":"description","type":"0x1::string::String"},{"name":"default_properties","type":"0x3::property_map::PropertyMap"},{"name":"mutability_config","type":"0x3::token::TokenMutabilityConfig"}]},{"name":"TokenDataId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"creator","type":"address"},{"name":"collection","type":"0x1::string::String"},{"name":"name","type":"0x1::string::String"}]},{"name":"TokenId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"token_data_id","type":"0x3::token::TokenDataId"},{"name":"property_version","type":"u64"}]},{"name":"TokenMutabilityConfig","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"maximum","type":"bool"},{"name":"uri","type":"bool"},{"name":"royalty","type":"bool"},{"name":"description","type":"bool"},{"name":"properties","type":"bool"}]},{"name":"TokenStore","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"tokens","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token::Token>"},{"name":"direct_transfer","type":"bool"},{"name":"deposit_events","type":"0x1::event::EventHandle<0x3::token::DepositEvent>"},{"name":"withdraw_events","type":"0x1::event::EventHandle<0x3::token::WithdrawEvent>"},{"name":"burn_events","type":"0x1::event::EventHandle<0x3::token::BurnTokenEvent>"},{"name":"mutate_token_property_events","type":"0x1::event::EventHandle<0x3::token::MutateTokenPropertyMapEvent>"}]},{"name":"WithdrawCapability","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_owner","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"expiration_sec","type":"u64"}]},{"name":"WithdrawEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]}]}'
|
|
@@ -534,18 +534,18 @@ export namespace token {
|
|
|
534
534
|
|
|
535
535
|
export namespace property_map {
|
|
536
536
|
export class PropertyMap {
|
|
537
|
-
static
|
|
537
|
+
static TYPE_QNAME = "0x3::property_map::PropertyMap";
|
|
538
538
|
map: simple_map.SimpleMap<string, property_map.PropertyValue>;
|
|
539
539
|
}
|
|
540
540
|
|
|
541
541
|
export class PropertyValue {
|
|
542
|
-
static
|
|
542
|
+
static TYPE_QNAME = "0x3::property_map::PropertyValue";
|
|
543
543
|
value: string;
|
|
544
544
|
type: string;
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
export function loadTypes(
|
|
548
|
-
loadAllTypes(
|
|
547
|
+
export function loadTypes(_r: aptos.TypeRegistry) {
|
|
548
|
+
loadAllTypes(_r);
|
|
549
549
|
}
|
|
550
550
|
export const ABI: MoveModule = JSON.parse(
|
|
551
551
|
'{"address":"0x3","name":"property_map","friends":[],"exposed_functions":[{"name":"add","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","0x1::string::String","0x3::property_map::PropertyValue"],"return":[]},{"name":"borrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["&0x3::property_map::PropertyValue"]},{"name":"borrow_type","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyValue"],"return":["0x1::string::String"]},{"name":"borrow_value","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyValue"],"return":["vector<u8>"]},{"name":"contains_key","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["bool"]},{"name":"create_property_value","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":["copy"]}],"params":["&T0"],"return":["0x3::property_map::PropertyValue"]},{"name":"create_property_value_raw","visibility":"public","is_entry":false,"generic_type_params":[],"params":["vector<u8>","0x1::string::String"],"return":["0x3::property_map::PropertyValue"]},{"name":"empty","visibility":"public","is_entry":false,"generic_type_params":[],"params":[],"return":["0x3::property_map::PropertyMap"]},{"name":"length","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap"],"return":["u64"]},{"name":"new","visibility":"public","is_entry":false,"generic_type_params":[],"params":["vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":["0x3::property_map::PropertyMap"]},{"name":"read_address","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["address"]},{"name":"read_bool","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["bool"]},{"name":"read_string","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["0x1::string::String"]},{"name":"read_u128","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u128"]},{"name":"read_u64","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u64"]},{"name":"read_u8","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&0x3::property_map::PropertyMap","&0x1::string::String"],"return":["u8"]},{"name":"remove","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","&0x1::string::String"],"return":["0x1::string::String","0x3::property_map::PropertyValue"]},{"name":"update_property_map","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","vector<0x1::string::String>","vector<vector<u8>>","vector<0x1::string::String>"],"return":[]},{"name":"update_property_value","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&mut 0x3::property_map::PropertyMap","&0x1::string::String","0x3::property_map::PropertyValue"],"return":[]}],"structs":[{"name":"PropertyMap","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"map","type":"0x1::simple_map::SimpleMap<0x1::string::String, 0x3::property_map::PropertyValue>"}]},{"name":"PropertyValue","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"value","type":"vector<u8>"},{"name":"type","type":"0x1::string::String"}]}]}'
|
|
@@ -613,19 +613,19 @@ export class token_coin_swap extends aptos.AptosBaseProcessor {
|
|
|
613
613
|
|
|
614
614
|
export namespace token_coin_swap {
|
|
615
615
|
export class TokenCoinSwap<T0> {
|
|
616
|
-
static
|
|
616
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenCoinSwap";
|
|
617
617
|
token_amount: bigint;
|
|
618
618
|
min_price_per_token: bigint;
|
|
619
619
|
}
|
|
620
620
|
|
|
621
621
|
export class TokenEscrow {
|
|
622
|
-
static
|
|
622
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenEscrow";
|
|
623
623
|
token: token.Token;
|
|
624
624
|
locked_until_secs: bigint;
|
|
625
625
|
}
|
|
626
626
|
|
|
627
627
|
export class TokenListingEvent {
|
|
628
|
-
static
|
|
628
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenListingEvent";
|
|
629
629
|
token_id: token.TokenId;
|
|
630
630
|
amount: bigint;
|
|
631
631
|
min_price: bigint;
|
|
@@ -640,19 +640,19 @@ export namespace token_coin_swap {
|
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
export class TokenListings<T0> {
|
|
643
|
-
static
|
|
643
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenListings";
|
|
644
644
|
listings: table.Table<token.TokenId, token_coin_swap.TokenCoinSwap<T0>>;
|
|
645
645
|
listing_events: event.EventHandle<token_coin_swap.TokenListingEvent>;
|
|
646
646
|
swap_events: event.EventHandle<token_coin_swap.TokenSwapEvent>;
|
|
647
647
|
}
|
|
648
648
|
|
|
649
649
|
export class TokenStoreEscrow {
|
|
650
|
-
static
|
|
650
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenStoreEscrow";
|
|
651
651
|
token_escrows: table.Table<token.TokenId, token_coin_swap.TokenEscrow>;
|
|
652
652
|
}
|
|
653
653
|
|
|
654
654
|
export class TokenSwapEvent {
|
|
655
|
-
static
|
|
655
|
+
static TYPE_QNAME = "0x3::token_coin_swap::TokenSwapEvent";
|
|
656
656
|
token_id: token.TokenId;
|
|
657
657
|
token_buyer: Address;
|
|
658
658
|
token_amount: bigint;
|
|
@@ -674,8 +674,8 @@ export namespace token_coin_swap {
|
|
|
674
674
|
type_arguments: [string];
|
|
675
675
|
}
|
|
676
676
|
|
|
677
|
-
export function loadTypes(
|
|
678
|
-
loadAllTypes(
|
|
677
|
+
export function loadTypes(_r: aptos.TypeRegistry) {
|
|
678
|
+
loadAllTypes(_r);
|
|
679
679
|
}
|
|
680
680
|
export const ABI: MoveModule = JSON.parse(
|
|
681
681
|
'{"address":"0x3","name":"token_coin_swap","friends":[],"exposed_functions":[{"name":"cancel_token_listing","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["&signer","0x3::token::TokenId","u64"],"return":[]},{"name":"deposit_token_to_escrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","0x3::token::Token","u64"],"return":[]},{"name":"does_listing_exist","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["address","0x3::token::TokenId"],"return":["bool"]},{"name":"exchange_coin_for_token","visibility":"public","is_entry":false,"generic_type_params":[{"constraints":[]}],"params":["&signer","u64","address","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]},{"name":"list_token_for_swap","visibility":"public","is_entry":true,"generic_type_params":[{"constraints":[]}],"params":["&signer","address","0x1::string::String","0x1::string::String","u64","u64","u64","u64"],"return":[]},{"name":"withdraw_token_from_escrow","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","0x3::token::TokenId","u64"],"return":["0x3::token::Token"]}],"structs":[{"name":"TokenCoinSwap","is_native":false,"abilities":["drop","store"],"generic_type_params":[{"constraints":[]}],"fields":[{"name":"token_amount","type":"u64"},{"name":"min_price_per_token","type":"u64"}]},{"name":"TokenEscrow","is_native":false,"abilities":["store"],"generic_type_params":[],"fields":[{"name":"token","type":"0x3::token::Token"},{"name":"locked_until_secs","type":"u64"}]},{"name":"TokenListingEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"},{"name":"min_price","type":"u64"},{"name":"locked_until_secs","type":"u64"},{"name":"coin_type_info","type":"0x1::type_info::TypeInfo"}]},{"name":"TokenListings","is_native":false,"abilities":["key"],"generic_type_params":[{"constraints":[]}],"fields":[{"name":"listings","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token_coin_swap::TokenCoinSwap<T0>>"},{"name":"listing_events","type":"0x1::event::EventHandle<0x3::token_coin_swap::TokenListingEvent>"},{"name":"swap_events","type":"0x1::event::EventHandle<0x3::token_coin_swap::TokenSwapEvent>"}]},{"name":"TokenStoreEscrow","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"token_escrows","type":"0x1::table::Table<0x3::token::TokenId, 0x3::token_coin_swap::TokenEscrow>"}]},{"name":"TokenSwapEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"token_id","type":"0x3::token::TokenId"},{"name":"token_buyer","type":"address"},{"name":"token_amount","type":"u64"},{"name":"coin_amount","type":"u64"},{"name":"coin_type_info","type":"0x1::type_info::TypeInfo"}]}]}'
|
|
@@ -740,38 +740,38 @@ export class token_transfers extends aptos.AptosBaseProcessor {
|
|
|
740
740
|
return this;
|
|
741
741
|
}
|
|
742
742
|
|
|
743
|
-
|
|
743
|
+
onEventTokenOfferEvent(
|
|
744
744
|
func: (
|
|
745
|
-
event: token_transfers.
|
|
745
|
+
event: token_transfers.TokenOfferEventInstance,
|
|
746
746
|
ctx: aptos.AptosContext
|
|
747
747
|
) => void
|
|
748
748
|
): token_transfers {
|
|
749
749
|
this.onEvent(func, {
|
|
750
|
-
type: "token_transfers::
|
|
750
|
+
type: "token_transfers::TokenOfferEvent",
|
|
751
751
|
});
|
|
752
752
|
return this;
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
-
|
|
755
|
+
onEventTokenCancelOfferEvent(
|
|
756
756
|
func: (
|
|
757
|
-
event: token_transfers.
|
|
757
|
+
event: token_transfers.TokenCancelOfferEventInstance,
|
|
758
758
|
ctx: aptos.AptosContext
|
|
759
759
|
) => void
|
|
760
760
|
): token_transfers {
|
|
761
761
|
this.onEvent(func, {
|
|
762
|
-
type: "token_transfers::
|
|
762
|
+
type: "token_transfers::TokenCancelOfferEvent",
|
|
763
763
|
});
|
|
764
764
|
return this;
|
|
765
765
|
}
|
|
766
766
|
|
|
767
|
-
|
|
767
|
+
onEventTokenClaimEvent(
|
|
768
768
|
func: (
|
|
769
|
-
event: token_transfers.
|
|
769
|
+
event: token_transfers.TokenClaimEventInstance,
|
|
770
770
|
ctx: aptos.AptosContext
|
|
771
771
|
) => void
|
|
772
772
|
): token_transfers {
|
|
773
773
|
this.onEvent(func, {
|
|
774
|
-
type: "token_transfers::
|
|
774
|
+
type: "token_transfers::TokenClaimEvent",
|
|
775
775
|
});
|
|
776
776
|
return this;
|
|
777
777
|
}
|
|
@@ -783,7 +783,7 @@ export class token_transfers extends aptos.AptosBaseProcessor {
|
|
|
783
783
|
|
|
784
784
|
export namespace token_transfers {
|
|
785
785
|
export class PendingClaims {
|
|
786
|
-
static
|
|
786
|
+
static TYPE_QNAME = "0x3::token_transfers::PendingClaims";
|
|
787
787
|
pending_claims: table.Table<token_transfers.TokenOfferId, token.Token>;
|
|
788
788
|
offer_events: event.EventHandle<token_transfers.TokenOfferEvent>;
|
|
789
789
|
cancel_offer_events: event.EventHandle<token_transfers.TokenCancelOfferEvent>;
|
|
@@ -791,7 +791,7 @@ export namespace token_transfers {
|
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
export class TokenCancelOfferEvent {
|
|
794
|
-
static
|
|
794
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenCancelOfferEvent";
|
|
795
795
|
to_address: Address;
|
|
796
796
|
token_id: token.TokenId;
|
|
797
797
|
amount: bigint;
|
|
@@ -804,7 +804,7 @@ export namespace token_transfers {
|
|
|
804
804
|
}
|
|
805
805
|
|
|
806
806
|
export class TokenClaimEvent {
|
|
807
|
-
static
|
|
807
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenClaimEvent";
|
|
808
808
|
to_address: Address;
|
|
809
809
|
token_id: token.TokenId;
|
|
810
810
|
amount: bigint;
|
|
@@ -817,7 +817,7 @@ export namespace token_transfers {
|
|
|
817
817
|
}
|
|
818
818
|
|
|
819
819
|
export class TokenOfferEvent {
|
|
820
|
-
static
|
|
820
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenOfferEvent";
|
|
821
821
|
to_address: Address;
|
|
822
822
|
token_id: token.TokenId;
|
|
823
823
|
amount: bigint;
|
|
@@ -830,7 +830,7 @@ export namespace token_transfers {
|
|
|
830
830
|
}
|
|
831
831
|
|
|
832
832
|
export class TokenOfferId {
|
|
833
|
-
static
|
|
833
|
+
static TYPE_QNAME = "0x3::token_transfers::TokenOfferId";
|
|
834
834
|
to_addr: Address;
|
|
835
835
|
token_id: token.TokenId;
|
|
836
836
|
}
|
|
@@ -859,22 +859,22 @@ export namespace token_transfers {
|
|
|
859
859
|
type_arguments: [];
|
|
860
860
|
}
|
|
861
861
|
|
|
862
|
-
export function loadTypes(
|
|
863
|
-
loadAllTypes(
|
|
862
|
+
export function loadTypes(_r: aptos.TypeRegistry) {
|
|
863
|
+
loadAllTypes(_r);
|
|
864
864
|
}
|
|
865
865
|
export const ABI: MoveModule = JSON.parse(
|
|
866
866
|
'{"address":"0x3","name":"token_transfers","friends":[],"exposed_functions":[{"name":"cancel_offer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId"],"return":[]},{"name":"cancel_offer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"claim","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId"],"return":[]},{"name":"claim_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64"],"return":[]},{"name":"offer","visibility":"public","is_entry":false,"generic_type_params":[],"params":["&signer","address","0x3::token::TokenId","u64"],"return":[]},{"name":"offer_script","visibility":"public","is_entry":true,"generic_type_params":[],"params":["signer","address","address","0x1::string::String","0x1::string::String","u64","u64"],"return":[]}],"structs":[{"name":"PendingClaims","is_native":false,"abilities":["key"],"generic_type_params":[],"fields":[{"name":"pending_claims","type":"0x1::table::Table<0x3::token_transfers::TokenOfferId, 0x3::token::Token>"},{"name":"offer_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenOfferEvent>"},{"name":"cancel_offer_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenCancelOfferEvent>"},{"name":"claim_events","type":"0x1::event::EventHandle<0x3::token_transfers::TokenClaimEvent>"}]},{"name":"TokenCancelOfferEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenClaimEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenOfferEvent","is_native":false,"abilities":["drop","store"],"generic_type_params":[],"fields":[{"name":"to_address","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"},{"name":"amount","type":"u64"}]},{"name":"TokenOfferId","is_native":false,"abilities":["copy","drop","store"],"generic_type_params":[],"fields":[{"name":"to_addr","type":"address"},{"name":"token_id","type":"0x3::token::TokenId"}]}]}'
|
|
867
867
|
);
|
|
868
868
|
}
|
|
869
869
|
|
|
870
|
-
function loadAllTypes(
|
|
871
|
-
table.loadTypes(
|
|
872
|
-
event.loadTypes(
|
|
873
|
-
simple_map.loadTypes(
|
|
874
|
-
type_info.loadTypes(
|
|
870
|
+
function loadAllTypes(_r: aptos.TypeRegistry) {
|
|
871
|
+
table.loadTypes(_r);
|
|
872
|
+
event.loadTypes(_r);
|
|
873
|
+
simple_map.loadTypes(_r);
|
|
874
|
+
type_info.loadTypes(_r);
|
|
875
875
|
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
876
|
+
_r.load(token.ABI);
|
|
877
|
+
_r.load(property_map.ABI);
|
|
878
|
+
_r.load(token_coin_swap.ABI);
|
|
879
|
+
_r.load(token_transfers.ABI);
|
|
880
880
|
}
|
package/src/core/exporter.ts
CHANGED
|
@@ -1,30 +1,25 @@
|
|
|
1
1
|
import { BaseContext } from './context'
|
|
2
|
-
import { DataDescriptor, ExportResult
|
|
2
|
+
import { DataDescriptor, ExportResult } from '@sentio/sdk'
|
|
3
3
|
|
|
4
4
|
export type Export = Record<string, any>
|
|
5
5
|
|
|
6
|
-
export interface ExporterOptions {
|
|
7
|
-
exportType: ExportConfig_ExportType
|
|
8
|
-
exportUrl: string
|
|
9
|
-
}
|
|
10
|
-
|
|
11
6
|
export class Exporter {
|
|
12
|
-
static register(
|
|
13
|
-
const exporter = new Exporter(
|
|
7
|
+
static register(name: string, channel: string) {
|
|
8
|
+
const exporter = new Exporter(name, channel)
|
|
14
9
|
global.PROCESSOR_STATE.exporters.push(exporter)
|
|
15
10
|
return exporter
|
|
16
11
|
}
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
protected constructor(
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
13
|
+
name: string
|
|
14
|
+
channel: string
|
|
15
|
+
protected constructor(name: string, channel: string) {
|
|
16
|
+
this.name = name
|
|
17
|
+
this.channel = channel
|
|
23
18
|
}
|
|
24
19
|
|
|
25
20
|
emit(ctx: BaseContext, data: Export) {
|
|
26
21
|
const res: ExportResult = {
|
|
27
|
-
metadata: ctx.getMetaData(DataDescriptor.fromPartial({ name: this.
|
|
22
|
+
metadata: ctx.getMetaData(DataDescriptor.fromPartial({ name: this.name }), {}),
|
|
28
23
|
payload: JSON.stringify(data),
|
|
29
24
|
runtimeInfo: undefined,
|
|
30
25
|
}
|