@sentio/sdk 2.60.0-rc.2 → 2.60.0-rc.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/src/eth/eth.ts CHANGED
@@ -150,34 +150,39 @@ export function formatEthData(data: {
150
150
  return data.__formattedEthData
151
151
  }
152
152
 
153
- const log = data.log ? formatLog(data.log) : undefined
154
- if (data.block && !data.block.transactions) {
155
- data.block.transactions = []
156
- }
157
- const block = data.block ? formatRichBlock(data.block) : undefined
158
- const trace = data.trace ? (data.trace as Trace) : undefined
159
- let transaction = undefined
160
- if (data.transaction) {
161
- if (!data.transaction.v) {
162
- data.transaction.v = '0x1c'
163
- data.transaction.r = '0x88ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0'
164
- data.transaction.s = '0x45e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33a'
153
+ try {
154
+ const log = data.log ? formatLog(data.log) : undefined
155
+ if (data.block && !data.block.transactions) {
156
+ data.block.transactions = []
157
+ }
158
+ const block = data.block ? formatRichBlock(data.block) : undefined
159
+ const trace = data.trace ? (data.trace as Trace) : undefined
160
+ let transaction = undefined
161
+ if (data.transaction) {
162
+ if (!data.transaction.v) {
163
+ data.transaction.v = '0x1c'
164
+ data.transaction.r = '0x88ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0'
165
+ data.transaction.s = '0x45e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33a'
166
+ }
167
+ transaction = formatTransactionResponse(data.transaction)
168
+ }
169
+ const transactionReceipt = data.transactionReceipt ? formatTransactionReceipt(data.transactionReceipt) : undefined
170
+
171
+ const result = {
172
+ log,
173
+ block,
174
+ trace,
175
+ transaction,
176
+ transactionReceipt
165
177
  }
166
- transaction = formatTransactionResponse(data.transaction)
167
- }
168
- const transactionReceipt = data.transactionReceipt ? formatTransactionReceipt(data.transactionReceipt) : undefined
169
-
170
- const result = {
171
- log,
172
- block,
173
- trace,
174
- transaction,
175
- transactionReceipt
176
- }
177
178
 
178
- // Cache the result on the input data object
179
- data.__formattedEthData = result
180
- return result
179
+ // Cache the result on the input data object
180
+ data.__formattedEthData = result
181
+ return result
182
+ } catch (e) {
183
+ console.error('Error formatting eth data', e)
184
+ return data
185
+ }
181
186
  }
182
187
 
183
188
  export function formatRichBlock(block: RichBlock): RichBlock {
@@ -1,4 +1,34 @@
1
1
  {
2
+ "accumulator": {
3
+ "fileFormatVersion": 6,
4
+ "address": "0x2",
5
+ "name": "accumulator",
6
+ "friends": [],
7
+ "structs": {
8
+ "AccumulatorRoot": {
9
+ "abilities": {
10
+ "abilities": [
11
+ "Key"
12
+ ]
13
+ },
14
+ "typeParameters": [],
15
+ "fields": [
16
+ {
17
+ "name": "id",
18
+ "type": {
19
+ "Struct": {
20
+ "address": "0x2",
21
+ "module": "object",
22
+ "name": "UID",
23
+ "typeArguments": []
24
+ }
25
+ }
26
+ }
27
+ ]
28
+ }
29
+ },
30
+ "exposedFunctions": {}
31
+ },
2
32
  "address": {
3
33
  "fileFormatVersion": 6,
4
34
  "address": "0x2",
@@ -14484,6 +14514,10 @@
14484
14514
  "address": "0x2",
14485
14515
  "name": "object",
14486
14516
  "friends": [
14517
+ {
14518
+ "address": "0x2",
14519
+ "name": "accumulator"
14520
+ },
14487
14521
  {
14488
14522
  "address": "0x2",
14489
14523
  "name": "authenticator_state"
@@ -14836,6 +14870,31 @@
14836
14870
  }
14837
14871
  ]
14838
14872
  },
14873
+ "sui_accumulator_root_address": {
14874
+ "visibility": "Friend",
14875
+ "isEntry": false,
14876
+ "typeParameters": [],
14877
+ "parameters": [],
14878
+ "return": [
14879
+ "Address"
14880
+ ]
14881
+ },
14882
+ "sui_accumulator_root_object_id": {
14883
+ "visibility": "Friend",
14884
+ "isEntry": false,
14885
+ "typeParameters": [],
14886
+ "parameters": [],
14887
+ "return": [
14888
+ {
14889
+ "Struct": {
14890
+ "address": "0x2",
14891
+ "module": "object",
14892
+ "name": "UID",
14893
+ "typeArguments": []
14894
+ }
14895
+ }
14896
+ ]
14897
+ },
14839
14898
  "sui_deny_list_object_id": {
14840
14899
  "visibility": "Friend",
14841
14900
  "isEntry": false,
@@ -16537,6 +16596,141 @@
16537
16596
  }
16538
16597
  }
16539
16598
  },
16599
+ "party": {
16600
+ "fileFormatVersion": 6,
16601
+ "address": "0x2",
16602
+ "name": "party",
16603
+ "friends": [
16604
+ {
16605
+ "address": "0x2",
16606
+ "name": "transfer"
16607
+ }
16608
+ ],
16609
+ "structs": {
16610
+ "Party": {
16611
+ "abilities": {
16612
+ "abilities": [
16613
+ "Copy",
16614
+ "Drop"
16615
+ ]
16616
+ },
16617
+ "typeParameters": [],
16618
+ "fields": [
16619
+ {
16620
+ "name": "default",
16621
+ "type": {
16622
+ "Struct": {
16623
+ "address": "0x2",
16624
+ "module": "party",
16625
+ "name": "Permissions",
16626
+ "typeArguments": []
16627
+ }
16628
+ }
16629
+ },
16630
+ {
16631
+ "name": "members",
16632
+ "type": {
16633
+ "Struct": {
16634
+ "address": "0x2",
16635
+ "module": "vec_map",
16636
+ "name": "VecMap",
16637
+ "typeArguments": [
16638
+ "Address",
16639
+ {
16640
+ "Struct": {
16641
+ "address": "0x2",
16642
+ "module": "party",
16643
+ "name": "Permissions",
16644
+ "typeArguments": []
16645
+ }
16646
+ }
16647
+ ]
16648
+ }
16649
+ }
16650
+ }
16651
+ ]
16652
+ },
16653
+ "Permissions": {
16654
+ "abilities": {
16655
+ "abilities": [
16656
+ "Copy",
16657
+ "Drop"
16658
+ ]
16659
+ },
16660
+ "typeParameters": [],
16661
+ "fields": [
16662
+ {
16663
+ "name": "pos0",
16664
+ "type": "U64"
16665
+ }
16666
+ ]
16667
+ }
16668
+ },
16669
+ "exposedFunctions": {
16670
+ "into_native": {
16671
+ "visibility": "Friend",
16672
+ "isEntry": false,
16673
+ "typeParameters": [],
16674
+ "parameters": [
16675
+ {
16676
+ "Struct": {
16677
+ "address": "0x2",
16678
+ "module": "party",
16679
+ "name": "Party",
16680
+ "typeArguments": []
16681
+ }
16682
+ }
16683
+ ],
16684
+ "return": [
16685
+ "U64",
16686
+ {
16687
+ "Vector": "Address"
16688
+ },
16689
+ {
16690
+ "Vector": "U64"
16691
+ }
16692
+ ]
16693
+ },
16694
+ "is_single_owner": {
16695
+ "visibility": "Friend",
16696
+ "isEntry": false,
16697
+ "typeParameters": [],
16698
+ "parameters": [
16699
+ {
16700
+ "Reference": {
16701
+ "Struct": {
16702
+ "address": "0x2",
16703
+ "module": "party",
16704
+ "name": "Party",
16705
+ "typeArguments": []
16706
+ }
16707
+ }
16708
+ }
16709
+ ],
16710
+ "return": [
16711
+ "Bool"
16712
+ ]
16713
+ },
16714
+ "single_owner": {
16715
+ "visibility": "Public",
16716
+ "isEntry": false,
16717
+ "typeParameters": [],
16718
+ "parameters": [
16719
+ "Address"
16720
+ ],
16721
+ "return": [
16722
+ {
16723
+ "Struct": {
16724
+ "address": "0x2",
16725
+ "module": "party",
16726
+ "name": "Party",
16727
+ "typeArguments": []
16728
+ }
16729
+ }
16730
+ ]
16731
+ }
16732
+ }
16733
+ },
16540
16734
  "pay": {
16541
16735
  "fileFormatVersion": 6,
16542
16736
  "address": "0x2",
@@ -20920,6 +21114,55 @@
20920
21114
  ],
20921
21115
  "return": []
20922
21116
  },
