-
Notifications
You must be signed in to change notification settings - Fork 237
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
More examples. #982
Comments
Hi, it seems that encoding did not work properly for me either. This seems to be an edge-case of scale-value where we recurse too deeply into the value types, basically flattening the values from nested sequences. I've created an initial fix to validate the following behavior, in paritytech/scale-value#31: #[test]
fn can_encode_vec_tuples() {
// Presume we have a type: Vec<(u8, u16)>.
let vec_tuple = Value::unnamed_composite(vec![Value::unnamed_composite(vec![
Value::u128(20u8.into()),
Value::u128(30u16.into()),
])]);
assert_can_encode_to_type(vec_tuple, vec![(20u8, 30u16)]);
} |
@twhiteheadzm sorry for your frustration here; we did identify a bug in The next |
|
@jsdw Thank you, greatly appreciated. |
I am really struggling to figure out how to create dynamic calls with parameters more complicated than simple types. For example I need to create a call whose second parameter is a vec of structs (I initially had it as a vec of tuples but couldn't get that working either).
The same call works fine if I use the auto generated call based on the metadata, but I cannot use that method as I then need to pass the call as a parameter (proposal)
The text was updated successfully, but these errors were encountered: