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

feat: eth command #73

Merged
merged 12 commits into from
Apr 24, 2023
Merged

feat: eth command #73

merged 12 commits into from
Apr 24, 2023

Conversation

nugaon
Copy link
Collaborator

@nugaon nugaon commented Dec 5, 2022

Added eth group command with

  • balance
  • send
    commands.

The test environment got updated with command log related utility function, namely describeCommand and other changes regarding how the error handling happens in the CLI.

Resolves #72

import { CommandLineError } from '../../utils/error'

export class EthCommand extends RootCommand {
protected provider = new providers.JsonRpcProvider('http://localhost:9545')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does it need to be hardcoded? Maybe it's better to put it in env?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

you cannot change URL parameters in the CLI so it is always contant on the host.
Nevertheless I defined it in the constant.ts instead


const network = await this.provider.getNetwork()

if (network.chainId !== 4020) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

4020 also can also be placed in env

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it is also fixed, but I will put into the constant.ts

src/command/eth/send.ts Outdated Show resolved Hide resolved
test/integration/eth.spec.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@IgorShadurin IgorShadurin left a comment

Choose a reason for hiding this comment

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

LGTM!

@nugaon nugaon merged commit 0ae40de into master Apr 24, 2023
@nugaon nugaon deleted the feat/eth-command branch April 24, 2023 13:21
@nugaon
Copy link
Collaborator Author

nugaon commented Jun 16, 2023

Release v2.2.0 addresses this.

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.

send coins and query balance of address
2 participants