Skip to content

Commit

Permalink
add note about UncheckedExtrinsic in default substitutes
Browse files Browse the repository at this point in the history
  • Loading branch information
tadeohepperle committed Nov 21, 2023
1 parent f47fd4e commit 03591a6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions Cargo.lock

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

2 changes: 0 additions & 2 deletions codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,4 @@ scale-typegen = { git = "https://github.com/paritytech/scale-typegen", branch =
getrandom = { workspace = true, optional = true }

[dev-dependencies]
bitvec = { workspace = true }
scale-info = { workspace = true, features = ["bit-vec"] }
pretty_assertions = { workspace = true }
2 changes: 2 additions & 0 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ fn default_substitutes(crate_path: &syn::Path) -> TypeSubstitutes {
// The inner bytes represent the encoded extrinsic, however when deriving the
// `EncodeAsType` the bytes would be re-encoded. This leads to the bytes
// being altered by adding the length prefix in front of them.

// Note: Not sure if this is appropriate or not. The most recent polkadot.rs file does not have these.
(
parse_quote!(sp_runtime::generic::unchecked_extrinsic::UncheckedExtrinsic),
parse_quote!(#crate_path::utils::UncheckedExtrinsic),
Expand Down

0 comments on commit 03591a6

Please sign in to comment.