Skip to content

Commit 14c8bbc

Browse files
Updated polkadot dependencies to v1.2.0. sp-io is no longer exported from frame support, so had to add it directly as a dependency on the pallets, and update all imports accordingly. sp-std is no longer exported from frame support, so had to add it directly as a dependency on the pallets, and update all imports accordingly. The balance transfer method is exposed through the token Mutate trait so had to import it, and update the call to transfer with the correct parameters. DispatchError is no longer exported from frame support so had to import it directly from sp_runtime. The https://github.com/paritytech/substrate repository has been archived, so updated all dependencies to use the new repo https://github.com/paritytech/substrate
1 parent d19802d commit 14c8bbc

39 files changed

+744
-200
lines changed

Cargo.lock

+569-59
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ An index is a short and easy-to-remember version of an address. Claiming an inde
1818

1919
The Recovery pallet is an M-of-N social recovery tool for users to gain access to their accounts if the private key or other authentication mechanism is lost. Through this pallet, a user is able to make calls on-behalf-of another account which they have recovered. The recovery process is protected by trusted "friends" whom the original account owner chooses. A threshold (M) out of N friends are needed to give another account access to the recoverable account.
2020

21-
#### [Uniques (NFTs)](https://github.com/paritytech/substrate/tree/master/frame/uniques)
21+
#### [Uniques (NFTs)](https://github.com/paritytech/polkadot-sdk/tree/master/frame/uniques)
2222

2323
A simple, secure module for dealing with non-fungible assets.
2424

@@ -235,7 +235,7 @@ the following:
235235
### Pallets
236236

