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

Define contract spec for Hash; adds instruction for XDR-gen #361

Merged
merged 2 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,23 @@ stellar-xdr decode --type BucketEntry --input stream-framed --output json-format
```

License: Apache-2.0


### For Developers: How to Regenerate From XDR
To regenerate types from XDR definitions
1. Update XDR definitions
```concole
git submodule update --init --remote
```
The `--init` flag is only required for the first time setting up the local project.
`--remote` flag will make sure to fetch the latest changes from from the remote-tracking branches `curr` and `next` at [stellar/stellar-xdr].

**_NOTE:_** if you had multiple remotes specified in the submodules (e.g. one tracking `stellar/stellar-xdr`, the other tracking `your-fork/stellar-xdr`),
make sure the remote that tracks [stellar/stellar-xdr] match with what's specifies in the `.git/config` or `.gitsubmodules` (with `.git/config` taking precedence. If neither file specifies it, then `origin` is used).

2. Recompile and test
```console
make
```

When the regenerated types are ready to be merged, make sure to commit the regenerated code file `src/curr/generated.rs`, `src/next/generated.rs`, the version string file `xdr/curr-version`, `xdr/next-version`, as well as the submodule files `xdr/curr`, `xdr/next`.
Loading
Loading