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(txsim): add CLI Flag for chainID #2934

Closed

Conversation

phamminh0811
Copy link
Contributor

Overview

Close #2471
This pr adding CLI Flag for chainID in txsim and make txsim runs with chainID option.

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

Copy link
Contributor

coderabbitai bot commented Dec 13, 2023

Walkthrough

The code changes introduce a new CLI flag for specifying the chainID in the txsim tool. This allows users to explicitly set the chain ID for transactions, ensuring they are submitted to the correct blockchain even if the endpoint's chain ID changes. The update affects the account management and transaction simulation processes, ensuring that the specified chain ID is used throughout the transaction lifecycle.

Changes

File Path Change Summary
test/cmd/txsim/cli.go Added chainID variable and flag; updated main function to use WithChainID.
test/txsim/account.go Updated NewAccountManager and setupMasterAccount to accept and use chainID.
test/txsim/run.go Added chainID to Options struct and Run function; introduced WithChainID method.
test/testground/README.md Modified a URL from inline to a hyperlink.

Assessment against linked issues

Objective Addressed Explanation
Adding CLI Flag for chainID in txsim for improved transaction control (#2471) The changes include the addition of a chainID flag in the CLI and the necessary adjustments in the code to handle the specified chain ID, addressing the issue's objective.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

@celestia-bot celestia-bot requested a review from a team December 13, 2023 14:40
@hoangdv2429
Copy link
Contributor

we need to add prefix feat: for this @phamminh0811

@phamminh0811 phamminh0811 changed the title adding CLI Flag for chainID in txsim feat: adding CLI Flag for chainID in txsim Dec 13, 2023
@rootulp rootulp changed the title feat: adding CLI Flag for chainID in txsim feat(txsim): add CLI Flag for chainID Dec 14, 2023
Copy link
Collaborator

@rootulp rootulp left a comment

Choose a reason for hiding this comment

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

Code changes LGTM. Thanks for the contribution! Defer to @staheri14 and @cmwaters for another review + merge

Copy link
Contributor

@staheri14 staheri14 left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! I have left one comment.
Also, would like to defer it to other reviewers for the final approval.

go.work.sum Show resolved Hide resolved
@celestia-bot celestia-bot requested a review from a team December 14, 2023 20:10
@hoangdv2429
Copy link
Contributor

hoangdv2429 commented Dec 14, 2023

I believe here is the describe of go.work.sum and we also have an on going issue related to changes of go.work.sum in here. I think we don't have to track it for now. wdyt @staheri14 @phamminh0811

@rootulp rootulp removed request for a team and evan-forbes December 19, 2023 20:13
@rootulp
Copy link
Collaborator

rootulp commented Dec 28, 2023

Based on #2471 (comment) it looks like we may not need this PR. Thoughts @cmwaters ?

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.

Add CLI Flag for chainID in txsim for improved transaction control
4 participants