Skip to content

Commit

Permalink
add framework_sdk_builder to compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
0o-de-lally committed Oct 31, 2024
1 parent 5f1a4f6 commit c72ca85
Show file tree
Hide file tree
Showing 6 changed files with 3,552 additions and 2 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compatibility/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ diem-types = { workspace = true }
move-core-types = { workspace = true }
hex = { workspace = true }
libra-types = { workspace = true }
once_cell = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
tokio = { workspace = true }
Expand Down
3 changes: 1 addition & 2 deletions compatibility/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//! `legacy-types`

pub mod legacy_recovery_v6;
pub mod version_five;
pub mod sdk;
11 changes: 11 additions & 0 deletions compatibility/src/sdk/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Versions of Libra SDK

## Why do we need these?
Transactions submitted to blockchain are done in bytecode. Decoding that bytecode into a useful object (function name, arguments, timestamp) is hard to do if you do not have the Rust serialization lib which generated the bytecode originally.

The names of functions (and some primitives like Account Address), change between versions.

Suppose you would like to analyze a V5 transaction. Without these files you'll have to guess the transaction type and craft an individual decoder.

# Modifications to originals
Note that these files are code generated, and were not intended to be changed. We have however added serde De/Serialize attributes to the EntryFunctionCall, so that they can be easily be read into memory.
1 change: 1 addition & 0 deletions compatibility/src/sdk/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod v7_libra_framework_sdk_builder;
Loading

0 comments on commit c72ca85

Please sign in to comment.