-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: collapse interfaces for single implementation (#2599)
There is an absurd amount of interfaces for things that are just the same implementation but thrown into different (and sometimes same) things. It makes it more difficult to contribute and figure out what is going on in the code, and don't really give us a benefit when it is values that are expected to be tightly coupled anyway. If the need for multiple implementations arise lets make the interfaces then. - Creates `StateInfoProvider` which combines: - `contract_commitment_provider.ts` - `data_commitment_provider.ts` - `l1_l2_message_provider.ts` - `nullifier_provider.ts` - This have functions for retrieving index and sibling paths as we had before. - Replaces the multiple `findXLeafIndex` functions we had with a single `findLeafIndex` that takes the tree id as input. - The sibling path functions are not collapsed hence this don't play well with the `remote` from `comlink` that we use.
- Loading branch information
Showing
15 changed files
with
82 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
yarn-project/types/src/interfaces/contract_commitment_provider.ts
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
yarn-project/types/src/interfaces/data_commitment_provider.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
yarn-project/types/src/interfaces/l1_l2_message_provider.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.