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

Add encode subcommand to cli #311

Merged
merged 1 commit into from
Oct 18, 2023
Merged

Add encode subcommand to cli #311

merged 1 commit into from
Oct 18, 2023

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Oct 18, 2023

What

Add encode subcommand to cli that converts JSON into XDR.

printf '{
  "updated_entry": [
    {
      "contract_max_size_bytes": 2011
    },
    {
      "contract_compute_v0": {
        "ledger_max_instructions": 2500011,
        "tx_max_instructions": 2500011,
        "fee_rate_per_instructions_increment": 111,
        "tx_memory_limit": 2000011
      }
    }
  ]
}' | stellar-xdr encode --type ConfigUpgradeSet
AAAAAgAAAAAAAAfbAAAAAQAAAAAAJiWrAAAAAAAmJasAAAAAAAAAbwAehIs=

Why

The stellar-xdr CLI can convert XDR to JSON. It would be helpful to be able to convert JSON into XDR going in the reverse direction.

@leighmcculloch leighmcculloch marked this pull request as ready for review October 18, 2023 21:26
@leighmcculloch leighmcculloch removed the request for review from sisuresh October 18, 2023 22:20
@leighmcculloch leighmcculloch added this pull request to the merge queue Oct 18, 2023
Merged via the queue into main with commit b96ca71 Oct 18, 2023
7 checks passed
@leighmcculloch leighmcculloch deleted the cli-encode branch October 18, 2023 22:43
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