Update dependencies of pallet_contracts (#8637)

* Update parity-wasm

* Cleanup Cargo.toml files

- Sort dependencies
- Remove minor and fix version where they are not necessary

* Update pretty_assertions

* Update rand
This commit is contained in:
Alexander Theißen
2021-04-19 12:47:46 +02:00
committed by GitHub
parent ea10494ca9
commit 18000a9ae8
9 changed files with 126 additions and 77 deletions
@@ -28,15 +28,15 @@ macro_rules! convert_args {
macro_rules! gen_signature {
( ( $( $params: ty ),* ) ) => (
{
parity_wasm::elements::FunctionType::new(convert_args!($($params),*), None)
parity_wasm::elements::FunctionType::new(convert_args!($($params),*), vec![])
}
);
( ( $( $params: ty ),* ) -> $returns: ty ) => (
{
parity_wasm::elements::FunctionType::new(convert_args!($($params),*), Some({
parity_wasm::elements::FunctionType::new(convert_args!($($params),*), vec![{
use $crate::wasm::env_def::ConvertibleToWasm; <$returns>::VALUE_TYPE
}))
}])
}
);
}
@@ -301,12 +301,12 @@ mod tests {
fn macro_gen_signature() {
assert_eq!(
gen_signature!((i32)),
FunctionType::new(vec![ValueType::I32], None),
FunctionType::new(vec![ValueType::I32], vec![]),
);
assert_eq!(
gen_signature!( (i32, u32) -> u32 ),
FunctionType::new(vec![ValueType::I32, ValueType::I32], Some(ValueType::I32)),
FunctionType::new(vec![ValueType::I32, ValueType::I32], vec![ValueType::I32]),
);
}
@@ -348,10 +348,10 @@ mod tests {
);
assert!(
Env::can_satisfy(b"seal0", b"seal_gas",&FunctionType::new(vec![ValueType::I32], None))
Env::can_satisfy(b"seal0", b"seal_gas",&FunctionType::new(vec![ValueType::I32], vec![]))
);
assert!(
!Env::can_satisfy(b"seal0", b"not_exists", &FunctionType::new(vec![], None))
!Env::can_satisfy(b"seal0", b"not_exists", &FunctionType::new(vec![], vec![]))
);
}
}