git.delta.rocks / unique-network / refs/commits / 2eedf4593dca

difftreelog

Fix warnings, update Dockerfile

Greg Zaitsev2021-03-06parent: #e17babf.patch.diff
in: master

4 files changed

modifiedDockerfilediffbeforeafterboth
3FROM phusion/baseimage:18.04-1.0.0 as builder3FROM phusion/baseimage:18.04-1.0.0 as builder
4LABEL maintainer="UniqueNetwork.io"4LABEL maintainer="UniqueNetwork.io"
55
6ENV WASM_TOOLCHAIN=nightly-2021-01-276ENV WASM_TOOLCHAIN=nightly-2021-03-01
7ENV NATIVE_TOOLCHAIN=1.49.07# ENV NATIVE_TOOLCHAIN=1.50.0
88
9ARG PROFILE=release9ARG PROFILE=release
1010
25RUN export PATH="/cargo-home/bin:$PATH" && \25RUN export PATH="/cargo-home/bin:$PATH" && \
26 export CARGO_HOME="/cargo-home" && \26 export CARGO_HOME="/cargo-home" && \
27 rustup toolchain uninstall $(rustup toolchain list) && \27 rustup toolchain uninstall $(rustup toolchain list) && \
28 rustup toolchain install $NATIVE_TOOLCHAIN && \28 # rustup toolchain install $NATIVE_TOOLCHAIN && \
29 rustup toolchain install $WASM_TOOLCHAIN && \29 rustup toolchain install $WASM_TOOLCHAIN && \
30 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \30 rustup target add wasm32-unknown-unknown --toolchain $WASM_TOOLCHAIN && \
31 rustup default $NATIVE_TOOLCHAIN && \31 rustup default $WASM_TOOLCHAIN && \
32 rustup target list --installed && \32 rustup target list --installed && \
33 rustup show33 rustup show
3434
modifiedREADME.mddiffbeforeafterboth
6363
642. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.642. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.
6565
663. Install stable toolchain 1.49.0 and make it default, install nightly 2021-01-27:663. Install install nightly 2021-03-01 and make it default:
6767
68```bash68```bash
69rustup toolchain install 1.49.069rustup toolchain install nightly-2021-03-01
70rustup toolchain install nightly-2020-01-27
71rustup default nightly-2021-01-2770rustup default nightly-2021-03-01
72```71```
7372
744. Add wasm target for nightly toolchain:734. Add wasm target for nightly toolchain:
7574
76```bash75```bash
77rustup target add wasm32-unknown-unknown --toolchain nightly-2021-01-2776rustup target add wasm32-unknown-unknown --toolchain nightly-2021-03-01
78```77```
7978
805. Build:795. Build:
modifiednode/src/service.rsdiffbeforeafterboth
16use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};16use sp_consensus_aura::sr25519::{AuthorityPair as AuraPair};
17use sc_finality_grandpa::SharedVoterState;17use sc_finality_grandpa::SharedVoterState;
18use sc_keystore::LocalKeystore;18use sc_keystore::LocalKeystore;
19use sc_telemetry::TelemetrySpan;
2019
21// Our native executor instance.20// Our native executor instance.
22native_executor_instance!(21native_executor_instance!(
modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
43};43};
44use sp_runtime::traits::StaticLookup;44use sp_runtime::traits::StaticLookup;
45use pallet_contracts::chain_extension::UncheckedFrom;45use pallet_contracts::chain_extension::UncheckedFrom;
46use pallet_contracts::*;
47use pallet_transaction_payment::OnChargeTransaction;46use pallet_transaction_payment::OnChargeTransaction;
4847
49#[cfg(test)]48#[cfg(test)]
11181117
1119 // Transfer permissions check1118 // Transfer permissions check
1120 let target_collection = <Collection<T>>::get(collection_id);1119 let target_collection = <Collection<T>>::get(collection_id);
1121 let allowance_limit = if (1120 let allowance_limit = if target_collection.limits.owner_can_transfer &&
1122 target_collection.limits.owner_can_transfer &&
1123 Self::is_owner_or_admin_permissions(1121 Self::is_owner_or_admin_permissions(
1124 collection_id,1122 collection_id,
1125 sender.clone(),1123 sender.clone(),
1126 )1124 ) {
1127 ) {
1128 None1125 None
1129 } else if let Some(amount) = Self::owned_amount(1126 } else if let Some(amount) = Self::owned_amount(
1130 sender.clone(),1127 sender.clone(),