21117
+ "party_transfer": {
21118
+ "visibility": "Public",
21119
+ "isEntry": false,
21120
+ "typeParameters": [
21121
+ {
21122
+ "abilities": [
21123
+ "Key"
21124
+ ]
21125
+ }
21126
+ ],
21127
+ "parameters": [
21128
+ {
21129
+ "TypeParameter": 0
21130
+ },
21131
+ {
21132
+ "Struct": {
21133
+ "address": "0x2",
21134
+ "module": "party",
21135
+ "name": "Party",
21136
+ "typeArguments": []
21137
+ }
21138
+ }
21139
+ ],
21140
+ "return": []
21141
+ },
21142
+ "party_transfer_impl": {
21143
+ "visibility": "Friend",
21144
+ "isEntry": false,
21145
+ "typeParameters": [
21146
+ {
21147
+ "abilities": [
21148
+ "Key"
21149
+ ]
21150
+ }
21151
+ ],
21152
+ "parameters": [
21153
+ {
21154
+ "TypeParameter": 0
21155
+ },
21156
+ "U64",
21157
+ {
21158
+ "Vector": "Address"
21159
+ },
21160
+ {
21161
+ "Vector": "U64"
21162
+ }
21163
+ ],
21164
+ "return": []
21165
+ },
20923
21166
  "public_freeze_object": {
20924
21167
  "visibility": "Public",
20925
21168
  "isEntry": false,
@@ -20938,6 +21181,32 @@
20938
21181
  ],
