difftreelog
ci upgrade toolchains
in: master
Some of our dependencies were updated to 2021 edition, so we are
29 files changed
.devcontainer/Dockerfilediffbeforeafterboth--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -13,8 +13,8 @@
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \
nvm install v16.2.0 && \
npm install -g yarn && \
- rustup toolchain install nightly-2021-06-28 && \
- rustup default nightly-2021-06-28 && \
+ rustup toolchain install nightly-2021-11-11 && \
+ rustup default nightly-2021-11-11 && \
rustup target add wasm32-unknown-unknown && \
rustup component add rustfmt clippy && \
cargo install cargo-expand cargo-edit cargo-contract
.envdiffbeforeafterboth--- a/.env
+++ b/.env
@@ -1,4 +1,4 @@
-RUST_TOOLCHAIN=nightly-2021-06-28
+RUST_TOOLCHAIN=nightly-2021-11-11
RUST_C=1.55.0-nightly
POLKA_VERSION=v0.9.12
NFT_BRANCH=develop
Dockerfile-parachaindiffbeforeafterboth--- a/Dockerfile-parachain
+++ b/Dockerfile-parachain
@@ -2,7 +2,7 @@
FROM phusion/baseimage:focal-1.0.0 as rust-builder
LABEL maintainer="Unique.Network"
-ARG RUST_TOOLCHAIN=nightly-2021-06-28
+ARG RUST_TOOLCHAIN=nightly-2021-11-11
#ARG RUST_C=1.55.0-nightly
ARG POLKA_VERSION=v0.9.12
ARG NFT_BRANCH=develop
README.mddiffbeforeafterboth123# NFT Parachain45## Project Description67The NFT Pallet is the core of NFT functionality. Like ERC-721 standard in Ethereum ecosystem, this pallet provides the8basement for creating collections of unique non-divisible things, also called Non Fungible Tokens (NFTs), minting NFT of9a given Collection, and managing their ownership.1011The pallet also enables storing NFT properties. Though (according to ERC-721) NFT properties belong to logic of a12concrete application that operates a Collection, so purposefully the NFT Tracking Module does not have any knowledge13about properties except their byte size leaving application logic out to be controlled by Smart Contracts.1415The NFT Chain also provides:1617- Smart Contracts Pallet and example smart contract that interacts with NFT Runtime18- ERC-1155 Functionality (currently PoC as Re-Fungible tokens, i.e. items that are still unique, but that can be split19 between multiple users)20- Variety of economic options for dapp producers to choose from to create freemium games and other ways to attract21 users. As a step one, we implemented an economic model when a collection sponsor can be set to pay for collection22 Transfer transactions.2324Wider NFT Ecosystem (most of it was developed during Hackusama):2526- [SubstraPunks Game hosted on IPFS](https://github.com/usetech-llc/substrapunks)27- [NFT Wallet and UI](https://uniqueapps.usetech.com/#/nft)28- [NFT Asset for Unity Framework](https://github.com/usetech-llc/nft_unity)2930Please see our [walk-thorugh instructions](doc/hackusama_walk_through.md) to try everything out!3132## Hackusama Update3334During the Kusama Hackaphon the following changes were made:3536- Enabled Smart Contracts Pallet37- Enabled integration between Smart Contracts and NFT Pallet (required special edition of RC4 Substrate version)38- Fixed misc. bugs in NFT Pallet39- Deployed NFT TestNet. Public node available at wss://unique.usetech.com, custom UI types - see below in this README.40- New Features:41 - Re-Fungible Token Mode42 - Off-Chain Schema to store token image URLs43 - Alternative economic model44 - Allow Lists and Public Mint Permission45- Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and NFT Testnet46 Blockchain.4748## Application Development4950If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).5152## Building5354Building NFT chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything55so that we can keep the builds stable.56571. Install Rust:5859```bash60curl https://sh.rustup.rs -sSf | sh61sudo apt-get install libssl-dev pkg-config libclang-dev clang62```63642. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.65663. Install install nightly 2021-06-28 and make it default:6768```bash69rustup toolchain install nightly-2021-06-2870rustup default nightly-2021-06-2871```72734. Add wasm target for nightly toolchain:7475```bash76rustup target add wasm32-unknown-unknown --toolchain nightly-2021-06-2877```78795. Build:80```bash81cargo build82```8384optionally, build in release:85```bash86cargo build --release87```8889## Run9091You can start a development chain with:9293```bash94cargo run -- --dev95```9697Detailed logs may be shown by running the node with the following environment variables set:98`RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.99100If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two101validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with102testnet units. Give each node a name and expose them so they are listed on the Polkadot103[telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open.104105We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at106`/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from107the `--node-key` value that we specify below:108109```bash110cargo run -- \111 --base-path /tmp/alice \112 --chain=local \113 --alice \114 --node-key 0000000000000000000000000000000000000000000000000000000000000001 \115 --telemetry-url ws://telemetry.polkadot.io:1024 \116 --validator117```118119In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database120stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's121bootnode ID on TCP port 30333:122123```bash124cargo run -- \125 --base-path /tmp/bob \126 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \127 --chain=local \128 --bob \129 --port 30334 \130 --telemetry-url ws://telemetry.polkadot.io:1024 \131 --validator132```133134Additional CLI usage options are available and may be shown by running `cargo run -- --help`.135136## Building and Running as Parachain locally137138Rust toolchain: nightly-2021-06-28139Note: checkout this project and polkadot project (see below) in the sibling folders (both under the same folder)140141### Build relay142143```144git clone https://github.com/paritytech/polkadot.git145cd polkadot146git checkout release-v0.9.9147cargo build --release148```149150### Build parachain151152Run in the root of this project:153```154cargo --build155```156157### Run 4-node Relay1581591. Download `rococo-custom-4.json` chain spec here: https://substrate.dev/cumulus-workshop/shared/chainspecs/rococo-custom-4.json1602. Use these instructions to launch 4 nodes: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/1-launch161162Example (Run in polkadot folder. Replace `12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on` with output from Alice node):163```164./target/release/polkadot --alice --validator --base-path ./cumulus_relay0 --chain rococo-custom-4.json --port 50555 --ws-port 9944165./target/release/polkadot --bob --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50556 --ws-port 9945166./target/release/polkadot --charlie --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50557 --ws-port 9946167./target/release/polkadot --dave --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50558 --ws-port 9947168169```1701713. Export genesis state and runtime wasm from NFT parachain:172173Run from this project root:174```175./target/release/nft export-genesis-state --parachain-id 2000 > ./resources/para-2000-genesis176./target/release/nft export-genesis-wasm > ./resources/para-2000-wasm177```1781794. Run two parachain nodes:180181Replace `12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg` with Alice or Bob relay ID182183Run from this project root:184```185./target/release/nft --alice --collator --force-authoring --base-path ./tmp/parachain-alice --parachain-id 2000 --port 40333 --ws-port 9844 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30343 --ws-port 9977186./target/release/nft --bob --collator --force-authoring --parachain-id 2000 --base-path ./tmp/parachain/bob --port 40334 --ws-port 9845 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30344 --ws-port 9978 --bootnodes /ip4/127.0.0.1/tcp/50556/p2p/12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg187```1881894. Reserve parachain ID as described here: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/2-reserve1901915. Register parachain in relay as described here: https://substrate.dev/cumulus-workshop/#/en/3-parachains/2-register192193194## Run Integration Tests1951961. Install all needed dependecies197```198cd tests199yarn install200```2012022. Run tests203```204yarn test205```206207## Benchmarks208209First of all, add rust toolchain and make it default.210```bash211rustup target add wasm32-unknown-unknown --toolchain nightly-2021-06-28212```213214Then in "/node/src" run build command below215```bash216cargo +nightly-2021-06-28 build --release --features runtime-benchmarks217```218219Run benchmark220```bash221target/release/nft benchmark --chain dev --pallet "pallet_nft" --extrinsic "*" --repeat 1222```223224## UI custom types225226Moved to [runtime_types.json](./runtime_types.json).227228## Running Integration Tests229230See [tests/README.md](./tests/README.md).231232## Code Formatting233234### Get formatter and linter settings into your branch (if you forked before they were introduced)235```bash236git cherry-pick -n 8ff77c21b0d30b2a4648fa35dbf61dfa9d3948a7237```238239### Apply formatting and clippy fixes240```bash241cargo clippy242cargo fmt243```244245### Format tests246```bash247pushd tests && yarn fix ; popd248```249250### Check code style in tests251```bash252cd tests && yarn eslint --ext .ts,.js src/253```254255## Re-Enabling Ink! Contracts256257Uncomment following lies:2581. In node/rpc/Cargo.toml259```260# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }261```2622632. In node/rpc/src/lib.rs264```265// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,266...267// use pallet_contracts_rpc::{Contracts, ContractsApi};268...269// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));270271```2722733. In runtime/Cargo.toml274```275 # 'pallet-contracts/std',276 # 'pallet-contracts-primitives/std',277 # 'pallet-contracts-rpc-runtime-api/std',278 # 'pallet-contract-helpers/std',279...280 # [dependencies.pallet-contracts]281 # git = 'https://github.com/paritytech/substrate.git'282 # default-features = false283 # branch = 'polkadot-v0.9.9'284 # version = '3.0.0'285286 # [dependencies.pallet-contracts-primitives]287 # git = 'https://github.com/paritytech/substrate.git'288 # default-features = false289 # branch = 'polkadot-v0.9.9'290 # version = '3.0.0'291292 # [dependencies.pallet-contracts-rpc-runtime-api]293 # git = 'https://github.com/paritytech/substrate.git'294 # default-features = false295 # branch = 'polkadot-v0.9.9'296 # version = '3.0.0'297...298 # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }299```3003014. runtime/src/lib.rs302```303// use pallet_contracts::weights::WeightInfo;304...305// pub use pallet_timestamp::Call as TimestampCall;306...307// mod chain_extension;308// use crate::chain_extension::{NFTExtension, Imbalance};309...310/*311parameter_types! {312 pub TombstoneDeposit: Balance = deposit(313 ...314}315*/316...317//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,318...319// impl pallet_contract_helpers::Config for Runtime {}320...321// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},322...323// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},324...325//pallet_contract_helpers::ContractHelpersExtension<Runtime>,326...327/*328 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>329 for Runtime330 {331 ...332 }333*/334335```123# NFT Parachain45## Project Description67The NFT Pallet is the core of NFT functionality. Like ERC-721 standard in Ethereum ecosystem, this pallet provides the8basement for creating collections of unique non-divisible things, also called Non Fungible Tokens (NFTs), minting NFT of9a given Collection, and managing their ownership.1011The pallet also enables storing NFT properties. Though (according to ERC-721) NFT properties belong to logic of a12concrete application that operates a Collection, so purposefully the NFT Tracking Module does not have any knowledge13about properties except their byte size leaving application logic out to be controlled by Smart Contracts.1415The NFT Chain also provides:1617- Smart Contracts Pallet and example smart contract that interacts with NFT Runtime18- ERC-1155 Functionality (currently PoC as Re-Fungible tokens, i.e. items that are still unique, but that can be split19 between multiple users)20- Variety of economic options for dapp producers to choose from to create freemium games and other ways to attract21 users. As a step one, we implemented an economic model when a collection sponsor can be set to pay for collection22 Transfer transactions.2324Wider NFT Ecosystem (most of it was developed during Hackusama):2526- [SubstraPunks Game hosted on IPFS](https://github.com/usetech-llc/substrapunks)27- [NFT Wallet and UI](https://uniqueapps.usetech.com/#/nft)28- [NFT Asset for Unity Framework](https://github.com/usetech-llc/nft_unity)2930Please see our [walk-thorugh instructions](doc/hackusama_walk_through.md) to try everything out!3132## Hackusama Update3334During the Kusama Hackaphon the following changes were made:3536- Enabled Smart Contracts Pallet37- Enabled integration between Smart Contracts and NFT Pallet (required special edition of RC4 Substrate version)38- Fixed misc. bugs in NFT Pallet39- Deployed NFT TestNet. Public node available at wss://unique.usetech.com, custom UI types - see below in this README.40- New Features:41 - Re-Fungible Token Mode42 - Off-Chain Schema to store token image URLs43 - Alternative economic model44 - Allow Lists and Public Mint Permission45- Use example: [SubstraPunks Game](https://github.com/usetech-llc/substrapunks), fully hosted on IPFS and NFT Testnet46 Blockchain.4748## Application Development4950If you are building an application that operates NFT tokens, use [this document](doc/application_development.md).5152## Building5354Building NFT chain requires special versions of Rust and toolchain. We don't use the most recent versions of everything55so that we can keep the builds stable.56571. Install Rust:5859```bash60curl https://sh.rustup.rs -sSf | sh61sudo apt-get install libssl-dev pkg-config libclang-dev clang62```63642. Remove all installed toolchains with `rustup toolchain list` and `rustup toolchain uninstall <toolchain>`.65663. Install install nightly 2021-11-11 and make it default:6768```bash69rustup toolchain install nightly-2021-11-1170rustup default nightly-2021-11-1171```72734. Add wasm target for nightly toolchain:7475```bash76rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-1177```78795. Build:80```bash81cargo build82```8384optionally, build in release:85```bash86cargo build --release87```8889## Run9091You can start a development chain with:9293```bash94cargo run -- --dev95```9697Detailed logs may be shown by running the node with the following environment variables set:98`RUST_LOG=debug RUST_BACKTRACE=1 cargo run -- --dev`.99100If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two101validator nodes for Alice and Bob, who are the initial authorities of the genesis chain that have been endowed with102testnet units. Give each node a name and expose them so they are listed on the Polkadot103[telemetry site](https://telemetry.polkadot.io/#/Local%20Testnet). You'll need two terminal windows open.104105We'll start Alice's substrate node first on default TCP port 30333 with her chain database stored locally at106`/tmp/alice`. The bootnode ID of her node is `QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN`, which is generated from107the `--node-key` value that we specify below:108109```bash110cargo run -- \111 --base-path /tmp/alice \112 --chain=local \113 --alice \114 --node-key 0000000000000000000000000000000000000000000000000000000000000001 \115 --telemetry-url ws://telemetry.polkadot.io:1024 \116 --validator117```118119In the second terminal, we'll start Bob's substrate node on a different TCP port of 30334, and with his chain database120stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's121bootnode ID on TCP port 30333:122123```bash124cargo run -- \125 --base-path /tmp/bob \126 --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/QmQZ8TjTqeDj3ciwr93EJ95hxfDsb9pEYDizUAbWpigtQN \127 --chain=local \128 --bob \129 --port 30334 \130 --telemetry-url ws://telemetry.polkadot.io:1024 \131 --validator132```133134Additional CLI usage options are available and may be shown by running `cargo run -- --help`.135136## Building and Running as Parachain locally137138Rust toolchain: nightly-2021-11-11139Note: checkout this project and polkadot project (see below) in the sibling folders (both under the same folder)140141### Build relay142143```144git clone https://github.com/paritytech/polkadot.git145cd polkadot146git checkout release-v0.9.9147cargo build --release148```149150### Build parachain151152Run in the root of this project:153```154cargo --build155```156157### Run 4-node Relay1581591. Download `rococo-custom-4.json` chain spec here: https://substrate.dev/cumulus-workshop/shared/chainspecs/rococo-custom-4.json1602. Use these instructions to launch 4 nodes: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/1-launch161162Example (Run in polkadot folder. Replace `12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on` with output from Alice node):163```164./target/release/polkadot --alice --validator --base-path ./cumulus_relay0 --chain rococo-custom-4.json --port 50555 --ws-port 9944165./target/release/polkadot --bob --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50556 --ws-port 9945166./target/release/polkadot --charlie --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50557 --ws-port 9946167./target/release/polkadot --dave --validator --base-path ./cumulus_relay1 --chain rococo-custom-4.json --bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWNLAmKcyee3oqSgTMthaQVXaAcXeo8RrGCzMfMVA3B5on --port 50558 --ws-port 9947168169```1701713. Export genesis state and runtime wasm from NFT parachain:172173Run from this project root:174```175./target/release/nft export-genesis-state --parachain-id 2000 > ./resources/para-2000-genesis176./target/release/nft export-genesis-wasm > ./resources/para-2000-wasm177```1781794. Run two parachain nodes:180181Replace `12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg` with Alice or Bob relay ID182183Run from this project root:184```185./target/release/nft --alice --collator --force-authoring --base-path ./tmp/parachain-alice --parachain-id 2000 --port 40333 --ws-port 9844 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30343 --ws-port 9977186./target/release/nft --bob --collator --force-authoring --parachain-id 2000 --base-path ./tmp/parachain/bob --port 40334 --ws-port 9845 -- --execution wasm --chain ../polkadot/rococo-custom-4.json --port 30344 --ws-port 9978 --bootnodes /ip4/127.0.0.1/tcp/50556/p2p/12D3KooWN1ah2bFQSysEFnwZqcmcVpDDR8UedXyo6xfzV1zDNMNg187```1881894. Reserve parachain ID as described here: https://substrate.dev/cumulus-workshop/#/en/2-relay-chain/2-reserve1901915. Register parachain in relay as described here: https://substrate.dev/cumulus-workshop/#/en/3-parachains/2-register192193194## Run Integration Tests1951961. Install all needed dependecies197```198cd tests199yarn install200```2012022. Run tests203```204yarn test205```206207## Benchmarks208209First of all, add rust toolchain and make it default.210```bash211rustup target add wasm32-unknown-unknown --toolchain nightly-2021-11-11212```213214Then in "/node/src" run build command below215```bash216cargo +nightly-2021-11-11 build --release --features runtime-benchmarks217```218219Run benchmark220```bash221target/release/nft benchmark --chain dev --pallet "pallet_nft" --extrinsic "*" --repeat 1222```223224## UI custom types225226Moved to [runtime_types.json](./runtime_types.json).227228## Running Integration Tests229230See [tests/README.md](./tests/README.md).231232## Code Formatting233234### Get formatter and linter settings into your branch (if you forked before they were introduced)235```bash236git cherry-pick -n 8ff77c21b0d30b2a4648fa35dbf61dfa9d3948a7237```238239### Apply formatting and clippy fixes240```bash241cargo clippy242cargo fmt243```244245### Format tests246```bash247pushd tests && yarn fix ; popd248```249250### Check code style in tests251```bash252cd tests && yarn eslint --ext .ts,.js src/253```254255## Re-Enabling Ink! Contracts256257Uncomment following lies:2581. In node/rpc/Cargo.toml259```260# pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.9' }261```2622632. In node/rpc/src/lib.rs264```265// C::Api: pallet_contracts_rpc::ContractsRuntimeApi<Block, AccountId, Balance, BlockNumber, Hash>,266...267// use pallet_contracts_rpc::{Contracts, ContractsApi};268...269// io.extend_with(ContractsApi::to_delegate(Contracts::new(client.clone())));270271```2722733. In runtime/Cargo.toml274```275 # 'pallet-contracts/std',276 # 'pallet-contracts-primitives/std',277 # 'pallet-contracts-rpc-runtime-api/std',278 # 'pallet-contract-helpers/std',279...280 # [dependencies.pallet-contracts]281 # git = 'https://github.com/paritytech/substrate.git'282 # default-features = false283 # branch = 'polkadot-v0.9.9'284 # version = '3.0.0'285286 # [dependencies.pallet-contracts-primitives]287 # git = 'https://github.com/paritytech/substrate.git'288 # default-features = false289 # branch = 'polkadot-v0.9.9'290 # version = '3.0.0'291292 # [dependencies.pallet-contracts-rpc-runtime-api]293 # git = 'https://github.com/paritytech/substrate.git'294 # default-features = false295 # branch = 'polkadot-v0.9.9'296 # version = '3.0.0'297...298 # pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }299```3003014. runtime/src/lib.rs302```303// use pallet_contracts::weights::WeightInfo;304...305// pub use pallet_timestamp::Call as TimestampCall;306...307// mod chain_extension;308// use crate::chain_extension::{NFTExtension, Imbalance};309...310/*311parameter_types! {312 pub TombstoneDeposit: Balance = deposit(313 ...314}315*/316...317//pallet_contract_helpers::ContractSponsorshipHandler<Runtime>,318...319// impl pallet_contract_helpers::Config for Runtime {}320...321// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>},322...323// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage},324...325//pallet_contract_helpers::ContractHelpersExtension<Runtime>,326...327/*328 impl pallet_contracts_rpc_runtime_api::ContractsApi<Block, AccountId, Balance, BlockNumber, Hash>329 for Runtime330 {331 ...332 }333*/334335```client/rpc/Cargo.tomldiffbeforeafterboth--- a/client/rpc/Cargo.toml
+++ b/client/rpc/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "uc-rpc"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
pallet-common = { default-features = false, path = '../../pallets/common' }
crates/evm-coder-macros/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder-macros/Cargo.toml
+++ b/crates/evm-coder-macros/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "evm-coder-macros"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[lib]
proc-macro = true
@@ -13,4 +13,4 @@
syn = { version = "1.0", features = ["full"] }
hex = "0.4.3"
Inflector = "0.11.4"
-darling = "0.13.0"
\ No newline at end of file
+darling = "0.13.0"
crates/evm-coder/Cargo.tomldiffbeforeafterboth--- a/crates/evm-coder/Cargo.toml
+++ b/crates/evm-coder/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "evm-coder"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
evm-coder-macros = { path = "../evm-coder-macros" }
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -3,7 +3,7 @@
version = "3.3.1"
authors = ['Unique Network <support@uniquenetwork.io>']
license = 'All Rights Reserved'
-edition = "2018"
+edition = "2021"
description = "Unique chain rpc"
[package.metadata.docs.rs]
pallets/common/Cargo.tomldiffbeforeafterboth--- a/pallets/common/Cargo.toml
+++ b/pallets/common/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-common"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies.codec]
default-features = false
pallets/contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/contract-helpers/Cargo.toml
+++ b/pallets/contract-helpers/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-contract-helpers"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies.codec]
default-features = false
@@ -16,7 +16,7 @@
pallet-contracts = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-runtime = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
sp-std = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
[features]
default = ["std"]
pallets/evm-coder-substrate/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-coder-substrate/Cargo.toml
+++ b/pallets/evm-coder-substrate/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-evm-coder-substrate"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = [
pallets/evm-contract-helpers/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-contract-helpers/Cargo.toml
+++ b/pallets/evm-contract-helpers/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-evm-contract-helpers"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = [
@@ -15,7 +15,7 @@
evm-coder = { default-features = false, path = '../../crates/evm-coder' }
pallet-evm-coder-substrate = { default-features = false, path = '../../pallets/evm-coder-substrate' }
pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12-weights" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
log = "0.4.14"
[dependencies.codec]
pallets/evm-migration/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-migration/Cargo.toml
+++ b/pallets/evm-migration/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-evm-migration"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = [
pallets/evm-transaction-payment/Cargo.tomldiffbeforeafterboth--- a/pallets/evm-transaction-payment/Cargo.toml
+++ b/pallets/evm-transaction-payment/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-evm-transaction-payment"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
scale-info = { version = "1.0.0", default-features = false, features = [
@@ -16,7 +16,7 @@
pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12-weights" }
fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12-weights" }
pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/frontier.git", branch = "unique-polkadot-v0.9.12-weights" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
[dependencies.codec]
pallets/fungible/Cargo.tomldiffbeforeafterboth--- a/pallets/fungible/Cargo.toml
+++ b/pallets/fungible/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-fungible"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies.codec]
default-features = false
pallets/nft/Cargo.tomldiffbeforeafterboth--- a/pallets/nft/Cargo.toml
+++ b/pallets/nft/Cargo.toml
@@ -135,7 +135,7 @@
rlp = { default-features = false, version = "0.5.0" }
sp-api = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.12" }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
up-evm-mapping = { default-features = false, path = "../../primitives/evm-mapping" }
evm-coder = { default-features = false, path = "../../crates/evm-coder" }
pallet-evm-coder-substrate = { default-features = false, path = "../../pallets/evm-coder-substrate" }
pallets/nonfungible/Cargo.tomldiffbeforeafterboth--- a/pallets/nonfungible/Cargo.toml
+++ b/pallets/nonfungible/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-nonfungible"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies.codec]
default-features = false
pallets/refungible/Cargo.tomldiffbeforeafterboth--- a/pallets/refungible/Cargo.toml
+++ b/pallets/refungible/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pallet-refungible"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies.codec]
default-features = false
pallets/scheduler/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -2,7 +2,7 @@
name = "pallet-unq-scheduler"
version = "3.0.0"
authors = ["Parity Technologies <admin@parity.io>"]
-edition = "2018"
+edition = "2021"
license = "Unlicense"
homepage = "https://substrate.dev"
repository = "https://github.com/paritytech/substrate/"
@@ -20,7 +20,7 @@
sp-io = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
frame-benchmarking = { default-features = false, optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
-up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
+up-sponsorship = { version = "0.1.0", default-features = false, git = "https://github.com/UniqueNetwork/pallet-sponsoring" }
log = { version = "0.4.14", default-features = false }
[dev-dependencies]
primitives/evm-mapping/Cargo.tomldiffbeforeafterboth--- a/primitives/evm-mapping/Cargo.toml
+++ b/primitives/evm-mapping/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "up-evm-mapping"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
sp-core = { default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.12' }
@@ -9,7 +9,4 @@
[features]
default = ["std"]
-std = [
- "sp-core/std",
- "frame-support/std",
-]
+std = ["sp-core/std", "frame-support/std"]
primitives/nft/Cargo.tomldiffbeforeafterboth--- a/primitives/nft/Cargo.toml
+++ b/primitives/nft/Cargo.toml
@@ -2,7 +2,7 @@
name = "nft-data-structs"
authors = ['Substrate DevHub <https://github.com/substrate-developer-hub>']
description = "Nft data structs definitions"
-edition = "2018"
+edition = "2021"
license = 'GPL-3.0'
homepage = "https://substrate.dev"
repository = 'https://github.com/clover-network/clover'
primitives/rpc/Cargo.tomldiffbeforeafterboth--- a/primitives/rpc/Cargo.toml
+++ b/primitives/rpc/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "up-rpc"
version = "0.1.0"
-edition = "2018"
+edition = "2021"
[dependencies]
pallet-common = { default-features = false, path = '../../pallets/common' }
smart_contracs/transfer/Cargo.tomldiffbeforeafterboth--- a/smart_contracs/transfer/Cargo.toml
+++ b/smart_contracs/transfer/Cargo.toml
@@ -2,7 +2,7 @@
name = "nft_transfer"
version = "0.1.0"
authors = ["[Greg Zaitsev] <[your_email]>"]
-edition = "2018"
+edition = "2021"
[workspace]
tests/README.mddiffbeforeafterboth--- a/tests/README.md
+++ b/tests/README.md
@@ -8,7 +8,7 @@
git checkout release-v0.9.9
```
-2. Build with nightly-2021-06-28
+2. Build with nightly-2021-11-11
```bash
cargo build --release
```
@@ -28,4 +28,3 @@
1. Run `yarn install`.
2. Optional step - configure tests with env variables or by editing [configuration file](src/config.ts).
3. Run `yarn test`.
-
tests/flipper-src/Cargo.tomldiffbeforeafterboth--- a/tests/flipper-src/Cargo.toml
+++ b/tests/flipper-src/Cargo.toml
@@ -2,7 +2,7 @@
name = "flipper"
version = "3.0.0-rc1"
authors = ["Parity Technologies <admin@parity.io>"]
-edition = "2018"
+edition = "2021"
[dependencies]
ink_primitives = { version = "3.0.0-rc1", git = "https://github.com/paritytech/ink", tag = "v3.0.0-rc1", default-features = false }
@@ -32,4 +32,4 @@
"scale-info",
"scale-info/std",
]
-ink-as-dependency = []
\ No newline at end of file
+ink-as-dependency = []
tests/ink-types-node-runtime/Cargo.tomldiffbeforeafterboth--- a/tests/ink-types-node-runtime/Cargo.toml
+++ b/tests/ink-types-node-runtime/Cargo.toml
@@ -2,7 +2,7 @@
name = "ink_types_node_runtime"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
-edition = "2018"
+edition = "2021"
license = "GPL-3.0"
readme = "README.md"
tests/ink-types-node-runtime/examples/calls/.ink/abi_gen/Cargo.tomldiffbeforeafterboth--- a/tests/ink-types-node-runtime/examples/calls/.ink/abi_gen/Cargo.toml
+++ b/tests/ink-types-node-runtime/examples/calls/.ink/abi_gen/Cargo.toml
@@ -2,7 +2,7 @@
name = "abi-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
-edition = "2018"
+edition = "2021"
publish = false
[[bin]]
tests/ink-types-node-runtime/examples/calls/Cargo.tomldiffbeforeafterboth--- a/tests/ink-types-node-runtime/examples/calls/Cargo.toml
+++ b/tests/ink-types-node-runtime/examples/calls/Cargo.toml
@@ -2,7 +2,7 @@
name = "calls"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
-edition = "2018"
+edition = "2021"
[dependencies]
ink_abi = { version = "2", git = "https://github.com/paritytech/ink", tag = "latest-v2", package = "ink_abi", default-features = false, features = ["derive"], optional = true }
tests/loadtester-src/Cargo.tomldiffbeforeafterboth--- a/tests/loadtester-src/Cargo.toml
+++ b/tests/loadtester-src/Cargo.toml
@@ -2,7 +2,7 @@
name = "loadtester"
version = "0.1.0"
authors = ["[your_name] <[your_email]>"]
-edition = "2018"
+edition = "2021"
[dependencies]
ink_primitives = { version = "3.0.0-rc2", default-features = false }