237237
The runtime in this project is constructed using many FRAME pallets that ship with the
238-
[core Substrate repository](https://github.com/paritytech/substrate/tree/master/frame) and a
238+
[core Substrate repository](https://github.com/paritytech/polkadot-sdk/tree/master/frame) and a
239239
template pallet that is [defined in the `pallets`](./pallets/template/src/lib.rs) directory.
240240

241241
A FRAME pallet is compromised of a number of blockchain primitives:

docs/learning-path.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Now that you have an idea for the environment, dive deeper into both the Rust tr
6565
- [PolkaWallet Flutter SDK](https://github.com/polkawallet-io/sdk)
6666
- [Front End template](https://github.com/substrate-developer-hub/substrate-front-end-template) from Parity
6767

68-
2. Review tooling for data caching and query -[Useful API sidecar](https://github.com/paritytech/substrate-api-sidecar) from Parity -[Awesome Substrate tools section](https://substrate.io/ecosystem/resources/awesome-substrate/#tools)
68+
2. Review tooling for data caching and query -[Useful API sidecar](https://github.com/paritytech/polkadot-sdk-api-sidecar) from Parity -[Awesome Substrate tools section](https://substrate.io/ecosystem/resources/awesome-substrate/#tools)
6969

7070
### Tools and Tips
7171

docs/pallets-review/fruniques.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22

33
## Spawn mechanism
44

5-
Taken from #1
5+
Taken from #1
66

77
`Fruniques` is a stateful pallet. It needs to store additional data to maintain various relationships and state. We need to design/build the data structure for this additional state, as described below.
88

99
There are a few NFT protocols in the Polkadot ecosystem: https://wiki.polkadot.network/docs/learn-nft
1010

11-
Of these, we should build to the [`Uniques` ](https://wiki.polkadot.network/docs/learn-nft#uniques) patterns. It is the implementation from Parity and I believe the most recent. It is the only one compatible with Statemint/Statemine. We can build to multiple protocols if it makes sense, but let's start with `Uniques`.
11+
Of these, we should build to the [`Uniques` ](https://wiki.polkadot.network/docs/learn-nft#uniques) patterns. It is the implementation from Parity and I believe the most recent. It is the only one compatible with Statemint/Statemine. We can build to multiple protocols if it makes sense, but let's start with `Uniques`.
1212

13-
In addition to a regular `Unique`, a [`Frunique`](https://hashed.systems/hashed-chain) needs to store a reference to the parent, a different `Unique`. There also needs to be a heuristic for specifying if metadata is inherited from the parent or not. It seems like Metadata is a set of Key:Value pairs that can be assigned at the `class` level (a group or collection of NFTs) and at the `instance` level (a single NFT).
13+
In addition to a regular `Unique`, a [`Frunique`](https://hashed.systems/hashed-chain) needs to store a reference to the parent, a different `Unique`. There also needs to be a heuristic for specifying if metadata is inherited from the parent or not. It seems like Metadata is a set of Key:Value pairs that can be assigned at the `class` level (a group or collection of NFTs) and at the `instance` level (a single NFT).
1414

15-
Here's the function `set_attribute`:
16-
https://github.com/paritytech/substrate/blob/master/frame/uniques/src/lib.rs#L959
15+
Here's the function `set_attribute`:
16+
https://github.com/paritytech/polkadot-sdk/blob/master/frame/uniques/src/lib.rs#L959
1717

18-
Let's map the cannabis lifecycle.
18+
Let's map the cannabis lifecycle.
1919
> NOTE: the cannabis use case may be able to be implemented with a lighter weight protocol, but it seems like it might be handy to use the same structure
20-
1. Seeds come from a vendor as a package with a count, e.g. 100 seeds in a bag. This bag is an `InstanceId` even though it actually contains 100 seeds.
20+
1. Seeds come from a vendor as a package with a count, e.g. 100 seeds in a bag. This bag is an `InstanceId` even though it actually contains 100 seeds.
2121
2. Seeds that germinate get cubed; others are scrapped.
2222
3. When a seed is cubed, it receives its own `InstanceID` (I've been calling this a `spawn` function) for the first time. The count of seeds that did germinate should be tracked, but not individually, and they are scrapped.
2323
4. Successful cubed seeds become mother plants; perhaps through some iteration or trial/error to discover most productive mother(s).
2424
5. Mother plants produce clones (and may produce flower directly).
25-
7. The parent-->child relationship is well represented as a [Directed Acyclic Graph](https://hazelcast.com/glossary/directed-acyclic-graph), which is what we are building on chain.
25+
7. The parent-->child relationship is well represented as a [Directed Acyclic Graph](https://hazelcast.com/glossary/directed-acyclic-graph), which is what we are building on chain.
2626
8. Clones may be sold directly to clone buyers.
27-
7. Clones produce flower, measured in weight. When flower is harvested, the weight values of the material are recorded as continuous value. So the `InstanceId` would map this specific `bag of weed`, and there would also be a data element for weight.
27+
7. Clones produce flower, measured in weight. When flower is harvested, the weight values of the material are recorded as continuous value. So the `InstanceId` would map this specific `bag of weed`, and there would also be a data element for weight.
2828

29-
The sum of this continuous value for all peers should always equal the continuous value of the parent. This is a critical feature that maintains the economic hierarchy of the NFTs. Tax credits can be subdivided based on this continuous value, but just like the weed, none can be lost or compromised along the way. This feature - the `NFT Rollup` enables many use cases.
29+
The sum of this continuous value for all peers should always equal the continuous value of the parent. This is a critical feature that maintains the economic hierarchy of the NFTs. Tax credits can be subdivided based on this continuous value, but just like the weed, none can be lost or compromised along the way. This feature - the `NFT Rollup` enables many use cases.
3030

3131
9. Flower gets tested, and results are implied across that entire harvest/mother? The test results include a set of files and also a set of values. We need a structure to assign this data/metadata across the appropriate `InstanceIds`.
32-
10. Flower is sold to dispensaries.
32+
10. Flower is sold to dispensaries.
3333

3434
- [ ] Research and prototype a pallet data storage mapping to hold the appropriate data to maintain the hierarchy and enforce the aggregation rules.
3535

pallets/afloat/Cargo.toml

+12-12
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,25 @@ log = "0.4"
1717
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
1818
serde = { version = "1.0.140", default-features = false, features = ["derive"] }
1919
scale-info = { version = "2.5.0", default-features = false, features = [
20-
"derive"
20+
"derive",
2121
] }
22-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
23-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
24-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true }
25-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
26-
pallet-uniques = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
27-
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
28-
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
22+
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
23+
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
24+
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false, optional = true }
25+
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
26+
pallet-uniques = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
27+
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
28+
pallet-timestamp = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
2929
pallet-fruniques = { path = "../fruniques", default-features = false, version = "0.1.0-dev" }
3030
pallet-rbac = { path = "../rbac/", default-features = false, version = "4.0.0-dev" }
3131
pallet-gated-marketplace = { path = "../gated-marketplace/", default-features = false, version = "4.0.0-dev" }
3232
pallet-mapped-assets = { path = "../mapped-assets/", default-features = false, version = "4.0.0-dev" }
3333

3434
[dev-dependencies]
35-
sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
36-
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
37-
sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
38-
sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
35+
sp-core = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0" }
36+
sp-io = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0" }
37+
sp-runtime = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0" }
38+
sp-std = { default-features = false, git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0" }
3939

4040
[features]
4141
default = ["std"]

pallets/afloat/src/functions.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use pallet_gated_marketplace::types::{Marketplace, MarketplaceRole};
77
use sp_runtime::{traits::StaticLookup, Permill};
88
// use frame_support::traits::OriginTrait;
99
use core::convert::TryInto;
10-
use frame_support::{sp_io::hashing::blake2_256, traits::Time};
10+
use frame_support::traits::Time;
1111
use pallet_rbac::types::{IdOrVec, RoleBasedAccessControl, RoleId};
1212
use scale_info::prelude::vec;
13+
use sp_io::hashing::blake2_256;
1314
use sp_runtime::{
1415
sp_std::{str, vec::Vec},
1516
traits::Zero,

pallets/bitcoin-vaults/Cargo.toml

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ codec = { package = "parity-scale-codec", version = "3.6.1", default-features =
1818
serde = { version = "1.0.140", default-features = false, features = ["derive"] }
1919
lite-json = { version = "0.2", default-features = false }
2020
scale-info = { version = "2.5.0", default-features = false, features = [
21-
"derive"
21+
"derive",
2222
] }
23-
frame-support = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
24-
frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
25-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true }
26-
sp-core = { version = "21.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
27-
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
28-
sp-runtime = { version = "24.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
29-
sp-std = { version = "8.0.0", git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
30-
sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true }
23+
frame-support = { version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
24+
frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
25+
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false, optional = true }
26+
sp-core = { version = "21.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
27+
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
28+
sp-runtime = { version = "24.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
29+
sp-std = { version = "8.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
30+
sp-keystore = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false, optional = true }
3131

3232
[dev-dependencies]
33-
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
33+
pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
3434

3535
[features]
3636
default = ["std"]

pallets/bitcoin-vaults/src/functions.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::*;
22
use crate::types::*;
3-
use frame_support::{pallet_prelude::*, sp_io::hashing::blake2_256};
3+
use frame_support::pallet_prelude::*;
44
use frame_system::{
55
offchain::{SendUnsignedTransaction, Signer},
66
pallet_prelude::BlockNumberFor,
@@ -9,6 +9,7 @@ use lite_json::{
99
json::{JsonValue, NumberValue},
1010
parse_json, Serialize as jsonSerialize,
1111
};
12+
use sp_io::hashing::blake2_256;
1213
use sp_runtime::{
1314
offchain::{http, Duration},
1415
sp_std::{str, vec::Vec},

pallets/bitcoin-vaults/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ pub mod pallet {
2020
//#[cfg(feature = "std")]
2121
//use frame_support::serde::{Deserialize, Serialize};
2222
use crate::types::*;
23-
use frame_support::{pallet_prelude::BoundedVec, sp_io::hashing::blake2_256, traits::Get};
23+
use frame_support::{pallet_prelude::BoundedVec, traits::Get};
2424
use frame_system::{
2525
offchain::{AppCrypto, CreateSignedTransaction, SignedPayload, Signer},
2626
pallet_prelude::*,
2727
};
28+
use sp_io::hashing::blake2_256;
2829
use sp_runtime::{
2930
offchain::{
3031
storage_lock::{BlockAndTime, StorageLock},
@@ -45,7 +46,7 @@ pub mod pallet {
4546
pub _config: sp_std::marker::PhantomData<T>,
4647
}
4748

48-
#[cfg(feature = "std")]
49+
// #[cfg(feature = "std")]
4950
impl<T: Config> Default for GenesisConfig<T> {
5051
fn default() -> Self {
5152
Self {

pallets/bitcoin-vaults/src/types.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use super::*;
2-
use frame_support::{pallet_prelude::*, sp_io::hashing::blake2_256};
2+
use frame_support::pallet_prelude::*;
33
use frame_system::offchain::{SignedPayload, SigningTypes};
44
use sp_core::crypto::KeyTypeId;
5+
use sp_io::hashing::blake2_256;
56
use sp_runtime::sp_std::vec::Vec;
67

78
pub type Description<T> = BoundedVec<u8, <T as Config>::VaultDescriptionMaxLen>;

pallets/confidential-docs/Cargo.toml

+8-7
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ targets = ["x86_64-unknown-linux-gnu"]
1515
[dependencies]
1616
codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false }
1717
scale-info = { version = "2.5.0", default-features = false, features = [
18-
"derive"
18+
"derive",
1919
] }
20-
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
21-
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
22-
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true }
20+
frame-support = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
21+
frame-system = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
22+
frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false, optional = true }
23+
sp-io = { version = "23.0.0", git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
2324

2425
[dev-dependencies]
25-
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
26-
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
27-
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false }
26+
sp-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
27+
sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
28+
sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.2.0", default-features = false }
2829

2930
[features]
3031
default = ["std"]

pallets/confidential-docs/src/functions.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use super::*;
2-
use frame_support::{pallet_prelude::*, sp_io::hashing::blake2_256};
2+
use frame_support::pallet_prelude::*;
3+
use sp_io::hashing::blake2_256;
34
//use frame_system::pallet_prelude::*;
45
use crate::types::*;
56

pallets/confidential-docs/src/tests.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use crate::{mock::*, types::*, Error, Event};
22
use codec::Encode;
3-
use frame_support::{assert_noop, assert_ok, sp_io::hashing::blake2_256};
3+
use frame_support::{assert_noop, assert_ok};
44
use frame_system as system;
5+
use sp_io::hashing::blake2_256;
56

67
fn generate_user_id(id: &str) -> UserId {
78
format!("user id: {}", id).using_encoded(blake2_256)

0 commit comments

Comments
 (0)