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(cli): Specify client.toml variables (gas, gas-prices, note, etc) #601

Merged
merged 11 commits into from
Mar 18, 2023

Conversation

Reecepbcups
Copy link
Contributor

@Reecepbcups Reecepbcups commented Mar 18, 2023

Closes #518

CI Failure note

The linter upgraded overnight... 95% of the issues are in the oracle and price feeder - which are being removed anyway in another PR

Feature

Reads from the client.toml file to get custom defined variables. This includes:

  • gas
  • gas-price
  • gas-adjustment
  • fees
  • fee-account
  • note (memo)

Logic

  • When set in the config, it auto populates by setting the env of said command for that transaction.
  • If a user has a local env set, it will override the config
  • junod config gas 1000000 to add in all the custom configuration options
  • If you set gas-prices, it will clear fees. If you set fees, clears gas-prices (since you can not do both)

image

Flow

  • Set junod config gas 1000000 into config.toml
  • Run junod tx bank send key juno1... 100ujuno
  • Program check config, and sets JUNOD_GAS=1000000 for that run
  • User then runs export JUNOD_GAS=500000 in the terminal
  • Run junod tx bank send key juno1... 100ujuno
  • Program sees gas is 500k, and uses that for this run. Ignoring config. (then to use config again, set JUNOD_GAS="")

@Reecepbcups Reecepbcups enabled auto-merge (squash) March 18, 2023 09:02
@Reecepbcups
Copy link
Contributor Author

UGH the linter changed overnight... 95% of the issues are in the oracle and price feeder - which are being removed anyway

@faddat
Copy link
Contributor

faddat commented Mar 18, 2023

K, you have a PR to take out the price feeder, yes?

@faddat
Copy link
Contributor

faddat commented Mar 18, 2023

PS: this looks like solid usability improvements

@Reecepbcups
Copy link
Contributor Author

K, you have a PR to take out the price feeder, yes?

@faddat yes, that PR which was just merged to main did this. So I'll pull main in later today & will fix these PRs CI

@faddat
Copy link
Contributor

faddat commented Mar 18, 2023

Cherry picked the lint commits from another branch, this should be good to go now, linter-wise.

@Reecepbcups Reecepbcups merged commit d027656 into main Mar 18, 2023
@Reecepbcups Reecepbcups mentioned this pull request Mar 20, 2023
9 tasks
@Reecepbcups Reecepbcups deleted the reece/easier-client-config branch March 28, 2023 04:04
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.

Reducing flags in junod commands
3 participants