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

Use middleware #278

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Use middleware #278

wants to merge 2 commits into from

Conversation

jmoreira-valory
Copy link
Collaborator

Use middleware for quickstart.

@jmoreira-valory jmoreira-valory marked this pull request as draft June 26, 2024 16:25
"""Run service."""

print_title("Trader Quickstart")
print("This script will assist you in setting up and running the Trader service.")

Choose a reason for hiding this comment

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

Shouldnt the Trader word be taken from the Configuration?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your comments @8ball030. This was an experimental PR to use the middleware in this repository, but at that time the middleware lacked some required features. For this reason, this PR is somewhat obsolete. The middleware has evolved and will be eventually integrated in this repository, most likely in a new PR.

"description": "trader service",
"configuration": ConfigurationTemplate(
{
"rpc": "",

Choose a reason for hiding this comment

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

Is there a way to force for example, subgraph api key and rpc url to be necessary?

spinner.succeed("RPC checks passed.")


def main() -> None:
Copy link

@8ball030 8ball030 Oct 22, 2024

Choose a reason for hiding this comment

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

is it possible to have a couple of flags here;

A) --dry-run: (effectively validate prior to the the deployment to verify that the deployment will proceed without issue?

B) --local-user-account-password/--no-user-password: Flag such that by default none is passed, and it will prompt the user, however if it is passed this will be used.

C) --no-wait: such that the application just fails if there is an error encountered

D) --from-env: such that the necessary vars for the service are retrieved from the environment.

reasoning.

it would then be very easy for users to automate suing ansible etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, we already have some of these features in main/develop branch. Will comment to the team about the rest.

wallet, mnemonic = app.wallet_manager.create(ledger_type=LedgerType.ETHEREUM)
wallet.password = password
print()
print_box(f"Please save the mnemonic phrase for the main wallet:\n{', '.join(mnemonic)}", 0 , '-')

Choose a reason for hiding this comment

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

maybe a verification that the user has actually saved it?

I.e. please enter 4-9-12 from the key

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