@sentio/sdk 1.27.0 → 1.27.2
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/utils.d.ts +2 -0
- package/lib/aptos/utils.js +8 -1
- package/lib/aptos/utils.js.map +1 -1
- package/lib/aptos-codegen/codegen.js +19 -15
- package/lib/aptos-codegen/codegen.js.map +1 -1
- package/lib/builtin/aptos/0x1.d.ts +24 -24
- package/lib/builtin/aptos/0x1.js.map +1 -1
- package/lib/builtin/aptos/0x3.d.ts +15 -4
- package/lib/builtin/aptos/0x3.js.map +1 -1
- package/lib/cli/upload.js +17 -2
- package/lib/cli/upload.js.map +1 -1
- package/lib/gen/chainquery/protos/chainquery.d.ts +223 -0
- package/lib/gen/chainquery/protos/chainquery.js +628 -0
- package/lib/gen/chainquery/protos/chainquery.js.map +1 -0
- package/lib/tests/types/aptos/soffl3.d.ts +786 -0
- package/lib/tests/types/aptos/soffl3.js +559 -0
- package/lib/tests/types/aptos/soffl3.js.map +1 -0
- package/lib/tests/types/aptos/souffle.d.ts +16 -16
- package/lib/tests/types/aptos/souffle.js.map +1 -1
- package/package.json +1 -1
- package/src/aptos/utils.ts +9 -0
- package/src/aptos-codegen/codegen.ts +20 -15
- package/src/builtin/aptos/0x1.ts +28 -26
- package/src/builtin/aptos/0x3.ts +15 -7
- package/src/cli/upload.ts +17 -2
- package/src/gen/chainquery/protos/chainquery.ts +840 -0
- package/src/tests/abis/aptos/soffl3.json +1411 -0
- package/src/tests/types/aptos/soffl3.ts +1377 -0
- package/src/tests/types/aptos/souffle.ts +16 -16
package/src/builtin/aptos/0x1.ts
CHANGED
|
@@ -281,25 +281,25 @@ export namespace coin {
|
|
|
281
281
|
type_arguments: [];
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
-
export interface FreezeCoinStorePayload
|
|
285
|
-
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
286
|
-
arguments_typed: [Address];
|
|
284
|
+
export interface FreezeCoinStorePayload<T0 = any>
|
|
285
|
+
extends aptos.TypedEntryFunctionPayload<[Address, Address]> {
|
|
286
|
+
arguments_typed: [Address, Address];
|
|
287
287
|
type_arguments: [string];
|
|
288
288
|
}
|
|
289
289
|
|
|
290
|
-
export interface TransferPayload
|
|
290
|
+
export interface TransferPayload<T0 = any>
|
|
291
291
|
extends aptos.TypedEntryFunctionPayload<[Address, bigint]> {
|
|
292
292
|
arguments_typed: [Address, bigint];
|
|
293
293
|
type_arguments: [string];
|
|
294
294
|
}
|
|
295
295
|
|
|
296
|
-
export interface UnfreezeCoinStorePayload
|
|
297
|
-
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
298
|
-
arguments_typed: [Address];
|
|
296
|
+
export interface UnfreezeCoinStorePayload<T0 = any>
|
|
297
|
+
extends aptos.TypedEntryFunctionPayload<[Address, Address]> {
|
|
298
|
+
arguments_typed: [Address, Address];
|
|
299
299
|
type_arguments: [string];
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
export interface UpgradeSupplyPayload
|
|
302
|
+
export interface UpgradeSupplyPayload<T0 = any>
|
|
303
303
|
extends aptos.TypedEntryFunctionPayload<[]> {
|
|
304
304
|
arguments_typed: [];
|
|
305
305
|
type_arguments: [string];
|
|
@@ -2163,8 +2163,8 @@ export namespace vesting {
|
|
|
2163
2163
|
}
|
|
2164
2164
|
|
|
2165
2165
|
export interface DistributePayload
|
|
2166
|
-
extends aptos.TypedEntryFunctionPayload<[]> {
|
|
2167
|
-
arguments_typed: [];
|
|
2166
|
+
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
2167
|
+
arguments_typed: [Address];
|
|
2168
2168
|
type_arguments: [];
|
|
2169
2169
|
}
|
|
2170
2170
|
|
|
@@ -2205,8 +2205,8 @@ export namespace vesting {
|
|
|
2205
2205
|
}
|
|
2206
2206
|
|
|
2207
2207
|
export interface UnlockRewardsPayload
|
|
2208
|
-
extends aptos.TypedEntryFunctionPayload<[]> {
|
|
2209
|
-
arguments_typed: [];
|
|
2208
|
+
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
2209
|
+
arguments_typed: [Address];
|
|
2210
2210
|
type_arguments: [];
|
|
2211
2211
|
}
|
|
2212
2212
|
|
|
@@ -2228,8 +2228,9 @@ export namespace vesting {
|
|
|
2228
2228
|
type_arguments: [];
|
|
2229
2229
|
}
|
|
2230
2230
|
|
|
2231
|
-
export interface VestPayload
|
|
2232
|
-
|
|
2231
|
+
export interface VestPayload
|
|
2232
|
+
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
2233
|
+
arguments_typed: [Address];
|
|
2233
2234
|
type_arguments: [];
|
|
2234
2235
|
}
|
|
2235
2236
|
|
|
@@ -2486,8 +2487,8 @@ export namespace aptos_coin {
|
|
|
2486
2487
|
}
|
|
2487
2488
|
|
|
2488
2489
|
export interface DelegateMintCapabilityPayload
|
|
2489
|
-
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
2490
|
-
arguments_typed: [Address];
|
|
2490
|
+
extends aptos.TypedEntryFunctionPayload<[Address, Address]> {
|
|
2491
|
+
arguments_typed: [Address, Address];
|
|
2491
2492
|
type_arguments: [];
|
|
2492
2493
|
}
|
|
2493
2494
|
|
|
@@ -2766,25 +2767,26 @@ export namespace managed_coin {
|
|
|
2766
2767
|
mint_cap: coin.MintCapability<T0>;
|
|
2767
2768
|
}
|
|
2768
2769
|
|
|
2769
|
-
export interface BurnPayload
|
|
2770
|
+
export interface BurnPayload<T0 = any>
|
|
2770
2771
|
extends aptos.TypedEntryFunctionPayload<[bigint]> {
|
|
2771
2772
|
arguments_typed: [bigint];
|
|
2772
2773
|
type_arguments: [string];
|
|
2773
2774
|
}
|
|
2774
2775
|
|
|
2775
|
-
export interface InitializePayload
|
|
2776
|
+
export interface InitializePayload<T0 = any>
|
|
2776
2777
|
extends aptos.TypedEntryFunctionPayload<[string, string, number, Boolean]> {
|
|
2777
2778
|
arguments_typed: [string, string, number, Boolean];
|
|
2778
2779
|
type_arguments: [string];
|
|
2779
2780
|
}
|
|
2780
2781
|
|
|
2781
|
-
export interface MintPayload
|
|
2782
|
+
export interface MintPayload<T0 = any>
|
|
2782
2783
|
extends aptos.TypedEntryFunctionPayload<[Address, bigint]> {
|
|
2783
2784
|
arguments_typed: [Address, bigint];
|
|
2784
2785
|
type_arguments: [string];
|
|
2785
2786
|
}
|
|
2786
2787
|
|
|
2787
|
-
export interface RegisterPayload
|
|
2788
|
+
export interface RegisterPayload<T0 = any>
|
|
2789
|
+
extends aptos.TypedEntryFunctionPayload<[]> {
|
|
2788
2790
|
arguments_typed: [];
|
|
2789
2791
|
type_arguments: [string];
|
|
2790
2792
|
}
|
|
@@ -2869,8 +2871,8 @@ export class aptos_account extends aptos.AptosBaseProcessor {
|
|
|
2869
2871
|
|
|
2870
2872
|
export namespace aptos_account {
|
|
2871
2873
|
export interface CreateAccountPayload
|
|
2872
|
-
extends aptos.TypedEntryFunctionPayload<[]> {
|
|
2873
|
-
arguments_typed: [];
|
|
2874
|
+
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
2875
|
+
arguments_typed: [Address];
|
|
2874
2876
|
type_arguments: [];
|
|
2875
2877
|
}
|
|
2876
2878
|
|
|
@@ -3414,8 +3416,8 @@ export namespace aptos_governance {
|
|
|
3414
3416
|
}
|
|
3415
3417
|
|
|
3416
3418
|
export interface AddApprovedScriptHashScriptPayload
|
|
3417
|
-
extends aptos.TypedEntryFunctionPayload<[]> {
|
|
3418
|
-
arguments_typed: [];
|
|
3419
|
+
extends aptos.TypedEntryFunctionPayload<[bigint]> {
|
|
3420
|
+
arguments_typed: [bigint];
|
|
3419
3421
|
type_arguments: [];
|
|
3420
3422
|
}
|
|
3421
3423
|
|
|
@@ -3982,8 +3984,8 @@ export namespace staking_contract {
|
|
|
3982
3984
|
}
|
|
3983
3985
|
|
|
3984
3986
|
export interface DistributePayload
|
|
3985
|
-
extends aptos.TypedEntryFunctionPayload<[Address]> {
|
|
3986
|
-
arguments_typed: [Address];
|
|
3987
|
+
extends aptos.TypedEntryFunctionPayload<[Address, Address]> {
|
|
3988
|
+
arguments_typed: [Address, Address];
|
|
3987
3989
|
type_arguments: [];
|
|
3988
3990
|
}
|
|
3989
3991
|
|
package/src/builtin/aptos/0x3.ts
CHANGED
|
@@ -666,7 +666,7 @@ export namespace token_coin_swap {
|
|
|
666
666
|
type_arguments: [];
|
|
667
667
|
}
|
|
668
668
|
|
|
669
|
-
export interface ListTokenForSwapPayload
|
|
669
|
+
export interface ListTokenForSwapPayload<T0 = any>
|
|
670
670
|
extends aptos.TypedEntryFunctionPayload<
|
|
671
671
|
[Address, string, string, bigint, bigint, bigint, bigint]
|
|
672
672
|
> {
|
|
@@ -837,25 +837,33 @@ export namespace token_transfers {
|
|
|
837
837
|
|
|
838
838
|
export interface CancelOfferScriptPayload
|
|
839
839
|
extends aptos.TypedEntryFunctionPayload<
|
|
840
|
-
[Address, Address, string, string, bigint]
|
|
840
|
+
[Address, Address, Address, string, string, bigint]
|
|
841
841
|
> {
|
|
842
|
-
arguments_typed: [Address, Address, string, string, bigint];
|
|
842
|
+
arguments_typed: [Address, Address, Address, string, string, bigint];
|
|
843
843
|
type_arguments: [];
|
|
844
844
|
}
|
|
845
845
|
|
|
846
846
|
export interface ClaimScriptPayload
|
|
847
847
|
extends aptos.TypedEntryFunctionPayload<
|
|
848
|
-
[Address, Address, string, string, bigint]
|
|
848
|
+
[Address, Address, Address, string, string, bigint]
|
|
849
849
|
> {
|
|
850
|
-
arguments_typed: [Address, Address, string, string, bigint];
|
|
850
|
+
arguments_typed: [Address, Address, Address, string, string, bigint];
|
|
851
851
|
type_arguments: [];
|
|
852
852
|
}
|
|
853
853
|
|
|
854
854
|
export interface OfferScriptPayload
|
|
855
855
|
extends aptos.TypedEntryFunctionPayload<
|
|
856
|
-
[Address, Address, string, string, bigint, bigint]
|
|
856
|
+
[Address, Address, Address, string, string, bigint, bigint]
|
|
857
857
|
> {
|
|
858
|
-
arguments_typed: [
|
|
858
|
+
arguments_typed: [
|
|
859
|
+
Address,
|
|
860
|
+
Address,
|
|
861
|
+
Address,
|
|
862
|
+
string,
|
|
863
|
+
string,
|
|
864
|
+
bigint,
|
|
865
|
+
bigint
|
|
866
|
+
];
|
|
859
867
|
type_arguments: [];
|
|
860
868
|
}
|
|
861
869
|
|
package/src/cli/upload.ts
CHANGED
|
@@ -53,6 +53,7 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
|
|
|
53
53
|
hash.update(content)
|
|
54
54
|
const digest = hash.digest('hex')
|
|
55
55
|
|
|
56
|
+
let triedCount = 0
|
|
56
57
|
const upload = async () => {
|
|
57
58
|
const data = new FormData()
|
|
58
59
|
data.append('attachment', fs.createReadStream(PROCESSOR_FILE))
|
|
@@ -71,7 +72,7 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
|
|
|
71
72
|
} catch (e) {
|
|
72
73
|
// skip errors
|
|
73
74
|
}
|
|
74
|
-
console.log(chalk.blue('Uploading'))
|
|
75
|
+
console.log(chalk.blue(triedCount > 1 ? 'Retry uploading' : 'Uploading'))
|
|
75
76
|
const res = await fetch(url, {
|
|
76
77
|
method: 'POST',
|
|
77
78
|
headers: {
|
|
@@ -125,5 +126,19 @@ export async function uploadFile(options: SentioProjectConfig, apiKeyOverride: s
|
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
const tryUploading = async () => {
|
|
130
|
+
if (triedCount++ >= 5) {
|
|
131
|
+
return
|
|
132
|
+
}
|
|
133
|
+
try {
|
|
134
|
+
await upload()
|
|
135
|
+
} catch (e) {
|
|
136
|
+
console.log(e)
|
|
137
|
+
if (e.constructor.name === 'FetchError' && e.type === 'system' && e.code === 'EPIPE') {
|
|
138
|
+
await tryUploading()
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
await tryUploading()
|
|
129
144
|
}
|