Skip to content

Commit cd6e74c

Browse files
committed
fix(sdk,feeder): align with stellar-sdk v12 API and clean up repo
- Use account.sequenceNumber() and SorobanRpc.assembleTransaction instead of the removed Api.GetAccountResponse and rpc subpath imports - Type the Horizon operation records, error shapes, and keypair parameters, and update jest mocks accordingly so sdk and feeder build and pass tests - Add .eslintignore so lint skips generated dist/ and coverage/ output - Remove committed build artifacts (sdk coverage, stray npm package-lock files) and the stray test_vec.rs; ignore coverage/ output - Regenerate stale Soroban test snapshots to match current scoring logic
1 parent 7e1fb35 commit cd6e74c

36 files changed

Lines changed: 695 additions & 18006 deletions

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/dist/**
2+
**/coverage/**
3+
**/node_modules/**

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ contracts/**/test_snapshots/tests/proptest_*.json
88
# Node
99
node_modules/
1010
dist/
11+
coverage/
1112
.env
1213
.env.local
1314
.env.*.local

contracts/credit-oracle/test_snapshots/tests/test_compute_score_skips_write_when_inputs_unchanged.1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
},
352352
"ext": "v0"
353353
},
354-
4096
354+
518401
355355
]
356356
],
357357
[

contracts/credit-oracle/test_snapshots/tests/test_counterparty_bonus_adds_points.1.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@
730730
"symbol": "previous_score"
731731
},
732732
"val": {
733-
"u32": 646
733+
"u32": 564
734734
}
735735
},
736736
{
@@ -746,7 +746,7 @@
746746
"symbol": "score"
747747
},
748748
"val": {
749-
"u32": 657
749+
"u32": 575
750750
}
751751
},
752752
{
@@ -1753,7 +1753,7 @@
17531753
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM"
17541754
},
17551755
{
1756-
"u32": 657
1756+
"u32": 575
17571757
}
17581758
]
17591759
}

contracts/credit-oracle/test_snapshots/tests/test_score_bounded_300_850.1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3594,7 +3594,7 @@
35943594
"symbol": "score"
35953595
},
35963596
"val": {
3597-
"u32": 850
3597+
"u32": 767
35983598
}
35993599
},
36003600
{
@@ -7706,7 +7706,7 @@
77067706
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAK3IM"
77077707
},
77087708
{
7709-
"u32": 850
7709+
"u32": 767
77107710
}
77117711
]
77127712
}

contracts/credit-oracle/test_snapshots/tests/test_score_increases_with_repayments.1.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@
556556
"symbol": "score"
557557
},
558558
"val": {
559-
"u32": 465
559+
"u32": 382
560560
}
561561
},
562562
{
@@ -1213,7 +1213,7 @@
12131213
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAITA4"
12141214
},
12151215
{
1216-
"u32": 465
1216+
"u32": 382
12171217
}
12181218
]
12191219
}

contracts/credit-oracle/test_snapshots/tests/test_set_and_get_identity_oracle.1.json

Lines changed: 1 addition & 160 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,6 @@
106106
"u32": 1
107107
}
108108
},
109-
{
110-
"key": {
111-
"vec": [
112-
{
113-
"symbol": "ComputeCooldownLedgers"
114-
}
115-
]
116-
},
117-
"val": {
118-
"u32": 1
119-
}
120-
},
121109
{
122110
"key": {
123111
"vec": [
@@ -167,18 +155,6 @@
167155
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4"
168156
}
169157
},
170-
{
171-
"key": {
172-
"vec": [
173-
{
174-
"symbol": "StorageVersion"
175-
}
176-
]
177-
},
178-
"val": {
179-
"u32": 2
180-
}
181-
},
182158
{
183159
"key": {
184160
"vec": [
@@ -315,39 +291,6 @@
315291
{
316292
"contract_data": {
317293
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M",
318-
"key": {
319-
"ledger_key_nonce": {
320-
"nonce": 1033654523790656264
321-
}
322-
},
323-
"durability": "temporary"
324-
}
325-
},
326-
[
327-
{
328-
"last_modified_ledger_seq": 0,
329-
"data": {
330-
"contract_data": {
331-
"ext": "v0",
332-
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
333-
"key": {
334-
"ledger_key_nonce": {
335-
"nonce": 1033654523790656264
336-
}
337-
},
338-
"durability": "temporary",
339-
"val": "void"
340-
}
341-
},
342-
"ext": "v0"
343-
},
344-
6311999
345-
]
346-
],
347-
[
348-
{
349-
"contract_data": {
350-
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4",
351294
"key": {
352295
"ledger_key_nonce": {
353296
"nonce": 5541220902715666415
@@ -377,108 +320,6 @@
377320
6311999
378321
]
379322
],
380-
[
381-
{
382-
"contract_data": {
383-
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M",
384-
"key": {
385-
"vec": [
386-
{
387-
"symbol": "ActiveVCCount"
388-
},
389-
{
390-
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM"
391-
}
392-
]
393-
},
394-
"durability": "persistent"
395-
}
396-
},
397-
[
398-
{
399-
"last_modified_ledger_seq": 0,
400-
"data": {
401-
"contract_data": {
402-
"ext": "v0",
403-
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M",
404-
"key": {
405-
"vec": [
406-
{
407-
"symbol": "ActiveVCCount"
408-
},
409-
{
410-
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD2KM"
411-
}
412-
]
413-
},
414-
"durability": "persistent",
415-
"val": {
416-
"u32": 0
417-
}
418-
}
419-
},
420-
"ext": "v0"
421-
},
422-
4095
423-
]
424-
],
425-
[
426-
{
427-
"contract_data": {
428-
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M",
429-
"key": "ledger_key_contract_instance",
430-
"durability": "persistent"
431-
}
432-
},
433-
[
434-
{
435-
"last_modified_ledger_seq": 0,
436-
"data": {
437-
"contract_data": {
438-
"ext": "v0",
439-
"contract": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M",
440-
"key": "ledger_key_contract_instance",
441-
"durability": "persistent",
442-
"val": {
443-
"contract_instance": {
444-
"executable": {
445-
"wasm": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
446-
},
447-
"storage": [
448-
{
449-
"key": {
450-
"vec": [
451-
{
452-
"symbol": "Admin"
453-
}
454-
]
455-
},
456-
"val": {
457-
"address": "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFCT4"
458-
}
459-
},
460-
{
461-
"key": {
462-
"vec": [
463-
{
464-
"symbol": "StorageVersion"
465-
}
466-
]
467-
},
468-
"val": {
469-
"u32": 2
470-
}
471-
}
472-
]
473-
}
474-
}
475-
}
476-
},
477-
"ext": "v0"
478-
},
479-
500000
480-
]
481-
],
482323
[
483324
{
484325
"contract_code": {
@@ -497,7 +338,7 @@
497338
},
498339
"ext": "v0"
499340
},
500-
500000
341+
4095
501342
]
502343
]
503344
]

contracts/tests/test_snapshots/integration_test/tests/test_batch_revoke_integration.1.json

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

contracts/tests/test_snapshots/integration_test/tests/test_compute_score_deterministic.1.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)