Skip to content

Commit

Permalink
Merge pull request #1476 from ardriveapp/PE-5010-optimize-pst-retriev…
Browse files Browse the repository at this point in the history
…al-by-excluding-verto-cache-on-ar-drive-app

PE-5010: optimize pst retrieval by excluding verto cache on ar drive app
  • Loading branch information
thiagocarvalhodev authored Nov 14, 2023
2 parents 40c9c02 + 11abbe0 commit 8f2b768
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 43 deletions.
2 changes: 0 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,6 @@ class AppState extends State<App> {
communityOracle: CommunityOracle(
ArDriveContractOracle(
[
ContractOracle(VertoContractReader()),
ContractOracle(RedstoneContractReader()),
ContractOracle(ARNSContractReader()),
],
fallbackContractOracle: ContractOracle(
Expand Down
2 changes: 0 additions & 2 deletions packages/ardrive_uploader/lib/src/ardrive_uploader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ abstract class ArDriveUploader {
pstService ??= PstService(
communityOracle: CommunityOracle(
ArDriveContractOracle([
ContractOracle(VertoContractReader()),
ContractOracle(RedstoneContractReader()),
ContractOracle(SmartweaveContractReader()),
]),
),
Expand Down
2 changes: 0 additions & 2 deletions packages/pst/lib/pst.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export 'src/community_oracle.dart';
export 'src/contract_oracle.dart';
export 'src/contract_reader.dart';
export 'src/contract_readers/arns_contract_reader.dart';
export 'src/contract_readers/redstone_contract_reader.dart';
export 'src/contract_readers/smartweave_contract_reader.dart';
export 'src/contract_readers/verto_contract_reader.dart';
export 'src/pst.dart';
export 'src/pst_contract_data.dart';
export 'src/pst_contract_data_builder.dart';
3 changes: 1 addition & 2 deletions packages/pst/lib/src/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ final pstTransactionId = TransactionID(
'-8A6RexFkpfWwuyVO98wzSFZh0d6VJuI-buTJvlwOJQ',
);
const cacheUrl = 'https://d2440r7x1v6779.cloudfront.net/cache/state';
const vertoCacheUrl = 'https://v2.cache.verto.exchange';
const arnsCacheUrl = 'https://dev.arns.app/v1/contract';
const arnsCacheUrl = 'https://api.arns.app/v1/contract';

This file was deleted.

14 changes: 0 additions & 14 deletions packages/pst/lib/src/contract_readers/verto_contract_reader.dart

This file was deleted.

7 changes: 0 additions & 7 deletions packages/pst/test/src/contract_oracle_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,6 @@ void main() {
myBrokenContractOracle = ContractOracle(myBrokenContractReader);
});

test('throws if an empty array is passed', () {
expect(
() => ArDriveContractOracle([]),
throwsA(const EmptyContractOracles()),
);
});

setUp(() {
// Puts a delay to test the retries in the broken contract
// in other case it will returns before the broken one retry more than one time
Expand Down

0 comments on commit 8f2b768

Please sign in to comment.