Closed patofet closed 3 years ago
This pallet hasn't been updated to work with the latest version of Substrate. Most probably that's what causing the problem. Try updating the dependencies and see if that works.
I'm trying to modify it to work but I can't get it working, I make a fork and tried to compile but it give me a bunch of errors, something like "expected ,
" ex:
error: expected `,`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:639:39
|
639 | #[wasm_bindgen(js_namespace = Atomics, catch)]
| ^^^^^^^
error: expected `,`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:1576:39
|
1576 | #[wasm_bindgen(js_namespace = Math)]
| ^^^^
error: expected `,`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:2832:39
|
2832 | #[wasm_bindgen(js_namespace = Reflect, js_name = getOwnPropertyDescriptor, catch)]
| ^^^^^^^
error[E0425]: cannot find function `get` in module `Reflect`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:1524:28
|
1524 | let iter_fn = Reflect::get(val, iter_sym.as_ref())?;
| ^^^ not found in `Reflect`
|
help: consider importing this function
|
21 | use std::rt::panic_count::get;
|
error[E0412]: cannot find type `Memory` in module `WebAssembly`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:4933:60
|
4933 | let mem = buf.unchecked_ref::<WebAssembly::Memory>();
| ^^^^^^ not found in `WebAssembly`
...
5008 | / arrays! {
5009 | | /// `Int8Array()`
5010 | | /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array
5011 | | Int8Array: i8,
... |
5043 | | Float64Array: f64,
5044 | | }
| |_- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0412]: cannot find type `Memory` in module `WebAssembly`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:4958:60
|
4958 | let mem = buf.unchecked_ref::<WebAssembly::Memory>();
| ^^^^^^ not found in `WebAssembly`
...
5008 | / arrays! {
5009 | | /// `Int8Array()`
5010 | | /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array
5011 | | Int8Array: i8,
... |
5043 | | Float64Array: f64,
5044 | | }
| |_- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0412]: cannot find type `Memory` in module `WebAssembly`
--> /home/easy/.cargo/registry/src/github.com-1ecc6299db9ec823/js-sys-0.3.47/src/lib.rs:4968:60
|
4968 | let mem = buf.unchecked_ref::<WebAssembly::Memory>();
| ^^^^^^ not found in `WebAssembly`
...
5008 | / arrays! {
5009 | | /// `Int8Array()`
5010 | | /// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array
5011 | | Int8Array: i8,
... |
5043 | | Float64Array: f64,
5044 | | }
| |_- in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 123 previous errors
Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `js-sys`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
How can I fix it?
The pallet is now updated to work with the latest monthly prerelease of Substrate and node template (monthly-2021-07). This should resolve your issues. I have tested it with the node template and everything seems to work fine.
Hi, I'm trying to install substrate-validator-set from substrate-node-template 3.0.0: git clone -b v3.0.0 --depth 1 https://github.com/substrate-developer-hub/substrate-node-template
And I'm getting yhis error:
How can I fix it?
Edit: With the version of v3.0.0 monthly-2021-05 it trow diferent errors: