Skip to content

Split AdapterOptions #152

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

Closed
elpiel opened this issue Oct 9, 2019 · 0 comments
Closed

Split AdapterOptions #152

elpiel opened this issue Oct 9, 2019 · 0 comments
Milestone

Comments

@elpiel
Copy link
Member

elpiel commented Oct 9, 2019

In #143 the options for both adapters are in 1 struct, separate the struct into 2 structs for each Adapter:

  • Dummy Adapter options struct
  • Ethereum Adapter options struct

This will ensure not to check for all the required options in the specific adapter and will remove a lot of this code in the init functions.

Another option is to use an Enum and have a default init fn taking it and have a TryFrom<ConfigStructForEthereum> for EthereumAdapter

@samparsky Also for the Keystore file, why don't we just deserialize it into an object instead of keystore_json: Value, and instead of doing let address = match keystore_json["address"].as_str() { .... }; we can ensure that the passed Keystore file is correct and we can use that struct in the Ethereum adapter like keystore: Keystore instead of serde Value

@elpiel elpiel added this to the 0.2.0 milestone Oct 9, 2019
@elpiel elpiel changed the title AdapterOptions Split AdapterOptions Oct 9, 2019
@elpiel elpiel closed this as completed Oct 9, 2019
@elpiel elpiel modified the milestones: sentry-v0.2.0, validator-v0.2.0 Jan 4, 2021
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

No branches or pull requests

1 participant