-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
How to extract the correct rust types from Sui ? #19512
Comments
@bmwill, @phoenix-o -- any idea what the best way is to make sure that someone can generate the necessary BCS bindings for the format that data ingestion reads from? IIRC, |
#19516 should address this |
Dope @bmwill ! While we are on the topic of bcs types, is the SDK up to date about type fetching ? In order to generate bcs types from packages (https://github.com/Sceat/sui-bcs) I'm using
|
Hi @bmwill could you also include those ? It's needed to parse snapshots export const LiveObject = bcs.enum('LiveObject', {
Normal: SuiObject,
Wrapped: ObjectKey,
})
export const Manifest = bcs.enum('Manifest', {
V1: ManifestV1,
}) actually @amnn it would be so much easier to have those bcs types included in the ts SDK |
also saw that |
The ideal place for this would be a separated SDK specific to data ingestion, in TypeScript, similar to our
I looked into this, it seems like this change is unintentional, and an artifact of how the sui/crates/sui-types/src/type_input.rs Lines 20 to 22 in 76d629e
sui/external-crates/move/crates/move-core-types/src/language_storage.rs Lines 149 to 151 in 76d629e
Note that this is not a breaking change in the BCS schema per se, because the BCS schema is not name sensitive, but the best way to watch out for changes to the types you care about is to look for diffs in this file: |
In efforts of having a working indexer in javascript, I'm generating BCS types from this file https://github.com/MystenLabs/sui/blob/testnet-v1.34.0/crates/sui-core/tests/staged/sui.yaml
The problem is many of them are missing and some are also incorrect, like below where
TransactionEvents
is replaced byTransactionEventsDigest
How can we get a consistent types file after each release ? (used for https://github.com/aresrpg/sui-checkpoint-reader/)
The text was updated successfully, but these errors were encountered: