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

[TASK] Context Derives - Defaults and additional options #265

Open
6 tasks
Tracked by #232
Tjemmmic opened this issue Sep 10, 2024 · 1 comment
Open
6 tasks
Tracked by #232

[TASK] Context Derives - Defaults and additional options #265

Tjemmmic opened this issue Sep 10, 2024 · 1 comment
Assignees

Comments

@Tjemmmic
Copy link
Contributor

Tjemmmic commented Sep 10, 2024

Overview

Introduce Derive macros for GadgetConfiguration (Context) to simplify the implementation of common traits and functionalities. These derives will automatically handle boilerplate code, such as the implementation of the keystore, Tangle client, and standard defaults, allowing developers to focus on core logic without manual implementation of repetitive tasks.

Checklist

  • WithKeystore: Automatically implement the keystore trait for any struct that derives WithKeystore. This will provide out-of-the-box support for secure key management.
  • WithTangleClient: Automatically implement the client function that returns a new subxt::OnlineClient instance for interacting with the Tangle. This will streamline integration with the Tangle network.
  • StandardDefaults: (Name will change) Automatically derive a set of common derives (e.g., Default, Clone, Debug, PartialEq) for GadgetConfiguration, reducing the need for manual derivations and ensuring consistency.
  • Specific keystore derives for functions specific to each key type e.g., first_ecdsa_signer
  • Tests for each Derive
  • Document the derives - [TASK] Docs - Context Derive Options #271
@drewstone
Copy link
Contributor

Pseudocode examples would be helpful, but generally I think my first feeling about naming is that I don't like these names or deriving WithKeystore feels off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Planning 🗺️
Development

No branches or pull requests

3 participants