20939
21182
  "return": []
20940
21183
  },
21184
+ "public_party_transfer": {
21185
+ "visibility": "Public",
21186
+ "isEntry": false,
21187
+ "typeParameters": [
21188
+ {
21189
+ "abilities": [
21190
+ "Store",
21191
+ "Key"
21192
+ ]
21193
+ }
21194
+ ],
21195
+ "parameters": [
21196
+ {
21197
+ "TypeParameter": 0
21198
+ },
21199
+ {
21200
+ "Struct": {
21201
+ "address": "0x2",
21202
+ "module": "party",
21203
+ "name": "Party",
21204
+ "typeArguments": []
21205
+ }
21206
+ }
21207
+ ],
21208
+ "return": []
21209
+ },
20941
21210
  "public_receive": {
20942
21211
  "visibility": "Public",
20943
21212
  "isEntry": false,
@@ -747,6 +747,35 @@
747
747
  ],
748
748
  "return": []
749
749
  },
750
+ "activation_epoch": {
751
+ "visibility": "Friend",
752
+ "isEntry": false,
753
+ "typeParameters": [],
754
+ "parameters": [
755
+ {
756
+ "Reference": {
757
+ "Struct": {
758
+ "address": "0x3",
759
+ "module": "staking_pool",
760
+ "name": "StakingPool",
761
+ "typeArguments": []
762
+ }
763
+ }
764
+ }
765
+ ],
766
+ "return": [
767
+ {
768
+ "Struct": {
769
+ "address": "0x1",
770
+ "module": "option",
771
+ "name": "Option",
772
+ "typeArguments": [
773
+ "U64"
774
+ ]
775
+ }
776
+ }
777
+ ]
778
+ },
750
779
  "convert_to_fungible_staked_sui": {
751
780
  "visibility": "Friend",
752
781
  "isEntry": false,