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

Make Datum/Redeemer method generics on LedgerClient instead of on the whole trait #38

Open
MitchTurner opened this issue Sep 16, 2022 · 0 comments
Labels
2 2 point story good first issue Good for newcomers

Comments

@MitchTurner
Copy link
Collaborator

MitchTurner commented Sep 16, 2022

This will make it more flexible.

Essentially, the signature is currently:

pub trait LedgerClient<Datum, Redeemer>: Send + Sync {
    ...
    async fn outputs_at_address(&self, address: &Address)
        -> LedgerClientResult<Vec<Output<Datum>>>;
    ...
    async fn issue(&self, tx: Transaction<Datum, Redeemer>) -> LedgerClientResult<()>;

and we can make it

pub trait LedgerClient: Send + Sync {
    ...
    async fn outputs_at_address<Datum>(&self, address: &Address)
        -> LedgerClientResult<Vec<Output<Datum>>>;
    ...
    async fn issue<Datum, Redeemer>(&self, tx: Transaction<Datum, Redeemer>) -> LedgerClientResult<()>;
@MitchTurner MitchTurner added good first issue Good for newcomers 2 2 point story labels Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 2 point story good first issue Good for newcomers
Projects
Status: No status
Development

No branches or pull requests

1 participant