Skip to content
This repository was archived by the owner on Aug 19, 2020. It is now read-only.

Commit 15efcb8

Browse files
committed
Use crate.parity.io
1 parent 89a31fa commit 15efcb8

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

current/runtime/storage.md

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ information about how these interfaces are implemented.
1919
## Storage Items
2020

2121
The `storage` module in
22-
[FRAME Support](https://substrate.dev/rustdocs/master/frame_support/storage/index.html) gives
22+
[FRAME Support](https://crates.parity.io/frame_support/storage/index.html) gives
2323
runtime developers access to Substrate's flexible storage APIs. Any value that can be encoded by the
2424
[Parity SCALE codec](../advanced/codec) is supported by these storage APIs:
2525

26-
- [Storage Value](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageValue.html) -
26+
- [Storage Value](https://crates.parity.io/frame_support/storage/trait.StorageValue.html) -
2727
A single value
28-
- [Storage Map](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageMap.html) -
28+
- [Storage Map](https://crates.parity.io/frame_support/storage/trait.StorageMap.html) -
2929
A key-value hash map
30-
- [Storage Double Map](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageDoubleMap.html) -
30+
- [Storage Double Map](https://crates.parity.io/frame_support/storage/trait.StorageDoubleMap.html) -
3131
An implementation of a map with two keys that provides the important ability to efficiently remove
3232
all entries that have a common first key
3333

@@ -49,16 +49,16 @@ will stop producing blocks, which means that it will stop functioning.
4949
#### Methods
5050

5151
Refer to the Storage Value documentation for
52-
[a comprehensive list of the methods that Storage Values expose](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageValue.html#required-methods).
52+
[a comprehensive list of the methods that Storage Values expose](https://crates.parity.io/frame_support/storage/trait.StorageValue.html#required-methods).
5353
Some of the most important methods are summarized here:
5454

55-
- [`get()`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageValue.html#tymethod.get) -
55+
- [`get()`](https://crates.parity.io/frame_support/storage/trait.StorageValue.html#tymethod.get) -
5656
Load the value from storage.
57-
- [`put(val)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageValue.html#tymethod.put) -
57+
- [`put(val)`](https://crates.parity.io/frame_support/storage/trait.StorageValue.html#tymethod.put) -
5858
Store the provided value.
59-
- [`mutate(fn)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageValue.html#tymethod.mutate) -
59+
- [`mutate(fn)`](https://crates.parity.io/frame_support/storage/trait.StorageValue.html#tymethod.mutate) -
6060
Mutate the value with the provided function.
61-
- [`take()`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageValue.html#tymethod.take) -
61+
- [`take()`](https://crates.parity.io/frame_support/storage/trait.StorageValue.html#tymethod.take) -
6262
Load the value and remove it from storage.
6363

6464
### Storage Maps
@@ -73,21 +73,21 @@ Storage Maps are implemented.
7373

7474
#### Methods
7575

76-
[Storage Maps expose an API](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageMap.html#required-methods)
76+
[Storage Maps expose an API](https://crates.parity.io/frame_support/storage/trait.StorageMap.html#required-methods)
7777
that is similar to that of Storage Values.
7878

7979
- `get` - Load the value associated with the provided key from storage. Docs:
80-
[`StorageMap#get(key)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageMap.html#tymethod.get),
81-
[`StorageDoubleMap#get(key1, key2)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageDoubleMap.html#tymethod.get)
80+
[`StorageMap#get(key)`](https://crates.parity.io/frame_support/storage/trait.StorageMap.html#tymethod.get),
81+
[`StorageDoubleMap#get(key1, key2)`](https://crates.parity.io/frame_support/storage/trait.StorageDoubleMap.html#tymethod.get)
8282
- `insert` - Store the provided value by associating it with the given key. Docs:
83-
[`StorageMap#insert(key, val)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageMap.html#tymethod.insert),
84-
[`StorageDoubleMap#insert(key1, key2, val)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageDoubleMap.html#tymethod.insert)
83+
[`StorageMap#insert(key, val)`](https://crates.parity.io/frame_support/storage/trait.StorageMap.html#tymethod.insert),
84+
[`StorageDoubleMap#insert(key1, key2, val)`](https://crates.parity.io/frame_support/storage/trait.StorageDoubleMap.html#tymethod.insert)
8585
- `mutate` - Use the provided function to mutate the value associated with the given key. Docs:
86-
[`StorageMap#mutate(key, fn)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageMap.html#tymethod.mutate),
87-
[`StorageDoubleMap#mutate(key1, key2, fn)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageDoubleMap.html#tymethod.mutate)
86+
[`StorageMap#mutate(key, fn)`](https://crates.parity.io/frame_support/storage/trait.StorageMap.html#tymethod.mutate),
87+
[`StorageDoubleMap#mutate(key1, key2, fn)`](https://crates.parity.io/frame_support/storage/trait.StorageDoubleMap.html#tymethod.mutate)
8888
- `take` - Load the value associated with the given key and remove it from storage. Docs:
89-
[`StorageMap#take(key)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageMap.html#tymethod.take),
90-
[`StorageDoubleMap#take(key1, key2)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.StorageDoubleMap.html#tymethod.take)
89+
[`StorageMap#take(key)`](https://crates.parity.io/frame_support/storage/trait.StorageMap.html#tymethod.take),
90+
[`StorageDoubleMap#take(key1, key2)`](https://crates.parity.io/frame_support/storage/trait.StorageDoubleMap.html#tymethod.take)
9191

9292
#### Iterable Storage Maps
9393

@@ -111,16 +111,16 @@ Storage Double Maps, the `iter` and `drain` methods require a parameter, i.e. th
111111

112112
- `iter` - Enumerate all elements in the map in no particular order. If you alter the map while
113113
doing this, you'll get undefined results. Docs:
114-
[`IterableStorageMap#iter()`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.IterableStorageMap.html#tymethod.iter),
115-
[`IterableStorageDoubleMap#iter(key1)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.iter)
114+
[`IterableStorageMap#iter()`](https://crates.parity.io/frame_support/storage/trait.IterableStorageMap.html#tymethod.iter),
115+
[`IterableStorageDoubleMap#iter(key1)`](https://crates.parity.io/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.iter)
116116
- `drain` - Remove all elements from the map and iterate through them in no particular order. If you
117117
add elements to the map while doing this, you'll get undefined results. Docs:
118-
[`IterableStorageMap#drain()`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.IterableStorageMap.html#tymethod.drain),
119-
[`IterableStorageDoubleMap#drain(key1)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.drain)
118+
[`IterableStorageMap#drain()`](https://crates.parity.io/frame_support/storage/trait.IterableStorageMap.html#tymethod.drain),
119+
[`IterableStorageDoubleMap#drain(key1)`](https://crates.parity.io/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.drain)
120120
- `translate` - Use the provided function to translate all elements of the map, in no particular
121121
order. To remove an element from the map, return `None` from the translation function. Docs:
122-
[`IterableStorageMap#translate(fn)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.IterableStorageMap.html#tymethod.translate),
123-
[`IterableStorageDoubleMap#translate(fn)`](https://substrate.dev/rustdocs/master/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.translate)
122+
[`IterableStorageMap#translate(fn)`](https://crates.parity.io/frame_support/storage/trait.IterableStorageMap.html#tymethod.translate),
123+
[`IterableStorageDoubleMap#translate(fn)`](https://crates.parity.io/frame_support/storage/trait.IterableStorageDoubleMap.html#tymethod.translate)
124124

125125
#### Hashing Algorithms
126126

@@ -163,11 +163,11 @@ those that are transparent:
163163

164164
| Hasher | Cryptographic | Transparent |
165165
| ----------------------------------------------------------------------------------------------------- | ------------- | ----------- |
166-
| [Blake2 128](https://substrate.dev/rustdocs/master/frame_support/struct.Blake2_128.html) | X | |
167-
| [TwoX 128](https://substrate.dev/rustdocs/master/frame_support/struct.Twox128.html) | | |
168-
| [Blake2 128 Concat](https://substrate.dev/rustdocs/master/frame_support/struct.Blake2_128Concat.html) | X | X |
169-
| [TwoX 64 Concat](https://substrate.dev/rustdocs/master/frame_support/struct.Twox64Concat.html) | | X |
170-
| [Identity](https://substrate.dev/rustdocs/master/frame_support/struct.Identity.html) | | |
166+
| [Blake2 128](https://crates.parity.io/frame_support/struct.Blake2_128.html) | X | |
167+
| [TwoX 128](https://crates.parity.io/frame_support/struct.Twox128.html) | | |
168+
| [Blake2 128 Concat](https://crates.parity.io/frame_support/struct.Blake2_128Concat.html) | X | X |
169+
| [TwoX 64 Concat](https://crates.parity.io/frame_support/struct.Twox64Concat.html) | | X |
170+
| [Identity](https://crates.parity.io/frame_support/struct.Identity.html) | | |
171171

172172
The Identity hasher encapsulates a hashing algorithm that has an output equal to its input (the
173173
identity function). This type of hasher should only be used when the starting key is already a
@@ -176,7 +176,7 @@ cryptographic hash.
176176
## Declaring Storage Items
177177

178178
You can use
179-
[the `decl_storage` macro](https://substrate.dev/rustdocs/master/frame_support/macro.decl_storage.html)
179+
[the `decl_storage` macro](https://crates.parity.io/frame_support/macro.decl_storage.html)
180180
to easily create new runtime storage items. Here is an example of what it looks like to declare each
181181
type of storage item:
182182

@@ -247,7 +247,7 @@ decl_storage! {
247247
### Genesis Config
248248

249249
You can define
250-
[an optional `GenesisConfig`](https://substrate.dev/rustdocs/master/frame_support/macro.decl_storage.html#genesisconfig)
250+
[an optional `GenesisConfig`](https://crates.parity.io/frame_support/macro.decl_storage.html#genesisconfig)
251251
struct in order to initialize storage items in the genesis block of your blockchain.
252252

253253
// TODO
@@ -358,7 +358,7 @@ Check out
358358
### References
359359

360360
- Visit the reference docs for the
361-
[`decl_storage!` macro](https://substrate.dev/rustdocs/master/frame_support/macro.decl_storage.html)
361+
[`decl_storage!` macro](https://crates.parity.io/frame_support/macro.decl_storage.html)
362362
for more details about the available storage declarations.
363363

364364
- Visit the reference docs for

0 commit comments

Comments
 (0)