Update to the latest Substrate commit

Enables building with only the stable toolchain. The nightly toolchain is still
used for clippy in order to access additional checks.
This commit is contained in:
Luke Parker 2023-03-31 02:34:52 -04:00
parent 1610383649
commit 30b8636641
No known key found for this signature in database
4 changed files with 415 additions and 291 deletions

View file

@ -37,16 +37,6 @@ runs:
with: with:
toolchain: ${{ inputs.rust-toolchain }} toolchain: ${{ inputs.rust-toolchain }}
components: ${{ inputs.rust-components }} components: ${{ inputs.rust-components }}
- name: Get nightly version to use
id: nightly
shell: bash
run: echo "version=$(cat .github/nightly-version)" >> $GITHUB_OUTPUT
- name: Install WASM toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ steps.nightly.outputs.version }}
targets: wasm32-unknown-unknown targets: wasm32-unknown-unknown
- name: Cache Rust - name: Cache Rust

693
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -27,6 +27,7 @@ brew install rustup
``` ```
rustup update rustup update
rustup toolchain install stable rustup toolchain install stable
rustup target add wasm32-unknown-unknown
rustup toolchain install nightly rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly rustup target add wasm32-unknown-unknown --toolchain nightly
``` ```

View file

@ -4,7 +4,7 @@ use subxt::ext::scale_value::{Composite, ValueDef, Value, scale};
pub(crate) fn scale_value<V: Encode + TypeInfo + 'static>(value: V) -> Value { pub(crate) fn scale_value<V: Encode + TypeInfo + 'static>(value: V) -> Value {
let mut registry = Registry::new(); let mut registry = Registry::new();
let id = registry.register_type(&MetaType::new::<V>()).id(); let id = registry.register_type(&MetaType::new::<V>()).id;
let registry = PortableRegistry::from(registry); let registry = PortableRegistry::from(registry);
scale::decode_as_type(&mut value.encode().as_ref(), id, &registry).unwrap().remove_context() scale::decode_as_type(&mut value.encode().as_ref(), id, &registry).unwrap().remove_context()
} }