Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADP-3335] Add functions and mock implementations to Deposit Wallet #4527

Merged
merged 6 commits into from
May 14, 2024

Conversation

HeinrichApfelmus
Copy link
Contributor

This pull request adds various functions and mock implementations to the Deposit Wallet in order to prepare the execution of user scenarios.

Comment

This pull request prepares the implementation of a mock environment for
the Deposit Wallet. In turn, this enables execution of user scenarios.

Issue Number

ADP-3335

@HeinrichApfelmus HeinrichApfelmus changed the base branch from master to HeinrichApfelmus/ADP-3335/deposit-wallet-db April 8, 2024 15:48
@HeinrichApfelmus HeinrichApfelmus changed the title [ADP-3335] Add additional functions and mock implementations to Deposit Wallet [ADP-3335] Add functions and mock implementations to Deposit Wallet Apr 8, 2024
@HeinrichApfelmus HeinrichApfelmus self-assigned this Apr 8, 2024
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from de236a9 to b16bb0b Compare April 8, 2024 15:51
@HeinrichApfelmus HeinrichApfelmus requested a review from paolino April 8, 2024 15:51
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from b16bb0b to 5608d1e Compare April 8, 2024 15:55
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from 09d294a to 4bd8b0b Compare April 9, 2024 11:00
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from 5608d1e to a1b11fa Compare April 9, 2024 11:00
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from 4bd8b0b to f06018b Compare April 16, 2024 11:55
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from a1b11fa to 418a80f Compare April 16, 2024 11:55
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from f06018b to d1d58af Compare April 24, 2024 10:27
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from 418a80f to e76c26a Compare April 24, 2024 10:27
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from d1d58af to 0e05b55 Compare May 2, 2024 11:09
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from e76c26a to cc51cf6 Compare May 2, 2024 11:09
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from 0e05b55 to da599d2 Compare May 2, 2024 14:00
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from cc51cf6 to ce2a99a Compare May 2, 2024 14:00
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from da599d2 to 4d683d0 Compare May 10, 2024 12:23
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from ce2a99a to 2d4cf2a Compare May 10, 2024 12:23
@HeinrichApfelmus HeinrichApfelmus requested review from paweljakubas and removed request for paolino May 10, 2024 12:24
@@ -50,6 +55,9 @@ import Data.Foldable
import Data.List.NonEmpty
( NonEmpty
)
import Data.Map
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my suggestion: use Data.Map.Strict

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it needed when importing the type Map rather than the functions? But maybe the Semigroup instance… 🤔

@@ -59,6 +60,7 @@ import qualified Cardano.Wallet.Primitive.Types.Tx.TxIn as W
import qualified Cardano.Wallet.Primitive.Types.Tx.TxOut as W
import qualified Cardano.Wallet.Primitive.Types.UTxO as W
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as B8
-- import qualified Ouroboros.Consensus.Cardano.Block as O
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope we will clean those things later... Now, not a good moment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Cardano.Wallet.Deposit.Read is essentially a messy lumber room at the moment. 😅

Copy link
Contributor

@paweljakubas paweljakubas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! What about adding test skeleton for db functions? With First invariances of method combinations that should be obeyed...

@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/deposit-wallet-db branch from 4d683d0 to f186998 Compare May 13, 2024 16:07
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from 2d4cf2a to 02078e9 Compare May 13, 2024 16:21
@HeinrichApfelmus
Copy link
Contributor Author

Thanks for your review, Pawel! 😊

What about adding test skeleton for db functions? With First invariances of method combinations that should be obeyed...

Not yet. The next pull request, #4513, will specify usage scenarios and (mock) test some of these scenarios. The methods will be mainly tested on the *.Pure side — and a subset of them will be proven correct instead of tested.

Base automatically changed from HeinrichApfelmus/ADP-3335/deposit-wallet-db to master May 13, 2024 17:34
@HeinrichApfelmus HeinrichApfelmus force-pushed the HeinrichApfelmus/ADP-3335/mock-deposit branch from 02078e9 to 1c697ff Compare May 14, 2024 09:55
@HeinrichApfelmus HeinrichApfelmus added this pull request to the merge queue May 14, 2024
Merged via the queue into master with commit 59176a5 May 14, 2024
3 checks passed
@HeinrichApfelmus HeinrichApfelmus deleted the HeinrichApfelmus/ADP-3335/mock-deposit branch May 14, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants