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

Contract Spec: add XDR format + docs link #1277

Merged
merged 2 commits into from
Mar 19, 2025
Merged

Contract Spec: add XDR format + docs link #1277

merged 2 commits into from
Mar 19, 2025

Conversation

quietbits
Copy link
Contributor

  • Updated CodeEditor component:
    • added languages dropdown to support language switching,
    • added optional info text or link to the title
  • Added XDR format and info link to the Contract Spec

@quietbits quietbits linked an issue Mar 13, 2025 that may be closed by this pull request
@stellar-jenkins
Copy link

@quietbits quietbits requested a review from jeesunikim March 13, 2025 19:45
@janewang
Copy link
Contributor

janewang commented Mar 14, 2025

@quietbits This XDR looks good. Do you think it makes sense to link it to the XDR > JSON decoder? The XDR strings are decode-able by ScSpecEntry See here: https://developers.stellar.org/docs/tools/sdks/build-your-own#contract-spec-generation

@quietbits
Copy link
Contributor Author

@quietbits This XDR looks good. Do you think it makes sense to link it to the XDR > JSON decoder? The XDR strings are decode-able by ScSpecEntry See here: https://developers.stellar.org/docs/tools/sdks/build-your-own#contract-spec-generation

@janewang , we need to pass a formatted string to the code editor, so we can't use any components there. Having the option to view the XDR would be nice, though.

This is the output we would get in the editor:

image

@janewang
Copy link
Contributor

Let's keep it as it is then.

@jeesunikim
Copy link
Contributor

Screenshot 2025-03-19 at 11 11 33 AM
I got this with the contract ID CAQP53Z2GMZ6WVOKJWXMCVDLZYJ7GYVMWPAMWACPLEZRF2UEZW3B636S on TESTNET

@quietbits
Copy link
Contributor Author

Screenshot 2025-03-19 at 11 11 33 AM I got this with the contract ID CAQP53Z2GMZ6WVOKJWXMCVDLZYJ7GYVMWPAMWACPLEZRF2UEZW3B636S on TESTNET

Thanks for catching this, @jeesunikim ! It will show a proper error message from the server now:

image

@stellar-jenkins
Copy link

@quietbits quietbits merged commit 6ce05e2 into main Mar 19, 2025
5 checks passed
@quietbits quietbits deleted the cs-docs-link-xdr branch March 19, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Contract Spec: add instructions for spec
4 participants